@google-cloud/storage-control 0.5.0 → 0.6.1

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.
@@ -857,6 +857,105 @@
857
857
  * @variation 2
858
858
  */
859
859
 
860
+ /**
861
+ * Callback as used by {@link google.storage.control.v2.StorageControl|getIamPolicy}.
862
+ * @memberof google.storage.control.v2.StorageControl
863
+ * @typedef GetIamPolicyCallback
864
+ * @type {function}
865
+ * @param {Error|null} error Error, if any
866
+ * @param {google.iam.v1.Policy} [response] Policy
867
+ */
868
+
869
+ /**
870
+ * Calls GetIamPolicy.
871
+ * @function getIamPolicy
872
+ * @memberof google.storage.control.v2.StorageControl
873
+ * @instance
874
+ * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object
875
+ * @param {google.storage.control.v2.StorageControl.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy
876
+ * @returns {undefined}
877
+ * @variation 1
878
+ */
879
+ Object.defineProperty(StorageControl.prototype.getIamPolicy = function getIamPolicy(request, callback) {
880
+ return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback);
881
+ }, "name", { value: "GetIamPolicy" });
882
+
883
+ /**
884
+ * Calls GetIamPolicy.
885
+ * @function getIamPolicy
886
+ * @memberof google.storage.control.v2.StorageControl
887
+ * @instance
888
+ * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object
889
+ * @returns {Promise<google.iam.v1.Policy>} Promise
890
+ * @variation 2
891
+ */
892
+
893
+ /**
894
+ * Callback as used by {@link google.storage.control.v2.StorageControl|setIamPolicy}.
895
+ * @memberof google.storage.control.v2.StorageControl
896
+ * @typedef SetIamPolicyCallback
897
+ * @type {function}
898
+ * @param {Error|null} error Error, if any
899
+ * @param {google.iam.v1.Policy} [response] Policy
900
+ */
901
+
902
+ /**
903
+ * Calls SetIamPolicy.
904
+ * @function setIamPolicy
905
+ * @memberof google.storage.control.v2.StorageControl
906
+ * @instance
907
+ * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object
908
+ * @param {google.storage.control.v2.StorageControl.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy
909
+ * @returns {undefined}
910
+ * @variation 1
911
+ */
912
+ Object.defineProperty(StorageControl.prototype.setIamPolicy = function setIamPolicy(request, callback) {
913
+ return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback);
914
+ }, "name", { value: "SetIamPolicy" });
915
+
916
+ /**
917
+ * Calls SetIamPolicy.
918
+ * @function setIamPolicy
919
+ * @memberof google.storage.control.v2.StorageControl
920
+ * @instance
921
+ * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object
922
+ * @returns {Promise<google.iam.v1.Policy>} Promise
923
+ * @variation 2
924
+ */
925
+
926
+ /**
927
+ * Callback as used by {@link google.storage.control.v2.StorageControl|testIamPermissions}.
928
+ * @memberof google.storage.control.v2.StorageControl
929
+ * @typedef TestIamPermissionsCallback
930
+ * @type {function}
931
+ * @param {Error|null} error Error, if any
932
+ * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse
933
+ */
934
+
935
+ /**
936
+ * Calls TestIamPermissions.
937
+ * @function testIamPermissions
938
+ * @memberof google.storage.control.v2.StorageControl
939
+ * @instance
940
+ * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object
941
+ * @param {google.storage.control.v2.StorageControl.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse
942
+ * @returns {undefined}
943
+ * @variation 1
944
+ */
945
+ Object.defineProperty(StorageControl.prototype.testIamPermissions = function testIamPermissions(request, callback) {
946
+ return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback);
947
+ }, "name", { value: "TestIamPermissions" });
948
+
949
+ /**
950
+ * Calls TestIamPermissions.
951
+ * @function testIamPermissions
952
+ * @memberof google.storage.control.v2.StorageControl
953
+ * @instance
954
+ * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object
955
+ * @returns {Promise<google.iam.v1.TestIamPermissionsResponse>} Promise
956
+ * @variation 2
957
+ */
958
+
860
959
  return StorageControl;
861
960
  })();
862
961
 
@@ -31571,25 +31670,25 @@
31571
31670
  return Duration;
31572
31671
  })();
31573
31672
 
31574
- protobuf.Any = (function() {
31673
+ protobuf.FieldMask = (function() {
31575
31674
 
31576
31675
  /**
31577
- * Properties of an Any.
31676
+ * Properties of a FieldMask.
31578
31677
  * @memberof google.protobuf
31579
- * @interface IAny
31580
- * @property {string|null} [type_url] Any type_url
31581
- * @property {Uint8Array|null} [value] Any value
31678
+ * @interface IFieldMask
31679
+ * @property {Array.<string>|null} [paths] FieldMask paths
31582
31680
  */
31583
31681
 
31584
31682
  /**
31585
- * Constructs a new Any.
31683
+ * Constructs a new FieldMask.
31586
31684
  * @memberof google.protobuf
31587
- * @classdesc Represents an Any.
31588
- * @implements IAny
31685
+ * @classdesc Represents a FieldMask.
31686
+ * @implements IFieldMask
31589
31687
  * @constructor
31590
- * @param {google.protobuf.IAny=} [properties] Properties to set
31688
+ * @param {google.protobuf.IFieldMask=} [properties] Properties to set
31591
31689
  */
31592
- function Any(properties) {
31690
+ function FieldMask(properties) {
31691
+ this.paths = [];
31593
31692
  if (properties)
31594
31693
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
31595
31694
  if (properties[keys[i]] != null)
@@ -31597,91 +31696,80 @@
31597
31696
  }
31598
31697
 
31599
31698
  /**
31600
- * Any type_url.
31601
- * @member {string} type_url
31602
- * @memberof google.protobuf.Any
31603
- * @instance
31604
- */
31605
- Any.prototype.type_url = "";
31606
-
31607
- /**
31608
- * Any value.
31609
- * @member {Uint8Array} value
31610
- * @memberof google.protobuf.Any
31699
+ * FieldMask paths.
31700
+ * @member {Array.<string>} paths
31701
+ * @memberof google.protobuf.FieldMask
31611
31702
  * @instance
31612
31703
  */
31613
- Any.prototype.value = $util.newBuffer([]);
31704
+ FieldMask.prototype.paths = $util.emptyArray;
31614
31705
 
31615
31706
  /**
31616
- * Creates a new Any instance using the specified properties.
31707
+ * Creates a new FieldMask instance using the specified properties.
31617
31708
  * @function create
31618
- * @memberof google.protobuf.Any
31709
+ * @memberof google.protobuf.FieldMask
31619
31710
  * @static
31620
- * @param {google.protobuf.IAny=} [properties] Properties to set
31621
- * @returns {google.protobuf.Any} Any instance
31711
+ * @param {google.protobuf.IFieldMask=} [properties] Properties to set
31712
+ * @returns {google.protobuf.FieldMask} FieldMask instance
31622
31713
  */
31623
- Any.create = function create(properties) {
31624
- return new Any(properties);
31714
+ FieldMask.create = function create(properties) {
31715
+ return new FieldMask(properties);
31625
31716
  };
31626
31717
 
31627
31718
  /**
31628
- * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
31719
+ * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
31629
31720
  * @function encode
31630
- * @memberof google.protobuf.Any
31721
+ * @memberof google.protobuf.FieldMask
31631
31722
  * @static
31632
- * @param {google.protobuf.IAny} message Any message or plain object to encode
31723
+ * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode
31633
31724
  * @param {$protobuf.Writer} [writer] Writer to encode to
31634
31725
  * @returns {$protobuf.Writer} Writer
31635
31726
  */
31636
- Any.encode = function encode(message, writer) {
31727
+ FieldMask.encode = function encode(message, writer) {
31637
31728
  if (!writer)
31638
31729
  writer = $Writer.create();
31639
- if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url"))
31640
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url);
31641
- if (message.value != null && Object.hasOwnProperty.call(message, "value"))
31642
- writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value);
31730
+ if (message.paths != null && message.paths.length)
31731
+ for (var i = 0; i < message.paths.length; ++i)
31732
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]);
31643
31733
  return writer;
31644
31734
  };
31645
31735
 
31646
31736
  /**
31647
- * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
31737
+ * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
31648
31738
  * @function encodeDelimited
31649
- * @memberof google.protobuf.Any
31739
+ * @memberof google.protobuf.FieldMask
31650
31740
  * @static
31651
- * @param {google.protobuf.IAny} message Any message or plain object to encode
31741
+ * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode
31652
31742
  * @param {$protobuf.Writer} [writer] Writer to encode to
31653
31743
  * @returns {$protobuf.Writer} Writer
31654
31744
  */
31655
- Any.encodeDelimited = function encodeDelimited(message, writer) {
31745
+ FieldMask.encodeDelimited = function encodeDelimited(message, writer) {
31656
31746
  return this.encode(message, writer).ldelim();
31657
31747
  };
31658
31748
 
31659
31749
  /**
31660
- * Decodes an Any message from the specified reader or buffer.
31750
+ * Decodes a FieldMask message from the specified reader or buffer.
31661
31751
  * @function decode
31662
- * @memberof google.protobuf.Any
31752
+ * @memberof google.protobuf.FieldMask
31663
31753
  * @static
31664
31754
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
31665
31755
  * @param {number} [length] Message length if known beforehand
31666
- * @returns {google.protobuf.Any} Any
31756
+ * @returns {google.protobuf.FieldMask} FieldMask
31667
31757
  * @throws {Error} If the payload is not a reader or valid buffer
31668
31758
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
31669
31759
  */
31670
- Any.decode = function decode(reader, length, error) {
31760
+ FieldMask.decode = function decode(reader, length, error) {
31671
31761
  if (!(reader instanceof $Reader))
31672
31762
  reader = $Reader.create(reader);
31673
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any();
31763
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask();
31674
31764
  while (reader.pos < end) {
31675
31765
  var tag = reader.uint32();
31676
31766
  if (tag === error)
31677
31767
  break;
31678
31768
  switch (tag >>> 3) {
31679
31769
  case 1: {
31680
- message.type_url = reader.string();
31681
- break;
31682
- }
31683
- case 2: {
31684
- message.value = reader.bytes();
31770
+ if (!(message.paths && message.paths.length))
31771
+ message.paths = [];
31772
+ message.paths.push(reader.string());
31685
31773
  break;
31686
31774
  }
31687
31775
  default:
@@ -31693,139 +31781,135 @@
31693
31781
  };
31694
31782
 
31695
31783
  /**
31696
- * Decodes an Any message from the specified reader or buffer, length delimited.
31784
+ * Decodes a FieldMask message from the specified reader or buffer, length delimited.
31697
31785
  * @function decodeDelimited
31698
- * @memberof google.protobuf.Any
31786
+ * @memberof google.protobuf.FieldMask
31699
31787
  * @static
31700
31788
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
31701
- * @returns {google.protobuf.Any} Any
31789
+ * @returns {google.protobuf.FieldMask} FieldMask
31702
31790
  * @throws {Error} If the payload is not a reader or valid buffer
31703
31791
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
31704
31792
  */
31705
- Any.decodeDelimited = function decodeDelimited(reader) {
31793
+ FieldMask.decodeDelimited = function decodeDelimited(reader) {
31706
31794
  if (!(reader instanceof $Reader))
31707
31795
  reader = new $Reader(reader);
31708
31796
  return this.decode(reader, reader.uint32());
31709
31797
  };
31710
31798
 
31711
31799
  /**
31712
- * Verifies an Any message.
31800
+ * Verifies a FieldMask message.
31713
31801
  * @function verify
31714
- * @memberof google.protobuf.Any
31802
+ * @memberof google.protobuf.FieldMask
31715
31803
  * @static
31716
31804
  * @param {Object.<string,*>} message Plain object to verify
31717
31805
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
31718
31806
  */
31719
- Any.verify = function verify(message) {
31807
+ FieldMask.verify = function verify(message) {
31720
31808
  if (typeof message !== "object" || message === null)
31721
31809
  return "object expected";
31722
- if (message.type_url != null && message.hasOwnProperty("type_url"))
31723
- if (!$util.isString(message.type_url))
31724
- return "type_url: string expected";
31725
- if (message.value != null && message.hasOwnProperty("value"))
31726
- if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
31727
- return "value: buffer expected";
31810
+ if (message.paths != null && message.hasOwnProperty("paths")) {
31811
+ if (!Array.isArray(message.paths))
31812
+ return "paths: array expected";
31813
+ for (var i = 0; i < message.paths.length; ++i)
31814
+ if (!$util.isString(message.paths[i]))
31815
+ return "paths: string[] expected";
31816
+ }
31728
31817
  return null;
31729
31818
  };
31730
31819
 
31731
31820
  /**
31732
- * Creates an Any message from a plain object. Also converts values to their respective internal types.
31821
+ * Creates a FieldMask message from a plain object. Also converts values to their respective internal types.
31733
31822
  * @function fromObject
31734
- * @memberof google.protobuf.Any
31823
+ * @memberof google.protobuf.FieldMask
31735
31824
  * @static
31736
31825
  * @param {Object.<string,*>} object Plain object
31737
- * @returns {google.protobuf.Any} Any
31826
+ * @returns {google.protobuf.FieldMask} FieldMask
31738
31827
  */
31739
- Any.fromObject = function fromObject(object) {
31740
- if (object instanceof $root.google.protobuf.Any)
31828
+ FieldMask.fromObject = function fromObject(object) {
31829
+ if (object instanceof $root.google.protobuf.FieldMask)
31741
31830
  return object;
31742
- var message = new $root.google.protobuf.Any();
31743
- if (object.type_url != null)
31744
- message.type_url = String(object.type_url);
31745
- if (object.value != null)
31746
- if (typeof object.value === "string")
31747
- $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
31748
- else if (object.value.length >= 0)
31749
- message.value = object.value;
31831
+ var message = new $root.google.protobuf.FieldMask();
31832
+ if (object.paths) {
31833
+ if (!Array.isArray(object.paths))
31834
+ throw TypeError(".google.protobuf.FieldMask.paths: array expected");
31835
+ message.paths = [];
31836
+ for (var i = 0; i < object.paths.length; ++i)
31837
+ message.paths[i] = String(object.paths[i]);
31838
+ }
31750
31839
  return message;
31751
31840
  };
31752
31841
 
31753
31842
  /**
31754
- * Creates a plain object from an Any message. Also converts values to other types if specified.
31843
+ * Creates a plain object from a FieldMask message. Also converts values to other types if specified.
31755
31844
  * @function toObject
31756
- * @memberof google.protobuf.Any
31845
+ * @memberof google.protobuf.FieldMask
31757
31846
  * @static
31758
- * @param {google.protobuf.Any} message Any
31847
+ * @param {google.protobuf.FieldMask} message FieldMask
31759
31848
  * @param {$protobuf.IConversionOptions} [options] Conversion options
31760
31849
  * @returns {Object.<string,*>} Plain object
31761
31850
  */
31762
- Any.toObject = function toObject(message, options) {
31851
+ FieldMask.toObject = function toObject(message, options) {
31763
31852
  if (!options)
31764
31853
  options = {};
31765
31854
  var object = {};
31766
- if (options.defaults) {
31767
- object.type_url = "";
31768
- if (options.bytes === String)
31769
- object.value = "";
31770
- else {
31771
- object.value = [];
31772
- if (options.bytes !== Array)
31773
- object.value = $util.newBuffer(object.value);
31774
- }
31855
+ if (options.arrays || options.defaults)
31856
+ object.paths = [];
31857
+ if (message.paths && message.paths.length) {
31858
+ object.paths = [];
31859
+ for (var j = 0; j < message.paths.length; ++j)
31860
+ object.paths[j] = message.paths[j];
31775
31861
  }
31776
- if (message.type_url != null && message.hasOwnProperty("type_url"))
31777
- object.type_url = message.type_url;
31778
- if (message.value != null && message.hasOwnProperty("value"))
31779
- object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
31780
31862
  return object;
31781
31863
  };
31782
31864
 
31783
31865
  /**
31784
- * Converts this Any to JSON.
31866
+ * Converts this FieldMask to JSON.
31785
31867
  * @function toJSON
31786
- * @memberof google.protobuf.Any
31868
+ * @memberof google.protobuf.FieldMask
31787
31869
  * @instance
31788
31870
  * @returns {Object.<string,*>} JSON object
31789
31871
  */
31790
- Any.prototype.toJSON = function toJSON() {
31872
+ FieldMask.prototype.toJSON = function toJSON() {
31791
31873
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
31792
31874
  };
31793
31875
 
31794
31876
  /**
31795
- * Gets the default type url for Any
31877
+ * Gets the default type url for FieldMask
31796
31878
  * @function getTypeUrl
31797
- * @memberof google.protobuf.Any
31879
+ * @memberof google.protobuf.FieldMask
31798
31880
  * @static
31799
31881
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
31800
31882
  * @returns {string} The default type url
31801
31883
  */
31802
- Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
31884
+ FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
31803
31885
  if (typeUrlPrefix === undefined) {
31804
31886
  typeUrlPrefix = "type.googleapis.com";
31805
31887
  }
31806
- return typeUrlPrefix + "/google.protobuf.Any";
31888
+ return typeUrlPrefix + "/google.protobuf.FieldMask";
31807
31889
  };
31808
31890
 
31809
- return Any;
31891
+ return FieldMask;
31810
31892
  })();
31811
31893
 
31812
- protobuf.Empty = (function() {
31894
+ protobuf.Any = (function() {
31813
31895
 
31814
31896
  /**
31815
- * Properties of an Empty.
31897
+ * Properties of an Any.
31816
31898
  * @memberof google.protobuf
31817
- * @interface IEmpty
31899
+ * @interface IAny
31900
+ * @property {string|null} [type_url] Any type_url
31901
+ * @property {Uint8Array|null} [value] Any value
31818
31902
  */
31819
31903
 
31820
31904
  /**
31821
- * Constructs a new Empty.
31905
+ * Constructs a new Any.
31822
31906
  * @memberof google.protobuf
31823
- * @classdesc Represents an Empty.
31824
- * @implements IEmpty
31907
+ * @classdesc Represents an Any.
31908
+ * @implements IAny
31825
31909
  * @constructor
31826
- * @param {google.protobuf.IEmpty=} [properties] Properties to set
31910
+ * @param {google.protobuf.IAny=} [properties] Properties to set
31827
31911
  */
31828
- function Empty(properties) {
31912
+ function Any(properties) {
31829
31913
  if (properties)
31830
31914
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
31831
31915
  if (properties[keys[i]] != null)
@@ -31833,65 +31917,93 @@
31833
31917
  }
31834
31918
 
31835
31919
  /**
31836
- * Creates a new Empty instance using the specified properties.
31920
+ * Any type_url.
31921
+ * @member {string} type_url
31922
+ * @memberof google.protobuf.Any
31923
+ * @instance
31924
+ */
31925
+ Any.prototype.type_url = "";
31926
+
31927
+ /**
31928
+ * Any value.
31929
+ * @member {Uint8Array} value
31930
+ * @memberof google.protobuf.Any
31931
+ * @instance
31932
+ */
31933
+ Any.prototype.value = $util.newBuffer([]);
31934
+
31935
+ /**
31936
+ * Creates a new Any instance using the specified properties.
31837
31937
  * @function create
31838
- * @memberof google.protobuf.Empty
31938
+ * @memberof google.protobuf.Any
31839
31939
  * @static
31840
- * @param {google.protobuf.IEmpty=} [properties] Properties to set
31841
- * @returns {google.protobuf.Empty} Empty instance
31940
+ * @param {google.protobuf.IAny=} [properties] Properties to set
31941
+ * @returns {google.protobuf.Any} Any instance
31842
31942
  */
31843
- Empty.create = function create(properties) {
31844
- return new Empty(properties);
31943
+ Any.create = function create(properties) {
31944
+ return new Any(properties);
31845
31945
  };
31846
31946
 
31847
31947
  /**
31848
- * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages.
31948
+ * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
31849
31949
  * @function encode
31850
- * @memberof google.protobuf.Empty
31950
+ * @memberof google.protobuf.Any
31851
31951
  * @static
31852
- * @param {google.protobuf.IEmpty} message Empty message or plain object to encode
31952
+ * @param {google.protobuf.IAny} message Any message or plain object to encode
31853
31953
  * @param {$protobuf.Writer} [writer] Writer to encode to
31854
31954
  * @returns {$protobuf.Writer} Writer
31855
31955
  */
31856
- Empty.encode = function encode(message, writer) {
31956
+ Any.encode = function encode(message, writer) {
31857
31957
  if (!writer)
31858
31958
  writer = $Writer.create();
31959
+ if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url"))
31960
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url);
31961
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
31962
+ writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value);
31859
31963
  return writer;
31860
31964
  };
31861
31965
 
31862
31966
  /**
31863
- * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages.
31967
+ * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
31864
31968
  * @function encodeDelimited
31865
- * @memberof google.protobuf.Empty
31969
+ * @memberof google.protobuf.Any
31866
31970
  * @static
31867
- * @param {google.protobuf.IEmpty} message Empty message or plain object to encode
31971
+ * @param {google.protobuf.IAny} message Any message or plain object to encode
31868
31972
  * @param {$protobuf.Writer} [writer] Writer to encode to
31869
31973
  * @returns {$protobuf.Writer} Writer
31870
31974
  */
31871
- Empty.encodeDelimited = function encodeDelimited(message, writer) {
31975
+ Any.encodeDelimited = function encodeDelimited(message, writer) {
31872
31976
  return this.encode(message, writer).ldelim();
31873
31977
  };
31874
31978
 
31875
31979
  /**
31876
- * Decodes an Empty message from the specified reader or buffer.
31980
+ * Decodes an Any message from the specified reader or buffer.
31877
31981
  * @function decode
31878
- * @memberof google.protobuf.Empty
31982
+ * @memberof google.protobuf.Any
31879
31983
  * @static
31880
31984
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
31881
31985
  * @param {number} [length] Message length if known beforehand
31882
- * @returns {google.protobuf.Empty} Empty
31986
+ * @returns {google.protobuf.Any} Any
31883
31987
  * @throws {Error} If the payload is not a reader or valid buffer
31884
31988
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
31885
31989
  */
31886
- Empty.decode = function decode(reader, length, error) {
31990
+ Any.decode = function decode(reader, length, error) {
31887
31991
  if (!(reader instanceof $Reader))
31888
31992
  reader = $Reader.create(reader);
31889
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty();
31993
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any();
31890
31994
  while (reader.pos < end) {
31891
31995
  var tag = reader.uint32();
31892
31996
  if (tag === error)
31893
31997
  break;
31894
31998
  switch (tag >>> 3) {
31999
+ case 1: {
32000
+ message.type_url = reader.string();
32001
+ break;
32002
+ }
32003
+ case 2: {
32004
+ message.value = reader.bytes();
32005
+ break;
32006
+ }
31895
32007
  default:
31896
32008
  reader.skipType(tag & 7);
31897
32009
  break;
@@ -31901,110 +32013,139 @@
31901
32013
  };
31902
32014
 
31903
32015
  /**
31904
- * Decodes an Empty message from the specified reader or buffer, length delimited.
32016
+ * Decodes an Any message from the specified reader or buffer, length delimited.
31905
32017
  * @function decodeDelimited
31906
- * @memberof google.protobuf.Empty
32018
+ * @memberof google.protobuf.Any
31907
32019
  * @static
31908
32020
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
31909
- * @returns {google.protobuf.Empty} Empty
32021
+ * @returns {google.protobuf.Any} Any
31910
32022
  * @throws {Error} If the payload is not a reader or valid buffer
31911
32023
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
31912
32024
  */
31913
- Empty.decodeDelimited = function decodeDelimited(reader) {
32025
+ Any.decodeDelimited = function decodeDelimited(reader) {
31914
32026
  if (!(reader instanceof $Reader))
31915
32027
  reader = new $Reader(reader);
31916
32028
  return this.decode(reader, reader.uint32());
31917
32029
  };
31918
32030
 
31919
32031
  /**
31920
- * Verifies an Empty message.
32032
+ * Verifies an Any message.
31921
32033
  * @function verify
31922
- * @memberof google.protobuf.Empty
32034
+ * @memberof google.protobuf.Any
31923
32035
  * @static
31924
32036
  * @param {Object.<string,*>} message Plain object to verify
31925
32037
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
31926
32038
  */
31927
- Empty.verify = function verify(message) {
32039
+ Any.verify = function verify(message) {
31928
32040
  if (typeof message !== "object" || message === null)
31929
32041
  return "object expected";
32042
+ if (message.type_url != null && message.hasOwnProperty("type_url"))
32043
+ if (!$util.isString(message.type_url))
32044
+ return "type_url: string expected";
32045
+ if (message.value != null && message.hasOwnProperty("value"))
32046
+ if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
32047
+ return "value: buffer expected";
31930
32048
  return null;
31931
32049
  };
31932
32050
 
31933
32051
  /**
31934
- * Creates an Empty message from a plain object. Also converts values to their respective internal types.
32052
+ * Creates an Any message from a plain object. Also converts values to their respective internal types.
31935
32053
  * @function fromObject
31936
- * @memberof google.protobuf.Empty
32054
+ * @memberof google.protobuf.Any
31937
32055
  * @static
31938
32056
  * @param {Object.<string,*>} object Plain object
31939
- * @returns {google.protobuf.Empty} Empty
32057
+ * @returns {google.protobuf.Any} Any
31940
32058
  */
31941
- Empty.fromObject = function fromObject(object) {
31942
- if (object instanceof $root.google.protobuf.Empty)
32059
+ Any.fromObject = function fromObject(object) {
32060
+ if (object instanceof $root.google.protobuf.Any)
31943
32061
  return object;
31944
- return new $root.google.protobuf.Empty();
32062
+ var message = new $root.google.protobuf.Any();
32063
+ if (object.type_url != null)
32064
+ message.type_url = String(object.type_url);
32065
+ if (object.value != null)
32066
+ if (typeof object.value === "string")
32067
+ $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
32068
+ else if (object.value.length >= 0)
32069
+ message.value = object.value;
32070
+ return message;
31945
32071
  };
31946
32072
 
31947
32073
  /**
31948
- * Creates a plain object from an Empty message. Also converts values to other types if specified.
32074
+ * Creates a plain object from an Any message. Also converts values to other types if specified.
31949
32075
  * @function toObject
31950
- * @memberof google.protobuf.Empty
32076
+ * @memberof google.protobuf.Any
31951
32077
  * @static
31952
- * @param {google.protobuf.Empty} message Empty
32078
+ * @param {google.protobuf.Any} message Any
31953
32079
  * @param {$protobuf.IConversionOptions} [options] Conversion options
31954
32080
  * @returns {Object.<string,*>} Plain object
31955
32081
  */
31956
- Empty.toObject = function toObject() {
31957
- return {};
32082
+ Any.toObject = function toObject(message, options) {
32083
+ if (!options)
32084
+ options = {};
32085
+ var object = {};
32086
+ if (options.defaults) {
32087
+ object.type_url = "";
32088
+ if (options.bytes === String)
32089
+ object.value = "";
32090
+ else {
32091
+ object.value = [];
32092
+ if (options.bytes !== Array)
32093
+ object.value = $util.newBuffer(object.value);
32094
+ }
32095
+ }
32096
+ if (message.type_url != null && message.hasOwnProperty("type_url"))
32097
+ object.type_url = message.type_url;
32098
+ if (message.value != null && message.hasOwnProperty("value"))
32099
+ object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
32100
+ return object;
31958
32101
  };
31959
32102
 
31960
32103
  /**
31961
- * Converts this Empty to JSON.
32104
+ * Converts this Any to JSON.
31962
32105
  * @function toJSON
31963
- * @memberof google.protobuf.Empty
32106
+ * @memberof google.protobuf.Any
31964
32107
  * @instance
31965
32108
  * @returns {Object.<string,*>} JSON object
31966
32109
  */
31967
- Empty.prototype.toJSON = function toJSON() {
32110
+ Any.prototype.toJSON = function toJSON() {
31968
32111
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
31969
32112
  };
31970
32113
 
31971
32114
  /**
31972
- * Gets the default type url for Empty
32115
+ * Gets the default type url for Any
31973
32116
  * @function getTypeUrl
31974
- * @memberof google.protobuf.Empty
32117
+ * @memberof google.protobuf.Any
31975
32118
  * @static
31976
32119
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
31977
32120
  * @returns {string} The default type url
31978
32121
  */
31979
- Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
32122
+ Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
31980
32123
  if (typeUrlPrefix === undefined) {
31981
32124
  typeUrlPrefix = "type.googleapis.com";
31982
32125
  }
31983
- return typeUrlPrefix + "/google.protobuf.Empty";
32126
+ return typeUrlPrefix + "/google.protobuf.Any";
31984
32127
  };
31985
32128
 
31986
- return Empty;
32129
+ return Any;
31987
32130
  })();
31988
32131
 
31989
- protobuf.FieldMask = (function() {
32132
+ protobuf.Empty = (function() {
31990
32133
 
31991
32134
  /**
31992
- * Properties of a FieldMask.
32135
+ * Properties of an Empty.
31993
32136
  * @memberof google.protobuf
31994
- * @interface IFieldMask
31995
- * @property {Array.<string>|null} [paths] FieldMask paths
32137
+ * @interface IEmpty
31996
32138
  */
31997
32139
 
31998
32140
  /**
31999
- * Constructs a new FieldMask.
32141
+ * Constructs a new Empty.
32000
32142
  * @memberof google.protobuf
32001
- * @classdesc Represents a FieldMask.
32002
- * @implements IFieldMask
32143
+ * @classdesc Represents an Empty.
32144
+ * @implements IEmpty
32003
32145
  * @constructor
32004
- * @param {google.protobuf.IFieldMask=} [properties] Properties to set
32146
+ * @param {google.protobuf.IEmpty=} [properties] Properties to set
32005
32147
  */
32006
- function FieldMask(properties) {
32007
- this.paths = [];
32148
+ function Empty(properties) {
32008
32149
  if (properties)
32009
32150
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
32010
32151
  if (properties[keys[i]] != null)
@@ -32012,82 +32153,65 @@
32012
32153
  }
32013
32154
 
32014
32155
  /**
32015
- * FieldMask paths.
32016
- * @member {Array.<string>} paths
32017
- * @memberof google.protobuf.FieldMask
32018
- * @instance
32019
- */
32020
- FieldMask.prototype.paths = $util.emptyArray;
32021
-
32022
- /**
32023
- * Creates a new FieldMask instance using the specified properties.
32156
+ * Creates a new Empty instance using the specified properties.
32024
32157
  * @function create
32025
- * @memberof google.protobuf.FieldMask
32158
+ * @memberof google.protobuf.Empty
32026
32159
  * @static
32027
- * @param {google.protobuf.IFieldMask=} [properties] Properties to set
32028
- * @returns {google.protobuf.FieldMask} FieldMask instance
32160
+ * @param {google.protobuf.IEmpty=} [properties] Properties to set
32161
+ * @returns {google.protobuf.Empty} Empty instance
32029
32162
  */
32030
- FieldMask.create = function create(properties) {
32031
- return new FieldMask(properties);
32163
+ Empty.create = function create(properties) {
32164
+ return new Empty(properties);
32032
32165
  };
32033
32166
 
32034
32167
  /**
32035
- * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
32168
+ * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages.
32036
32169
  * @function encode
32037
- * @memberof google.protobuf.FieldMask
32170
+ * @memberof google.protobuf.Empty
32038
32171
  * @static
32039
- * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode
32172
+ * @param {google.protobuf.IEmpty} message Empty message or plain object to encode
32040
32173
  * @param {$protobuf.Writer} [writer] Writer to encode to
32041
32174
  * @returns {$protobuf.Writer} Writer
32042
32175
  */
32043
- FieldMask.encode = function encode(message, writer) {
32176
+ Empty.encode = function encode(message, writer) {
32044
32177
  if (!writer)
32045
32178
  writer = $Writer.create();
32046
- if (message.paths != null && message.paths.length)
32047
- for (var i = 0; i < message.paths.length; ++i)
32048
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]);
32049
32179
  return writer;
32050
32180
  };
32051
32181
 
32052
32182
  /**
32053
- * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
32183
+ * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages.
32054
32184
  * @function encodeDelimited
32055
- * @memberof google.protobuf.FieldMask
32185
+ * @memberof google.protobuf.Empty
32056
32186
  * @static
32057
- * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode
32187
+ * @param {google.protobuf.IEmpty} message Empty message or plain object to encode
32058
32188
  * @param {$protobuf.Writer} [writer] Writer to encode to
32059
32189
  * @returns {$protobuf.Writer} Writer
32060
32190
  */
32061
- FieldMask.encodeDelimited = function encodeDelimited(message, writer) {
32191
+ Empty.encodeDelimited = function encodeDelimited(message, writer) {
32062
32192
  return this.encode(message, writer).ldelim();
32063
32193
  };
32064
32194
 
32065
32195
  /**
32066
- * Decodes a FieldMask message from the specified reader or buffer.
32196
+ * Decodes an Empty message from the specified reader or buffer.
32067
32197
  * @function decode
32068
- * @memberof google.protobuf.FieldMask
32198
+ * @memberof google.protobuf.Empty
32069
32199
  * @static
32070
32200
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
32071
32201
  * @param {number} [length] Message length if known beforehand
32072
- * @returns {google.protobuf.FieldMask} FieldMask
32202
+ * @returns {google.protobuf.Empty} Empty
32073
32203
  * @throws {Error} If the payload is not a reader or valid buffer
32074
32204
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
32075
32205
  */
32076
- FieldMask.decode = function decode(reader, length, error) {
32206
+ Empty.decode = function decode(reader, length, error) {
32077
32207
  if (!(reader instanceof $Reader))
32078
32208
  reader = $Reader.create(reader);
32079
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask();
32209
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty();
32080
32210
  while (reader.pos < end) {
32081
32211
  var tag = reader.uint32();
32082
32212
  if (tag === error)
32083
32213
  break;
32084
32214
  switch (tag >>> 3) {
32085
- case 1: {
32086
- if (!(message.paths && message.paths.length))
32087
- message.paths = [];
32088
- message.paths.push(reader.string());
32089
- break;
32090
- }
32091
32215
  default:
32092
32216
  reader.skipType(tag & 7);
32093
32217
  break;
@@ -32097,114 +32221,89 @@
32097
32221
  };
32098
32222
 
32099
32223
  /**
32100
- * Decodes a FieldMask message from the specified reader or buffer, length delimited.
32224
+ * Decodes an Empty message from the specified reader or buffer, length delimited.
32101
32225
  * @function decodeDelimited
32102
- * @memberof google.protobuf.FieldMask
32226
+ * @memberof google.protobuf.Empty
32103
32227
  * @static
32104
32228
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
32105
- * @returns {google.protobuf.FieldMask} FieldMask
32229
+ * @returns {google.protobuf.Empty} Empty
32106
32230
  * @throws {Error} If the payload is not a reader or valid buffer
32107
32231
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
32108
32232
  */
32109
- FieldMask.decodeDelimited = function decodeDelimited(reader) {
32233
+ Empty.decodeDelimited = function decodeDelimited(reader) {
32110
32234
  if (!(reader instanceof $Reader))
32111
32235
  reader = new $Reader(reader);
32112
32236
  return this.decode(reader, reader.uint32());
32113
32237
  };
32114
32238
 
32115
32239
  /**
32116
- * Verifies a FieldMask message.
32240
+ * Verifies an Empty message.
32117
32241
  * @function verify
32118
- * @memberof google.protobuf.FieldMask
32242
+ * @memberof google.protobuf.Empty
32119
32243
  * @static
32120
32244
  * @param {Object.<string,*>} message Plain object to verify
32121
32245
  * @returns {string|null} `null` if valid, otherwise the reason why it is not
32122
32246
  */
32123
- FieldMask.verify = function verify(message) {
32247
+ Empty.verify = function verify(message) {
32124
32248
  if (typeof message !== "object" || message === null)
32125
32249
  return "object expected";
32126
- if (message.paths != null && message.hasOwnProperty("paths")) {
32127
- if (!Array.isArray(message.paths))
32128
- return "paths: array expected";
32129
- for (var i = 0; i < message.paths.length; ++i)
32130
- if (!$util.isString(message.paths[i]))
32131
- return "paths: string[] expected";
32132
- }
32133
32250
  return null;
32134
32251
  };
32135
32252
 
32136
32253
  /**
32137
- * Creates a FieldMask message from a plain object. Also converts values to their respective internal types.
32254
+ * Creates an Empty message from a plain object. Also converts values to their respective internal types.
32138
32255
  * @function fromObject
32139
- * @memberof google.protobuf.FieldMask
32256
+ * @memberof google.protobuf.Empty
32140
32257
  * @static
32141
32258
  * @param {Object.<string,*>} object Plain object
32142
- * @returns {google.protobuf.FieldMask} FieldMask
32259
+ * @returns {google.protobuf.Empty} Empty
32143
32260
  */
32144
- FieldMask.fromObject = function fromObject(object) {
32145
- if (object instanceof $root.google.protobuf.FieldMask)
32146
- return object;
32147
- var message = new $root.google.protobuf.FieldMask();
32148
- if (object.paths) {
32149
- if (!Array.isArray(object.paths))
32150
- throw TypeError(".google.protobuf.FieldMask.paths: array expected");
32151
- message.paths = [];
32152
- for (var i = 0; i < object.paths.length; ++i)
32153
- message.paths[i] = String(object.paths[i]);
32154
- }
32155
- return message;
32261
+ Empty.fromObject = function fromObject(object) {
32262
+ if (object instanceof $root.google.protobuf.Empty)
32263
+ return object;
32264
+ return new $root.google.protobuf.Empty();
32156
32265
  };
32157
32266
 
32158
32267
  /**
32159
- * Creates a plain object from a FieldMask message. Also converts values to other types if specified.
32268
+ * Creates a plain object from an Empty message. Also converts values to other types if specified.
32160
32269
  * @function toObject
32161
- * @memberof google.protobuf.FieldMask
32270
+ * @memberof google.protobuf.Empty
32162
32271
  * @static
32163
- * @param {google.protobuf.FieldMask} message FieldMask
32272
+ * @param {google.protobuf.Empty} message Empty
32164
32273
  * @param {$protobuf.IConversionOptions} [options] Conversion options
32165
32274
  * @returns {Object.<string,*>} Plain object
32166
32275
  */
32167
- FieldMask.toObject = function toObject(message, options) {
32168
- if (!options)
32169
- options = {};
32170
- var object = {};
32171
- if (options.arrays || options.defaults)
32172
- object.paths = [];
32173
- if (message.paths && message.paths.length) {
32174
- object.paths = [];
32175
- for (var j = 0; j < message.paths.length; ++j)
32176
- object.paths[j] = message.paths[j];
32177
- }
32178
- return object;
32276
+ Empty.toObject = function toObject() {
32277
+ return {};
32179
32278
  };
32180
32279
 
32181
32280
  /**
32182
- * Converts this FieldMask to JSON.
32281
+ * Converts this Empty to JSON.
32183
32282
  * @function toJSON
32184
- * @memberof google.protobuf.FieldMask
32283
+ * @memberof google.protobuf.Empty
32185
32284
  * @instance
32186
32285
  * @returns {Object.<string,*>} JSON object
32187
32286
  */
32188
- FieldMask.prototype.toJSON = function toJSON() {
32287
+ Empty.prototype.toJSON = function toJSON() {
32189
32288
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
32190
32289
  };
32191
32290
 
32192
32291
  /**
32193
- * Gets the default type url for FieldMask
32292
+ * Gets the default type url for Empty
32194
32293
  * @function getTypeUrl
32195
- * @memberof google.protobuf.FieldMask
32294
+ * @memberof google.protobuf.Empty
32196
32295
  * @static
32197
32296
  * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
32198
32297
  * @returns {string} The default type url
32199
32298
  */
32200
- FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
32299
+ Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
32201
32300
  if (typeUrlPrefix === undefined) {
32202
32301
  typeUrlPrefix = "type.googleapis.com";
32203
32302
  }
32204
- return typeUrlPrefix + "/google.protobuf.FieldMask";
32303
+ return typeUrlPrefix + "/google.protobuf.Empty";
32205
32304
  };
32206
32305
 
32207
- return FieldMask;
32306
+ return Empty;
32208
32307
  })();
32209
32308
 
32210
32309
  protobuf.Timestamp = (function() {
@@ -32453,6 +32552,3668 @@
32453
32552
  return protobuf;
32454
32553
  })();
32455
32554
 
32555
+ google.iam = (function() {
32556
+
32557
+ /**
32558
+ * Namespace iam.
32559
+ * @memberof google
32560
+ * @namespace
32561
+ */
32562
+ var iam = {};
32563
+
32564
+ iam.v1 = (function() {
32565
+
32566
+ /**
32567
+ * Namespace v1.
32568
+ * @memberof google.iam
32569
+ * @namespace
32570
+ */
32571
+ var v1 = {};
32572
+
32573
+ v1.IAMPolicy = (function() {
32574
+
32575
+ /**
32576
+ * Constructs a new IAMPolicy service.
32577
+ * @memberof google.iam.v1
32578
+ * @classdesc Represents a IAMPolicy
32579
+ * @extends $protobuf.rpc.Service
32580
+ * @constructor
32581
+ * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
32582
+ * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
32583
+ * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
32584
+ */
32585
+ function IAMPolicy(rpcImpl, requestDelimited, responseDelimited) {
32586
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
32587
+ }
32588
+
32589
+ (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy;
32590
+
32591
+ /**
32592
+ * Creates new IAMPolicy service using the specified rpc implementation.
32593
+ * @function create
32594
+ * @memberof google.iam.v1.IAMPolicy
32595
+ * @static
32596
+ * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
32597
+ * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
32598
+ * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
32599
+ * @returns {IAMPolicy} RPC service. Useful where requests and/or responses are streamed.
32600
+ */
32601
+ IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) {
32602
+ return new this(rpcImpl, requestDelimited, responseDelimited);
32603
+ };
32604
+
32605
+ /**
32606
+ * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}.
32607
+ * @memberof google.iam.v1.IAMPolicy
32608
+ * @typedef SetIamPolicyCallback
32609
+ * @type {function}
32610
+ * @param {Error|null} error Error, if any
32611
+ * @param {google.iam.v1.Policy} [response] Policy
32612
+ */
32613
+
32614
+ /**
32615
+ * Calls SetIamPolicy.
32616
+ * @function setIamPolicy
32617
+ * @memberof google.iam.v1.IAMPolicy
32618
+ * @instance
32619
+ * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object
32620
+ * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy
32621
+ * @returns {undefined}
32622
+ * @variation 1
32623
+ */
32624
+ Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) {
32625
+ return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback);
32626
+ }, "name", { value: "SetIamPolicy" });
32627
+
32628
+ /**
32629
+ * Calls SetIamPolicy.
32630
+ * @function setIamPolicy
32631
+ * @memberof google.iam.v1.IAMPolicy
32632
+ * @instance
32633
+ * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object
32634
+ * @returns {Promise<google.iam.v1.Policy>} Promise
32635
+ * @variation 2
32636
+ */
32637
+
32638
+ /**
32639
+ * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}.
32640
+ * @memberof google.iam.v1.IAMPolicy
32641
+ * @typedef GetIamPolicyCallback
32642
+ * @type {function}
32643
+ * @param {Error|null} error Error, if any
32644
+ * @param {google.iam.v1.Policy} [response] Policy
32645
+ */
32646
+
32647
+ /**
32648
+ * Calls GetIamPolicy.
32649
+ * @function getIamPolicy
32650
+ * @memberof google.iam.v1.IAMPolicy
32651
+ * @instance
32652
+ * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object
32653
+ * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy
32654
+ * @returns {undefined}
32655
+ * @variation 1
32656
+ */
32657
+ Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) {
32658
+ return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback);
32659
+ }, "name", { value: "GetIamPolicy" });
32660
+
32661
+ /**
32662
+ * Calls GetIamPolicy.
32663
+ * @function getIamPolicy
32664
+ * @memberof google.iam.v1.IAMPolicy
32665
+ * @instance
32666
+ * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object
32667
+ * @returns {Promise<google.iam.v1.Policy>} Promise
32668
+ * @variation 2
32669
+ */
32670
+
32671
+ /**
32672
+ * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}.
32673
+ * @memberof google.iam.v1.IAMPolicy
32674
+ * @typedef TestIamPermissionsCallback
32675
+ * @type {function}
32676
+ * @param {Error|null} error Error, if any
32677
+ * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse
32678
+ */
32679
+
32680
+ /**
32681
+ * Calls TestIamPermissions.
32682
+ * @function testIamPermissions
32683
+ * @memberof google.iam.v1.IAMPolicy
32684
+ * @instance
32685
+ * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object
32686
+ * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse
32687
+ * @returns {undefined}
32688
+ * @variation 1
32689
+ */
32690
+ Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) {
32691
+ return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback);
32692
+ }, "name", { value: "TestIamPermissions" });
32693
+
32694
+ /**
32695
+ * Calls TestIamPermissions.
32696
+ * @function testIamPermissions
32697
+ * @memberof google.iam.v1.IAMPolicy
32698
+ * @instance
32699
+ * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object
32700
+ * @returns {Promise<google.iam.v1.TestIamPermissionsResponse>} Promise
32701
+ * @variation 2
32702
+ */
32703
+
32704
+ return IAMPolicy;
32705
+ })();
32706
+
32707
+ v1.SetIamPolicyRequest = (function() {
32708
+
32709
+ /**
32710
+ * Properties of a SetIamPolicyRequest.
32711
+ * @memberof google.iam.v1
32712
+ * @interface ISetIamPolicyRequest
32713
+ * @property {string|null} [resource] SetIamPolicyRequest resource
32714
+ * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy
32715
+ * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask
32716
+ */
32717
+
32718
+ /**
32719
+ * Constructs a new SetIamPolicyRequest.
32720
+ * @memberof google.iam.v1
32721
+ * @classdesc Represents a SetIamPolicyRequest.
32722
+ * @implements ISetIamPolicyRequest
32723
+ * @constructor
32724
+ * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set
32725
+ */
32726
+ function SetIamPolicyRequest(properties) {
32727
+ if (properties)
32728
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
32729
+ if (properties[keys[i]] != null)
32730
+ this[keys[i]] = properties[keys[i]];
32731
+ }
32732
+
32733
+ /**
32734
+ * SetIamPolicyRequest resource.
32735
+ * @member {string} resource
32736
+ * @memberof google.iam.v1.SetIamPolicyRequest
32737
+ * @instance
32738
+ */
32739
+ SetIamPolicyRequest.prototype.resource = "";
32740
+
32741
+ /**
32742
+ * SetIamPolicyRequest policy.
32743
+ * @member {google.iam.v1.IPolicy|null|undefined} policy
32744
+ * @memberof google.iam.v1.SetIamPolicyRequest
32745
+ * @instance
32746
+ */
32747
+ SetIamPolicyRequest.prototype.policy = null;
32748
+
32749
+ /**
32750
+ * SetIamPolicyRequest updateMask.
32751
+ * @member {google.protobuf.IFieldMask|null|undefined} updateMask
32752
+ * @memberof google.iam.v1.SetIamPolicyRequest
32753
+ * @instance
32754
+ */
32755
+ SetIamPolicyRequest.prototype.updateMask = null;
32756
+
32757
+ /**
32758
+ * Creates a new SetIamPolicyRequest instance using the specified properties.
32759
+ * @function create
32760
+ * @memberof google.iam.v1.SetIamPolicyRequest
32761
+ * @static
32762
+ * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set
32763
+ * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance
32764
+ */
32765
+ SetIamPolicyRequest.create = function create(properties) {
32766
+ return new SetIamPolicyRequest(properties);
32767
+ };
32768
+
32769
+ /**
32770
+ * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages.
32771
+ * @function encode
32772
+ * @memberof google.iam.v1.SetIamPolicyRequest
32773
+ * @static
32774
+ * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode
32775
+ * @param {$protobuf.Writer} [writer] Writer to encode to
32776
+ * @returns {$protobuf.Writer} Writer
32777
+ */
32778
+ SetIamPolicyRequest.encode = function encode(message, writer) {
32779
+ if (!writer)
32780
+ writer = $Writer.create();
32781
+ if (message.resource != null && Object.hasOwnProperty.call(message, "resource"))
32782
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource);
32783
+ if (message.policy != null && Object.hasOwnProperty.call(message, "policy"))
32784
+ $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
32785
+ if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
32786
+ $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
32787
+ return writer;
32788
+ };
32789
+
32790
+ /**
32791
+ * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages.
32792
+ * @function encodeDelimited
32793
+ * @memberof google.iam.v1.SetIamPolicyRequest
32794
+ * @static
32795
+ * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode
32796
+ * @param {$protobuf.Writer} [writer] Writer to encode to
32797
+ * @returns {$protobuf.Writer} Writer
32798
+ */
32799
+ SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) {
32800
+ return this.encode(message, writer).ldelim();
32801
+ };
32802
+
32803
+ /**
32804
+ * Decodes a SetIamPolicyRequest message from the specified reader or buffer.
32805
+ * @function decode
32806
+ * @memberof google.iam.v1.SetIamPolicyRequest
32807
+ * @static
32808
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
32809
+ * @param {number} [length] Message length if known beforehand
32810
+ * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest
32811
+ * @throws {Error} If the payload is not a reader or valid buffer
32812
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
32813
+ */
32814
+ SetIamPolicyRequest.decode = function decode(reader, length, error) {
32815
+ if (!(reader instanceof $Reader))
32816
+ reader = $Reader.create(reader);
32817
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest();
32818
+ while (reader.pos < end) {
32819
+ var tag = reader.uint32();
32820
+ if (tag === error)
32821
+ break;
32822
+ switch (tag >>> 3) {
32823
+ case 1: {
32824
+ message.resource = reader.string();
32825
+ break;
32826
+ }
32827
+ case 2: {
32828
+ message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32());
32829
+ break;
32830
+ }
32831
+ case 3: {
32832
+ message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
32833
+ break;
32834
+ }
32835
+ default:
32836
+ reader.skipType(tag & 7);
32837
+ break;
32838
+ }
32839
+ }
32840
+ return message;
32841
+ };
32842
+
32843
+ /**
32844
+ * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited.
32845
+ * @function decodeDelimited
32846
+ * @memberof google.iam.v1.SetIamPolicyRequest
32847
+ * @static
32848
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
32849
+ * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest
32850
+ * @throws {Error} If the payload is not a reader or valid buffer
32851
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
32852
+ */
32853
+ SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) {
32854
+ if (!(reader instanceof $Reader))
32855
+ reader = new $Reader(reader);
32856
+ return this.decode(reader, reader.uint32());
32857
+ };
32858
+
32859
+ /**
32860
+ * Verifies a SetIamPolicyRequest message.
32861
+ * @function verify
32862
+ * @memberof google.iam.v1.SetIamPolicyRequest
32863
+ * @static
32864
+ * @param {Object.<string,*>} message Plain object to verify
32865
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
32866
+ */
32867
+ SetIamPolicyRequest.verify = function verify(message) {
32868
+ if (typeof message !== "object" || message === null)
32869
+ return "object expected";
32870
+ if (message.resource != null && message.hasOwnProperty("resource"))
32871
+ if (!$util.isString(message.resource))
32872
+ return "resource: string expected";
32873
+ if (message.policy != null && message.hasOwnProperty("policy")) {
32874
+ var error = $root.google.iam.v1.Policy.verify(message.policy);
32875
+ if (error)
32876
+ return "policy." + error;
32877
+ }
32878
+ if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
32879
+ var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
32880
+ if (error)
32881
+ return "updateMask." + error;
32882
+ }
32883
+ return null;
32884
+ };
32885
+
32886
+ /**
32887
+ * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types.
32888
+ * @function fromObject
32889
+ * @memberof google.iam.v1.SetIamPolicyRequest
32890
+ * @static
32891
+ * @param {Object.<string,*>} object Plain object
32892
+ * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest
32893
+ */
32894
+ SetIamPolicyRequest.fromObject = function fromObject(object) {
32895
+ if (object instanceof $root.google.iam.v1.SetIamPolicyRequest)
32896
+ return object;
32897
+ var message = new $root.google.iam.v1.SetIamPolicyRequest();
32898
+ if (object.resource != null)
32899
+ message.resource = String(object.resource);
32900
+ if (object.policy != null) {
32901
+ if (typeof object.policy !== "object")
32902
+ throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected");
32903
+ message.policy = $root.google.iam.v1.Policy.fromObject(object.policy);
32904
+ }
32905
+ if (object.updateMask != null) {
32906
+ if (typeof object.updateMask !== "object")
32907
+ throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected");
32908
+ message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
32909
+ }
32910
+ return message;
32911
+ };
32912
+
32913
+ /**
32914
+ * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified.
32915
+ * @function toObject
32916
+ * @memberof google.iam.v1.SetIamPolicyRequest
32917
+ * @static
32918
+ * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest
32919
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
32920
+ * @returns {Object.<string,*>} Plain object
32921
+ */
32922
+ SetIamPolicyRequest.toObject = function toObject(message, options) {
32923
+ if (!options)
32924
+ options = {};
32925
+ var object = {};
32926
+ if (options.defaults) {
32927
+ object.resource = "";
32928
+ object.policy = null;
32929
+ object.updateMask = null;
32930
+ }
32931
+ if (message.resource != null && message.hasOwnProperty("resource"))
32932
+ object.resource = message.resource;
32933
+ if (message.policy != null && message.hasOwnProperty("policy"))
32934
+ object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options);
32935
+ if (message.updateMask != null && message.hasOwnProperty("updateMask"))
32936
+ object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
32937
+ return object;
32938
+ };
32939
+
32940
+ /**
32941
+ * Converts this SetIamPolicyRequest to JSON.
32942
+ * @function toJSON
32943
+ * @memberof google.iam.v1.SetIamPolicyRequest
32944
+ * @instance
32945
+ * @returns {Object.<string,*>} JSON object
32946
+ */
32947
+ SetIamPolicyRequest.prototype.toJSON = function toJSON() {
32948
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
32949
+ };
32950
+
32951
+ /**
32952
+ * Gets the default type url for SetIamPolicyRequest
32953
+ * @function getTypeUrl
32954
+ * @memberof google.iam.v1.SetIamPolicyRequest
32955
+ * @static
32956
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
32957
+ * @returns {string} The default type url
32958
+ */
32959
+ SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
32960
+ if (typeUrlPrefix === undefined) {
32961
+ typeUrlPrefix = "type.googleapis.com";
32962
+ }
32963
+ return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest";
32964
+ };
32965
+
32966
+ return SetIamPolicyRequest;
32967
+ })();
32968
+
32969
+ v1.GetIamPolicyRequest = (function() {
32970
+
32971
+ /**
32972
+ * Properties of a GetIamPolicyRequest.
32973
+ * @memberof google.iam.v1
32974
+ * @interface IGetIamPolicyRequest
32975
+ * @property {string|null} [resource] GetIamPolicyRequest resource
32976
+ * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options
32977
+ */
32978
+
32979
+ /**
32980
+ * Constructs a new GetIamPolicyRequest.
32981
+ * @memberof google.iam.v1
32982
+ * @classdesc Represents a GetIamPolicyRequest.
32983
+ * @implements IGetIamPolicyRequest
32984
+ * @constructor
32985
+ * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set
32986
+ */
32987
+ function GetIamPolicyRequest(properties) {
32988
+ if (properties)
32989
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
32990
+ if (properties[keys[i]] != null)
32991
+ this[keys[i]] = properties[keys[i]];
32992
+ }
32993
+
32994
+ /**
32995
+ * GetIamPolicyRequest resource.
32996
+ * @member {string} resource
32997
+ * @memberof google.iam.v1.GetIamPolicyRequest
32998
+ * @instance
32999
+ */
33000
+ GetIamPolicyRequest.prototype.resource = "";
33001
+
33002
+ /**
33003
+ * GetIamPolicyRequest options.
33004
+ * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options
33005
+ * @memberof google.iam.v1.GetIamPolicyRequest
33006
+ * @instance
33007
+ */
33008
+ GetIamPolicyRequest.prototype.options = null;
33009
+
33010
+ /**
33011
+ * Creates a new GetIamPolicyRequest instance using the specified properties.
33012
+ * @function create
33013
+ * @memberof google.iam.v1.GetIamPolicyRequest
33014
+ * @static
33015
+ * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set
33016
+ * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance
33017
+ */
33018
+ GetIamPolicyRequest.create = function create(properties) {
33019
+ return new GetIamPolicyRequest(properties);
33020
+ };
33021
+
33022
+ /**
33023
+ * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages.
33024
+ * @function encode
33025
+ * @memberof google.iam.v1.GetIamPolicyRequest
33026
+ * @static
33027
+ * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode
33028
+ * @param {$protobuf.Writer} [writer] Writer to encode to
33029
+ * @returns {$protobuf.Writer} Writer
33030
+ */
33031
+ GetIamPolicyRequest.encode = function encode(message, writer) {
33032
+ if (!writer)
33033
+ writer = $Writer.create();
33034
+ if (message.resource != null && Object.hasOwnProperty.call(message, "resource"))
33035
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource);
33036
+ if (message.options != null && Object.hasOwnProperty.call(message, "options"))
33037
+ $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
33038
+ return writer;
33039
+ };
33040
+
33041
+ /**
33042
+ * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages.
33043
+ * @function encodeDelimited
33044
+ * @memberof google.iam.v1.GetIamPolicyRequest
33045
+ * @static
33046
+ * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode
33047
+ * @param {$protobuf.Writer} [writer] Writer to encode to
33048
+ * @returns {$protobuf.Writer} Writer
33049
+ */
33050
+ GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) {
33051
+ return this.encode(message, writer).ldelim();
33052
+ };
33053
+
33054
+ /**
33055
+ * Decodes a GetIamPolicyRequest message from the specified reader or buffer.
33056
+ * @function decode
33057
+ * @memberof google.iam.v1.GetIamPolicyRequest
33058
+ * @static
33059
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
33060
+ * @param {number} [length] Message length if known beforehand
33061
+ * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest
33062
+ * @throws {Error} If the payload is not a reader or valid buffer
33063
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
33064
+ */
33065
+ GetIamPolicyRequest.decode = function decode(reader, length, error) {
33066
+ if (!(reader instanceof $Reader))
33067
+ reader = $Reader.create(reader);
33068
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest();
33069
+ while (reader.pos < end) {
33070
+ var tag = reader.uint32();
33071
+ if (tag === error)
33072
+ break;
33073
+ switch (tag >>> 3) {
33074
+ case 1: {
33075
+ message.resource = reader.string();
33076
+ break;
33077
+ }
33078
+ case 2: {
33079
+ message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32());
33080
+ break;
33081
+ }
33082
+ default:
33083
+ reader.skipType(tag & 7);
33084
+ break;
33085
+ }
33086
+ }
33087
+ return message;
33088
+ };
33089
+
33090
+ /**
33091
+ * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited.
33092
+ * @function decodeDelimited
33093
+ * @memberof google.iam.v1.GetIamPolicyRequest
33094
+ * @static
33095
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
33096
+ * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest
33097
+ * @throws {Error} If the payload is not a reader or valid buffer
33098
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
33099
+ */
33100
+ GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) {
33101
+ if (!(reader instanceof $Reader))
33102
+ reader = new $Reader(reader);
33103
+ return this.decode(reader, reader.uint32());
33104
+ };
33105
+
33106
+ /**
33107
+ * Verifies a GetIamPolicyRequest message.
33108
+ * @function verify
33109
+ * @memberof google.iam.v1.GetIamPolicyRequest
33110
+ * @static
33111
+ * @param {Object.<string,*>} message Plain object to verify
33112
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
33113
+ */
33114
+ GetIamPolicyRequest.verify = function verify(message) {
33115
+ if (typeof message !== "object" || message === null)
33116
+ return "object expected";
33117
+ if (message.resource != null && message.hasOwnProperty("resource"))
33118
+ if (!$util.isString(message.resource))
33119
+ return "resource: string expected";
33120
+ if (message.options != null && message.hasOwnProperty("options")) {
33121
+ var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options);
33122
+ if (error)
33123
+ return "options." + error;
33124
+ }
33125
+ return null;
33126
+ };
33127
+
33128
+ /**
33129
+ * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types.
33130
+ * @function fromObject
33131
+ * @memberof google.iam.v1.GetIamPolicyRequest
33132
+ * @static
33133
+ * @param {Object.<string,*>} object Plain object
33134
+ * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest
33135
+ */
33136
+ GetIamPolicyRequest.fromObject = function fromObject(object) {
33137
+ if (object instanceof $root.google.iam.v1.GetIamPolicyRequest)
33138
+ return object;
33139
+ var message = new $root.google.iam.v1.GetIamPolicyRequest();
33140
+ if (object.resource != null)
33141
+ message.resource = String(object.resource);
33142
+ if (object.options != null) {
33143
+ if (typeof object.options !== "object")
33144
+ throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected");
33145
+ message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options);
33146
+ }
33147
+ return message;
33148
+ };
33149
+
33150
+ /**
33151
+ * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified.
33152
+ * @function toObject
33153
+ * @memberof google.iam.v1.GetIamPolicyRequest
33154
+ * @static
33155
+ * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest
33156
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
33157
+ * @returns {Object.<string,*>} Plain object
33158
+ */
33159
+ GetIamPolicyRequest.toObject = function toObject(message, options) {
33160
+ if (!options)
33161
+ options = {};
33162
+ var object = {};
33163
+ if (options.defaults) {
33164
+ object.resource = "";
33165
+ object.options = null;
33166
+ }
33167
+ if (message.resource != null && message.hasOwnProperty("resource"))
33168
+ object.resource = message.resource;
33169
+ if (message.options != null && message.hasOwnProperty("options"))
33170
+ object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options);
33171
+ return object;
33172
+ };
33173
+
33174
+ /**
33175
+ * Converts this GetIamPolicyRequest to JSON.
33176
+ * @function toJSON
33177
+ * @memberof google.iam.v1.GetIamPolicyRequest
33178
+ * @instance
33179
+ * @returns {Object.<string,*>} JSON object
33180
+ */
33181
+ GetIamPolicyRequest.prototype.toJSON = function toJSON() {
33182
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
33183
+ };
33184
+
33185
+ /**
33186
+ * Gets the default type url for GetIamPolicyRequest
33187
+ * @function getTypeUrl
33188
+ * @memberof google.iam.v1.GetIamPolicyRequest
33189
+ * @static
33190
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
33191
+ * @returns {string} The default type url
33192
+ */
33193
+ GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
33194
+ if (typeUrlPrefix === undefined) {
33195
+ typeUrlPrefix = "type.googleapis.com";
33196
+ }
33197
+ return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest";
33198
+ };
33199
+
33200
+ return GetIamPolicyRequest;
33201
+ })();
33202
+
33203
+ v1.TestIamPermissionsRequest = (function() {
33204
+
33205
+ /**
33206
+ * Properties of a TestIamPermissionsRequest.
33207
+ * @memberof google.iam.v1
33208
+ * @interface ITestIamPermissionsRequest
33209
+ * @property {string|null} [resource] TestIamPermissionsRequest resource
33210
+ * @property {Array.<string>|null} [permissions] TestIamPermissionsRequest permissions
33211
+ */
33212
+
33213
+ /**
33214
+ * Constructs a new TestIamPermissionsRequest.
33215
+ * @memberof google.iam.v1
33216
+ * @classdesc Represents a TestIamPermissionsRequest.
33217
+ * @implements ITestIamPermissionsRequest
33218
+ * @constructor
33219
+ * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set
33220
+ */
33221
+ function TestIamPermissionsRequest(properties) {
33222
+ this.permissions = [];
33223
+ if (properties)
33224
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
33225
+ if (properties[keys[i]] != null)
33226
+ this[keys[i]] = properties[keys[i]];
33227
+ }
33228
+
33229
+ /**
33230
+ * TestIamPermissionsRequest resource.
33231
+ * @member {string} resource
33232
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33233
+ * @instance
33234
+ */
33235
+ TestIamPermissionsRequest.prototype.resource = "";
33236
+
33237
+ /**
33238
+ * TestIamPermissionsRequest permissions.
33239
+ * @member {Array.<string>} permissions
33240
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33241
+ * @instance
33242
+ */
33243
+ TestIamPermissionsRequest.prototype.permissions = $util.emptyArray;
33244
+
33245
+ /**
33246
+ * Creates a new TestIamPermissionsRequest instance using the specified properties.
33247
+ * @function create
33248
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33249
+ * @static
33250
+ * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set
33251
+ * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance
33252
+ */
33253
+ TestIamPermissionsRequest.create = function create(properties) {
33254
+ return new TestIamPermissionsRequest(properties);
33255
+ };
33256
+
33257
+ /**
33258
+ * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages.
33259
+ * @function encode
33260
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33261
+ * @static
33262
+ * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode
33263
+ * @param {$protobuf.Writer} [writer] Writer to encode to
33264
+ * @returns {$protobuf.Writer} Writer
33265
+ */
33266
+ TestIamPermissionsRequest.encode = function encode(message, writer) {
33267
+ if (!writer)
33268
+ writer = $Writer.create();
33269
+ if (message.resource != null && Object.hasOwnProperty.call(message, "resource"))
33270
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource);
33271
+ if (message.permissions != null && message.permissions.length)
33272
+ for (var i = 0; i < message.permissions.length; ++i)
33273
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]);
33274
+ return writer;
33275
+ };
33276
+
33277
+ /**
33278
+ * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages.
33279
+ * @function encodeDelimited
33280
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33281
+ * @static
33282
+ * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode
33283
+ * @param {$protobuf.Writer} [writer] Writer to encode to
33284
+ * @returns {$protobuf.Writer} Writer
33285
+ */
33286
+ TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) {
33287
+ return this.encode(message, writer).ldelim();
33288
+ };
33289
+
33290
+ /**
33291
+ * Decodes a TestIamPermissionsRequest message from the specified reader or buffer.
33292
+ * @function decode
33293
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33294
+ * @static
33295
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
33296
+ * @param {number} [length] Message length if known beforehand
33297
+ * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest
33298
+ * @throws {Error} If the payload is not a reader or valid buffer
33299
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
33300
+ */
33301
+ TestIamPermissionsRequest.decode = function decode(reader, length, error) {
33302
+ if (!(reader instanceof $Reader))
33303
+ reader = $Reader.create(reader);
33304
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest();
33305
+ while (reader.pos < end) {
33306
+ var tag = reader.uint32();
33307
+ if (tag === error)
33308
+ break;
33309
+ switch (tag >>> 3) {
33310
+ case 1: {
33311
+ message.resource = reader.string();
33312
+ break;
33313
+ }
33314
+ case 2: {
33315
+ if (!(message.permissions && message.permissions.length))
33316
+ message.permissions = [];
33317
+ message.permissions.push(reader.string());
33318
+ break;
33319
+ }
33320
+ default:
33321
+ reader.skipType(tag & 7);
33322
+ break;
33323
+ }
33324
+ }
33325
+ return message;
33326
+ };
33327
+
33328
+ /**
33329
+ * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited.
33330
+ * @function decodeDelimited
33331
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33332
+ * @static
33333
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
33334
+ * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest
33335
+ * @throws {Error} If the payload is not a reader or valid buffer
33336
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
33337
+ */
33338
+ TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) {
33339
+ if (!(reader instanceof $Reader))
33340
+ reader = new $Reader(reader);
33341
+ return this.decode(reader, reader.uint32());
33342
+ };
33343
+
33344
+ /**
33345
+ * Verifies a TestIamPermissionsRequest message.
33346
+ * @function verify
33347
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33348
+ * @static
33349
+ * @param {Object.<string,*>} message Plain object to verify
33350
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
33351
+ */
33352
+ TestIamPermissionsRequest.verify = function verify(message) {
33353
+ if (typeof message !== "object" || message === null)
33354
+ return "object expected";
33355
+ if (message.resource != null && message.hasOwnProperty("resource"))
33356
+ if (!$util.isString(message.resource))
33357
+ return "resource: string expected";
33358
+ if (message.permissions != null && message.hasOwnProperty("permissions")) {
33359
+ if (!Array.isArray(message.permissions))
33360
+ return "permissions: array expected";
33361
+ for (var i = 0; i < message.permissions.length; ++i)
33362
+ if (!$util.isString(message.permissions[i]))
33363
+ return "permissions: string[] expected";
33364
+ }
33365
+ return null;
33366
+ };
33367
+
33368
+ /**
33369
+ * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types.
33370
+ * @function fromObject
33371
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33372
+ * @static
33373
+ * @param {Object.<string,*>} object Plain object
33374
+ * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest
33375
+ */
33376
+ TestIamPermissionsRequest.fromObject = function fromObject(object) {
33377
+ if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest)
33378
+ return object;
33379
+ var message = new $root.google.iam.v1.TestIamPermissionsRequest();
33380
+ if (object.resource != null)
33381
+ message.resource = String(object.resource);
33382
+ if (object.permissions) {
33383
+ if (!Array.isArray(object.permissions))
33384
+ throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected");
33385
+ message.permissions = [];
33386
+ for (var i = 0; i < object.permissions.length; ++i)
33387
+ message.permissions[i] = String(object.permissions[i]);
33388
+ }
33389
+ return message;
33390
+ };
33391
+
33392
+ /**
33393
+ * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified.
33394
+ * @function toObject
33395
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33396
+ * @static
33397
+ * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest
33398
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
33399
+ * @returns {Object.<string,*>} Plain object
33400
+ */
33401
+ TestIamPermissionsRequest.toObject = function toObject(message, options) {
33402
+ if (!options)
33403
+ options = {};
33404
+ var object = {};
33405
+ if (options.arrays || options.defaults)
33406
+ object.permissions = [];
33407
+ if (options.defaults)
33408
+ object.resource = "";
33409
+ if (message.resource != null && message.hasOwnProperty("resource"))
33410
+ object.resource = message.resource;
33411
+ if (message.permissions && message.permissions.length) {
33412
+ object.permissions = [];
33413
+ for (var j = 0; j < message.permissions.length; ++j)
33414
+ object.permissions[j] = message.permissions[j];
33415
+ }
33416
+ return object;
33417
+ };
33418
+
33419
+ /**
33420
+ * Converts this TestIamPermissionsRequest to JSON.
33421
+ * @function toJSON
33422
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33423
+ * @instance
33424
+ * @returns {Object.<string,*>} JSON object
33425
+ */
33426
+ TestIamPermissionsRequest.prototype.toJSON = function toJSON() {
33427
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
33428
+ };
33429
+
33430
+ /**
33431
+ * Gets the default type url for TestIamPermissionsRequest
33432
+ * @function getTypeUrl
33433
+ * @memberof google.iam.v1.TestIamPermissionsRequest
33434
+ * @static
33435
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
33436
+ * @returns {string} The default type url
33437
+ */
33438
+ TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
33439
+ if (typeUrlPrefix === undefined) {
33440
+ typeUrlPrefix = "type.googleapis.com";
33441
+ }
33442
+ return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest";
33443
+ };
33444
+
33445
+ return TestIamPermissionsRequest;
33446
+ })();
33447
+
33448
+ v1.TestIamPermissionsResponse = (function() {
33449
+
33450
+ /**
33451
+ * Properties of a TestIamPermissionsResponse.
33452
+ * @memberof google.iam.v1
33453
+ * @interface ITestIamPermissionsResponse
33454
+ * @property {Array.<string>|null} [permissions] TestIamPermissionsResponse permissions
33455
+ */
33456
+
33457
+ /**
33458
+ * Constructs a new TestIamPermissionsResponse.
33459
+ * @memberof google.iam.v1
33460
+ * @classdesc Represents a TestIamPermissionsResponse.
33461
+ * @implements ITestIamPermissionsResponse
33462
+ * @constructor
33463
+ * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set
33464
+ */
33465
+ function TestIamPermissionsResponse(properties) {
33466
+ this.permissions = [];
33467
+ if (properties)
33468
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
33469
+ if (properties[keys[i]] != null)
33470
+ this[keys[i]] = properties[keys[i]];
33471
+ }
33472
+
33473
+ /**
33474
+ * TestIamPermissionsResponse permissions.
33475
+ * @member {Array.<string>} permissions
33476
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33477
+ * @instance
33478
+ */
33479
+ TestIamPermissionsResponse.prototype.permissions = $util.emptyArray;
33480
+
33481
+ /**
33482
+ * Creates a new TestIamPermissionsResponse instance using the specified properties.
33483
+ * @function create
33484
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33485
+ * @static
33486
+ * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set
33487
+ * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance
33488
+ */
33489
+ TestIamPermissionsResponse.create = function create(properties) {
33490
+ return new TestIamPermissionsResponse(properties);
33491
+ };
33492
+
33493
+ /**
33494
+ * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages.
33495
+ * @function encode
33496
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33497
+ * @static
33498
+ * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode
33499
+ * @param {$protobuf.Writer} [writer] Writer to encode to
33500
+ * @returns {$protobuf.Writer} Writer
33501
+ */
33502
+ TestIamPermissionsResponse.encode = function encode(message, writer) {
33503
+ if (!writer)
33504
+ writer = $Writer.create();
33505
+ if (message.permissions != null && message.permissions.length)
33506
+ for (var i = 0; i < message.permissions.length; ++i)
33507
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]);
33508
+ return writer;
33509
+ };
33510
+
33511
+ /**
33512
+ * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages.
33513
+ * @function encodeDelimited
33514
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33515
+ * @static
33516
+ * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode
33517
+ * @param {$protobuf.Writer} [writer] Writer to encode to
33518
+ * @returns {$protobuf.Writer} Writer
33519
+ */
33520
+ TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) {
33521
+ return this.encode(message, writer).ldelim();
33522
+ };
33523
+
33524
+ /**
33525
+ * Decodes a TestIamPermissionsResponse message from the specified reader or buffer.
33526
+ * @function decode
33527
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33528
+ * @static
33529
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
33530
+ * @param {number} [length] Message length if known beforehand
33531
+ * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse
33532
+ * @throws {Error} If the payload is not a reader or valid buffer
33533
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
33534
+ */
33535
+ TestIamPermissionsResponse.decode = function decode(reader, length, error) {
33536
+ if (!(reader instanceof $Reader))
33537
+ reader = $Reader.create(reader);
33538
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse();
33539
+ while (reader.pos < end) {
33540
+ var tag = reader.uint32();
33541
+ if (tag === error)
33542
+ break;
33543
+ switch (tag >>> 3) {
33544
+ case 1: {
33545
+ if (!(message.permissions && message.permissions.length))
33546
+ message.permissions = [];
33547
+ message.permissions.push(reader.string());
33548
+ break;
33549
+ }
33550
+ default:
33551
+ reader.skipType(tag & 7);
33552
+ break;
33553
+ }
33554
+ }
33555
+ return message;
33556
+ };
33557
+
33558
+ /**
33559
+ * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited.
33560
+ * @function decodeDelimited
33561
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33562
+ * @static
33563
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
33564
+ * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse
33565
+ * @throws {Error} If the payload is not a reader or valid buffer
33566
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
33567
+ */
33568
+ TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) {
33569
+ if (!(reader instanceof $Reader))
33570
+ reader = new $Reader(reader);
33571
+ return this.decode(reader, reader.uint32());
33572
+ };
33573
+
33574
+ /**
33575
+ * Verifies a TestIamPermissionsResponse message.
33576
+ * @function verify
33577
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33578
+ * @static
33579
+ * @param {Object.<string,*>} message Plain object to verify
33580
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
33581
+ */
33582
+ TestIamPermissionsResponse.verify = function verify(message) {
33583
+ if (typeof message !== "object" || message === null)
33584
+ return "object expected";
33585
+ if (message.permissions != null && message.hasOwnProperty("permissions")) {
33586
+ if (!Array.isArray(message.permissions))
33587
+ return "permissions: array expected";
33588
+ for (var i = 0; i < message.permissions.length; ++i)
33589
+ if (!$util.isString(message.permissions[i]))
33590
+ return "permissions: string[] expected";
33591
+ }
33592
+ return null;
33593
+ };
33594
+
33595
+ /**
33596
+ * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types.
33597
+ * @function fromObject
33598
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33599
+ * @static
33600
+ * @param {Object.<string,*>} object Plain object
33601
+ * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse
33602
+ */
33603
+ TestIamPermissionsResponse.fromObject = function fromObject(object) {
33604
+ if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse)
33605
+ return object;
33606
+ var message = new $root.google.iam.v1.TestIamPermissionsResponse();
33607
+ if (object.permissions) {
33608
+ if (!Array.isArray(object.permissions))
33609
+ throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected");
33610
+ message.permissions = [];
33611
+ for (var i = 0; i < object.permissions.length; ++i)
33612
+ message.permissions[i] = String(object.permissions[i]);
33613
+ }
33614
+ return message;
33615
+ };
33616
+
33617
+ /**
33618
+ * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified.
33619
+ * @function toObject
33620
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33621
+ * @static
33622
+ * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse
33623
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
33624
+ * @returns {Object.<string,*>} Plain object
33625
+ */
33626
+ TestIamPermissionsResponse.toObject = function toObject(message, options) {
33627
+ if (!options)
33628
+ options = {};
33629
+ var object = {};
33630
+ if (options.arrays || options.defaults)
33631
+ object.permissions = [];
33632
+ if (message.permissions && message.permissions.length) {
33633
+ object.permissions = [];
33634
+ for (var j = 0; j < message.permissions.length; ++j)
33635
+ object.permissions[j] = message.permissions[j];
33636
+ }
33637
+ return object;
33638
+ };
33639
+
33640
+ /**
33641
+ * Converts this TestIamPermissionsResponse to JSON.
33642
+ * @function toJSON
33643
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33644
+ * @instance
33645
+ * @returns {Object.<string,*>} JSON object
33646
+ */
33647
+ TestIamPermissionsResponse.prototype.toJSON = function toJSON() {
33648
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
33649
+ };
33650
+
33651
+ /**
33652
+ * Gets the default type url for TestIamPermissionsResponse
33653
+ * @function getTypeUrl
33654
+ * @memberof google.iam.v1.TestIamPermissionsResponse
33655
+ * @static
33656
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
33657
+ * @returns {string} The default type url
33658
+ */
33659
+ TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
33660
+ if (typeUrlPrefix === undefined) {
33661
+ typeUrlPrefix = "type.googleapis.com";
33662
+ }
33663
+ return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse";
33664
+ };
33665
+
33666
+ return TestIamPermissionsResponse;
33667
+ })();
33668
+
33669
+ v1.GetPolicyOptions = (function() {
33670
+
33671
+ /**
33672
+ * Properties of a GetPolicyOptions.
33673
+ * @memberof google.iam.v1
33674
+ * @interface IGetPolicyOptions
33675
+ * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion
33676
+ */
33677
+
33678
+ /**
33679
+ * Constructs a new GetPolicyOptions.
33680
+ * @memberof google.iam.v1
33681
+ * @classdesc Represents a GetPolicyOptions.
33682
+ * @implements IGetPolicyOptions
33683
+ * @constructor
33684
+ * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set
33685
+ */
33686
+ function GetPolicyOptions(properties) {
33687
+ if (properties)
33688
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
33689
+ if (properties[keys[i]] != null)
33690
+ this[keys[i]] = properties[keys[i]];
33691
+ }
33692
+
33693
+ /**
33694
+ * GetPolicyOptions requestedPolicyVersion.
33695
+ * @member {number} requestedPolicyVersion
33696
+ * @memberof google.iam.v1.GetPolicyOptions
33697
+ * @instance
33698
+ */
33699
+ GetPolicyOptions.prototype.requestedPolicyVersion = 0;
33700
+
33701
+ /**
33702
+ * Creates a new GetPolicyOptions instance using the specified properties.
33703
+ * @function create
33704
+ * @memberof google.iam.v1.GetPolicyOptions
33705
+ * @static
33706
+ * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set
33707
+ * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance
33708
+ */
33709
+ GetPolicyOptions.create = function create(properties) {
33710
+ return new GetPolicyOptions(properties);
33711
+ };
33712
+
33713
+ /**
33714
+ * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages.
33715
+ * @function encode
33716
+ * @memberof google.iam.v1.GetPolicyOptions
33717
+ * @static
33718
+ * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode
33719
+ * @param {$protobuf.Writer} [writer] Writer to encode to
33720
+ * @returns {$protobuf.Writer} Writer
33721
+ */
33722
+ GetPolicyOptions.encode = function encode(message, writer) {
33723
+ if (!writer)
33724
+ writer = $Writer.create();
33725
+ if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion"))
33726
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion);
33727
+ return writer;
33728
+ };
33729
+
33730
+ /**
33731
+ * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages.
33732
+ * @function encodeDelimited
33733
+ * @memberof google.iam.v1.GetPolicyOptions
33734
+ * @static
33735
+ * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode
33736
+ * @param {$protobuf.Writer} [writer] Writer to encode to
33737
+ * @returns {$protobuf.Writer} Writer
33738
+ */
33739
+ GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) {
33740
+ return this.encode(message, writer).ldelim();
33741
+ };
33742
+
33743
+ /**
33744
+ * Decodes a GetPolicyOptions message from the specified reader or buffer.
33745
+ * @function decode
33746
+ * @memberof google.iam.v1.GetPolicyOptions
33747
+ * @static
33748
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
33749
+ * @param {number} [length] Message length if known beforehand
33750
+ * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions
33751
+ * @throws {Error} If the payload is not a reader or valid buffer
33752
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
33753
+ */
33754
+ GetPolicyOptions.decode = function decode(reader, length, error) {
33755
+ if (!(reader instanceof $Reader))
33756
+ reader = $Reader.create(reader);
33757
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions();
33758
+ while (reader.pos < end) {
33759
+ var tag = reader.uint32();
33760
+ if (tag === error)
33761
+ break;
33762
+ switch (tag >>> 3) {
33763
+ case 1: {
33764
+ message.requestedPolicyVersion = reader.int32();
33765
+ break;
33766
+ }
33767
+ default:
33768
+ reader.skipType(tag & 7);
33769
+ break;
33770
+ }
33771
+ }
33772
+ return message;
33773
+ };
33774
+
33775
+ /**
33776
+ * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited.
33777
+ * @function decodeDelimited
33778
+ * @memberof google.iam.v1.GetPolicyOptions
33779
+ * @static
33780
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
33781
+ * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions
33782
+ * @throws {Error} If the payload is not a reader or valid buffer
33783
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
33784
+ */
33785
+ GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) {
33786
+ if (!(reader instanceof $Reader))
33787
+ reader = new $Reader(reader);
33788
+ return this.decode(reader, reader.uint32());
33789
+ };
33790
+
33791
+ /**
33792
+ * Verifies a GetPolicyOptions message.
33793
+ * @function verify
33794
+ * @memberof google.iam.v1.GetPolicyOptions
33795
+ * @static
33796
+ * @param {Object.<string,*>} message Plain object to verify
33797
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
33798
+ */
33799
+ GetPolicyOptions.verify = function verify(message) {
33800
+ if (typeof message !== "object" || message === null)
33801
+ return "object expected";
33802
+ if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion"))
33803
+ if (!$util.isInteger(message.requestedPolicyVersion))
33804
+ return "requestedPolicyVersion: integer expected";
33805
+ return null;
33806
+ };
33807
+
33808
+ /**
33809
+ * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types.
33810
+ * @function fromObject
33811
+ * @memberof google.iam.v1.GetPolicyOptions
33812
+ * @static
33813
+ * @param {Object.<string,*>} object Plain object
33814
+ * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions
33815
+ */
33816
+ GetPolicyOptions.fromObject = function fromObject(object) {
33817
+ if (object instanceof $root.google.iam.v1.GetPolicyOptions)
33818
+ return object;
33819
+ var message = new $root.google.iam.v1.GetPolicyOptions();
33820
+ if (object.requestedPolicyVersion != null)
33821
+ message.requestedPolicyVersion = object.requestedPolicyVersion | 0;
33822
+ return message;
33823
+ };
33824
+
33825
+ /**
33826
+ * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified.
33827
+ * @function toObject
33828
+ * @memberof google.iam.v1.GetPolicyOptions
33829
+ * @static
33830
+ * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions
33831
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
33832
+ * @returns {Object.<string,*>} Plain object
33833
+ */
33834
+ GetPolicyOptions.toObject = function toObject(message, options) {
33835
+ if (!options)
33836
+ options = {};
33837
+ var object = {};
33838
+ if (options.defaults)
33839
+ object.requestedPolicyVersion = 0;
33840
+ if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion"))
33841
+ object.requestedPolicyVersion = message.requestedPolicyVersion;
33842
+ return object;
33843
+ };
33844
+
33845
+ /**
33846
+ * Converts this GetPolicyOptions to JSON.
33847
+ * @function toJSON
33848
+ * @memberof google.iam.v1.GetPolicyOptions
33849
+ * @instance
33850
+ * @returns {Object.<string,*>} JSON object
33851
+ */
33852
+ GetPolicyOptions.prototype.toJSON = function toJSON() {
33853
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
33854
+ };
33855
+
33856
+ /**
33857
+ * Gets the default type url for GetPolicyOptions
33858
+ * @function getTypeUrl
33859
+ * @memberof google.iam.v1.GetPolicyOptions
33860
+ * @static
33861
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
33862
+ * @returns {string} The default type url
33863
+ */
33864
+ GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
33865
+ if (typeUrlPrefix === undefined) {
33866
+ typeUrlPrefix = "type.googleapis.com";
33867
+ }
33868
+ return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions";
33869
+ };
33870
+
33871
+ return GetPolicyOptions;
33872
+ })();
33873
+
33874
+ v1.Policy = (function() {
33875
+
33876
+ /**
33877
+ * Properties of a Policy.
33878
+ * @memberof google.iam.v1
33879
+ * @interface IPolicy
33880
+ * @property {number|null} [version] Policy version
33881
+ * @property {Array.<google.iam.v1.IBinding>|null} [bindings] Policy bindings
33882
+ * @property {Array.<google.iam.v1.IAuditConfig>|null} [auditConfigs] Policy auditConfigs
33883
+ * @property {Uint8Array|null} [etag] Policy etag
33884
+ */
33885
+
33886
+ /**
33887
+ * Constructs a new Policy.
33888
+ * @memberof google.iam.v1
33889
+ * @classdesc Represents a Policy.
33890
+ * @implements IPolicy
33891
+ * @constructor
33892
+ * @param {google.iam.v1.IPolicy=} [properties] Properties to set
33893
+ */
33894
+ function Policy(properties) {
33895
+ this.bindings = [];
33896
+ this.auditConfigs = [];
33897
+ if (properties)
33898
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
33899
+ if (properties[keys[i]] != null)
33900
+ this[keys[i]] = properties[keys[i]];
33901
+ }
33902
+
33903
+ /**
33904
+ * Policy version.
33905
+ * @member {number} version
33906
+ * @memberof google.iam.v1.Policy
33907
+ * @instance
33908
+ */
33909
+ Policy.prototype.version = 0;
33910
+
33911
+ /**
33912
+ * Policy bindings.
33913
+ * @member {Array.<google.iam.v1.IBinding>} bindings
33914
+ * @memberof google.iam.v1.Policy
33915
+ * @instance
33916
+ */
33917
+ Policy.prototype.bindings = $util.emptyArray;
33918
+
33919
+ /**
33920
+ * Policy auditConfigs.
33921
+ * @member {Array.<google.iam.v1.IAuditConfig>} auditConfigs
33922
+ * @memberof google.iam.v1.Policy
33923
+ * @instance
33924
+ */
33925
+ Policy.prototype.auditConfigs = $util.emptyArray;
33926
+
33927
+ /**
33928
+ * Policy etag.
33929
+ * @member {Uint8Array} etag
33930
+ * @memberof google.iam.v1.Policy
33931
+ * @instance
33932
+ */
33933
+ Policy.prototype.etag = $util.newBuffer([]);
33934
+
33935
+ /**
33936
+ * Creates a new Policy instance using the specified properties.
33937
+ * @function create
33938
+ * @memberof google.iam.v1.Policy
33939
+ * @static
33940
+ * @param {google.iam.v1.IPolicy=} [properties] Properties to set
33941
+ * @returns {google.iam.v1.Policy} Policy instance
33942
+ */
33943
+ Policy.create = function create(properties) {
33944
+ return new Policy(properties);
33945
+ };
33946
+
33947
+ /**
33948
+ * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages.
33949
+ * @function encode
33950
+ * @memberof google.iam.v1.Policy
33951
+ * @static
33952
+ * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode
33953
+ * @param {$protobuf.Writer} [writer] Writer to encode to
33954
+ * @returns {$protobuf.Writer} Writer
33955
+ */
33956
+ Policy.encode = function encode(message, writer) {
33957
+ if (!writer)
33958
+ writer = $Writer.create();
33959
+ if (message.version != null && Object.hasOwnProperty.call(message, "version"))
33960
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version);
33961
+ if (message.etag != null && Object.hasOwnProperty.call(message, "etag"))
33962
+ writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag);
33963
+ if (message.bindings != null && message.bindings.length)
33964
+ for (var i = 0; i < message.bindings.length; ++i)
33965
+ $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
33966
+ if (message.auditConfigs != null && message.auditConfigs.length)
33967
+ for (var i = 0; i < message.auditConfigs.length; ++i)
33968
+ $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
33969
+ return writer;
33970
+ };
33971
+
33972
+ /**
33973
+ * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages.
33974
+ * @function encodeDelimited
33975
+ * @memberof google.iam.v1.Policy
33976
+ * @static
33977
+ * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode
33978
+ * @param {$protobuf.Writer} [writer] Writer to encode to
33979
+ * @returns {$protobuf.Writer} Writer
33980
+ */
33981
+ Policy.encodeDelimited = function encodeDelimited(message, writer) {
33982
+ return this.encode(message, writer).ldelim();
33983
+ };
33984
+
33985
+ /**
33986
+ * Decodes a Policy message from the specified reader or buffer.
33987
+ * @function decode
33988
+ * @memberof google.iam.v1.Policy
33989
+ * @static
33990
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
33991
+ * @param {number} [length] Message length if known beforehand
33992
+ * @returns {google.iam.v1.Policy} Policy
33993
+ * @throws {Error} If the payload is not a reader or valid buffer
33994
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
33995
+ */
33996
+ Policy.decode = function decode(reader, length, error) {
33997
+ if (!(reader instanceof $Reader))
33998
+ reader = $Reader.create(reader);
33999
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy();
34000
+ while (reader.pos < end) {
34001
+ var tag = reader.uint32();
34002
+ if (tag === error)
34003
+ break;
34004
+ switch (tag >>> 3) {
34005
+ case 1: {
34006
+ message.version = reader.int32();
34007
+ break;
34008
+ }
34009
+ case 4: {
34010
+ if (!(message.bindings && message.bindings.length))
34011
+ message.bindings = [];
34012
+ message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32()));
34013
+ break;
34014
+ }
34015
+ case 6: {
34016
+ if (!(message.auditConfigs && message.auditConfigs.length))
34017
+ message.auditConfigs = [];
34018
+ message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32()));
34019
+ break;
34020
+ }
34021
+ case 3: {
34022
+ message.etag = reader.bytes();
34023
+ break;
34024
+ }
34025
+ default:
34026
+ reader.skipType(tag & 7);
34027
+ break;
34028
+ }
34029
+ }
34030
+ return message;
34031
+ };
34032
+
34033
+ /**
34034
+ * Decodes a Policy message from the specified reader or buffer, length delimited.
34035
+ * @function decodeDelimited
34036
+ * @memberof google.iam.v1.Policy
34037
+ * @static
34038
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
34039
+ * @returns {google.iam.v1.Policy} Policy
34040
+ * @throws {Error} If the payload is not a reader or valid buffer
34041
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
34042
+ */
34043
+ Policy.decodeDelimited = function decodeDelimited(reader) {
34044
+ if (!(reader instanceof $Reader))
34045
+ reader = new $Reader(reader);
34046
+ return this.decode(reader, reader.uint32());
34047
+ };
34048
+
34049
+ /**
34050
+ * Verifies a Policy message.
34051
+ * @function verify
34052
+ * @memberof google.iam.v1.Policy
34053
+ * @static
34054
+ * @param {Object.<string,*>} message Plain object to verify
34055
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
34056
+ */
34057
+ Policy.verify = function verify(message) {
34058
+ if (typeof message !== "object" || message === null)
34059
+ return "object expected";
34060
+ if (message.version != null && message.hasOwnProperty("version"))
34061
+ if (!$util.isInteger(message.version))
34062
+ return "version: integer expected";
34063
+ if (message.bindings != null && message.hasOwnProperty("bindings")) {
34064
+ if (!Array.isArray(message.bindings))
34065
+ return "bindings: array expected";
34066
+ for (var i = 0; i < message.bindings.length; ++i) {
34067
+ var error = $root.google.iam.v1.Binding.verify(message.bindings[i]);
34068
+ if (error)
34069
+ return "bindings." + error;
34070
+ }
34071
+ }
34072
+ if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) {
34073
+ if (!Array.isArray(message.auditConfigs))
34074
+ return "auditConfigs: array expected";
34075
+ for (var i = 0; i < message.auditConfigs.length; ++i) {
34076
+ var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]);
34077
+ if (error)
34078
+ return "auditConfigs." + error;
34079
+ }
34080
+ }
34081
+ if (message.etag != null && message.hasOwnProperty("etag"))
34082
+ if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag)))
34083
+ return "etag: buffer expected";
34084
+ return null;
34085
+ };
34086
+
34087
+ /**
34088
+ * Creates a Policy message from a plain object. Also converts values to their respective internal types.
34089
+ * @function fromObject
34090
+ * @memberof google.iam.v1.Policy
34091
+ * @static
34092
+ * @param {Object.<string,*>} object Plain object
34093
+ * @returns {google.iam.v1.Policy} Policy
34094
+ */
34095
+ Policy.fromObject = function fromObject(object) {
34096
+ if (object instanceof $root.google.iam.v1.Policy)
34097
+ return object;
34098
+ var message = new $root.google.iam.v1.Policy();
34099
+ if (object.version != null)
34100
+ message.version = object.version | 0;
34101
+ if (object.bindings) {
34102
+ if (!Array.isArray(object.bindings))
34103
+ throw TypeError(".google.iam.v1.Policy.bindings: array expected");
34104
+ message.bindings = [];
34105
+ for (var i = 0; i < object.bindings.length; ++i) {
34106
+ if (typeof object.bindings[i] !== "object")
34107
+ throw TypeError(".google.iam.v1.Policy.bindings: object expected");
34108
+ message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]);
34109
+ }
34110
+ }
34111
+ if (object.auditConfigs) {
34112
+ if (!Array.isArray(object.auditConfigs))
34113
+ throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected");
34114
+ message.auditConfigs = [];
34115
+ for (var i = 0; i < object.auditConfigs.length; ++i) {
34116
+ if (typeof object.auditConfigs[i] !== "object")
34117
+ throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected");
34118
+ message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]);
34119
+ }
34120
+ }
34121
+ if (object.etag != null)
34122
+ if (typeof object.etag === "string")
34123
+ $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0);
34124
+ else if (object.etag.length >= 0)
34125
+ message.etag = object.etag;
34126
+ return message;
34127
+ };
34128
+
34129
+ /**
34130
+ * Creates a plain object from a Policy message. Also converts values to other types if specified.
34131
+ * @function toObject
34132
+ * @memberof google.iam.v1.Policy
34133
+ * @static
34134
+ * @param {google.iam.v1.Policy} message Policy
34135
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
34136
+ * @returns {Object.<string,*>} Plain object
34137
+ */
34138
+ Policy.toObject = function toObject(message, options) {
34139
+ if (!options)
34140
+ options = {};
34141
+ var object = {};
34142
+ if (options.arrays || options.defaults) {
34143
+ object.bindings = [];
34144
+ object.auditConfigs = [];
34145
+ }
34146
+ if (options.defaults) {
34147
+ object.version = 0;
34148
+ if (options.bytes === String)
34149
+ object.etag = "";
34150
+ else {
34151
+ object.etag = [];
34152
+ if (options.bytes !== Array)
34153
+ object.etag = $util.newBuffer(object.etag);
34154
+ }
34155
+ }
34156
+ if (message.version != null && message.hasOwnProperty("version"))
34157
+ object.version = message.version;
34158
+ if (message.etag != null && message.hasOwnProperty("etag"))
34159
+ object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag;
34160
+ if (message.bindings && message.bindings.length) {
34161
+ object.bindings = [];
34162
+ for (var j = 0; j < message.bindings.length; ++j)
34163
+ object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options);
34164
+ }
34165
+ if (message.auditConfigs && message.auditConfigs.length) {
34166
+ object.auditConfigs = [];
34167
+ for (var j = 0; j < message.auditConfigs.length; ++j)
34168
+ object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options);
34169
+ }
34170
+ return object;
34171
+ };
34172
+
34173
+ /**
34174
+ * Converts this Policy to JSON.
34175
+ * @function toJSON
34176
+ * @memberof google.iam.v1.Policy
34177
+ * @instance
34178
+ * @returns {Object.<string,*>} JSON object
34179
+ */
34180
+ Policy.prototype.toJSON = function toJSON() {
34181
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
34182
+ };
34183
+
34184
+ /**
34185
+ * Gets the default type url for Policy
34186
+ * @function getTypeUrl
34187
+ * @memberof google.iam.v1.Policy
34188
+ * @static
34189
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
34190
+ * @returns {string} The default type url
34191
+ */
34192
+ Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
34193
+ if (typeUrlPrefix === undefined) {
34194
+ typeUrlPrefix = "type.googleapis.com";
34195
+ }
34196
+ return typeUrlPrefix + "/google.iam.v1.Policy";
34197
+ };
34198
+
34199
+ return Policy;
34200
+ })();
34201
+
34202
+ v1.Binding = (function() {
34203
+
34204
+ /**
34205
+ * Properties of a Binding.
34206
+ * @memberof google.iam.v1
34207
+ * @interface IBinding
34208
+ * @property {string|null} [role] Binding role
34209
+ * @property {Array.<string>|null} [members] Binding members
34210
+ * @property {google.type.IExpr|null} [condition] Binding condition
34211
+ */
34212
+
34213
+ /**
34214
+ * Constructs a new Binding.
34215
+ * @memberof google.iam.v1
34216
+ * @classdesc Represents a Binding.
34217
+ * @implements IBinding
34218
+ * @constructor
34219
+ * @param {google.iam.v1.IBinding=} [properties] Properties to set
34220
+ */
34221
+ function Binding(properties) {
34222
+ this.members = [];
34223
+ if (properties)
34224
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
34225
+ if (properties[keys[i]] != null)
34226
+ this[keys[i]] = properties[keys[i]];
34227
+ }
34228
+
34229
+ /**
34230
+ * Binding role.
34231
+ * @member {string} role
34232
+ * @memberof google.iam.v1.Binding
34233
+ * @instance
34234
+ */
34235
+ Binding.prototype.role = "";
34236
+
34237
+ /**
34238
+ * Binding members.
34239
+ * @member {Array.<string>} members
34240
+ * @memberof google.iam.v1.Binding
34241
+ * @instance
34242
+ */
34243
+ Binding.prototype.members = $util.emptyArray;
34244
+
34245
+ /**
34246
+ * Binding condition.
34247
+ * @member {google.type.IExpr|null|undefined} condition
34248
+ * @memberof google.iam.v1.Binding
34249
+ * @instance
34250
+ */
34251
+ Binding.prototype.condition = null;
34252
+
34253
+ /**
34254
+ * Creates a new Binding instance using the specified properties.
34255
+ * @function create
34256
+ * @memberof google.iam.v1.Binding
34257
+ * @static
34258
+ * @param {google.iam.v1.IBinding=} [properties] Properties to set
34259
+ * @returns {google.iam.v1.Binding} Binding instance
34260
+ */
34261
+ Binding.create = function create(properties) {
34262
+ return new Binding(properties);
34263
+ };
34264
+
34265
+ /**
34266
+ * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages.
34267
+ * @function encode
34268
+ * @memberof google.iam.v1.Binding
34269
+ * @static
34270
+ * @param {google.iam.v1.IBinding} message Binding message or plain object to encode
34271
+ * @param {$protobuf.Writer} [writer] Writer to encode to
34272
+ * @returns {$protobuf.Writer} Writer
34273
+ */
34274
+ Binding.encode = function encode(message, writer) {
34275
+ if (!writer)
34276
+ writer = $Writer.create();
34277
+ if (message.role != null && Object.hasOwnProperty.call(message, "role"))
34278
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.role);
34279
+ if (message.members != null && message.members.length)
34280
+ for (var i = 0; i < message.members.length; ++i)
34281
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]);
34282
+ if (message.condition != null && Object.hasOwnProperty.call(message, "condition"))
34283
+ $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
34284
+ return writer;
34285
+ };
34286
+
34287
+ /**
34288
+ * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages.
34289
+ * @function encodeDelimited
34290
+ * @memberof google.iam.v1.Binding
34291
+ * @static
34292
+ * @param {google.iam.v1.IBinding} message Binding message or plain object to encode
34293
+ * @param {$protobuf.Writer} [writer] Writer to encode to
34294
+ * @returns {$protobuf.Writer} Writer
34295
+ */
34296
+ Binding.encodeDelimited = function encodeDelimited(message, writer) {
34297
+ return this.encode(message, writer).ldelim();
34298
+ };
34299
+
34300
+ /**
34301
+ * Decodes a Binding message from the specified reader or buffer.
34302
+ * @function decode
34303
+ * @memberof google.iam.v1.Binding
34304
+ * @static
34305
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
34306
+ * @param {number} [length] Message length if known beforehand
34307
+ * @returns {google.iam.v1.Binding} Binding
34308
+ * @throws {Error} If the payload is not a reader or valid buffer
34309
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
34310
+ */
34311
+ Binding.decode = function decode(reader, length, error) {
34312
+ if (!(reader instanceof $Reader))
34313
+ reader = $Reader.create(reader);
34314
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding();
34315
+ while (reader.pos < end) {
34316
+ var tag = reader.uint32();
34317
+ if (tag === error)
34318
+ break;
34319
+ switch (tag >>> 3) {
34320
+ case 1: {
34321
+ message.role = reader.string();
34322
+ break;
34323
+ }
34324
+ case 2: {
34325
+ if (!(message.members && message.members.length))
34326
+ message.members = [];
34327
+ message.members.push(reader.string());
34328
+ break;
34329
+ }
34330
+ case 3: {
34331
+ message.condition = $root.google.type.Expr.decode(reader, reader.uint32());
34332
+ break;
34333
+ }
34334
+ default:
34335
+ reader.skipType(tag & 7);
34336
+ break;
34337
+ }
34338
+ }
34339
+ return message;
34340
+ };
34341
+
34342
+ /**
34343
+ * Decodes a Binding message from the specified reader or buffer, length delimited.
34344
+ * @function decodeDelimited
34345
+ * @memberof google.iam.v1.Binding
34346
+ * @static
34347
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
34348
+ * @returns {google.iam.v1.Binding} Binding
34349
+ * @throws {Error} If the payload is not a reader or valid buffer
34350
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
34351
+ */
34352
+ Binding.decodeDelimited = function decodeDelimited(reader) {
34353
+ if (!(reader instanceof $Reader))
34354
+ reader = new $Reader(reader);
34355
+ return this.decode(reader, reader.uint32());
34356
+ };
34357
+
34358
+ /**
34359
+ * Verifies a Binding message.
34360
+ * @function verify
34361
+ * @memberof google.iam.v1.Binding
34362
+ * @static
34363
+ * @param {Object.<string,*>} message Plain object to verify
34364
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
34365
+ */
34366
+ Binding.verify = function verify(message) {
34367
+ if (typeof message !== "object" || message === null)
34368
+ return "object expected";
34369
+ if (message.role != null && message.hasOwnProperty("role"))
34370
+ if (!$util.isString(message.role))
34371
+ return "role: string expected";
34372
+ if (message.members != null && message.hasOwnProperty("members")) {
34373
+ if (!Array.isArray(message.members))
34374
+ return "members: array expected";
34375
+ for (var i = 0; i < message.members.length; ++i)
34376
+ if (!$util.isString(message.members[i]))
34377
+ return "members: string[] expected";
34378
+ }
34379
+ if (message.condition != null && message.hasOwnProperty("condition")) {
34380
+ var error = $root.google.type.Expr.verify(message.condition);
34381
+ if (error)
34382
+ return "condition." + error;
34383
+ }
34384
+ return null;
34385
+ };
34386
+
34387
+ /**
34388
+ * Creates a Binding message from a plain object. Also converts values to their respective internal types.
34389
+ * @function fromObject
34390
+ * @memberof google.iam.v1.Binding
34391
+ * @static
34392
+ * @param {Object.<string,*>} object Plain object
34393
+ * @returns {google.iam.v1.Binding} Binding
34394
+ */
34395
+ Binding.fromObject = function fromObject(object) {
34396
+ if (object instanceof $root.google.iam.v1.Binding)
34397
+ return object;
34398
+ var message = new $root.google.iam.v1.Binding();
34399
+ if (object.role != null)
34400
+ message.role = String(object.role);
34401
+ if (object.members) {
34402
+ if (!Array.isArray(object.members))
34403
+ throw TypeError(".google.iam.v1.Binding.members: array expected");
34404
+ message.members = [];
34405
+ for (var i = 0; i < object.members.length; ++i)
34406
+ message.members[i] = String(object.members[i]);
34407
+ }
34408
+ if (object.condition != null) {
34409
+ if (typeof object.condition !== "object")
34410
+ throw TypeError(".google.iam.v1.Binding.condition: object expected");
34411
+ message.condition = $root.google.type.Expr.fromObject(object.condition);
34412
+ }
34413
+ return message;
34414
+ };
34415
+
34416
+ /**
34417
+ * Creates a plain object from a Binding message. Also converts values to other types if specified.
34418
+ * @function toObject
34419
+ * @memberof google.iam.v1.Binding
34420
+ * @static
34421
+ * @param {google.iam.v1.Binding} message Binding
34422
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
34423
+ * @returns {Object.<string,*>} Plain object
34424
+ */
34425
+ Binding.toObject = function toObject(message, options) {
34426
+ if (!options)
34427
+ options = {};
34428
+ var object = {};
34429
+ if (options.arrays || options.defaults)
34430
+ object.members = [];
34431
+ if (options.defaults) {
34432
+ object.role = "";
34433
+ object.condition = null;
34434
+ }
34435
+ if (message.role != null && message.hasOwnProperty("role"))
34436
+ object.role = message.role;
34437
+ if (message.members && message.members.length) {
34438
+ object.members = [];
34439
+ for (var j = 0; j < message.members.length; ++j)
34440
+ object.members[j] = message.members[j];
34441
+ }
34442
+ if (message.condition != null && message.hasOwnProperty("condition"))
34443
+ object.condition = $root.google.type.Expr.toObject(message.condition, options);
34444
+ return object;
34445
+ };
34446
+
34447
+ /**
34448
+ * Converts this Binding to JSON.
34449
+ * @function toJSON
34450
+ * @memberof google.iam.v1.Binding
34451
+ * @instance
34452
+ * @returns {Object.<string,*>} JSON object
34453
+ */
34454
+ Binding.prototype.toJSON = function toJSON() {
34455
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
34456
+ };
34457
+
34458
+ /**
34459
+ * Gets the default type url for Binding
34460
+ * @function getTypeUrl
34461
+ * @memberof google.iam.v1.Binding
34462
+ * @static
34463
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
34464
+ * @returns {string} The default type url
34465
+ */
34466
+ Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
34467
+ if (typeUrlPrefix === undefined) {
34468
+ typeUrlPrefix = "type.googleapis.com";
34469
+ }
34470
+ return typeUrlPrefix + "/google.iam.v1.Binding";
34471
+ };
34472
+
34473
+ return Binding;
34474
+ })();
34475
+
34476
+ v1.AuditConfig = (function() {
34477
+
34478
+ /**
34479
+ * Properties of an AuditConfig.
34480
+ * @memberof google.iam.v1
34481
+ * @interface IAuditConfig
34482
+ * @property {string|null} [service] AuditConfig service
34483
+ * @property {Array.<google.iam.v1.IAuditLogConfig>|null} [auditLogConfigs] AuditConfig auditLogConfigs
34484
+ */
34485
+
34486
+ /**
34487
+ * Constructs a new AuditConfig.
34488
+ * @memberof google.iam.v1
34489
+ * @classdesc Represents an AuditConfig.
34490
+ * @implements IAuditConfig
34491
+ * @constructor
34492
+ * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set
34493
+ */
34494
+ function AuditConfig(properties) {
34495
+ this.auditLogConfigs = [];
34496
+ if (properties)
34497
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
34498
+ if (properties[keys[i]] != null)
34499
+ this[keys[i]] = properties[keys[i]];
34500
+ }
34501
+
34502
+ /**
34503
+ * AuditConfig service.
34504
+ * @member {string} service
34505
+ * @memberof google.iam.v1.AuditConfig
34506
+ * @instance
34507
+ */
34508
+ AuditConfig.prototype.service = "";
34509
+
34510
+ /**
34511
+ * AuditConfig auditLogConfigs.
34512
+ * @member {Array.<google.iam.v1.IAuditLogConfig>} auditLogConfigs
34513
+ * @memberof google.iam.v1.AuditConfig
34514
+ * @instance
34515
+ */
34516
+ AuditConfig.prototype.auditLogConfigs = $util.emptyArray;
34517
+
34518
+ /**
34519
+ * Creates a new AuditConfig instance using the specified properties.
34520
+ * @function create
34521
+ * @memberof google.iam.v1.AuditConfig
34522
+ * @static
34523
+ * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set
34524
+ * @returns {google.iam.v1.AuditConfig} AuditConfig instance
34525
+ */
34526
+ AuditConfig.create = function create(properties) {
34527
+ return new AuditConfig(properties);
34528
+ };
34529
+
34530
+ /**
34531
+ * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
34532
+ * @function encode
34533
+ * @memberof google.iam.v1.AuditConfig
34534
+ * @static
34535
+ * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode
34536
+ * @param {$protobuf.Writer} [writer] Writer to encode to
34537
+ * @returns {$protobuf.Writer} Writer
34538
+ */
34539
+ AuditConfig.encode = function encode(message, writer) {
34540
+ if (!writer)
34541
+ writer = $Writer.create();
34542
+ if (message.service != null && Object.hasOwnProperty.call(message, "service"))
34543
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.service);
34544
+ if (message.auditLogConfigs != null && message.auditLogConfigs.length)
34545
+ for (var i = 0; i < message.auditLogConfigs.length; ++i)
34546
+ $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
34547
+ return writer;
34548
+ };
34549
+
34550
+ /**
34551
+ * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages.
34552
+ * @function encodeDelimited
34553
+ * @memberof google.iam.v1.AuditConfig
34554
+ * @static
34555
+ * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode
34556
+ * @param {$protobuf.Writer} [writer] Writer to encode to
34557
+ * @returns {$protobuf.Writer} Writer
34558
+ */
34559
+ AuditConfig.encodeDelimited = function encodeDelimited(message, writer) {
34560
+ return this.encode(message, writer).ldelim();
34561
+ };
34562
+
34563
+ /**
34564
+ * Decodes an AuditConfig message from the specified reader or buffer.
34565
+ * @function decode
34566
+ * @memberof google.iam.v1.AuditConfig
34567
+ * @static
34568
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
34569
+ * @param {number} [length] Message length if known beforehand
34570
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
34571
+ * @throws {Error} If the payload is not a reader or valid buffer
34572
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
34573
+ */
34574
+ AuditConfig.decode = function decode(reader, length, error) {
34575
+ if (!(reader instanceof $Reader))
34576
+ reader = $Reader.create(reader);
34577
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig();
34578
+ while (reader.pos < end) {
34579
+ var tag = reader.uint32();
34580
+ if (tag === error)
34581
+ break;
34582
+ switch (tag >>> 3) {
34583
+ case 1: {
34584
+ message.service = reader.string();
34585
+ break;
34586
+ }
34587
+ case 3: {
34588
+ if (!(message.auditLogConfigs && message.auditLogConfigs.length))
34589
+ message.auditLogConfigs = [];
34590
+ message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32()));
34591
+ break;
34592
+ }
34593
+ default:
34594
+ reader.skipType(tag & 7);
34595
+ break;
34596
+ }
34597
+ }
34598
+ return message;
34599
+ };
34600
+
34601
+ /**
34602
+ * Decodes an AuditConfig message from the specified reader or buffer, length delimited.
34603
+ * @function decodeDelimited
34604
+ * @memberof google.iam.v1.AuditConfig
34605
+ * @static
34606
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
34607
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
34608
+ * @throws {Error} If the payload is not a reader or valid buffer
34609
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
34610
+ */
34611
+ AuditConfig.decodeDelimited = function decodeDelimited(reader) {
34612
+ if (!(reader instanceof $Reader))
34613
+ reader = new $Reader(reader);
34614
+ return this.decode(reader, reader.uint32());
34615
+ };
34616
+
34617
+ /**
34618
+ * Verifies an AuditConfig message.
34619
+ * @function verify
34620
+ * @memberof google.iam.v1.AuditConfig
34621
+ * @static
34622
+ * @param {Object.<string,*>} message Plain object to verify
34623
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
34624
+ */
34625
+ AuditConfig.verify = function verify(message) {
34626
+ if (typeof message !== "object" || message === null)
34627
+ return "object expected";
34628
+ if (message.service != null && message.hasOwnProperty("service"))
34629
+ if (!$util.isString(message.service))
34630
+ return "service: string expected";
34631
+ if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) {
34632
+ if (!Array.isArray(message.auditLogConfigs))
34633
+ return "auditLogConfigs: array expected";
34634
+ for (var i = 0; i < message.auditLogConfigs.length; ++i) {
34635
+ var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]);
34636
+ if (error)
34637
+ return "auditLogConfigs." + error;
34638
+ }
34639
+ }
34640
+ return null;
34641
+ };
34642
+
34643
+ /**
34644
+ * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types.
34645
+ * @function fromObject
34646
+ * @memberof google.iam.v1.AuditConfig
34647
+ * @static
34648
+ * @param {Object.<string,*>} object Plain object
34649
+ * @returns {google.iam.v1.AuditConfig} AuditConfig
34650
+ */
34651
+ AuditConfig.fromObject = function fromObject(object) {
34652
+ if (object instanceof $root.google.iam.v1.AuditConfig)
34653
+ return object;
34654
+ var message = new $root.google.iam.v1.AuditConfig();
34655
+ if (object.service != null)
34656
+ message.service = String(object.service);
34657
+ if (object.auditLogConfigs) {
34658
+ if (!Array.isArray(object.auditLogConfigs))
34659
+ throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected");
34660
+ message.auditLogConfigs = [];
34661
+ for (var i = 0; i < object.auditLogConfigs.length; ++i) {
34662
+ if (typeof object.auditLogConfigs[i] !== "object")
34663
+ throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected");
34664
+ message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]);
34665
+ }
34666
+ }
34667
+ return message;
34668
+ };
34669
+
34670
+ /**
34671
+ * Creates a plain object from an AuditConfig message. Also converts values to other types if specified.
34672
+ * @function toObject
34673
+ * @memberof google.iam.v1.AuditConfig
34674
+ * @static
34675
+ * @param {google.iam.v1.AuditConfig} message AuditConfig
34676
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
34677
+ * @returns {Object.<string,*>} Plain object
34678
+ */
34679
+ AuditConfig.toObject = function toObject(message, options) {
34680
+ if (!options)
34681
+ options = {};
34682
+ var object = {};
34683
+ if (options.arrays || options.defaults)
34684
+ object.auditLogConfigs = [];
34685
+ if (options.defaults)
34686
+ object.service = "";
34687
+ if (message.service != null && message.hasOwnProperty("service"))
34688
+ object.service = message.service;
34689
+ if (message.auditLogConfigs && message.auditLogConfigs.length) {
34690
+ object.auditLogConfigs = [];
34691
+ for (var j = 0; j < message.auditLogConfigs.length; ++j)
34692
+ object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options);
34693
+ }
34694
+ return object;
34695
+ };
34696
+
34697
+ /**
34698
+ * Converts this AuditConfig to JSON.
34699
+ * @function toJSON
34700
+ * @memberof google.iam.v1.AuditConfig
34701
+ * @instance
34702
+ * @returns {Object.<string,*>} JSON object
34703
+ */
34704
+ AuditConfig.prototype.toJSON = function toJSON() {
34705
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
34706
+ };
34707
+
34708
+ /**
34709
+ * Gets the default type url for AuditConfig
34710
+ * @function getTypeUrl
34711
+ * @memberof google.iam.v1.AuditConfig
34712
+ * @static
34713
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
34714
+ * @returns {string} The default type url
34715
+ */
34716
+ AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
34717
+ if (typeUrlPrefix === undefined) {
34718
+ typeUrlPrefix = "type.googleapis.com";
34719
+ }
34720
+ return typeUrlPrefix + "/google.iam.v1.AuditConfig";
34721
+ };
34722
+
34723
+ return AuditConfig;
34724
+ })();
34725
+
34726
+ v1.AuditLogConfig = (function() {
34727
+
34728
+ /**
34729
+ * Properties of an AuditLogConfig.
34730
+ * @memberof google.iam.v1
34731
+ * @interface IAuditLogConfig
34732
+ * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType
34733
+ * @property {Array.<string>|null} [exemptedMembers] AuditLogConfig exemptedMembers
34734
+ */
34735
+
34736
+ /**
34737
+ * Constructs a new AuditLogConfig.
34738
+ * @memberof google.iam.v1
34739
+ * @classdesc Represents an AuditLogConfig.
34740
+ * @implements IAuditLogConfig
34741
+ * @constructor
34742
+ * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set
34743
+ */
34744
+ function AuditLogConfig(properties) {
34745
+ this.exemptedMembers = [];
34746
+ if (properties)
34747
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
34748
+ if (properties[keys[i]] != null)
34749
+ this[keys[i]] = properties[keys[i]];
34750
+ }
34751
+
34752
+ /**
34753
+ * AuditLogConfig logType.
34754
+ * @member {google.iam.v1.AuditLogConfig.LogType} logType
34755
+ * @memberof google.iam.v1.AuditLogConfig
34756
+ * @instance
34757
+ */
34758
+ AuditLogConfig.prototype.logType = 0;
34759
+
34760
+ /**
34761
+ * AuditLogConfig exemptedMembers.
34762
+ * @member {Array.<string>} exemptedMembers
34763
+ * @memberof google.iam.v1.AuditLogConfig
34764
+ * @instance
34765
+ */
34766
+ AuditLogConfig.prototype.exemptedMembers = $util.emptyArray;
34767
+
34768
+ /**
34769
+ * Creates a new AuditLogConfig instance using the specified properties.
34770
+ * @function create
34771
+ * @memberof google.iam.v1.AuditLogConfig
34772
+ * @static
34773
+ * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set
34774
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance
34775
+ */
34776
+ AuditLogConfig.create = function create(properties) {
34777
+ return new AuditLogConfig(properties);
34778
+ };
34779
+
34780
+ /**
34781
+ * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
34782
+ * @function encode
34783
+ * @memberof google.iam.v1.AuditLogConfig
34784
+ * @static
34785
+ * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode
34786
+ * @param {$protobuf.Writer} [writer] Writer to encode to
34787
+ * @returns {$protobuf.Writer} Writer
34788
+ */
34789
+ AuditLogConfig.encode = function encode(message, writer) {
34790
+ if (!writer)
34791
+ writer = $Writer.create();
34792
+ if (message.logType != null && Object.hasOwnProperty.call(message, "logType"))
34793
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType);
34794
+ if (message.exemptedMembers != null && message.exemptedMembers.length)
34795
+ for (var i = 0; i < message.exemptedMembers.length; ++i)
34796
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]);
34797
+ return writer;
34798
+ };
34799
+
34800
+ /**
34801
+ * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages.
34802
+ * @function encodeDelimited
34803
+ * @memberof google.iam.v1.AuditLogConfig
34804
+ * @static
34805
+ * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode
34806
+ * @param {$protobuf.Writer} [writer] Writer to encode to
34807
+ * @returns {$protobuf.Writer} Writer
34808
+ */
34809
+ AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) {
34810
+ return this.encode(message, writer).ldelim();
34811
+ };
34812
+
34813
+ /**
34814
+ * Decodes an AuditLogConfig message from the specified reader or buffer.
34815
+ * @function decode
34816
+ * @memberof google.iam.v1.AuditLogConfig
34817
+ * @static
34818
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
34819
+ * @param {number} [length] Message length if known beforehand
34820
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
34821
+ * @throws {Error} If the payload is not a reader or valid buffer
34822
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
34823
+ */
34824
+ AuditLogConfig.decode = function decode(reader, length, error) {
34825
+ if (!(reader instanceof $Reader))
34826
+ reader = $Reader.create(reader);
34827
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig();
34828
+ while (reader.pos < end) {
34829
+ var tag = reader.uint32();
34830
+ if (tag === error)
34831
+ break;
34832
+ switch (tag >>> 3) {
34833
+ case 1: {
34834
+ message.logType = reader.int32();
34835
+ break;
34836
+ }
34837
+ case 2: {
34838
+ if (!(message.exemptedMembers && message.exemptedMembers.length))
34839
+ message.exemptedMembers = [];
34840
+ message.exemptedMembers.push(reader.string());
34841
+ break;
34842
+ }
34843
+ default:
34844
+ reader.skipType(tag & 7);
34845
+ break;
34846
+ }
34847
+ }
34848
+ return message;
34849
+ };
34850
+
34851
+ /**
34852
+ * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited.
34853
+ * @function decodeDelimited
34854
+ * @memberof google.iam.v1.AuditLogConfig
34855
+ * @static
34856
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
34857
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
34858
+ * @throws {Error} If the payload is not a reader or valid buffer
34859
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
34860
+ */
34861
+ AuditLogConfig.decodeDelimited = function decodeDelimited(reader) {
34862
+ if (!(reader instanceof $Reader))
34863
+ reader = new $Reader(reader);
34864
+ return this.decode(reader, reader.uint32());
34865
+ };
34866
+
34867
+ /**
34868
+ * Verifies an AuditLogConfig message.
34869
+ * @function verify
34870
+ * @memberof google.iam.v1.AuditLogConfig
34871
+ * @static
34872
+ * @param {Object.<string,*>} message Plain object to verify
34873
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
34874
+ */
34875
+ AuditLogConfig.verify = function verify(message) {
34876
+ if (typeof message !== "object" || message === null)
34877
+ return "object expected";
34878
+ if (message.logType != null && message.hasOwnProperty("logType"))
34879
+ switch (message.logType) {
34880
+ default:
34881
+ return "logType: enum value expected";
34882
+ case 0:
34883
+ case 1:
34884
+ case 2:
34885
+ case 3:
34886
+ break;
34887
+ }
34888
+ if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) {
34889
+ if (!Array.isArray(message.exemptedMembers))
34890
+ return "exemptedMembers: array expected";
34891
+ for (var i = 0; i < message.exemptedMembers.length; ++i)
34892
+ if (!$util.isString(message.exemptedMembers[i]))
34893
+ return "exemptedMembers: string[] expected";
34894
+ }
34895
+ return null;
34896
+ };
34897
+
34898
+ /**
34899
+ * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types.
34900
+ * @function fromObject
34901
+ * @memberof google.iam.v1.AuditLogConfig
34902
+ * @static
34903
+ * @param {Object.<string,*>} object Plain object
34904
+ * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig
34905
+ */
34906
+ AuditLogConfig.fromObject = function fromObject(object) {
34907
+ if (object instanceof $root.google.iam.v1.AuditLogConfig)
34908
+ return object;
34909
+ var message = new $root.google.iam.v1.AuditLogConfig();
34910
+ switch (object.logType) {
34911
+ default:
34912
+ if (typeof object.logType === "number") {
34913
+ message.logType = object.logType;
34914
+ break;
34915
+ }
34916
+ break;
34917
+ case "LOG_TYPE_UNSPECIFIED":
34918
+ case 0:
34919
+ message.logType = 0;
34920
+ break;
34921
+ case "ADMIN_READ":
34922
+ case 1:
34923
+ message.logType = 1;
34924
+ break;
34925
+ case "DATA_WRITE":
34926
+ case 2:
34927
+ message.logType = 2;
34928
+ break;
34929
+ case "DATA_READ":
34930
+ case 3:
34931
+ message.logType = 3;
34932
+ break;
34933
+ }
34934
+ if (object.exemptedMembers) {
34935
+ if (!Array.isArray(object.exemptedMembers))
34936
+ throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected");
34937
+ message.exemptedMembers = [];
34938
+ for (var i = 0; i < object.exemptedMembers.length; ++i)
34939
+ message.exemptedMembers[i] = String(object.exemptedMembers[i]);
34940
+ }
34941
+ return message;
34942
+ };
34943
+
34944
+ /**
34945
+ * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified.
34946
+ * @function toObject
34947
+ * @memberof google.iam.v1.AuditLogConfig
34948
+ * @static
34949
+ * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig
34950
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
34951
+ * @returns {Object.<string,*>} Plain object
34952
+ */
34953
+ AuditLogConfig.toObject = function toObject(message, options) {
34954
+ if (!options)
34955
+ options = {};
34956
+ var object = {};
34957
+ if (options.arrays || options.defaults)
34958
+ object.exemptedMembers = [];
34959
+ if (options.defaults)
34960
+ object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0;
34961
+ if (message.logType != null && message.hasOwnProperty("logType"))
34962
+ object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType;
34963
+ if (message.exemptedMembers && message.exemptedMembers.length) {
34964
+ object.exemptedMembers = [];
34965
+ for (var j = 0; j < message.exemptedMembers.length; ++j)
34966
+ object.exemptedMembers[j] = message.exemptedMembers[j];
34967
+ }
34968
+ return object;
34969
+ };
34970
+
34971
+ /**
34972
+ * Converts this AuditLogConfig to JSON.
34973
+ * @function toJSON
34974
+ * @memberof google.iam.v1.AuditLogConfig
34975
+ * @instance
34976
+ * @returns {Object.<string,*>} JSON object
34977
+ */
34978
+ AuditLogConfig.prototype.toJSON = function toJSON() {
34979
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
34980
+ };
34981
+
34982
+ /**
34983
+ * Gets the default type url for AuditLogConfig
34984
+ * @function getTypeUrl
34985
+ * @memberof google.iam.v1.AuditLogConfig
34986
+ * @static
34987
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
34988
+ * @returns {string} The default type url
34989
+ */
34990
+ AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
34991
+ if (typeUrlPrefix === undefined) {
34992
+ typeUrlPrefix = "type.googleapis.com";
34993
+ }
34994
+ return typeUrlPrefix + "/google.iam.v1.AuditLogConfig";
34995
+ };
34996
+
34997
+ /**
34998
+ * LogType enum.
34999
+ * @name google.iam.v1.AuditLogConfig.LogType
35000
+ * @enum {number}
35001
+ * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value
35002
+ * @property {number} ADMIN_READ=1 ADMIN_READ value
35003
+ * @property {number} DATA_WRITE=2 DATA_WRITE value
35004
+ * @property {number} DATA_READ=3 DATA_READ value
35005
+ */
35006
+ AuditLogConfig.LogType = (function() {
35007
+ var valuesById = {}, values = Object.create(valuesById);
35008
+ values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0;
35009
+ values[valuesById[1] = "ADMIN_READ"] = 1;
35010
+ values[valuesById[2] = "DATA_WRITE"] = 2;
35011
+ values[valuesById[3] = "DATA_READ"] = 3;
35012
+ return values;
35013
+ })();
35014
+
35015
+ return AuditLogConfig;
35016
+ })();
35017
+
35018
+ v1.PolicyDelta = (function() {
35019
+
35020
+ /**
35021
+ * Properties of a PolicyDelta.
35022
+ * @memberof google.iam.v1
35023
+ * @interface IPolicyDelta
35024
+ * @property {Array.<google.iam.v1.IBindingDelta>|null} [bindingDeltas] PolicyDelta bindingDeltas
35025
+ * @property {Array.<google.iam.v1.IAuditConfigDelta>|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas
35026
+ */
35027
+
35028
+ /**
35029
+ * Constructs a new PolicyDelta.
35030
+ * @memberof google.iam.v1
35031
+ * @classdesc Represents a PolicyDelta.
35032
+ * @implements IPolicyDelta
35033
+ * @constructor
35034
+ * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set
35035
+ */
35036
+ function PolicyDelta(properties) {
35037
+ this.bindingDeltas = [];
35038
+ this.auditConfigDeltas = [];
35039
+ if (properties)
35040
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
35041
+ if (properties[keys[i]] != null)
35042
+ this[keys[i]] = properties[keys[i]];
35043
+ }
35044
+
35045
+ /**
35046
+ * PolicyDelta bindingDeltas.
35047
+ * @member {Array.<google.iam.v1.IBindingDelta>} bindingDeltas
35048
+ * @memberof google.iam.v1.PolicyDelta
35049
+ * @instance
35050
+ */
35051
+ PolicyDelta.prototype.bindingDeltas = $util.emptyArray;
35052
+
35053
+ /**
35054
+ * PolicyDelta auditConfigDeltas.
35055
+ * @member {Array.<google.iam.v1.IAuditConfigDelta>} auditConfigDeltas
35056
+ * @memberof google.iam.v1.PolicyDelta
35057
+ * @instance
35058
+ */
35059
+ PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray;
35060
+
35061
+ /**
35062
+ * Creates a new PolicyDelta instance using the specified properties.
35063
+ * @function create
35064
+ * @memberof google.iam.v1.PolicyDelta
35065
+ * @static
35066
+ * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set
35067
+ * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance
35068
+ */
35069
+ PolicyDelta.create = function create(properties) {
35070
+ return new PolicyDelta(properties);
35071
+ };
35072
+
35073
+ /**
35074
+ * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages.
35075
+ * @function encode
35076
+ * @memberof google.iam.v1.PolicyDelta
35077
+ * @static
35078
+ * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode
35079
+ * @param {$protobuf.Writer} [writer] Writer to encode to
35080
+ * @returns {$protobuf.Writer} Writer
35081
+ */
35082
+ PolicyDelta.encode = function encode(message, writer) {
35083
+ if (!writer)
35084
+ writer = $Writer.create();
35085
+ if (message.bindingDeltas != null && message.bindingDeltas.length)
35086
+ for (var i = 0; i < message.bindingDeltas.length; ++i)
35087
+ $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
35088
+ if (message.auditConfigDeltas != null && message.auditConfigDeltas.length)
35089
+ for (var i = 0; i < message.auditConfigDeltas.length; ++i)
35090
+ $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
35091
+ return writer;
35092
+ };
35093
+
35094
+ /**
35095
+ * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages.
35096
+ * @function encodeDelimited
35097
+ * @memberof google.iam.v1.PolicyDelta
35098
+ * @static
35099
+ * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode
35100
+ * @param {$protobuf.Writer} [writer] Writer to encode to
35101
+ * @returns {$protobuf.Writer} Writer
35102
+ */
35103
+ PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) {
35104
+ return this.encode(message, writer).ldelim();
35105
+ };
35106
+
35107
+ /**
35108
+ * Decodes a PolicyDelta message from the specified reader or buffer.
35109
+ * @function decode
35110
+ * @memberof google.iam.v1.PolicyDelta
35111
+ * @static
35112
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
35113
+ * @param {number} [length] Message length if known beforehand
35114
+ * @returns {google.iam.v1.PolicyDelta} PolicyDelta
35115
+ * @throws {Error} If the payload is not a reader or valid buffer
35116
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
35117
+ */
35118
+ PolicyDelta.decode = function decode(reader, length, error) {
35119
+ if (!(reader instanceof $Reader))
35120
+ reader = $Reader.create(reader);
35121
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta();
35122
+ while (reader.pos < end) {
35123
+ var tag = reader.uint32();
35124
+ if (tag === error)
35125
+ break;
35126
+ switch (tag >>> 3) {
35127
+ case 1: {
35128
+ if (!(message.bindingDeltas && message.bindingDeltas.length))
35129
+ message.bindingDeltas = [];
35130
+ message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32()));
35131
+ break;
35132
+ }
35133
+ case 2: {
35134
+ if (!(message.auditConfigDeltas && message.auditConfigDeltas.length))
35135
+ message.auditConfigDeltas = [];
35136
+ message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32()));
35137
+ break;
35138
+ }
35139
+ default:
35140
+ reader.skipType(tag & 7);
35141
+ break;
35142
+ }
35143
+ }
35144
+ return message;
35145
+ };
35146
+
35147
+ /**
35148
+ * Decodes a PolicyDelta message from the specified reader or buffer, length delimited.
35149
+ * @function decodeDelimited
35150
+ * @memberof google.iam.v1.PolicyDelta
35151
+ * @static
35152
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
35153
+ * @returns {google.iam.v1.PolicyDelta} PolicyDelta
35154
+ * @throws {Error} If the payload is not a reader or valid buffer
35155
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
35156
+ */
35157
+ PolicyDelta.decodeDelimited = function decodeDelimited(reader) {
35158
+ if (!(reader instanceof $Reader))
35159
+ reader = new $Reader(reader);
35160
+ return this.decode(reader, reader.uint32());
35161
+ };
35162
+
35163
+ /**
35164
+ * Verifies a PolicyDelta message.
35165
+ * @function verify
35166
+ * @memberof google.iam.v1.PolicyDelta
35167
+ * @static
35168
+ * @param {Object.<string,*>} message Plain object to verify
35169
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
35170
+ */
35171
+ PolicyDelta.verify = function verify(message) {
35172
+ if (typeof message !== "object" || message === null)
35173
+ return "object expected";
35174
+ if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) {
35175
+ if (!Array.isArray(message.bindingDeltas))
35176
+ return "bindingDeltas: array expected";
35177
+ for (var i = 0; i < message.bindingDeltas.length; ++i) {
35178
+ var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]);
35179
+ if (error)
35180
+ return "bindingDeltas." + error;
35181
+ }
35182
+ }
35183
+ if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) {
35184
+ if (!Array.isArray(message.auditConfigDeltas))
35185
+ return "auditConfigDeltas: array expected";
35186
+ for (var i = 0; i < message.auditConfigDeltas.length; ++i) {
35187
+ var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]);
35188
+ if (error)
35189
+ return "auditConfigDeltas." + error;
35190
+ }
35191
+ }
35192
+ return null;
35193
+ };
35194
+
35195
+ /**
35196
+ * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types.
35197
+ * @function fromObject
35198
+ * @memberof google.iam.v1.PolicyDelta
35199
+ * @static
35200
+ * @param {Object.<string,*>} object Plain object
35201
+ * @returns {google.iam.v1.PolicyDelta} PolicyDelta
35202
+ */
35203
+ PolicyDelta.fromObject = function fromObject(object) {
35204
+ if (object instanceof $root.google.iam.v1.PolicyDelta)
35205
+ return object;
35206
+ var message = new $root.google.iam.v1.PolicyDelta();
35207
+ if (object.bindingDeltas) {
35208
+ if (!Array.isArray(object.bindingDeltas))
35209
+ throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected");
35210
+ message.bindingDeltas = [];
35211
+ for (var i = 0; i < object.bindingDeltas.length; ++i) {
35212
+ if (typeof object.bindingDeltas[i] !== "object")
35213
+ throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected");
35214
+ message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]);
35215
+ }
35216
+ }
35217
+ if (object.auditConfigDeltas) {
35218
+ if (!Array.isArray(object.auditConfigDeltas))
35219
+ throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected");
35220
+ message.auditConfigDeltas = [];
35221
+ for (var i = 0; i < object.auditConfigDeltas.length; ++i) {
35222
+ if (typeof object.auditConfigDeltas[i] !== "object")
35223
+ throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected");
35224
+ message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]);
35225
+ }
35226
+ }
35227
+ return message;
35228
+ };
35229
+
35230
+ /**
35231
+ * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified.
35232
+ * @function toObject
35233
+ * @memberof google.iam.v1.PolicyDelta
35234
+ * @static
35235
+ * @param {google.iam.v1.PolicyDelta} message PolicyDelta
35236
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
35237
+ * @returns {Object.<string,*>} Plain object
35238
+ */
35239
+ PolicyDelta.toObject = function toObject(message, options) {
35240
+ if (!options)
35241
+ options = {};
35242
+ var object = {};
35243
+ if (options.arrays || options.defaults) {
35244
+ object.bindingDeltas = [];
35245
+ object.auditConfigDeltas = [];
35246
+ }
35247
+ if (message.bindingDeltas && message.bindingDeltas.length) {
35248
+ object.bindingDeltas = [];
35249
+ for (var j = 0; j < message.bindingDeltas.length; ++j)
35250
+ object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options);
35251
+ }
35252
+ if (message.auditConfigDeltas && message.auditConfigDeltas.length) {
35253
+ object.auditConfigDeltas = [];
35254
+ for (var j = 0; j < message.auditConfigDeltas.length; ++j)
35255
+ object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options);
35256
+ }
35257
+ return object;
35258
+ };
35259
+
35260
+ /**
35261
+ * Converts this PolicyDelta to JSON.
35262
+ * @function toJSON
35263
+ * @memberof google.iam.v1.PolicyDelta
35264
+ * @instance
35265
+ * @returns {Object.<string,*>} JSON object
35266
+ */
35267
+ PolicyDelta.prototype.toJSON = function toJSON() {
35268
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
35269
+ };
35270
+
35271
+ /**
35272
+ * Gets the default type url for PolicyDelta
35273
+ * @function getTypeUrl
35274
+ * @memberof google.iam.v1.PolicyDelta
35275
+ * @static
35276
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
35277
+ * @returns {string} The default type url
35278
+ */
35279
+ PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
35280
+ if (typeUrlPrefix === undefined) {
35281
+ typeUrlPrefix = "type.googleapis.com";
35282
+ }
35283
+ return typeUrlPrefix + "/google.iam.v1.PolicyDelta";
35284
+ };
35285
+
35286
+ return PolicyDelta;
35287
+ })();
35288
+
35289
+ v1.BindingDelta = (function() {
35290
+
35291
+ /**
35292
+ * Properties of a BindingDelta.
35293
+ * @memberof google.iam.v1
35294
+ * @interface IBindingDelta
35295
+ * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action
35296
+ * @property {string|null} [role] BindingDelta role
35297
+ * @property {string|null} [member] BindingDelta member
35298
+ * @property {google.type.IExpr|null} [condition] BindingDelta condition
35299
+ */
35300
+
35301
+ /**
35302
+ * Constructs a new BindingDelta.
35303
+ * @memberof google.iam.v1
35304
+ * @classdesc Represents a BindingDelta.
35305
+ * @implements IBindingDelta
35306
+ * @constructor
35307
+ * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set
35308
+ */
35309
+ function BindingDelta(properties) {
35310
+ if (properties)
35311
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
35312
+ if (properties[keys[i]] != null)
35313
+ this[keys[i]] = properties[keys[i]];
35314
+ }
35315
+
35316
+ /**
35317
+ * BindingDelta action.
35318
+ * @member {google.iam.v1.BindingDelta.Action} action
35319
+ * @memberof google.iam.v1.BindingDelta
35320
+ * @instance
35321
+ */
35322
+ BindingDelta.prototype.action = 0;
35323
+
35324
+ /**
35325
+ * BindingDelta role.
35326
+ * @member {string} role
35327
+ * @memberof google.iam.v1.BindingDelta
35328
+ * @instance
35329
+ */
35330
+ BindingDelta.prototype.role = "";
35331
+
35332
+ /**
35333
+ * BindingDelta member.
35334
+ * @member {string} member
35335
+ * @memberof google.iam.v1.BindingDelta
35336
+ * @instance
35337
+ */
35338
+ BindingDelta.prototype.member = "";
35339
+
35340
+ /**
35341
+ * BindingDelta condition.
35342
+ * @member {google.type.IExpr|null|undefined} condition
35343
+ * @memberof google.iam.v1.BindingDelta
35344
+ * @instance
35345
+ */
35346
+ BindingDelta.prototype.condition = null;
35347
+
35348
+ /**
35349
+ * Creates a new BindingDelta instance using the specified properties.
35350
+ * @function create
35351
+ * @memberof google.iam.v1.BindingDelta
35352
+ * @static
35353
+ * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set
35354
+ * @returns {google.iam.v1.BindingDelta} BindingDelta instance
35355
+ */
35356
+ BindingDelta.create = function create(properties) {
35357
+ return new BindingDelta(properties);
35358
+ };
35359
+
35360
+ /**
35361
+ * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages.
35362
+ * @function encode
35363
+ * @memberof google.iam.v1.BindingDelta
35364
+ * @static
35365
+ * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode
35366
+ * @param {$protobuf.Writer} [writer] Writer to encode to
35367
+ * @returns {$protobuf.Writer} Writer
35368
+ */
35369
+ BindingDelta.encode = function encode(message, writer) {
35370
+ if (!writer)
35371
+ writer = $Writer.create();
35372
+ if (message.action != null && Object.hasOwnProperty.call(message, "action"))
35373
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action);
35374
+ if (message.role != null && Object.hasOwnProperty.call(message, "role"))
35375
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.role);
35376
+ if (message.member != null && Object.hasOwnProperty.call(message, "member"))
35377
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.member);
35378
+ if (message.condition != null && Object.hasOwnProperty.call(message, "condition"))
35379
+ $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
35380
+ return writer;
35381
+ };
35382
+
35383
+ /**
35384
+ * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages.
35385
+ * @function encodeDelimited
35386
+ * @memberof google.iam.v1.BindingDelta
35387
+ * @static
35388
+ * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode
35389
+ * @param {$protobuf.Writer} [writer] Writer to encode to
35390
+ * @returns {$protobuf.Writer} Writer
35391
+ */
35392
+ BindingDelta.encodeDelimited = function encodeDelimited(message, writer) {
35393
+ return this.encode(message, writer).ldelim();
35394
+ };
35395
+
35396
+ /**
35397
+ * Decodes a BindingDelta message from the specified reader or buffer.
35398
+ * @function decode
35399
+ * @memberof google.iam.v1.BindingDelta
35400
+ * @static
35401
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
35402
+ * @param {number} [length] Message length if known beforehand
35403
+ * @returns {google.iam.v1.BindingDelta} BindingDelta
35404
+ * @throws {Error} If the payload is not a reader or valid buffer
35405
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
35406
+ */
35407
+ BindingDelta.decode = function decode(reader, length, error) {
35408
+ if (!(reader instanceof $Reader))
35409
+ reader = $Reader.create(reader);
35410
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta();
35411
+ while (reader.pos < end) {
35412
+ var tag = reader.uint32();
35413
+ if (tag === error)
35414
+ break;
35415
+ switch (tag >>> 3) {
35416
+ case 1: {
35417
+ message.action = reader.int32();
35418
+ break;
35419
+ }
35420
+ case 2: {
35421
+ message.role = reader.string();
35422
+ break;
35423
+ }
35424
+ case 3: {
35425
+ message.member = reader.string();
35426
+ break;
35427
+ }
35428
+ case 4: {
35429
+ message.condition = $root.google.type.Expr.decode(reader, reader.uint32());
35430
+ break;
35431
+ }
35432
+ default:
35433
+ reader.skipType(tag & 7);
35434
+ break;
35435
+ }
35436
+ }
35437
+ return message;
35438
+ };
35439
+
35440
+ /**
35441
+ * Decodes a BindingDelta message from the specified reader or buffer, length delimited.
35442
+ * @function decodeDelimited
35443
+ * @memberof google.iam.v1.BindingDelta
35444
+ * @static
35445
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
35446
+ * @returns {google.iam.v1.BindingDelta} BindingDelta
35447
+ * @throws {Error} If the payload is not a reader or valid buffer
35448
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
35449
+ */
35450
+ BindingDelta.decodeDelimited = function decodeDelimited(reader) {
35451
+ if (!(reader instanceof $Reader))
35452
+ reader = new $Reader(reader);
35453
+ return this.decode(reader, reader.uint32());
35454
+ };
35455
+
35456
+ /**
35457
+ * Verifies a BindingDelta message.
35458
+ * @function verify
35459
+ * @memberof google.iam.v1.BindingDelta
35460
+ * @static
35461
+ * @param {Object.<string,*>} message Plain object to verify
35462
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
35463
+ */
35464
+ BindingDelta.verify = function verify(message) {
35465
+ if (typeof message !== "object" || message === null)
35466
+ return "object expected";
35467
+ if (message.action != null && message.hasOwnProperty("action"))
35468
+ switch (message.action) {
35469
+ default:
35470
+ return "action: enum value expected";
35471
+ case 0:
35472
+ case 1:
35473
+ case 2:
35474
+ break;
35475
+ }
35476
+ if (message.role != null && message.hasOwnProperty("role"))
35477
+ if (!$util.isString(message.role))
35478
+ return "role: string expected";
35479
+ if (message.member != null && message.hasOwnProperty("member"))
35480
+ if (!$util.isString(message.member))
35481
+ return "member: string expected";
35482
+ if (message.condition != null && message.hasOwnProperty("condition")) {
35483
+ var error = $root.google.type.Expr.verify(message.condition);
35484
+ if (error)
35485
+ return "condition." + error;
35486
+ }
35487
+ return null;
35488
+ };
35489
+
35490
+ /**
35491
+ * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types.
35492
+ * @function fromObject
35493
+ * @memberof google.iam.v1.BindingDelta
35494
+ * @static
35495
+ * @param {Object.<string,*>} object Plain object
35496
+ * @returns {google.iam.v1.BindingDelta} BindingDelta
35497
+ */
35498
+ BindingDelta.fromObject = function fromObject(object) {
35499
+ if (object instanceof $root.google.iam.v1.BindingDelta)
35500
+ return object;
35501
+ var message = new $root.google.iam.v1.BindingDelta();
35502
+ switch (object.action) {
35503
+ default:
35504
+ if (typeof object.action === "number") {
35505
+ message.action = object.action;
35506
+ break;
35507
+ }
35508
+ break;
35509
+ case "ACTION_UNSPECIFIED":
35510
+ case 0:
35511
+ message.action = 0;
35512
+ break;
35513
+ case "ADD":
35514
+ case 1:
35515
+ message.action = 1;
35516
+ break;
35517
+ case "REMOVE":
35518
+ case 2:
35519
+ message.action = 2;
35520
+ break;
35521
+ }
35522
+ if (object.role != null)
35523
+ message.role = String(object.role);
35524
+ if (object.member != null)
35525
+ message.member = String(object.member);
35526
+ if (object.condition != null) {
35527
+ if (typeof object.condition !== "object")
35528
+ throw TypeError(".google.iam.v1.BindingDelta.condition: object expected");
35529
+ message.condition = $root.google.type.Expr.fromObject(object.condition);
35530
+ }
35531
+ return message;
35532
+ };
35533
+
35534
+ /**
35535
+ * Creates a plain object from a BindingDelta message. Also converts values to other types if specified.
35536
+ * @function toObject
35537
+ * @memberof google.iam.v1.BindingDelta
35538
+ * @static
35539
+ * @param {google.iam.v1.BindingDelta} message BindingDelta
35540
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
35541
+ * @returns {Object.<string,*>} Plain object
35542
+ */
35543
+ BindingDelta.toObject = function toObject(message, options) {
35544
+ if (!options)
35545
+ options = {};
35546
+ var object = {};
35547
+ if (options.defaults) {
35548
+ object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0;
35549
+ object.role = "";
35550
+ object.member = "";
35551
+ object.condition = null;
35552
+ }
35553
+ if (message.action != null && message.hasOwnProperty("action"))
35554
+ object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action;
35555
+ if (message.role != null && message.hasOwnProperty("role"))
35556
+ object.role = message.role;
35557
+ if (message.member != null && message.hasOwnProperty("member"))
35558
+ object.member = message.member;
35559
+ if (message.condition != null && message.hasOwnProperty("condition"))
35560
+ object.condition = $root.google.type.Expr.toObject(message.condition, options);
35561
+ return object;
35562
+ };
35563
+
35564
+ /**
35565
+ * Converts this BindingDelta to JSON.
35566
+ * @function toJSON
35567
+ * @memberof google.iam.v1.BindingDelta
35568
+ * @instance
35569
+ * @returns {Object.<string,*>} JSON object
35570
+ */
35571
+ BindingDelta.prototype.toJSON = function toJSON() {
35572
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
35573
+ };
35574
+
35575
+ /**
35576
+ * Gets the default type url for BindingDelta
35577
+ * @function getTypeUrl
35578
+ * @memberof google.iam.v1.BindingDelta
35579
+ * @static
35580
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
35581
+ * @returns {string} The default type url
35582
+ */
35583
+ BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
35584
+ if (typeUrlPrefix === undefined) {
35585
+ typeUrlPrefix = "type.googleapis.com";
35586
+ }
35587
+ return typeUrlPrefix + "/google.iam.v1.BindingDelta";
35588
+ };
35589
+
35590
+ /**
35591
+ * Action enum.
35592
+ * @name google.iam.v1.BindingDelta.Action
35593
+ * @enum {number}
35594
+ * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value
35595
+ * @property {number} ADD=1 ADD value
35596
+ * @property {number} REMOVE=2 REMOVE value
35597
+ */
35598
+ BindingDelta.Action = (function() {
35599
+ var valuesById = {}, values = Object.create(valuesById);
35600
+ values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0;
35601
+ values[valuesById[1] = "ADD"] = 1;
35602
+ values[valuesById[2] = "REMOVE"] = 2;
35603
+ return values;
35604
+ })();
35605
+
35606
+ return BindingDelta;
35607
+ })();
35608
+
35609
+ v1.AuditConfigDelta = (function() {
35610
+
35611
+ /**
35612
+ * Properties of an AuditConfigDelta.
35613
+ * @memberof google.iam.v1
35614
+ * @interface IAuditConfigDelta
35615
+ * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action
35616
+ * @property {string|null} [service] AuditConfigDelta service
35617
+ * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember
35618
+ * @property {string|null} [logType] AuditConfigDelta logType
35619
+ */
35620
+
35621
+ /**
35622
+ * Constructs a new AuditConfigDelta.
35623
+ * @memberof google.iam.v1
35624
+ * @classdesc Represents an AuditConfigDelta.
35625
+ * @implements IAuditConfigDelta
35626
+ * @constructor
35627
+ * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set
35628
+ */
35629
+ function AuditConfigDelta(properties) {
35630
+ if (properties)
35631
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
35632
+ if (properties[keys[i]] != null)
35633
+ this[keys[i]] = properties[keys[i]];
35634
+ }
35635
+
35636
+ /**
35637
+ * AuditConfigDelta action.
35638
+ * @member {google.iam.v1.AuditConfigDelta.Action} action
35639
+ * @memberof google.iam.v1.AuditConfigDelta
35640
+ * @instance
35641
+ */
35642
+ AuditConfigDelta.prototype.action = 0;
35643
+
35644
+ /**
35645
+ * AuditConfigDelta service.
35646
+ * @member {string} service
35647
+ * @memberof google.iam.v1.AuditConfigDelta
35648
+ * @instance
35649
+ */
35650
+ AuditConfigDelta.prototype.service = "";
35651
+
35652
+ /**
35653
+ * AuditConfigDelta exemptedMember.
35654
+ * @member {string} exemptedMember
35655
+ * @memberof google.iam.v1.AuditConfigDelta
35656
+ * @instance
35657
+ */
35658
+ AuditConfigDelta.prototype.exemptedMember = "";
35659
+
35660
+ /**
35661
+ * AuditConfigDelta logType.
35662
+ * @member {string} logType
35663
+ * @memberof google.iam.v1.AuditConfigDelta
35664
+ * @instance
35665
+ */
35666
+ AuditConfigDelta.prototype.logType = "";
35667
+
35668
+ /**
35669
+ * Creates a new AuditConfigDelta instance using the specified properties.
35670
+ * @function create
35671
+ * @memberof google.iam.v1.AuditConfigDelta
35672
+ * @static
35673
+ * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set
35674
+ * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance
35675
+ */
35676
+ AuditConfigDelta.create = function create(properties) {
35677
+ return new AuditConfigDelta(properties);
35678
+ };
35679
+
35680
+ /**
35681
+ * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages.
35682
+ * @function encode
35683
+ * @memberof google.iam.v1.AuditConfigDelta
35684
+ * @static
35685
+ * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode
35686
+ * @param {$protobuf.Writer} [writer] Writer to encode to
35687
+ * @returns {$protobuf.Writer} Writer
35688
+ */
35689
+ AuditConfigDelta.encode = function encode(message, writer) {
35690
+ if (!writer)
35691
+ writer = $Writer.create();
35692
+ if (message.action != null && Object.hasOwnProperty.call(message, "action"))
35693
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action);
35694
+ if (message.service != null && Object.hasOwnProperty.call(message, "service"))
35695
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.service);
35696
+ if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember"))
35697
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember);
35698
+ if (message.logType != null && Object.hasOwnProperty.call(message, "logType"))
35699
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType);
35700
+ return writer;
35701
+ };
35702
+
35703
+ /**
35704
+ * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages.
35705
+ * @function encodeDelimited
35706
+ * @memberof google.iam.v1.AuditConfigDelta
35707
+ * @static
35708
+ * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode
35709
+ * @param {$protobuf.Writer} [writer] Writer to encode to
35710
+ * @returns {$protobuf.Writer} Writer
35711
+ */
35712
+ AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) {
35713
+ return this.encode(message, writer).ldelim();
35714
+ };
35715
+
35716
+ /**
35717
+ * Decodes an AuditConfigDelta message from the specified reader or buffer.
35718
+ * @function decode
35719
+ * @memberof google.iam.v1.AuditConfigDelta
35720
+ * @static
35721
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
35722
+ * @param {number} [length] Message length if known beforehand
35723
+ * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta
35724
+ * @throws {Error} If the payload is not a reader or valid buffer
35725
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
35726
+ */
35727
+ AuditConfigDelta.decode = function decode(reader, length, error) {
35728
+ if (!(reader instanceof $Reader))
35729
+ reader = $Reader.create(reader);
35730
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta();
35731
+ while (reader.pos < end) {
35732
+ var tag = reader.uint32();
35733
+ if (tag === error)
35734
+ break;
35735
+ switch (tag >>> 3) {
35736
+ case 1: {
35737
+ message.action = reader.int32();
35738
+ break;
35739
+ }
35740
+ case 2: {
35741
+ message.service = reader.string();
35742
+ break;
35743
+ }
35744
+ case 3: {
35745
+ message.exemptedMember = reader.string();
35746
+ break;
35747
+ }
35748
+ case 4: {
35749
+ message.logType = reader.string();
35750
+ break;
35751
+ }
35752
+ default:
35753
+ reader.skipType(tag & 7);
35754
+ break;
35755
+ }
35756
+ }
35757
+ return message;
35758
+ };
35759
+
35760
+ /**
35761
+ * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited.
35762
+ * @function decodeDelimited
35763
+ * @memberof google.iam.v1.AuditConfigDelta
35764
+ * @static
35765
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
35766
+ * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta
35767
+ * @throws {Error} If the payload is not a reader or valid buffer
35768
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
35769
+ */
35770
+ AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) {
35771
+ if (!(reader instanceof $Reader))
35772
+ reader = new $Reader(reader);
35773
+ return this.decode(reader, reader.uint32());
35774
+ };
35775
+
35776
+ /**
35777
+ * Verifies an AuditConfigDelta message.
35778
+ * @function verify
35779
+ * @memberof google.iam.v1.AuditConfigDelta
35780
+ * @static
35781
+ * @param {Object.<string,*>} message Plain object to verify
35782
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
35783
+ */
35784
+ AuditConfigDelta.verify = function verify(message) {
35785
+ if (typeof message !== "object" || message === null)
35786
+ return "object expected";
35787
+ if (message.action != null && message.hasOwnProperty("action"))
35788
+ switch (message.action) {
35789
+ default:
35790
+ return "action: enum value expected";
35791
+ case 0:
35792
+ case 1:
35793
+ case 2:
35794
+ break;
35795
+ }
35796
+ if (message.service != null && message.hasOwnProperty("service"))
35797
+ if (!$util.isString(message.service))
35798
+ return "service: string expected";
35799
+ if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember"))
35800
+ if (!$util.isString(message.exemptedMember))
35801
+ return "exemptedMember: string expected";
35802
+ if (message.logType != null && message.hasOwnProperty("logType"))
35803
+ if (!$util.isString(message.logType))
35804
+ return "logType: string expected";
35805
+ return null;
35806
+ };
35807
+
35808
+ /**
35809
+ * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types.
35810
+ * @function fromObject
35811
+ * @memberof google.iam.v1.AuditConfigDelta
35812
+ * @static
35813
+ * @param {Object.<string,*>} object Plain object
35814
+ * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta
35815
+ */
35816
+ AuditConfigDelta.fromObject = function fromObject(object) {
35817
+ if (object instanceof $root.google.iam.v1.AuditConfigDelta)
35818
+ return object;
35819
+ var message = new $root.google.iam.v1.AuditConfigDelta();
35820
+ switch (object.action) {
35821
+ default:
35822
+ if (typeof object.action === "number") {
35823
+ message.action = object.action;
35824
+ break;
35825
+ }
35826
+ break;
35827
+ case "ACTION_UNSPECIFIED":
35828
+ case 0:
35829
+ message.action = 0;
35830
+ break;
35831
+ case "ADD":
35832
+ case 1:
35833
+ message.action = 1;
35834
+ break;
35835
+ case "REMOVE":
35836
+ case 2:
35837
+ message.action = 2;
35838
+ break;
35839
+ }
35840
+ if (object.service != null)
35841
+ message.service = String(object.service);
35842
+ if (object.exemptedMember != null)
35843
+ message.exemptedMember = String(object.exemptedMember);
35844
+ if (object.logType != null)
35845
+ message.logType = String(object.logType);
35846
+ return message;
35847
+ };
35848
+
35849
+ /**
35850
+ * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified.
35851
+ * @function toObject
35852
+ * @memberof google.iam.v1.AuditConfigDelta
35853
+ * @static
35854
+ * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta
35855
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
35856
+ * @returns {Object.<string,*>} Plain object
35857
+ */
35858
+ AuditConfigDelta.toObject = function toObject(message, options) {
35859
+ if (!options)
35860
+ options = {};
35861
+ var object = {};
35862
+ if (options.defaults) {
35863
+ object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0;
35864
+ object.service = "";
35865
+ object.exemptedMember = "";
35866
+ object.logType = "";
35867
+ }
35868
+ if (message.action != null && message.hasOwnProperty("action"))
35869
+ object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action;
35870
+ if (message.service != null && message.hasOwnProperty("service"))
35871
+ object.service = message.service;
35872
+ if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember"))
35873
+ object.exemptedMember = message.exemptedMember;
35874
+ if (message.logType != null && message.hasOwnProperty("logType"))
35875
+ object.logType = message.logType;
35876
+ return object;
35877
+ };
35878
+
35879
+ /**
35880
+ * Converts this AuditConfigDelta to JSON.
35881
+ * @function toJSON
35882
+ * @memberof google.iam.v1.AuditConfigDelta
35883
+ * @instance
35884
+ * @returns {Object.<string,*>} JSON object
35885
+ */
35886
+ AuditConfigDelta.prototype.toJSON = function toJSON() {
35887
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
35888
+ };
35889
+
35890
+ /**
35891
+ * Gets the default type url for AuditConfigDelta
35892
+ * @function getTypeUrl
35893
+ * @memberof google.iam.v1.AuditConfigDelta
35894
+ * @static
35895
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
35896
+ * @returns {string} The default type url
35897
+ */
35898
+ AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
35899
+ if (typeUrlPrefix === undefined) {
35900
+ typeUrlPrefix = "type.googleapis.com";
35901
+ }
35902
+ return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta";
35903
+ };
35904
+
35905
+ /**
35906
+ * Action enum.
35907
+ * @name google.iam.v1.AuditConfigDelta.Action
35908
+ * @enum {number}
35909
+ * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value
35910
+ * @property {number} ADD=1 ADD value
35911
+ * @property {number} REMOVE=2 REMOVE value
35912
+ */
35913
+ AuditConfigDelta.Action = (function() {
35914
+ var valuesById = {}, values = Object.create(valuesById);
35915
+ values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0;
35916
+ values[valuesById[1] = "ADD"] = 1;
35917
+ values[valuesById[2] = "REMOVE"] = 2;
35918
+ return values;
35919
+ })();
35920
+
35921
+ return AuditConfigDelta;
35922
+ })();
35923
+
35924
+ return v1;
35925
+ })();
35926
+
35927
+ return iam;
35928
+ })();
35929
+
35930
+ google.type = (function() {
35931
+
35932
+ /**
35933
+ * Namespace type.
35934
+ * @memberof google
35935
+ * @namespace
35936
+ */
35937
+ var type = {};
35938
+
35939
+ type.Expr = (function() {
35940
+
35941
+ /**
35942
+ * Properties of an Expr.
35943
+ * @memberof google.type
35944
+ * @interface IExpr
35945
+ * @property {string|null} [expression] Expr expression
35946
+ * @property {string|null} [title] Expr title
35947
+ * @property {string|null} [description] Expr description
35948
+ * @property {string|null} [location] Expr location
35949
+ */
35950
+
35951
+ /**
35952
+ * Constructs a new Expr.
35953
+ * @memberof google.type
35954
+ * @classdesc Represents an Expr.
35955
+ * @implements IExpr
35956
+ * @constructor
35957
+ * @param {google.type.IExpr=} [properties] Properties to set
35958
+ */
35959
+ function Expr(properties) {
35960
+ if (properties)
35961
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
35962
+ if (properties[keys[i]] != null)
35963
+ this[keys[i]] = properties[keys[i]];
35964
+ }
35965
+
35966
+ /**
35967
+ * Expr expression.
35968
+ * @member {string} expression
35969
+ * @memberof google.type.Expr
35970
+ * @instance
35971
+ */
35972
+ Expr.prototype.expression = "";
35973
+
35974
+ /**
35975
+ * Expr title.
35976
+ * @member {string} title
35977
+ * @memberof google.type.Expr
35978
+ * @instance
35979
+ */
35980
+ Expr.prototype.title = "";
35981
+
35982
+ /**
35983
+ * Expr description.
35984
+ * @member {string} description
35985
+ * @memberof google.type.Expr
35986
+ * @instance
35987
+ */
35988
+ Expr.prototype.description = "";
35989
+
35990
+ /**
35991
+ * Expr location.
35992
+ * @member {string} location
35993
+ * @memberof google.type.Expr
35994
+ * @instance
35995
+ */
35996
+ Expr.prototype.location = "";
35997
+
35998
+ /**
35999
+ * Creates a new Expr instance using the specified properties.
36000
+ * @function create
36001
+ * @memberof google.type.Expr
36002
+ * @static
36003
+ * @param {google.type.IExpr=} [properties] Properties to set
36004
+ * @returns {google.type.Expr} Expr instance
36005
+ */
36006
+ Expr.create = function create(properties) {
36007
+ return new Expr(properties);
36008
+ };
36009
+
36010
+ /**
36011
+ * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages.
36012
+ * @function encode
36013
+ * @memberof google.type.Expr
36014
+ * @static
36015
+ * @param {google.type.IExpr} message Expr message or plain object to encode
36016
+ * @param {$protobuf.Writer} [writer] Writer to encode to
36017
+ * @returns {$protobuf.Writer} Writer
36018
+ */
36019
+ Expr.encode = function encode(message, writer) {
36020
+ if (!writer)
36021
+ writer = $Writer.create();
36022
+ if (message.expression != null && Object.hasOwnProperty.call(message, "expression"))
36023
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression);
36024
+ if (message.title != null && Object.hasOwnProperty.call(message, "title"))
36025
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.title);
36026
+ if (message.description != null && Object.hasOwnProperty.call(message, "description"))
36027
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
36028
+ if (message.location != null && Object.hasOwnProperty.call(message, "location"))
36029
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.location);
36030
+ return writer;
36031
+ };
36032
+
36033
+ /**
36034
+ * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages.
36035
+ * @function encodeDelimited
36036
+ * @memberof google.type.Expr
36037
+ * @static
36038
+ * @param {google.type.IExpr} message Expr message or plain object to encode
36039
+ * @param {$protobuf.Writer} [writer] Writer to encode to
36040
+ * @returns {$protobuf.Writer} Writer
36041
+ */
36042
+ Expr.encodeDelimited = function encodeDelimited(message, writer) {
36043
+ return this.encode(message, writer).ldelim();
36044
+ };
36045
+
36046
+ /**
36047
+ * Decodes an Expr message from the specified reader or buffer.
36048
+ * @function decode
36049
+ * @memberof google.type.Expr
36050
+ * @static
36051
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
36052
+ * @param {number} [length] Message length if known beforehand
36053
+ * @returns {google.type.Expr} Expr
36054
+ * @throws {Error} If the payload is not a reader or valid buffer
36055
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
36056
+ */
36057
+ Expr.decode = function decode(reader, length, error) {
36058
+ if (!(reader instanceof $Reader))
36059
+ reader = $Reader.create(reader);
36060
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr();
36061
+ while (reader.pos < end) {
36062
+ var tag = reader.uint32();
36063
+ if (tag === error)
36064
+ break;
36065
+ switch (tag >>> 3) {
36066
+ case 1: {
36067
+ message.expression = reader.string();
36068
+ break;
36069
+ }
36070
+ case 2: {
36071
+ message.title = reader.string();
36072
+ break;
36073
+ }
36074
+ case 3: {
36075
+ message.description = reader.string();
36076
+ break;
36077
+ }
36078
+ case 4: {
36079
+ message.location = reader.string();
36080
+ break;
36081
+ }
36082
+ default:
36083
+ reader.skipType(tag & 7);
36084
+ break;
36085
+ }
36086
+ }
36087
+ return message;
36088
+ };
36089
+
36090
+ /**
36091
+ * Decodes an Expr message from the specified reader or buffer, length delimited.
36092
+ * @function decodeDelimited
36093
+ * @memberof google.type.Expr
36094
+ * @static
36095
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
36096
+ * @returns {google.type.Expr} Expr
36097
+ * @throws {Error} If the payload is not a reader or valid buffer
36098
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
36099
+ */
36100
+ Expr.decodeDelimited = function decodeDelimited(reader) {
36101
+ if (!(reader instanceof $Reader))
36102
+ reader = new $Reader(reader);
36103
+ return this.decode(reader, reader.uint32());
36104
+ };
36105
+
36106
+ /**
36107
+ * Verifies an Expr message.
36108
+ * @function verify
36109
+ * @memberof google.type.Expr
36110
+ * @static
36111
+ * @param {Object.<string,*>} message Plain object to verify
36112
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
36113
+ */
36114
+ Expr.verify = function verify(message) {
36115
+ if (typeof message !== "object" || message === null)
36116
+ return "object expected";
36117
+ if (message.expression != null && message.hasOwnProperty("expression"))
36118
+ if (!$util.isString(message.expression))
36119
+ return "expression: string expected";
36120
+ if (message.title != null && message.hasOwnProperty("title"))
36121
+ if (!$util.isString(message.title))
36122
+ return "title: string expected";
36123
+ if (message.description != null && message.hasOwnProperty("description"))
36124
+ if (!$util.isString(message.description))
36125
+ return "description: string expected";
36126
+ if (message.location != null && message.hasOwnProperty("location"))
36127
+ if (!$util.isString(message.location))
36128
+ return "location: string expected";
36129
+ return null;
36130
+ };
36131
+
36132
+ /**
36133
+ * Creates an Expr message from a plain object. Also converts values to their respective internal types.
36134
+ * @function fromObject
36135
+ * @memberof google.type.Expr
36136
+ * @static
36137
+ * @param {Object.<string,*>} object Plain object
36138
+ * @returns {google.type.Expr} Expr
36139
+ */
36140
+ Expr.fromObject = function fromObject(object) {
36141
+ if (object instanceof $root.google.type.Expr)
36142
+ return object;
36143
+ var message = new $root.google.type.Expr();
36144
+ if (object.expression != null)
36145
+ message.expression = String(object.expression);
36146
+ if (object.title != null)
36147
+ message.title = String(object.title);
36148
+ if (object.description != null)
36149
+ message.description = String(object.description);
36150
+ if (object.location != null)
36151
+ message.location = String(object.location);
36152
+ return message;
36153
+ };
36154
+
36155
+ /**
36156
+ * Creates a plain object from an Expr message. Also converts values to other types if specified.
36157
+ * @function toObject
36158
+ * @memberof google.type.Expr
36159
+ * @static
36160
+ * @param {google.type.Expr} message Expr
36161
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
36162
+ * @returns {Object.<string,*>} Plain object
36163
+ */
36164
+ Expr.toObject = function toObject(message, options) {
36165
+ if (!options)
36166
+ options = {};
36167
+ var object = {};
36168
+ if (options.defaults) {
36169
+ object.expression = "";
36170
+ object.title = "";
36171
+ object.description = "";
36172
+ object.location = "";
36173
+ }
36174
+ if (message.expression != null && message.hasOwnProperty("expression"))
36175
+ object.expression = message.expression;
36176
+ if (message.title != null && message.hasOwnProperty("title"))
36177
+ object.title = message.title;
36178
+ if (message.description != null && message.hasOwnProperty("description"))
36179
+ object.description = message.description;
36180
+ if (message.location != null && message.hasOwnProperty("location"))
36181
+ object.location = message.location;
36182
+ return object;
36183
+ };
36184
+
36185
+ /**
36186
+ * Converts this Expr to JSON.
36187
+ * @function toJSON
36188
+ * @memberof google.type.Expr
36189
+ * @instance
36190
+ * @returns {Object.<string,*>} JSON object
36191
+ */
36192
+ Expr.prototype.toJSON = function toJSON() {
36193
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
36194
+ };
36195
+
36196
+ /**
36197
+ * Gets the default type url for Expr
36198
+ * @function getTypeUrl
36199
+ * @memberof google.type.Expr
36200
+ * @static
36201
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
36202
+ * @returns {string} The default type url
36203
+ */
36204
+ Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
36205
+ if (typeUrlPrefix === undefined) {
36206
+ typeUrlPrefix = "type.googleapis.com";
36207
+ }
36208
+ return typeUrlPrefix + "/google.type.Expr";
36209
+ };
36210
+
36211
+ return Expr;
36212
+ })();
36213
+
36214
+ return type;
36215
+ })();
36216
+
32456
36217
  google.longrunning = (function() {
32457
36218
 
32458
36219
  /**