@google-cloud/dlp 5.8.0 → 5.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49944,6 +49944,22 @@
49944
49944
  return InspectJobConfig;
49945
49945
  })();
49946
49946
 
49947
+ /**
49948
+ * ProfileGeneration enum.
49949
+ * @name google.privacy.dlp.v2.ProfileGeneration
49950
+ * @enum {number}
49951
+ * @property {number} PROFILE_GENERATION_UNSPECIFIED=0 PROFILE_GENERATION_UNSPECIFIED value
49952
+ * @property {number} PROFILE_GENERATION_NEW=1 PROFILE_GENERATION_NEW value
49953
+ * @property {number} PROFILE_GENERATION_UPDATE=2 PROFILE_GENERATION_UPDATE value
49954
+ */
49955
+ v2.ProfileGeneration = (function() {
49956
+ var valuesById = {}, values = Object.create(valuesById);
49957
+ values[valuesById[0] = "PROFILE_GENERATION_UNSPECIFIED"] = 0;
49958
+ values[valuesById[1] = "PROFILE_GENERATION_NEW"] = 1;
49959
+ values[valuesById[2] = "PROFILE_GENERATION_UPDATE"] = 2;
49960
+ return values;
49961
+ })();
49962
+
49947
49963
  v2.DataProfileAction = (function() {
49948
49964
 
49949
49965
  /**
@@ -49952,6 +49968,7 @@
49952
49968
  * @interface IDataProfileAction
49953
49969
  * @property {google.privacy.dlp.v2.DataProfileAction.IExport|null} [exportData] DataProfileAction exportData
49954
49970
  * @property {google.privacy.dlp.v2.DataProfileAction.IPubSubNotification|null} [pubSubNotification] DataProfileAction pubSubNotification
49971
+ * @property {google.privacy.dlp.v2.DataProfileAction.ITagResources|null} [tagResources] DataProfileAction tagResources
49955
49972
  */
49956
49973
 
49957
49974
  /**
@@ -49985,17 +50002,25 @@
49985
50002
  */
49986
50003
  DataProfileAction.prototype.pubSubNotification = null;
49987
50004
 
50005
+ /**
50006
+ * DataProfileAction tagResources.
50007
+ * @member {google.privacy.dlp.v2.DataProfileAction.ITagResources|null|undefined} tagResources
50008
+ * @memberof google.privacy.dlp.v2.DataProfileAction
50009
+ * @instance
50010
+ */
50011
+ DataProfileAction.prototype.tagResources = null;
50012
+
49988
50013
  // OneOf field names bound to virtual getters and setters
49989
50014
  var $oneOfFields;
49990
50015
 
49991
50016
  /**
49992
50017
  * DataProfileAction action.
49993
- * @member {"exportData"|"pubSubNotification"|undefined} action
50018
+ * @member {"exportData"|"pubSubNotification"|"tagResources"|undefined} action
49994
50019
  * @memberof google.privacy.dlp.v2.DataProfileAction
49995
50020
  * @instance
49996
50021
  */
49997
50022
  Object.defineProperty(DataProfileAction.prototype, "action", {
49998
- get: $util.oneOfGetter($oneOfFields = ["exportData", "pubSubNotification"]),
50023
+ get: $util.oneOfGetter($oneOfFields = ["exportData", "pubSubNotification", "tagResources"]),
49999
50024
  set: $util.oneOfSetter($oneOfFields)
50000
50025
  });
50001
50026
 
@@ -50027,6 +50052,8 @@
50027
50052
  $root.google.privacy.dlp.v2.DataProfileAction.Export.encode(message.exportData, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
50028
50053
  if (message.pubSubNotification != null && Object.hasOwnProperty.call(message, "pubSubNotification"))
50029
50054
  $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.encode(message.pubSubNotification, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
50055
+ if (message.tagResources != null && Object.hasOwnProperty.call(message, "tagResources"))
50056
+ $root.google.privacy.dlp.v2.DataProfileAction.TagResources.encode(message.tagResources, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
50030
50057
  return writer;
50031
50058
  };
50032
50059
 
@@ -50069,6 +50096,10 @@
50069
50096
  message.pubSubNotification = $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.decode(reader, reader.uint32());
50070
50097
  break;
50071
50098
  }
50099
+ case 8: {
50100
+ message.tagResources = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.decode(reader, reader.uint32());
50101
+ break;
50102
+ }
50072
50103
  default:
50073
50104
  reader.skipType(tag & 7);
50074
50105
  break;
@@ -50123,6 +50154,16 @@
50123
50154
  return "pubSubNotification." + error;
50124
50155
  }
50125
50156
  }
50157
+ if (message.tagResources != null && message.hasOwnProperty("tagResources")) {
50158
+ if (properties.action === 1)
50159
+ return "action: multiple values";
50160
+ properties.action = 1;
50161
+ {
50162
+ var error = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.verify(message.tagResources);
50163
+ if (error)
50164
+ return "tagResources." + error;
50165
+ }
50166
+ }
50126
50167
  return null;
50127
50168
  };
50128
50169
 
@@ -50148,6 +50189,11 @@
50148
50189
  throw TypeError(".google.privacy.dlp.v2.DataProfileAction.pubSubNotification: object expected");
50149
50190
  message.pubSubNotification = $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.fromObject(object.pubSubNotification);
50150
50191
  }
50192
+ if (object.tagResources != null) {
50193
+ if (typeof object.tagResources !== "object")
50194
+ throw TypeError(".google.privacy.dlp.v2.DataProfileAction.tagResources: object expected");
50195
+ message.tagResources = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.fromObject(object.tagResources);
50196
+ }
50151
50197
  return message;
50152
50198
  };
50153
50199
 
@@ -50174,6 +50220,11 @@
50174
50220
  if (options.oneofs)
50175
50221
  object.action = "pubSubNotification";
50176
50222
  }
50223
+ if (message.tagResources != null && message.hasOwnProperty("tagResources")) {
50224
+ object.tagResources = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.toObject(message.tagResources, options);
50225
+ if (options.oneofs)
50226
+ object.action = "tagResources";
50227
+ }
50177
50228
  return object;
50178
50229
  };
50179
50230
 
@@ -50672,122 +50723,919 @@
50672
50723
  message.detailOfMessage = object.detailOfMessage;
50673
50724
  break;
50674
50725
  }
50675
- break;
50676
- case "DETAIL_LEVEL_UNSPECIFIED":
50677
- case 0:
50678
- message.detailOfMessage = 0;
50679
- break;
50680
- case "TABLE_PROFILE":
50681
- case 1:
50682
- message.detailOfMessage = 1;
50683
- break;
50684
- case "RESOURCE_NAME":
50685
- case 2:
50686
- message.detailOfMessage = 2;
50687
- break;
50688
- case "FILE_STORE_PROFILE":
50689
- case 3:
50690
- message.detailOfMessage = 3;
50691
- break;
50692
- }
50693
- return message;
50694
- };
50726
+ break;
50727
+ case "DETAIL_LEVEL_UNSPECIFIED":
50728
+ case 0:
50729
+ message.detailOfMessage = 0;
50730
+ break;
50731
+ case "TABLE_PROFILE":
50732
+ case 1:
50733
+ message.detailOfMessage = 1;
50734
+ break;
50735
+ case "RESOURCE_NAME":
50736
+ case 2:
50737
+ message.detailOfMessage = 2;
50738
+ break;
50739
+ case "FILE_STORE_PROFILE":
50740
+ case 3:
50741
+ message.detailOfMessage = 3;
50742
+ break;
50743
+ }
50744
+ return message;
50745
+ };
50746
+
50747
+ /**
50748
+ * Creates a plain object from a PubSubNotification message. Also converts values to other types if specified.
50749
+ * @function toObject
50750
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification
50751
+ * @static
50752
+ * @param {google.privacy.dlp.v2.DataProfileAction.PubSubNotification} message PubSubNotification
50753
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
50754
+ * @returns {Object.<string,*>} Plain object
50755
+ */
50756
+ PubSubNotification.toObject = function toObject(message, options) {
50757
+ if (!options)
50758
+ options = {};
50759
+ var object = {};
50760
+ if (options.defaults) {
50761
+ object.topic = "";
50762
+ object.event = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0;
50763
+ object.pubsubCondition = null;
50764
+ object.detailOfMessage = options.enums === String ? "DETAIL_LEVEL_UNSPECIFIED" : 0;
50765
+ }
50766
+ if (message.topic != null && message.hasOwnProperty("topic"))
50767
+ object.topic = message.topic;
50768
+ if (message.event != null && message.hasOwnProperty("event"))
50769
+ object.event = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileAction.EventType[message.event] === undefined ? message.event : $root.google.privacy.dlp.v2.DataProfileAction.EventType[message.event] : message.event;
50770
+ if (message.pubsubCondition != null && message.hasOwnProperty("pubsubCondition"))
50771
+ object.pubsubCondition = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.toObject(message.pubsubCondition, options);
50772
+ if (message.detailOfMessage != null && message.hasOwnProperty("detailOfMessage"))
50773
+ object.detailOfMessage = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel[message.detailOfMessage] === undefined ? message.detailOfMessage : $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel[message.detailOfMessage] : message.detailOfMessage;
50774
+ return object;
50775
+ };
50776
+
50777
+ /**
50778
+ * Converts this PubSubNotification to JSON.
50779
+ * @function toJSON
50780
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification
50781
+ * @instance
50782
+ * @returns {Object.<string,*>} JSON object
50783
+ */
50784
+ PubSubNotification.prototype.toJSON = function toJSON() {
50785
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
50786
+ };
50787
+
50788
+ /**
50789
+ * Gets the default type url for PubSubNotification
50790
+ * @function getTypeUrl
50791
+ * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification
50792
+ * @static
50793
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
50794
+ * @returns {string} The default type url
50795
+ */
50796
+ PubSubNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
50797
+ if (typeUrlPrefix === undefined) {
50798
+ typeUrlPrefix = "type.googleapis.com";
50799
+ }
50800
+ return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.PubSubNotification";
50801
+ };
50802
+
50803
+ /**
50804
+ * DetailLevel enum.
50805
+ * @name google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel
50806
+ * @enum {number}
50807
+ * @property {number} DETAIL_LEVEL_UNSPECIFIED=0 DETAIL_LEVEL_UNSPECIFIED value
50808
+ * @property {number} TABLE_PROFILE=1 TABLE_PROFILE value
50809
+ * @property {number} RESOURCE_NAME=2 RESOURCE_NAME value
50810
+ * @property {number} FILE_STORE_PROFILE=3 FILE_STORE_PROFILE value
50811
+ */
50812
+ PubSubNotification.DetailLevel = (function() {
50813
+ var valuesById = {}, values = Object.create(valuesById);
50814
+ values[valuesById[0] = "DETAIL_LEVEL_UNSPECIFIED"] = 0;
50815
+ values[valuesById[1] = "TABLE_PROFILE"] = 1;
50816
+ values[valuesById[2] = "RESOURCE_NAME"] = 2;
50817
+ values[valuesById[3] = "FILE_STORE_PROFILE"] = 3;
50818
+ return values;
50819
+ })();
50820
+
50821
+ return PubSubNotification;
50822
+ })();
50823
+
50824
+ /**
50825
+ * EventType enum.
50826
+ * @name google.privacy.dlp.v2.DataProfileAction.EventType
50827
+ * @enum {number}
50828
+ * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value
50829
+ * @property {number} NEW_PROFILE=1 NEW_PROFILE value
50830
+ * @property {number} CHANGED_PROFILE=2 CHANGED_PROFILE value
50831
+ * @property {number} SCORE_INCREASED=3 SCORE_INCREASED value
50832
+ * @property {number} ERROR_CHANGED=4 ERROR_CHANGED value
50833
+ */
50834
+ DataProfileAction.EventType = (function() {
50835
+ var valuesById = {}, values = Object.create(valuesById);
50836
+ values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0;
50837
+ values[valuesById[1] = "NEW_PROFILE"] = 1;
50838
+ values[valuesById[2] = "CHANGED_PROFILE"] = 2;
50839
+ values[valuesById[3] = "SCORE_INCREASED"] = 3;
50840
+ values[valuesById[4] = "ERROR_CHANGED"] = 4;
50841
+ return values;
50842
+ })();
50843
+
50844
+ DataProfileAction.TagResources = (function() {
50845
+
50846
+ /**
50847
+ * Properties of a TagResources.
50848
+ * @memberof google.privacy.dlp.v2.DataProfileAction
50849
+ * @interface ITagResources
50850
+ * @property {Array.<google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition>|null} [tagConditions] TagResources tagConditions
50851
+ * @property {Array.<google.privacy.dlp.v2.ProfileGeneration>|null} [profileGenerationsToTag] TagResources profileGenerationsToTag
50852
+ * @property {boolean|null} [lowerDataRiskToLow] TagResources lowerDataRiskToLow
50853
+ */
50854
+
50855
+ /**
50856
+ * Constructs a new TagResources.
50857
+ * @memberof google.privacy.dlp.v2.DataProfileAction
50858
+ * @classdesc Represents a TagResources.
50859
+ * @implements ITagResources
50860
+ * @constructor
50861
+ * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources=} [properties] Properties to set
50862
+ */
50863
+ function TagResources(properties) {
50864
+ this.tagConditions = [];
50865
+ this.profileGenerationsToTag = [];
50866
+ if (properties)
50867
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
50868
+ if (properties[keys[i]] != null)
50869
+ this[keys[i]] = properties[keys[i]];
50870
+ }
50871
+
50872
+ /**
50873
+ * TagResources tagConditions.
50874
+ * @member {Array.<google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition>} tagConditions
50875
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
50876
+ * @instance
50877
+ */
50878
+ TagResources.prototype.tagConditions = $util.emptyArray;
50879
+
50880
+ /**
50881
+ * TagResources profileGenerationsToTag.
50882
+ * @member {Array.<google.privacy.dlp.v2.ProfileGeneration>} profileGenerationsToTag
50883
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
50884
+ * @instance
50885
+ */
50886
+ TagResources.prototype.profileGenerationsToTag = $util.emptyArray;
50887
+
50888
+ /**
50889
+ * TagResources lowerDataRiskToLow.
50890
+ * @member {boolean} lowerDataRiskToLow
50891
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
50892
+ * @instance
50893
+ */
50894
+ TagResources.prototype.lowerDataRiskToLow = false;
50895
+
50896
+ /**
50897
+ * Creates a new TagResources instance using the specified properties.
50898
+ * @function create
50899
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
50900
+ * @static
50901
+ * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources=} [properties] Properties to set
50902
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources instance
50903
+ */
50904
+ TagResources.create = function create(properties) {
50905
+ return new TagResources(properties);
50906
+ };
50907
+
50908
+ /**
50909
+ * Encodes the specified TagResources message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.verify|verify} messages.
50910
+ * @function encode
50911
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
50912
+ * @static
50913
+ * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources} message TagResources message or plain object to encode
50914
+ * @param {$protobuf.Writer} [writer] Writer to encode to
50915
+ * @returns {$protobuf.Writer} Writer
50916
+ */
50917
+ TagResources.encode = function encode(message, writer) {
50918
+ if (!writer)
50919
+ writer = $Writer.create();
50920
+ if (message.tagConditions != null && message.tagConditions.length)
50921
+ for (var i = 0; i < message.tagConditions.length; ++i)
50922
+ $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.encode(message.tagConditions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
50923
+ if (message.profileGenerationsToTag != null && message.profileGenerationsToTag.length) {
50924
+ writer.uint32(/* id 2, wireType 2 =*/18).fork();
50925
+ for (var i = 0; i < message.profileGenerationsToTag.length; ++i)
50926
+ writer.int32(message.profileGenerationsToTag[i]);
50927
+ writer.ldelim();
50928
+ }
50929
+ if (message.lowerDataRiskToLow != null && Object.hasOwnProperty.call(message, "lowerDataRiskToLow"))
50930
+ writer.uint32(/* id 3, wireType 0 =*/24).bool(message.lowerDataRiskToLow);
50931
+ return writer;
50932
+ };
50933
+
50934
+ /**
50935
+ * Encodes the specified TagResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.verify|verify} messages.
50936
+ * @function encodeDelimited
50937
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
50938
+ * @static
50939
+ * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources} message TagResources message or plain object to encode
50940
+ * @param {$protobuf.Writer} [writer] Writer to encode to
50941
+ * @returns {$protobuf.Writer} Writer
50942
+ */
50943
+ TagResources.encodeDelimited = function encodeDelimited(message, writer) {
50944
+ return this.encode(message, writer).ldelim();
50945
+ };
50946
+
50947
+ /**
50948
+ * Decodes a TagResources message from the specified reader or buffer.
50949
+ * @function decode
50950
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
50951
+ * @static
50952
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
50953
+ * @param {number} [length] Message length if known beforehand
50954
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources
50955
+ * @throws {Error} If the payload is not a reader or valid buffer
50956
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
50957
+ */
50958
+ TagResources.decode = function decode(reader, length) {
50959
+ if (!(reader instanceof $Reader))
50960
+ reader = $Reader.create(reader);
50961
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources();
50962
+ while (reader.pos < end) {
50963
+ var tag = reader.uint32();
50964
+ switch (tag >>> 3) {
50965
+ case 1: {
50966
+ if (!(message.tagConditions && message.tagConditions.length))
50967
+ message.tagConditions = [];
50968
+ message.tagConditions.push($root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.decode(reader, reader.uint32()));
50969
+ break;
50970
+ }
50971
+ case 2: {
50972
+ if (!(message.profileGenerationsToTag && message.profileGenerationsToTag.length))
50973
+ message.profileGenerationsToTag = [];
50974
+ if ((tag & 7) === 2) {
50975
+ var end2 = reader.uint32() + reader.pos;
50976
+ while (reader.pos < end2)
50977
+ message.profileGenerationsToTag.push(reader.int32());
50978
+ } else
50979
+ message.profileGenerationsToTag.push(reader.int32());
50980
+ break;
50981
+ }
50982
+ case 3: {
50983
+ message.lowerDataRiskToLow = reader.bool();
50984
+ break;
50985
+ }
50986
+ default:
50987
+ reader.skipType(tag & 7);
50988
+ break;
50989
+ }
50990
+ }
50991
+ return message;
50992
+ };
50993
+
50994
+ /**
50995
+ * Decodes a TagResources message from the specified reader or buffer, length delimited.
50996
+ * @function decodeDelimited
50997
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
50998
+ * @static
50999
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
51000
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources
51001
+ * @throws {Error} If the payload is not a reader or valid buffer
51002
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
51003
+ */
51004
+ TagResources.decodeDelimited = function decodeDelimited(reader) {
51005
+ if (!(reader instanceof $Reader))
51006
+ reader = new $Reader(reader);
51007
+ return this.decode(reader, reader.uint32());
51008
+ };
51009
+
51010
+ /**
51011
+ * Verifies a TagResources message.
51012
+ * @function verify
51013
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
51014
+ * @static
51015
+ * @param {Object.<string,*>} message Plain object to verify
51016
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
51017
+ */
51018
+ TagResources.verify = function verify(message) {
51019
+ if (typeof message !== "object" || message === null)
51020
+ return "object expected";
51021
+ if (message.tagConditions != null && message.hasOwnProperty("tagConditions")) {
51022
+ if (!Array.isArray(message.tagConditions))
51023
+ return "tagConditions: array expected";
51024
+ for (var i = 0; i < message.tagConditions.length; ++i) {
51025
+ var error = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify(message.tagConditions[i]);
51026
+ if (error)
51027
+ return "tagConditions." + error;
51028
+ }
51029
+ }
51030
+ if (message.profileGenerationsToTag != null && message.hasOwnProperty("profileGenerationsToTag")) {
51031
+ if (!Array.isArray(message.profileGenerationsToTag))
51032
+ return "profileGenerationsToTag: array expected";
51033
+ for (var i = 0; i < message.profileGenerationsToTag.length; ++i)
51034
+ switch (message.profileGenerationsToTag[i]) {
51035
+ default:
51036
+ return "profileGenerationsToTag: enum value[] expected";
51037
+ case 0:
51038
+ case 1:
51039
+ case 2:
51040
+ break;
51041
+ }
51042
+ }
51043
+ if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow"))
51044
+ if (typeof message.lowerDataRiskToLow !== "boolean")
51045
+ return "lowerDataRiskToLow: boolean expected";
51046
+ return null;
51047
+ };
51048
+
51049
+ /**
51050
+ * Creates a TagResources message from a plain object. Also converts values to their respective internal types.
51051
+ * @function fromObject
51052
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
51053
+ * @static
51054
+ * @param {Object.<string,*>} object Plain object
51055
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources
51056
+ */
51057
+ TagResources.fromObject = function fromObject(object) {
51058
+ if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources)
51059
+ return object;
51060
+ var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources();
51061
+ if (object.tagConditions) {
51062
+ if (!Array.isArray(object.tagConditions))
51063
+ throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.tagConditions: array expected");
51064
+ message.tagConditions = [];
51065
+ for (var i = 0; i < object.tagConditions.length; ++i) {
51066
+ if (typeof object.tagConditions[i] !== "object")
51067
+ throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.tagConditions: object expected");
51068
+ message.tagConditions[i] = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.fromObject(object.tagConditions[i]);
51069
+ }
51070
+ }
51071
+ if (object.profileGenerationsToTag) {
51072
+ if (!Array.isArray(object.profileGenerationsToTag))
51073
+ throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.profileGenerationsToTag: array expected");
51074
+ message.profileGenerationsToTag = [];
51075
+ for (var i = 0; i < object.profileGenerationsToTag.length; ++i)
51076
+ switch (object.profileGenerationsToTag[i]) {
51077
+ default:
51078
+ if (typeof object.profileGenerationsToTag[i] === "number") {
51079
+ message.profileGenerationsToTag[i] = object.profileGenerationsToTag[i];
51080
+ break;
51081
+ }
51082
+ case "PROFILE_GENERATION_UNSPECIFIED":
51083
+ case 0:
51084
+ message.profileGenerationsToTag[i] = 0;
51085
+ break;
51086
+ case "PROFILE_GENERATION_NEW":
51087
+ case 1:
51088
+ message.profileGenerationsToTag[i] = 1;
51089
+ break;
51090
+ case "PROFILE_GENERATION_UPDATE":
51091
+ case 2:
51092
+ message.profileGenerationsToTag[i] = 2;
51093
+ break;
51094
+ }
51095
+ }
51096
+ if (object.lowerDataRiskToLow != null)
51097
+ message.lowerDataRiskToLow = Boolean(object.lowerDataRiskToLow);
51098
+ return message;
51099
+ };
51100
+
51101
+ /**
51102
+ * Creates a plain object from a TagResources message. Also converts values to other types if specified.
51103
+ * @function toObject
51104
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
51105
+ * @static
51106
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources} message TagResources
51107
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
51108
+ * @returns {Object.<string,*>} Plain object
51109
+ */
51110
+ TagResources.toObject = function toObject(message, options) {
51111
+ if (!options)
51112
+ options = {};
51113
+ var object = {};
51114
+ if (options.arrays || options.defaults) {
51115
+ object.tagConditions = [];
51116
+ object.profileGenerationsToTag = [];
51117
+ }
51118
+ if (options.defaults)
51119
+ object.lowerDataRiskToLow = false;
51120
+ if (message.tagConditions && message.tagConditions.length) {
51121
+ object.tagConditions = [];
51122
+ for (var j = 0; j < message.tagConditions.length; ++j)
51123
+ object.tagConditions[j] = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.toObject(message.tagConditions[j], options);
51124
+ }
51125
+ if (message.profileGenerationsToTag && message.profileGenerationsToTag.length) {
51126
+ object.profileGenerationsToTag = [];
51127
+ for (var j = 0; j < message.profileGenerationsToTag.length; ++j)
51128
+ object.profileGenerationsToTag[j] = options.enums === String ? $root.google.privacy.dlp.v2.ProfileGeneration[message.profileGenerationsToTag[j]] === undefined ? message.profileGenerationsToTag[j] : $root.google.privacy.dlp.v2.ProfileGeneration[message.profileGenerationsToTag[j]] : message.profileGenerationsToTag[j];
51129
+ }
51130
+ if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow"))
51131
+ object.lowerDataRiskToLow = message.lowerDataRiskToLow;
51132
+ return object;
51133
+ };
51134
+
51135
+ /**
51136
+ * Converts this TagResources to JSON.
51137
+ * @function toJSON
51138
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
51139
+ * @instance
51140
+ * @returns {Object.<string,*>} JSON object
51141
+ */
51142
+ TagResources.prototype.toJSON = function toJSON() {
51143
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
51144
+ };
51145
+
51146
+ /**
51147
+ * Gets the default type url for TagResources
51148
+ * @function getTypeUrl
51149
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
51150
+ * @static
51151
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
51152
+ * @returns {string} The default type url
51153
+ */
51154
+ TagResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
51155
+ if (typeUrlPrefix === undefined) {
51156
+ typeUrlPrefix = "type.googleapis.com";
51157
+ }
51158
+ return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources";
51159
+ };
51160
+
51161
+ TagResources.TagCondition = (function() {
51162
+
51163
+ /**
51164
+ * Properties of a TagCondition.
51165
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
51166
+ * @interface ITagCondition
51167
+ * @property {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue|null} [tag] TagCondition tag
51168
+ * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] TagCondition sensitivityScore
51169
+ */
51170
+
51171
+ /**
51172
+ * Constructs a new TagCondition.
51173
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
51174
+ * @classdesc Represents a TagCondition.
51175
+ * @implements ITagCondition
51176
+ * @constructor
51177
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition=} [properties] Properties to set
51178
+ */
51179
+ function TagCondition(properties) {
51180
+ if (properties)
51181
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
51182
+ if (properties[keys[i]] != null)
51183
+ this[keys[i]] = properties[keys[i]];
51184
+ }
51185
+
51186
+ /**
51187
+ * TagCondition tag.
51188
+ * @member {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue|null|undefined} tag
51189
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51190
+ * @instance
51191
+ */
51192
+ TagCondition.prototype.tag = null;
51193
+
51194
+ /**
51195
+ * TagCondition sensitivityScore.
51196
+ * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore
51197
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51198
+ * @instance
51199
+ */
51200
+ TagCondition.prototype.sensitivityScore = null;
51201
+
51202
+ // OneOf field names bound to virtual getters and setters
51203
+ var $oneOfFields;
51204
+
51205
+ /**
51206
+ * TagCondition type.
51207
+ * @member {"sensitivityScore"|undefined} type
51208
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51209
+ * @instance
51210
+ */
51211
+ Object.defineProperty(TagCondition.prototype, "type", {
51212
+ get: $util.oneOfGetter($oneOfFields = ["sensitivityScore"]),
51213
+ set: $util.oneOfSetter($oneOfFields)
51214
+ });
51215
+
51216
+ /**
51217
+ * Creates a new TagCondition instance using the specified properties.
51218
+ * @function create
51219
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51220
+ * @static
51221
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition=} [properties] Properties to set
51222
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition instance
51223
+ */
51224
+ TagCondition.create = function create(properties) {
51225
+ return new TagCondition(properties);
51226
+ };
51227
+
51228
+ /**
51229
+ * Encodes the specified TagCondition message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify|verify} messages.
51230
+ * @function encode
51231
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51232
+ * @static
51233
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition} message TagCondition message or plain object to encode
51234
+ * @param {$protobuf.Writer} [writer] Writer to encode to
51235
+ * @returns {$protobuf.Writer} Writer
51236
+ */
51237
+ TagCondition.encode = function encode(message, writer) {
51238
+ if (!writer)
51239
+ writer = $Writer.create();
51240
+ if (message.tag != null && Object.hasOwnProperty.call(message, "tag"))
51241
+ $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.encode(message.tag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
51242
+ if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore"))
51243
+ $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
51244
+ return writer;
51245
+ };
51246
+
51247
+ /**
51248
+ * Encodes the specified TagCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify|verify} messages.
51249
+ * @function encodeDelimited
51250
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51251
+ * @static
51252
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition} message TagCondition message or plain object to encode
51253
+ * @param {$protobuf.Writer} [writer] Writer to encode to
51254
+ * @returns {$protobuf.Writer} Writer
51255
+ */
51256
+ TagCondition.encodeDelimited = function encodeDelimited(message, writer) {
51257
+ return this.encode(message, writer).ldelim();
51258
+ };
51259
+
51260
+ /**
51261
+ * Decodes a TagCondition message from the specified reader or buffer.
51262
+ * @function decode
51263
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51264
+ * @static
51265
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
51266
+ * @param {number} [length] Message length if known beforehand
51267
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition
51268
+ * @throws {Error} If the payload is not a reader or valid buffer
51269
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
51270
+ */
51271
+ TagCondition.decode = function decode(reader, length) {
51272
+ if (!(reader instanceof $Reader))
51273
+ reader = $Reader.create(reader);
51274
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition();
51275
+ while (reader.pos < end) {
51276
+ var tag = reader.uint32();
51277
+ switch (tag >>> 3) {
51278
+ case 1: {
51279
+ message.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.decode(reader, reader.uint32());
51280
+ break;
51281
+ }
51282
+ case 2: {
51283
+ message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32());
51284
+ break;
51285
+ }
51286
+ default:
51287
+ reader.skipType(tag & 7);
51288
+ break;
51289
+ }
51290
+ }
51291
+ return message;
51292
+ };
51293
+
51294
+ /**
51295
+ * Decodes a TagCondition message from the specified reader or buffer, length delimited.
51296
+ * @function decodeDelimited
51297
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51298
+ * @static
51299
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
51300
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition
51301
+ * @throws {Error} If the payload is not a reader or valid buffer
51302
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
51303
+ */
51304
+ TagCondition.decodeDelimited = function decodeDelimited(reader) {
51305
+ if (!(reader instanceof $Reader))
51306
+ reader = new $Reader(reader);
51307
+ return this.decode(reader, reader.uint32());
51308
+ };
51309
+
51310
+ /**
51311
+ * Verifies a TagCondition message.
51312
+ * @function verify
51313
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51314
+ * @static
51315
+ * @param {Object.<string,*>} message Plain object to verify
51316
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
51317
+ */
51318
+ TagCondition.verify = function verify(message) {
51319
+ if (typeof message !== "object" || message === null)
51320
+ return "object expected";
51321
+ var properties = {};
51322
+ if (message.tag != null && message.hasOwnProperty("tag")) {
51323
+ var error = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify(message.tag);
51324
+ if (error)
51325
+ return "tag." + error;
51326
+ }
51327
+ if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) {
51328
+ properties.type = 1;
51329
+ {
51330
+ var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore);
51331
+ if (error)
51332
+ return "sensitivityScore." + error;
51333
+ }
51334
+ }
51335
+ return null;
51336
+ };
51337
+
51338
+ /**
51339
+ * Creates a TagCondition message from a plain object. Also converts values to their respective internal types.
51340
+ * @function fromObject
51341
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51342
+ * @static
51343
+ * @param {Object.<string,*>} object Plain object
51344
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition
51345
+ */
51346
+ TagCondition.fromObject = function fromObject(object) {
51347
+ if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition)
51348
+ return object;
51349
+ var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition();
51350
+ if (object.tag != null) {
51351
+ if (typeof object.tag !== "object")
51352
+ throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.tag: object expected");
51353
+ message.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.fromObject(object.tag);
51354
+ }
51355
+ if (object.sensitivityScore != null) {
51356
+ if (typeof object.sensitivityScore !== "object")
51357
+ throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.sensitivityScore: object expected");
51358
+ message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore);
51359
+ }
51360
+ return message;
51361
+ };
51362
+
51363
+ /**
51364
+ * Creates a plain object from a TagCondition message. Also converts values to other types if specified.
51365
+ * @function toObject
51366
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51367
+ * @static
51368
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} message TagCondition
51369
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
51370
+ * @returns {Object.<string,*>} Plain object
51371
+ */
51372
+ TagCondition.toObject = function toObject(message, options) {
51373
+ if (!options)
51374
+ options = {};
51375
+ var object = {};
51376
+ if (options.defaults)
51377
+ object.tag = null;
51378
+ if (message.tag != null && message.hasOwnProperty("tag"))
51379
+ object.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.toObject(message.tag, options);
51380
+ if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) {
51381
+ object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options);
51382
+ if (options.oneofs)
51383
+ object.type = "sensitivityScore";
51384
+ }
51385
+ return object;
51386
+ };
51387
+
51388
+ /**
51389
+ * Converts this TagCondition to JSON.
51390
+ * @function toJSON
51391
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51392
+ * @instance
51393
+ * @returns {Object.<string,*>} JSON object
51394
+ */
51395
+ TagCondition.prototype.toJSON = function toJSON() {
51396
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
51397
+ };
51398
+
51399
+ /**
51400
+ * Gets the default type url for TagCondition
51401
+ * @function getTypeUrl
51402
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition
51403
+ * @static
51404
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
51405
+ * @returns {string} The default type url
51406
+ */
51407
+ TagCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
51408
+ if (typeUrlPrefix === undefined) {
51409
+ typeUrlPrefix = "type.googleapis.com";
51410
+ }
51411
+ return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition";
51412
+ };
51413
+
51414
+ return TagCondition;
51415
+ })();
51416
+
51417
+ TagResources.TagValue = (function() {
51418
+
51419
+ /**
51420
+ * Properties of a TagValue.
51421
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
51422
+ * @interface ITagValue
51423
+ * @property {string|null} [namespacedValue] TagValue namespacedValue
51424
+ */
51425
+
51426
+ /**
51427
+ * Constructs a new TagValue.
51428
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources
51429
+ * @classdesc Represents a TagValue.
51430
+ * @implements ITagValue
51431
+ * @constructor
51432
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue=} [properties] Properties to set
51433
+ */
51434
+ function TagValue(properties) {
51435
+ if (properties)
51436
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
51437
+ if (properties[keys[i]] != null)
51438
+ this[keys[i]] = properties[keys[i]];
51439
+ }
51440
+
51441
+ /**
51442
+ * TagValue namespacedValue.
51443
+ * @member {string|null|undefined} namespacedValue
51444
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51445
+ * @instance
51446
+ */
51447
+ TagValue.prototype.namespacedValue = null;
51448
+
51449
+ // OneOf field names bound to virtual getters and setters
51450
+ var $oneOfFields;
51451
+
51452
+ /**
51453
+ * TagValue format.
51454
+ * @member {"namespacedValue"|undefined} format
51455
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51456
+ * @instance
51457
+ */
51458
+ Object.defineProperty(TagValue.prototype, "format", {
51459
+ get: $util.oneOfGetter($oneOfFields = ["namespacedValue"]),
51460
+ set: $util.oneOfSetter($oneOfFields)
51461
+ });
51462
+
51463
+ /**
51464
+ * Creates a new TagValue instance using the specified properties.
51465
+ * @function create
51466
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51467
+ * @static
51468
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue=} [properties] Properties to set
51469
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue instance
51470
+ */
51471
+ TagValue.create = function create(properties) {
51472
+ return new TagValue(properties);
51473
+ };
51474
+
51475
+ /**
51476
+ * Encodes the specified TagValue message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify|verify} messages.
51477
+ * @function encode
51478
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51479
+ * @static
51480
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue} message TagValue message or plain object to encode
51481
+ * @param {$protobuf.Writer} [writer] Writer to encode to
51482
+ * @returns {$protobuf.Writer} Writer
51483
+ */
51484
+ TagValue.encode = function encode(message, writer) {
51485
+ if (!writer)
51486
+ writer = $Writer.create();
51487
+ if (message.namespacedValue != null && Object.hasOwnProperty.call(message, "namespacedValue"))
51488
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespacedValue);
51489
+ return writer;
51490
+ };
51491
+
51492
+ /**
51493
+ * Encodes the specified TagValue message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify|verify} messages.
51494
+ * @function encodeDelimited
51495
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51496
+ * @static
51497
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue} message TagValue message or plain object to encode
51498
+ * @param {$protobuf.Writer} [writer] Writer to encode to
51499
+ * @returns {$protobuf.Writer} Writer
51500
+ */
51501
+ TagValue.encodeDelimited = function encodeDelimited(message, writer) {
51502
+ return this.encode(message, writer).ldelim();
51503
+ };
51504
+
51505
+ /**
51506
+ * Decodes a TagValue message from the specified reader or buffer.
51507
+ * @function decode
51508
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51509
+ * @static
51510
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
51511
+ * @param {number} [length] Message length if known beforehand
51512
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue
51513
+ * @throws {Error} If the payload is not a reader or valid buffer
51514
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
51515
+ */
51516
+ TagValue.decode = function decode(reader, length) {
51517
+ if (!(reader instanceof $Reader))
51518
+ reader = $Reader.create(reader);
51519
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue();
51520
+ while (reader.pos < end) {
51521
+ var tag = reader.uint32();
51522
+ switch (tag >>> 3) {
51523
+ case 1: {
51524
+ message.namespacedValue = reader.string();
51525
+ break;
51526
+ }
51527
+ default:
51528
+ reader.skipType(tag & 7);
51529
+ break;
51530
+ }
51531
+ }
51532
+ return message;
51533
+ };
50695
51534
 
50696
- /**
50697
- * Creates a plain object from a PubSubNotification message. Also converts values to other types if specified.
50698
- * @function toObject
50699
- * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification
50700
- * @static
50701
- * @param {google.privacy.dlp.v2.DataProfileAction.PubSubNotification} message PubSubNotification
50702
- * @param {$protobuf.IConversionOptions} [options] Conversion options
50703
- * @returns {Object.<string,*>} Plain object
50704
- */
50705
- PubSubNotification.toObject = function toObject(message, options) {
50706
- if (!options)
50707
- options = {};
50708
- var object = {};
50709
- if (options.defaults) {
50710
- object.topic = "";
50711
- object.event = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0;
50712
- object.pubsubCondition = null;
50713
- object.detailOfMessage = options.enums === String ? "DETAIL_LEVEL_UNSPECIFIED" : 0;
50714
- }
50715
- if (message.topic != null && message.hasOwnProperty("topic"))
50716
- object.topic = message.topic;
50717
- if (message.event != null && message.hasOwnProperty("event"))
50718
- object.event = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileAction.EventType[message.event] === undefined ? message.event : $root.google.privacy.dlp.v2.DataProfileAction.EventType[message.event] : message.event;
50719
- if (message.pubsubCondition != null && message.hasOwnProperty("pubsubCondition"))
50720
- object.pubsubCondition = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.toObject(message.pubsubCondition, options);
50721
- if (message.detailOfMessage != null && message.hasOwnProperty("detailOfMessage"))
50722
- object.detailOfMessage = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel[message.detailOfMessage] === undefined ? message.detailOfMessage : $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel[message.detailOfMessage] : message.detailOfMessage;
50723
- return object;
50724
- };
51535
+ /**
51536
+ * Decodes a TagValue message from the specified reader or buffer, length delimited.
51537
+ * @function decodeDelimited
51538
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51539
+ * @static
51540
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
51541
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue
51542
+ * @throws {Error} If the payload is not a reader or valid buffer
51543
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
51544
+ */
51545
+ TagValue.decodeDelimited = function decodeDelimited(reader) {
51546
+ if (!(reader instanceof $Reader))
51547
+ reader = new $Reader(reader);
51548
+ return this.decode(reader, reader.uint32());
51549
+ };
50725
51550
 
50726
- /**
50727
- * Converts this PubSubNotification to JSON.
50728
- * @function toJSON
50729
- * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification
50730
- * @instance
50731
- * @returns {Object.<string,*>} JSON object
50732
- */
50733
- PubSubNotification.prototype.toJSON = function toJSON() {
50734
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
50735
- };
51551
+ /**
51552
+ * Verifies a TagValue message.
51553
+ * @function verify
51554
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51555
+ * @static
51556
+ * @param {Object.<string,*>} message Plain object to verify
51557
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
51558
+ */
51559
+ TagValue.verify = function verify(message) {
51560
+ if (typeof message !== "object" || message === null)
51561
+ return "object expected";
51562
+ var properties = {};
51563
+ if (message.namespacedValue != null && message.hasOwnProperty("namespacedValue")) {
51564
+ properties.format = 1;
51565
+ if (!$util.isString(message.namespacedValue))
51566
+ return "namespacedValue: string expected";
51567
+ }
51568
+ return null;
51569
+ };
50736
51570
 
50737
- /**
50738
- * Gets the default type url for PubSubNotification
50739
- * @function getTypeUrl
50740
- * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification
50741
- * @static
50742
- * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
50743
- * @returns {string} The default type url
50744
- */
50745
- PubSubNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
50746
- if (typeUrlPrefix === undefined) {
50747
- typeUrlPrefix = "type.googleapis.com";
50748
- }
50749
- return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.PubSubNotification";
50750
- };
51571
+ /**
51572
+ * Creates a TagValue message from a plain object. Also converts values to their respective internal types.
51573
+ * @function fromObject
51574
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51575
+ * @static
51576
+ * @param {Object.<string,*>} object Plain object
51577
+ * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue
51578
+ */
51579
+ TagValue.fromObject = function fromObject(object) {
51580
+ if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue)
51581
+ return object;
51582
+ var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue();
51583
+ if (object.namespacedValue != null)
51584
+ message.namespacedValue = String(object.namespacedValue);
51585
+ return message;
51586
+ };
50751
51587
 
50752
- /**
50753
- * DetailLevel enum.
50754
- * @name google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel
50755
- * @enum {number}
50756
- * @property {number} DETAIL_LEVEL_UNSPECIFIED=0 DETAIL_LEVEL_UNSPECIFIED value
50757
- * @property {number} TABLE_PROFILE=1 TABLE_PROFILE value
50758
- * @property {number} RESOURCE_NAME=2 RESOURCE_NAME value
50759
- * @property {number} FILE_STORE_PROFILE=3 FILE_STORE_PROFILE value
50760
- */
50761
- PubSubNotification.DetailLevel = (function() {
50762
- var valuesById = {}, values = Object.create(valuesById);
50763
- values[valuesById[0] = "DETAIL_LEVEL_UNSPECIFIED"] = 0;
50764
- values[valuesById[1] = "TABLE_PROFILE"] = 1;
50765
- values[valuesById[2] = "RESOURCE_NAME"] = 2;
50766
- values[valuesById[3] = "FILE_STORE_PROFILE"] = 3;
50767
- return values;
50768
- })();
51588
+ /**
51589
+ * Creates a plain object from a TagValue message. Also converts values to other types if specified.
51590
+ * @function toObject
51591
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51592
+ * @static
51593
+ * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} message TagValue
51594
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
51595
+ * @returns {Object.<string,*>} Plain object
51596
+ */
51597
+ TagValue.toObject = function toObject(message, options) {
51598
+ if (!options)
51599
+ options = {};
51600
+ var object = {};
51601
+ if (message.namespacedValue != null && message.hasOwnProperty("namespacedValue")) {
51602
+ object.namespacedValue = message.namespacedValue;
51603
+ if (options.oneofs)
51604
+ object.format = "namespacedValue";
51605
+ }
51606
+ return object;
51607
+ };
50769
51608
 
50770
- return PubSubNotification;
50771
- })();
51609
+ /**
51610
+ * Converts this TagValue to JSON.
51611
+ * @function toJSON
51612
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51613
+ * @instance
51614
+ * @returns {Object.<string,*>} JSON object
51615
+ */
51616
+ TagValue.prototype.toJSON = function toJSON() {
51617
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
51618
+ };
50772
51619
 
50773
- /**
50774
- * EventType enum.
50775
- * @name google.privacy.dlp.v2.DataProfileAction.EventType
50776
- * @enum {number}
50777
- * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value
50778
- * @property {number} NEW_PROFILE=1 NEW_PROFILE value
50779
- * @property {number} CHANGED_PROFILE=2 CHANGED_PROFILE value
50780
- * @property {number} SCORE_INCREASED=3 SCORE_INCREASED value
50781
- * @property {number} ERROR_CHANGED=4 ERROR_CHANGED value
50782
- */
50783
- DataProfileAction.EventType = (function() {
50784
- var valuesById = {}, values = Object.create(valuesById);
50785
- values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0;
50786
- values[valuesById[1] = "NEW_PROFILE"] = 1;
50787
- values[valuesById[2] = "CHANGED_PROFILE"] = 2;
50788
- values[valuesById[3] = "SCORE_INCREASED"] = 3;
50789
- values[valuesById[4] = "ERROR_CHANGED"] = 4;
50790
- return values;
51620
+ /**
51621
+ * Gets the default type url for TagValue
51622
+ * @function getTypeUrl
51623
+ * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue
51624
+ * @static
51625
+ * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
51626
+ * @returns {string} The default type url
51627
+ */
51628
+ TagValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
51629
+ if (typeUrlPrefix === undefined) {
51630
+ typeUrlPrefix = "type.googleapis.com";
51631
+ }
51632
+ return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue";
51633
+ };
51634
+
51635
+ return TagValue;
51636
+ })();
51637
+
51638
+ return TagResources;
50791
51639
  })();
50792
51640
 
50793
51641
  return DataProfileAction;
@@ -55067,6 +55915,7 @@
55067
55915
  * @property {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence|null} [schemaModifiedCadence] DiscoveryGenerationCadence schemaModifiedCadence
55068
55916
  * @property {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence|null} [tableModifiedCadence] DiscoveryGenerationCadence tableModifiedCadence
55069
55917
  * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryGenerationCadence inspectTemplateModifiedCadence
55918
+ * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryGenerationCadence refreshFrequency
55070
55919
  */
55071
55920
 
55072
55921
  /**
@@ -55108,6 +55957,14 @@
55108
55957
  */
55109
55958
  DiscoveryGenerationCadence.prototype.inspectTemplateModifiedCadence = null;
55110
55959
 
55960
+ /**
55961
+ * DiscoveryGenerationCadence refreshFrequency.
55962
+ * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency
55963
+ * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence
55964
+ * @instance
55965
+ */
55966
+ DiscoveryGenerationCadence.prototype.refreshFrequency = 0;
55967
+
55111
55968
  /**
55112
55969
  * Creates a new DiscoveryGenerationCadence instance using the specified properties.
55113
55970
  * @function create
@@ -55138,6 +55995,8 @@
55138
55995
  $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.encode(message.tableModifiedCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
55139
55996
  if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence"))
55140
55997
  $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
55998
+ if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency"))
55999
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.refreshFrequency);
55141
56000
  return writer;
55142
56001
  };
55143
56002
 
@@ -55184,6 +56043,10 @@
55184
56043
  message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32());
55185
56044
  break;
55186
56045
  }
56046
+ case 4: {
56047
+ message.refreshFrequency = reader.int32();
56048
+ break;
56049
+ }
55187
56050
  default:
55188
56051
  reader.skipType(tag & 7);
55189
56052
  break;
@@ -55234,6 +56097,16 @@
55234
56097
  if (error)
55235
56098
  return "inspectTemplateModifiedCadence." + error;
55236
56099
  }
56100
+ if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency"))
56101
+ switch (message.refreshFrequency) {
56102
+ default:
56103
+ return "refreshFrequency: enum value expected";
56104
+ case 0:
56105
+ case 1:
56106
+ case 2:
56107
+ case 4:
56108
+ break;
56109
+ }
55237
56110
  return null;
55238
56111
  };
55239
56112
 
@@ -55264,6 +56137,30 @@
55264
56137
  throw TypeError(".google.privacy.dlp.v2.DiscoveryGenerationCadence.inspectTemplateModifiedCadence: object expected");
55265
56138
  message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence);
55266
56139
  }
56140
+ switch (object.refreshFrequency) {
56141
+ default:
56142
+ if (typeof object.refreshFrequency === "number") {
56143
+ message.refreshFrequency = object.refreshFrequency;
56144
+ break;
56145
+ }
56146
+ break;
56147
+ case "UPDATE_FREQUENCY_UNSPECIFIED":
56148
+ case 0:
56149
+ message.refreshFrequency = 0;
56150
+ break;
56151
+ case "UPDATE_FREQUENCY_NEVER":
56152
+ case 1:
56153
+ message.refreshFrequency = 1;
56154
+ break;
56155
+ case "UPDATE_FREQUENCY_DAILY":
56156
+ case 2:
56157
+ message.refreshFrequency = 2;
56158
+ break;
56159
+ case "UPDATE_FREQUENCY_MONTHLY":
56160
+ case 4:
56161
+ message.refreshFrequency = 4;
56162
+ break;
56163
+ }
55267
56164
  return message;
55268
56165
  };
55269
56166
 
@@ -55284,6 +56181,7 @@
55284
56181
  object.schemaModifiedCadence = null;
55285
56182
  object.tableModifiedCadence = null;
55286
56183
  object.inspectTemplateModifiedCadence = null;
56184
+ object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0;
55287
56185
  }
55288
56186
  if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence"))
55289
56187
  object.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.toObject(message.schemaModifiedCadence, options);
@@ -55291,6 +56189,8 @@
55291
56189
  object.tableModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.toObject(message.tableModifiedCadence, options);
55292
56190
  if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence"))
55293
56191
  object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options);
56192
+ if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency"))
56193
+ object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency;
55294
56194
  return object;
55295
56195
  };
55296
56196
 
@@ -58347,6 +59247,7 @@
58347
59247
  * @interface IDiscoveryCloudSqlGenerationCadence
58348
59248
  * @property {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence|null} [schemaModifiedCadence] DiscoveryCloudSqlGenerationCadence schemaModifiedCadence
58349
59249
  * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryCloudSqlGenerationCadence refreshFrequency
59250
+ * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryCloudSqlGenerationCadence inspectTemplateModifiedCadence
58350
59251
  */
58351
59252
 
58352
59253
  /**
@@ -58380,6 +59281,14 @@
58380
59281
  */
58381
59282
  DiscoveryCloudSqlGenerationCadence.prototype.refreshFrequency = 0;
58382
59283
 
59284
+ /**
59285
+ * DiscoveryCloudSqlGenerationCadence inspectTemplateModifiedCadence.
59286
+ * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence
59287
+ * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence
59288
+ * @instance
59289
+ */
59290
+ DiscoveryCloudSqlGenerationCadence.prototype.inspectTemplateModifiedCadence = null;
59291
+
58383
59292
  /**
58384
59293
  * Creates a new DiscoveryCloudSqlGenerationCadence instance using the specified properties.
58385
59294
  * @function create
@@ -58408,6 +59317,8 @@
58408
59317
  $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.encode(message.schemaModifiedCadence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
58409
59318
  if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency"))
58410
59319
  writer.uint32(/* id 2, wireType 0 =*/16).int32(message.refreshFrequency);
59320
+ if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence"))
59321
+ $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
58411
59322
  return writer;
58412
59323
  };
58413
59324
 
@@ -58450,6 +59361,10 @@
58450
59361
  message.refreshFrequency = reader.int32();
58451
59362
  break;
58452
59363
  }
59364
+ case 3: {
59365
+ message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32());
59366
+ break;
59367
+ }
58453
59368
  default:
58454
59369
  reader.skipType(tag & 7);
58455
59370
  break;
@@ -58500,6 +59415,11 @@
58500
59415
  case 4:
58501
59416
  break;
58502
59417
  }
59418
+ if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) {
59419
+ var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence);
59420
+ if (error)
59421
+ return "inspectTemplateModifiedCadence." + error;
59422
+ }
58503
59423
  return null;
58504
59424
  };
58505
59425
 
@@ -58544,6 +59464,11 @@
58544
59464
  message.refreshFrequency = 4;
58545
59465
  break;
58546
59466
  }
59467
+ if (object.inspectTemplateModifiedCadence != null) {
59468
+ if (typeof object.inspectTemplateModifiedCadence !== "object")
59469
+ throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.inspectTemplateModifiedCadence: object expected");
59470
+ message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence);
59471
+ }
58547
59472
  return message;
58548
59473
  };
58549
59474
 
@@ -58563,11 +59488,14 @@
58563
59488
  if (options.defaults) {
58564
59489
  object.schemaModifiedCadence = null;
58565
59490
  object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0;
59491
+ object.inspectTemplateModifiedCadence = null;
58566
59492
  }
58567
59493
  if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence"))
58568
59494
  object.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.toObject(message.schemaModifiedCadence, options);
58569
59495
  if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency"))
58570
59496
  object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency;
59497
+ if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence"))
59498
+ object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options);
58571
59499
  return object;
58572
59500
  };
58573
59501