Class: Google::Cloud::Dlp::V2::CustomInfoType

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/privacy/dlp/v2/storage.rb

Overview

Custom information type provided by the user. Used to find domain-specific sensitive information configurable to the data in question.

Defined Under Namespace

Modules: ExclusionType Classes: DetectionRule, Dictionary, Regex, SurrogateType

Instance Attribute Summary collapse

Instance Attribute Details

#detection_rules::Array<::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule>

Returns Set of detection rules to apply to all findings of this CustomInfoType. Rules are applied in order that they are specified. Not supported for the surrogate_type CustomInfoType.

Returns:



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 141

class CustomInfoType
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom information type based on a dictionary of words or phrases. This can
  # be used to match sensitive information specific to the data, such as a list
  # of employee IDs or job titles.
  #
  # Dictionary words are case-insensitive and all characters other than letters
  # and digits in the unicode [Basic Multilingual
  # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
  # will be replaced with whitespace when scanning for matches, so the
  # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
  # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
  # surrounding any match must be of a different type than the adjacent
  # characters within the word, so letters must be next to non-letters and
  # digits next to non-digits. For example, the dictionary word "jen" will
  # match the first three letters of the text "jen123" but will return no
  # matches for "jennifer".
  #
  # Dictionary words containing a large number of characters that are not
  # letters or digits may result in unexpected findings because such characters
  # are treated as whitespace. The
  # [limits](https://cloud.google.com/sensitive-data-protection/limits) page
  # contains details about the size limits of dictionaries. For dictionaries
  # that do not fit within these constraints, consider using
  # `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
  # @!attribute [rw] word_list
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList]
  #     List of words or phrases to search for.
  # @!attribute [rw] cloud_storage_path
  #   @return [::Google::Cloud::Dlp::V2::CloudStoragePath]
  #     Newline-delimited file of words in Cloud Storage. Only a single file
  #     is accepted.
  class Dictionary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message defining a list of words or phrases to search for in the data.
    # @!attribute [rw] words
    #   @return [::Array<::String>]
    #     Words or phrases defining the dictionary. The dictionary must contain
    #     at least one phrase and every phrase must contain at least 2 characters
    #     that are letters or digits. [required]
    class WordList
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Message defining a custom regular expression.
  # @!attribute [rw] pattern
  #   @return [::String]
  #     Pattern defining the regular expression. Its syntax
  #     (https://github.com/google/re2/wiki/Syntax) can be found under the
  #     google/re2 repository on GitHub.
  # @!attribute [rw] group_indexes
  #   @return [::Array<::Integer>]
  #     The index of the submatch to extract as findings. When not
  #     specified, the entire match is returned. No more than 3 may be included.
  class Regex
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message for detecting output from deidentification transformations
  # such as
  # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
  # These types of transformations are
  # those that perform pseudonymization, thereby producing a "surrogate" as
  # output. This should be used in conjunction with a field on the
  # transformation such as `surrogate_info_type`. This CustomInfoType does
  # not support the use of `detection_rules`.
  class SurrogateType
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
  # `CustomInfoType` to alter behavior under certain circumstances, depending
  # on the specific details of the rule. Not supported for the `surrogate_type`
  # custom infoType.
  # @!attribute [rw] hotword_rule
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule]
  #     Hotword-based detection rule.
  class DetectionRule
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message for specifying a window around a finding to apply a detection
    # rule.
    # @!attribute [rw] window_before
    #   @return [::Integer]
    #     Number of characters before the finding to consider. For tabular data,
    #     if you want to modify the likelihood of an entire column of findngs,
    #     set this to 1. For more information, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] window_after
    #   @return [::Integer]
    #     Number of characters after the finding to consider.
    class Proximity
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Message for specifying an adjustment to the likelihood of a finding as
    # part of a detection rule.
    # @!attribute [rw] fixed_likelihood
    #   @return [::Google::Cloud::Dlp::V2::Likelihood]
    #     Set the likelihood of a finding to a fixed value.
    # @!attribute [rw] relative_likelihood
    #   @return [::Integer]
    #     Increase or decrease the likelihood by the specified number of
    #     levels. For example, if a finding would be `POSSIBLE` without the
    #     detection rule and `relative_likelihood` is 1, then it is upgraded to
    #     `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
    #     Likelihood may never drop below `VERY_UNLIKELY` or exceed
    #     `VERY_LIKELY`, so applying an adjustment of 1 followed by an
    #     adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
    #     a final likelihood of `LIKELY`.
    class LikelihoodAdjustment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The rule that adjusts the likelihood of findings within a certain
    # proximity of hotwords.
    # @!attribute [rw] hotword_regex
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex]
    #     Regular expression pattern defining what qualifies as a hotword.
    # @!attribute [rw] proximity
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity]
    #     Range of characters within which the entire hotword must reside.
    #     The total length of the window cannot exceed 1000 characters.
    #     The finding itself will be included in the window, so that hotwords can
    #     be used to match substrings of the finding itself. Suppose you
    #     want Cloud DLP to promote the likelihood of the phone number
    #     regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the
    #     area code of a company's office. In this case, use the hotword regex
    #     "\(xxx\)", where "xxx" is the area code in question.
    #
    #     For tabular data, if you want to modify the likelihood of an entire
    #     column of findngs, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] likelihood_adjustment
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment]
    #     Likelihood adjustment to apply to all matching findings.
    class HotwordRule
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Type of exclusion rule.
  module ExclusionType
    # A finding of this custom info type will not be excluded from results.
    EXCLUSION_TYPE_UNSPECIFIED = 0

    # A finding of this custom info type will be excluded from final results,
    # but can still affect rule execution.
    EXCLUSION_TYPE_EXCLUDE = 1
  end
end

#dictionary::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary

Returns A list of phrases to detect as a CustomInfoType.

Returns:



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 141

class CustomInfoType
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom information type based on a dictionary of words or phrases. This can
  # be used to match sensitive information specific to the data, such as a list
  # of employee IDs or job titles.
  #
  # Dictionary words are case-insensitive and all characters other than letters
  # and digits in the unicode [Basic Multilingual
  # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
  # will be replaced with whitespace when scanning for matches, so the
  # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
  # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
  # surrounding any match must be of a different type than the adjacent
  # characters within the word, so letters must be next to non-letters and
  # digits next to non-digits. For example, the dictionary word "jen" will
  # match the first three letters of the text "jen123" but will return no
  # matches for "jennifer".
  #
  # Dictionary words containing a large number of characters that are not
  # letters or digits may result in unexpected findings because such characters
  # are treated as whitespace. The
  # [limits](https://cloud.google.com/sensitive-data-protection/limits) page
  # contains details about the size limits of dictionaries. For dictionaries
  # that do not fit within these constraints, consider using
  # `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
  # @!attribute [rw] word_list
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList]
  #     List of words or phrases to search for.
  # @!attribute [rw] cloud_storage_path
  #   @return [::Google::Cloud::Dlp::V2::CloudStoragePath]
  #     Newline-delimited file of words in Cloud Storage. Only a single file
  #     is accepted.
  class Dictionary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message defining a list of words or phrases to search for in the data.
    # @!attribute [rw] words
    #   @return [::Array<::String>]
    #     Words or phrases defining the dictionary. The dictionary must contain
    #     at least one phrase and every phrase must contain at least 2 characters
    #     that are letters or digits. [required]
    class WordList
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Message defining a custom regular expression.
  # @!attribute [rw] pattern
  #   @return [::String]
  #     Pattern defining the regular expression. Its syntax
  #     (https://github.com/google/re2/wiki/Syntax) can be found under the
  #     google/re2 repository on GitHub.
  # @!attribute [rw] group_indexes
  #   @return [::Array<::Integer>]
  #     The index of the submatch to extract as findings. When not
  #     specified, the entire match is returned. No more than 3 may be included.
  class Regex
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message for detecting output from deidentification transformations
  # such as
  # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
  # These types of transformations are
  # those that perform pseudonymization, thereby producing a "surrogate" as
  # output. This should be used in conjunction with a field on the
  # transformation such as `surrogate_info_type`. This CustomInfoType does
  # not support the use of `detection_rules`.
  class SurrogateType
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
  # `CustomInfoType` to alter behavior under certain circumstances, depending
  # on the specific details of the rule. Not supported for the `surrogate_type`
  # custom infoType.
  # @!attribute [rw] hotword_rule
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule]
  #     Hotword-based detection rule.
  class DetectionRule
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message for specifying a window around a finding to apply a detection
    # rule.
    # @!attribute [rw] window_before
    #   @return [::Integer]
    #     Number of characters before the finding to consider. For tabular data,
    #     if you want to modify the likelihood of an entire column of findngs,
    #     set this to 1. For more information, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] window_after
    #   @return [::Integer]
    #     Number of characters after the finding to consider.
    class Proximity
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Message for specifying an adjustment to the likelihood of a finding as
    # part of a detection rule.
    # @!attribute [rw] fixed_likelihood
    #   @return [::Google::Cloud::Dlp::V2::Likelihood]
    #     Set the likelihood of a finding to a fixed value.
    # @!attribute [rw] relative_likelihood
    #   @return [::Integer]
    #     Increase or decrease the likelihood by the specified number of
    #     levels. For example, if a finding would be `POSSIBLE` without the
    #     detection rule and `relative_likelihood` is 1, then it is upgraded to
    #     `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
    #     Likelihood may never drop below `VERY_UNLIKELY` or exceed
    #     `VERY_LIKELY`, so applying an adjustment of 1 followed by an
    #     adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
    #     a final likelihood of `LIKELY`.
    class LikelihoodAdjustment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The rule that adjusts the likelihood of findings within a certain
    # proximity of hotwords.
    # @!attribute [rw] hotword_regex
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex]
    #     Regular expression pattern defining what qualifies as a hotword.
    # @!attribute [rw] proximity
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity]
    #     Range of characters within which the entire hotword must reside.
    #     The total length of the window cannot exceed 1000 characters.
    #     The finding itself will be included in the window, so that hotwords can
    #     be used to match substrings of the finding itself. Suppose you
    #     want Cloud DLP to promote the likelihood of the phone number
    #     regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the
    #     area code of a company's office. In this case, use the hotword regex
    #     "\(xxx\)", where "xxx" is the area code in question.
    #
    #     For tabular data, if you want to modify the likelihood of an entire
    #     column of findngs, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] likelihood_adjustment
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment]
    #     Likelihood adjustment to apply to all matching findings.
    class HotwordRule
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Type of exclusion rule.
  module ExclusionType
    # A finding of this custom info type will not be excluded from results.
    EXCLUSION_TYPE_UNSPECIFIED = 0

    # A finding of this custom info type will be excluded from final results,
    # but can still affect rule execution.
    EXCLUSION_TYPE_EXCLUDE = 1
  end
end

#exclusion_type::Google::Cloud::Dlp::V2::CustomInfoType::ExclusionType

Returns If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding to be returned. It still can be used for rules matching.

Returns:



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 141

class CustomInfoType
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom information type based on a dictionary of words or phrases. This can
  # be used to match sensitive information specific to the data, such as a list
  # of employee IDs or job titles.
  #
  # Dictionary words are case-insensitive and all characters other than letters
  # and digits in the unicode [Basic Multilingual
  # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
  # will be replaced with whitespace when scanning for matches, so the
  # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
  # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
  # surrounding any match must be of a different type than the adjacent
  # characters within the word, so letters must be next to non-letters and
  # digits next to non-digits. For example, the dictionary word "jen" will
  # match the first three letters of the text "jen123" but will return no
  # matches for "jennifer".
  #
  # Dictionary words containing a large number of characters that are not
  # letters or digits may result in unexpected findings because such characters
  # are treated as whitespace. The
  # [limits](https://cloud.google.com/sensitive-data-protection/limits) page
  # contains details about the size limits of dictionaries. For dictionaries
  # that do not fit within these constraints, consider using
  # `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
  # @!attribute [rw] word_list
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList]
  #     List of words or phrases to search for.
  # @!attribute [rw] cloud_storage_path
  #   @return [::Google::Cloud::Dlp::V2::CloudStoragePath]
  #     Newline-delimited file of words in Cloud Storage. Only a single file
  #     is accepted.
  class Dictionary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message defining a list of words or phrases to search for in the data.
    # @!attribute [rw] words
    #   @return [::Array<::String>]
    #     Words or phrases defining the dictionary. The dictionary must contain
    #     at least one phrase and every phrase must contain at least 2 characters
    #     that are letters or digits. [required]
    class WordList
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Message defining a custom regular expression.
  # @!attribute [rw] pattern
  #   @return [::String]
  #     Pattern defining the regular expression. Its syntax
  #     (https://github.com/google/re2/wiki/Syntax) can be found under the
  #     google/re2 repository on GitHub.
  # @!attribute [rw] group_indexes
  #   @return [::Array<::Integer>]
  #     The index of the submatch to extract as findings. When not
  #     specified, the entire match is returned. No more than 3 may be included.
  class Regex
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message for detecting output from deidentification transformations
  # such as
  # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
  # These types of transformations are
  # those that perform pseudonymization, thereby producing a "surrogate" as
  # output. This should be used in conjunction with a field on the
  # transformation such as `surrogate_info_type`. This CustomInfoType does
  # not support the use of `detection_rules`.
  class SurrogateType
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
  # `CustomInfoType` to alter behavior under certain circumstances, depending
  # on the specific details of the rule. Not supported for the `surrogate_type`
  # custom infoType.
  # @!attribute [rw] hotword_rule
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule]
  #     Hotword-based detection rule.
  class DetectionRule
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message for specifying a window around a finding to apply a detection
    # rule.
    # @!attribute [rw] window_before
    #   @return [::Integer]
    #     Number of characters before the finding to consider. For tabular data,
    #     if you want to modify the likelihood of an entire column of findngs,
    #     set this to 1. For more information, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] window_after
    #   @return [::Integer]
    #     Number of characters after the finding to consider.
    class Proximity
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Message for specifying an adjustment to the likelihood of a finding as
    # part of a detection rule.
    # @!attribute [rw] fixed_likelihood
    #   @return [::Google::Cloud::Dlp::V2::Likelihood]
    #     Set the likelihood of a finding to a fixed value.
    # @!attribute [rw] relative_likelihood
    #   @return [::Integer]
    #     Increase or decrease the likelihood by the specified number of
    #     levels. For example, if a finding would be `POSSIBLE` without the
    #     detection rule and `relative_likelihood` is 1, then it is upgraded to
    #     `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
    #     Likelihood may never drop below `VERY_UNLIKELY` or exceed
    #     `VERY_LIKELY`, so applying an adjustment of 1 followed by an
    #     adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
    #     a final likelihood of `LIKELY`.
    class LikelihoodAdjustment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The rule that adjusts the likelihood of findings within a certain
    # proximity of hotwords.
    # @!attribute [rw] hotword_regex
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex]
    #     Regular expression pattern defining what qualifies as a hotword.
    # @!attribute [rw] proximity
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity]
    #     Range of characters within which the entire hotword must reside.
    #     The total length of the window cannot exceed 1000 characters.
    #     The finding itself will be included in the window, so that hotwords can
    #     be used to match substrings of the finding itself. Suppose you
    #     want Cloud DLP to promote the likelihood of the phone number
    #     regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the
    #     area code of a company's office. In this case, use the hotword regex
    #     "\(xxx\)", where "xxx" is the area code in question.
    #
    #     For tabular data, if you want to modify the likelihood of an entire
    #     column of findngs, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] likelihood_adjustment
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment]
    #     Likelihood adjustment to apply to all matching findings.
    class HotwordRule
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Type of exclusion rule.
  module ExclusionType
    # A finding of this custom info type will not be excluded from results.
    EXCLUSION_TYPE_UNSPECIFIED = 0

    # A finding of this custom info type will be excluded from final results,
    # but can still affect rule execution.
    EXCLUSION_TYPE_EXCLUDE = 1
  end
end

#info_type::Google::Cloud::Dlp::V2::InfoType

Returns CustomInfoType can either be a new infoType, or an extension of built-in infoType, when the name matches one of existing infoTypes and that infoType is specified in InspectContent.info_types field. Specifying the latter adds findings to the one detected by the system. If built-in info type is not specified in InspectContent.info_types list then the name is treated as a custom info type.

Returns:

  • (::Google::Cloud::Dlp::V2::InfoType)

    CustomInfoType can either be a new infoType, or an extension of built-in infoType, when the name matches one of existing infoTypes and that infoType is specified in InspectContent.info_types field. Specifying the latter adds findings to the one detected by the system. If built-in info type is not specified in InspectContent.info_types list then the name is treated as a custom info type.



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 141

class CustomInfoType
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom information type based on a dictionary of words or phrases. This can
  # be used to match sensitive information specific to the data, such as a list
  # of employee IDs or job titles.
  #
  # Dictionary words are case-insensitive and all characters other than letters
  # and digits in the unicode [Basic Multilingual
  # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
  # will be replaced with whitespace when scanning for matches, so the
  # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
  # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
  # surrounding any match must be of a different type than the adjacent
  # characters within the word, so letters must be next to non-letters and
  # digits next to non-digits. For example, the dictionary word "jen" will
  # match the first three letters of the text "jen123" but will return no
  # matches for "jennifer".
  #
  # Dictionary words containing a large number of characters that are not
  # letters or digits may result in unexpected findings because such characters
  # are treated as whitespace. The
  # [limits](https://cloud.google.com/sensitive-data-protection/limits) page
  # contains details about the size limits of dictionaries. For dictionaries
  # that do not fit within these constraints, consider using
  # `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
  # @!attribute [rw] word_list
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList]
  #     List of words or phrases to search for.
  # @!attribute [rw] cloud_storage_path
  #   @return [::Google::Cloud::Dlp::V2::CloudStoragePath]
  #     Newline-delimited file of words in Cloud Storage. Only a single file
  #     is accepted.
  class Dictionary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message defining a list of words or phrases to search for in the data.
    # @!attribute [rw] words
    #   @return [::Array<::String>]
    #     Words or phrases defining the dictionary. The dictionary must contain
    #     at least one phrase and every phrase must contain at least 2 characters
    #     that are letters or digits. [required]
    class WordList
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Message defining a custom regular expression.
  # @!attribute [rw] pattern
  #   @return [::String]
  #     Pattern defining the regular expression. Its syntax
  #     (https://github.com/google/re2/wiki/Syntax) can be found under the
  #     google/re2 repository on GitHub.
  # @!attribute [rw] group_indexes
  #   @return [::Array<::Integer>]
  #     The index of the submatch to extract as findings. When not
  #     specified, the entire match is returned. No more than 3 may be included.
  class Regex
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message for detecting output from deidentification transformations
  # such as
  # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
  # These types of transformations are
  # those that perform pseudonymization, thereby producing a "surrogate" as
  # output. This should be used in conjunction with a field on the
  # transformation such as `surrogate_info_type`. This CustomInfoType does
  # not support the use of `detection_rules`.
  class SurrogateType
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
  # `CustomInfoType` to alter behavior under certain circumstances, depending
  # on the specific details of the rule. Not supported for the `surrogate_type`
  # custom infoType.
  # @!attribute [rw] hotword_rule
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule]
  #     Hotword-based detection rule.
  class DetectionRule
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message for specifying a window around a finding to apply a detection
    # rule.
    # @!attribute [rw] window_before
    #   @return [::Integer]
    #     Number of characters before the finding to consider. For tabular data,
    #     if you want to modify the likelihood of an entire column of findngs,
    #     set this to 1. For more information, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] window_after
    #   @return [::Integer]
    #     Number of characters after the finding to consider.
    class Proximity
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Message for specifying an adjustment to the likelihood of a finding as
    # part of a detection rule.
    # @!attribute [rw] fixed_likelihood
    #   @return [::Google::Cloud::Dlp::V2::Likelihood]
    #     Set the likelihood of a finding to a fixed value.
    # @!attribute [rw] relative_likelihood
    #   @return [::Integer]
    #     Increase or decrease the likelihood by the specified number of
    #     levels. For example, if a finding would be `POSSIBLE` without the
    #     detection rule and `relative_likelihood` is 1, then it is upgraded to
    #     `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
    #     Likelihood may never drop below `VERY_UNLIKELY` or exceed
    #     `VERY_LIKELY`, so applying an adjustment of 1 followed by an
    #     adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
    #     a final likelihood of `LIKELY`.
    class LikelihoodAdjustment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The rule that adjusts the likelihood of findings within a certain
    # proximity of hotwords.
    # @!attribute [rw] hotword_regex
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex]
    #     Regular expression pattern defining what qualifies as a hotword.
    # @!attribute [rw] proximity
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity]
    #     Range of characters within which the entire hotword must reside.
    #     The total length of the window cannot exceed 1000 characters.
    #     The finding itself will be included in the window, so that hotwords can
    #     be used to match substrings of the finding itself. Suppose you
    #     want Cloud DLP to promote the likelihood of the phone number
    #     regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the
    #     area code of a company's office. In this case, use the hotword regex
    #     "\(xxx\)", where "xxx" is the area code in question.
    #
    #     For tabular data, if you want to modify the likelihood of an entire
    #     column of findngs, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] likelihood_adjustment
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment]
    #     Likelihood adjustment to apply to all matching findings.
    class HotwordRule
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Type of exclusion rule.
  module ExclusionType
    # A finding of this custom info type will not be excluded from results.
    EXCLUSION_TYPE_UNSPECIFIED = 0

    # A finding of this custom info type will be excluded from final results,
    # but can still affect rule execution.
    EXCLUSION_TYPE_EXCLUDE = 1
  end
end

#likelihood::Google::Cloud::Dlp::V2::Likelihood

Returns Likelihood to return for this CustomInfoType. This base value can be altered by a detection rule if the finding meets the criteria specified by the rule. Defaults to VERY_LIKELY if not specified.

Returns:

  • (::Google::Cloud::Dlp::V2::Likelihood)

    Likelihood to return for this CustomInfoType. This base value can be altered by a detection rule if the finding meets the criteria specified by the rule. Defaults to VERY_LIKELY if not specified.



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 141

class CustomInfoType
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom information type based on a dictionary of words or phrases. This can
  # be used to match sensitive information specific to the data, such as a list
  # of employee IDs or job titles.
  #
  # Dictionary words are case-insensitive and all characters other than letters
  # and digits in the unicode [Basic Multilingual
  # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
  # will be replaced with whitespace when scanning for matches, so the
  # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
  # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
  # surrounding any match must be of a different type than the adjacent
  # characters within the word, so letters must be next to non-letters and
  # digits next to non-digits. For example, the dictionary word "jen" will
  # match the first three letters of the text "jen123" but will return no
  # matches for "jennifer".
  #
  # Dictionary words containing a large number of characters that are not
  # letters or digits may result in unexpected findings because such characters
  # are treated as whitespace. The
  # [limits](https://cloud.google.com/sensitive-data-protection/limits) page
  # contains details about the size limits of dictionaries. For dictionaries
  # that do not fit within these constraints, consider using
  # `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
  # @!attribute [rw] word_list
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList]
  #     List of words or phrases to search for.
  # @!attribute [rw] cloud_storage_path
  #   @return [::Google::Cloud::Dlp::V2::CloudStoragePath]
  #     Newline-delimited file of words in Cloud Storage. Only a single file
  #     is accepted.
  class Dictionary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message defining a list of words or phrases to search for in the data.
    # @!attribute [rw] words
    #   @return [::Array<::String>]
    #     Words or phrases defining the dictionary. The dictionary must contain
    #     at least one phrase and every phrase must contain at least 2 characters
    #     that are letters or digits. [required]
    class WordList
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Message defining a custom regular expression.
  # @!attribute [rw] pattern
  #   @return [::String]
  #     Pattern defining the regular expression. Its syntax
  #     (https://github.com/google/re2/wiki/Syntax) can be found under the
  #     google/re2 repository on GitHub.
  # @!attribute [rw] group_indexes
  #   @return [::Array<::Integer>]
  #     The index of the submatch to extract as findings. When not
  #     specified, the entire match is returned. No more than 3 may be included.
  class Regex
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message for detecting output from deidentification transformations
  # such as
  # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
  # These types of transformations are
  # those that perform pseudonymization, thereby producing a "surrogate" as
  # output. This should be used in conjunction with a field on the
  # transformation such as `surrogate_info_type`. This CustomInfoType does
  # not support the use of `detection_rules`.
  class SurrogateType
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
  # `CustomInfoType` to alter behavior under certain circumstances, depending
  # on the specific details of the rule. Not supported for the `surrogate_type`
  # custom infoType.
  # @!attribute [rw] hotword_rule
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule]
  #     Hotword-based detection rule.
  class DetectionRule
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message for specifying a window around a finding to apply a detection
    # rule.
    # @!attribute [rw] window_before
    #   @return [::Integer]
    #     Number of characters before the finding to consider. For tabular data,
    #     if you want to modify the likelihood of an entire column of findngs,
    #     set this to 1. For more information, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] window_after
    #   @return [::Integer]
    #     Number of characters after the finding to consider.
    class Proximity
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Message for specifying an adjustment to the likelihood of a finding as
    # part of a detection rule.
    # @!attribute [rw] fixed_likelihood
    #   @return [::Google::Cloud::Dlp::V2::Likelihood]
    #     Set the likelihood of a finding to a fixed value.
    # @!attribute [rw] relative_likelihood
    #   @return [::Integer]
    #     Increase or decrease the likelihood by the specified number of
    #     levels. For example, if a finding would be `POSSIBLE` without the
    #     detection rule and `relative_likelihood` is 1, then it is upgraded to
    #     `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
    #     Likelihood may never drop below `VERY_UNLIKELY` or exceed
    #     `VERY_LIKELY`, so applying an adjustment of 1 followed by an
    #     adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
    #     a final likelihood of `LIKELY`.
    class LikelihoodAdjustment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The rule that adjusts the likelihood of findings within a certain
    # proximity of hotwords.
    # @!attribute [rw] hotword_regex
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex]
    #     Regular expression pattern defining what qualifies as a hotword.
    # @!attribute [rw] proximity
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity]
    #     Range of characters within which the entire hotword must reside.
    #     The total length of the window cannot exceed 1000 characters.
    #     The finding itself will be included in the window, so that hotwords can
    #     be used to match substrings of the finding itself. Suppose you
    #     want Cloud DLP to promote the likelihood of the phone number
    #     regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the
    #     area code of a company's office. In this case, use the hotword regex
    #     "\(xxx\)", where "xxx" is the area code in question.
    #
    #     For tabular data, if you want to modify the likelihood of an entire
    #     column of findngs, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] likelihood_adjustment
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment]
    #     Likelihood adjustment to apply to all matching findings.
    class HotwordRule
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Type of exclusion rule.
  module ExclusionType
    # A finding of this custom info type will not be excluded from results.
    EXCLUSION_TYPE_UNSPECIFIED = 0

    # A finding of this custom info type will be excluded from final results,
    # but can still affect rule execution.
    EXCLUSION_TYPE_EXCLUDE = 1
  end
end

#regex::Google::Cloud::Dlp::V2::CustomInfoType::Regex

Returns Regular expression based CustomInfoType.

Returns:



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 141

class CustomInfoType
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom information type based on a dictionary of words or phrases. This can
  # be used to match sensitive information specific to the data, such as a list
  # of employee IDs or job titles.
  #
  # Dictionary words are case-insensitive and all characters other than letters
  # and digits in the unicode [Basic Multilingual
  # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
  # will be replaced with whitespace when scanning for matches, so the
  # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
  # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
  # surrounding any match must be of a different type than the adjacent
  # characters within the word, so letters must be next to non-letters and
  # digits next to non-digits. For example, the dictionary word "jen" will
  # match the first three letters of the text "jen123" but will return no
  # matches for "jennifer".
  #
  # Dictionary words containing a large number of characters that are not
  # letters or digits may result in unexpected findings because such characters
  # are treated as whitespace. The
  # [limits](https://cloud.google.com/sensitive-data-protection/limits) page
  # contains details about the size limits of dictionaries. For dictionaries
  # that do not fit within these constraints, consider using
  # `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
  # @!attribute [rw] word_list
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList]
  #     List of words or phrases to search for.
  # @!attribute [rw] cloud_storage_path
  #   @return [::Google::Cloud::Dlp::V2::CloudStoragePath]
  #     Newline-delimited file of words in Cloud Storage. Only a single file
  #     is accepted.
  class Dictionary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message defining a list of words or phrases to search for in the data.
    # @!attribute [rw] words
    #   @return [::Array<::String>]
    #     Words or phrases defining the dictionary. The dictionary must contain
    #     at least one phrase and every phrase must contain at least 2 characters
    #     that are letters or digits. [required]
    class WordList
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Message defining a custom regular expression.
  # @!attribute [rw] pattern
  #   @return [::String]
  #     Pattern defining the regular expression. Its syntax
  #     (https://github.com/google/re2/wiki/Syntax) can be found under the
  #     google/re2 repository on GitHub.
  # @!attribute [rw] group_indexes
  #   @return [::Array<::Integer>]
  #     The index of the submatch to extract as findings. When not
  #     specified, the entire match is returned. No more than 3 may be included.
  class Regex
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message for detecting output from deidentification transformations
  # such as
  # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
  # These types of transformations are
  # those that perform pseudonymization, thereby producing a "surrogate" as
  # output. This should be used in conjunction with a field on the
  # transformation such as `surrogate_info_type`. This CustomInfoType does
  # not support the use of `detection_rules`.
  class SurrogateType
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
  # `CustomInfoType` to alter behavior under certain circumstances, depending
  # on the specific details of the rule. Not supported for the `surrogate_type`
  # custom infoType.
  # @!attribute [rw] hotword_rule
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule]
  #     Hotword-based detection rule.
  class DetectionRule
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message for specifying a window around a finding to apply a detection
    # rule.
    # @!attribute [rw] window_before
    #   @return [::Integer]
    #     Number of characters before the finding to consider. For tabular data,
    #     if you want to modify the likelihood of an entire column of findngs,
    #     set this to 1. For more information, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] window_after
    #   @return [::Integer]
    #     Number of characters after the finding to consider.
    class Proximity
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Message for specifying an adjustment to the likelihood of a finding as
    # part of a detection rule.
    # @!attribute [rw] fixed_likelihood
    #   @return [::Google::Cloud::Dlp::V2::Likelihood]
    #     Set the likelihood of a finding to a fixed value.
    # @!attribute [rw] relative_likelihood
    #   @return [::Integer]
    #     Increase or decrease the likelihood by the specified number of
    #     levels. For example, if a finding would be `POSSIBLE` without the
    #     detection rule and `relative_likelihood` is 1, then it is upgraded to
    #     `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
    #     Likelihood may never drop below `VERY_UNLIKELY` or exceed
    #     `VERY_LIKELY`, so applying an adjustment of 1 followed by an
    #     adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
    #     a final likelihood of `LIKELY`.
    class LikelihoodAdjustment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The rule that adjusts the likelihood of findings within a certain
    # proximity of hotwords.
    # @!attribute [rw] hotword_regex
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex]
    #     Regular expression pattern defining what qualifies as a hotword.
    # @!attribute [rw] proximity
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity]
    #     Range of characters within which the entire hotword must reside.
    #     The total length of the window cannot exceed 1000 characters.
    #     The finding itself will be included in the window, so that hotwords can
    #     be used to match substrings of the finding itself. Suppose you
    #     want Cloud DLP to promote the likelihood of the phone number
    #     regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the
    #     area code of a company's office. In this case, use the hotword regex
    #     "\(xxx\)", where "xxx" is the area code in question.
    #
    #     For tabular data, if you want to modify the likelihood of an entire
    #     column of findngs, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] likelihood_adjustment
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment]
    #     Likelihood adjustment to apply to all matching findings.
    class HotwordRule
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Type of exclusion rule.
  module ExclusionType
    # A finding of this custom info type will not be excluded from results.
    EXCLUSION_TYPE_UNSPECIFIED = 0

    # A finding of this custom info type will be excluded from final results,
    # but can still affect rule execution.
    EXCLUSION_TYPE_EXCLUDE = 1
  end
end

#sensitivity_score::Google::Cloud::Dlp::V2::SensitivityScore

Returns Sensitivity for this CustomInfoType. If this CustomInfoType extends an existing InfoType, the sensitivity here will take precedence over that of the original InfoType. If unset for a CustomInfoType, it will default to HIGH. This only applies to data profiling.

Returns:

  • (::Google::Cloud::Dlp::V2::SensitivityScore)

    Sensitivity for this CustomInfoType. If this CustomInfoType extends an existing InfoType, the sensitivity here will take precedence over that of the original InfoType. If unset for a CustomInfoType, it will default to HIGH. This only applies to data profiling.



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 141

class CustomInfoType
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom information type based on a dictionary of words or phrases. This can
  # be used to match sensitive information specific to the data, such as a list
  # of employee IDs or job titles.
  #
  # Dictionary words are case-insensitive and all characters other than letters
  # and digits in the unicode [Basic Multilingual
  # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
  # will be replaced with whitespace when scanning for matches, so the
  # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
  # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
  # surrounding any match must be of a different type than the adjacent
  # characters within the word, so letters must be next to non-letters and
  # digits next to non-digits. For example, the dictionary word "jen" will
  # match the first three letters of the text "jen123" but will return no
  # matches for "jennifer".
  #
  # Dictionary words containing a large number of characters that are not
  # letters or digits may result in unexpected findings because such characters
  # are treated as whitespace. The
  # [limits](https://cloud.google.com/sensitive-data-protection/limits) page
  # contains details about the size limits of dictionaries. For dictionaries
  # that do not fit within these constraints, consider using
  # `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
  # @!attribute [rw] word_list
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList]
  #     List of words or phrases to search for.
  # @!attribute [rw] cloud_storage_path
  #   @return [::Google::Cloud::Dlp::V2::CloudStoragePath]
  #     Newline-delimited file of words in Cloud Storage. Only a single file
  #     is accepted.
  class Dictionary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message defining a list of words or phrases to search for in the data.
    # @!attribute [rw] words
    #   @return [::Array<::String>]
    #     Words or phrases defining the dictionary. The dictionary must contain
    #     at least one phrase and every phrase must contain at least 2 characters
    #     that are letters or digits. [required]
    class WordList
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Message defining a custom regular expression.
  # @!attribute [rw] pattern
  #   @return [::String]
  #     Pattern defining the regular expression. Its syntax
  #     (https://github.com/google/re2/wiki/Syntax) can be found under the
  #     google/re2 repository on GitHub.
  # @!attribute [rw] group_indexes
  #   @return [::Array<::Integer>]
  #     The index of the submatch to extract as findings. When not
  #     specified, the entire match is returned. No more than 3 may be included.
  class Regex
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message for detecting output from deidentification transformations
  # such as
  # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
  # These types of transformations are
  # those that perform pseudonymization, thereby producing a "surrogate" as
  # output. This should be used in conjunction with a field on the
  # transformation such as `surrogate_info_type`. This CustomInfoType does
  # not support the use of `detection_rules`.
  class SurrogateType
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
  # `CustomInfoType` to alter behavior under certain circumstances, depending
  # on the specific details of the rule. Not supported for the `surrogate_type`
  # custom infoType.
  # @!attribute [rw] hotword_rule
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule]
  #     Hotword-based detection rule.
  class DetectionRule
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message for specifying a window around a finding to apply a detection
    # rule.
    # @!attribute [rw] window_before
    #   @return [::Integer]
    #     Number of characters before the finding to consider. For tabular data,
    #     if you want to modify the likelihood of an entire column of findngs,
    #     set this to 1. For more information, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] window_after
    #   @return [::Integer]
    #     Number of characters after the finding to consider.
    class Proximity
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Message for specifying an adjustment to the likelihood of a finding as
    # part of a detection rule.
    # @!attribute [rw] fixed_likelihood
    #   @return [::Google::Cloud::Dlp::V2::Likelihood]
    #     Set the likelihood of a finding to a fixed value.
    # @!attribute [rw] relative_likelihood
    #   @return [::Integer]
    #     Increase or decrease the likelihood by the specified number of
    #     levels. For example, if a finding would be `POSSIBLE` without the
    #     detection rule and `relative_likelihood` is 1, then it is upgraded to
    #     `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
    #     Likelihood may never drop below `VERY_UNLIKELY` or exceed
    #     `VERY_LIKELY`, so applying an adjustment of 1 followed by an
    #     adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
    #     a final likelihood of `LIKELY`.
    class LikelihoodAdjustment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The rule that adjusts the likelihood of findings within a certain
    # proximity of hotwords.
    # @!attribute [rw] hotword_regex
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex]
    #     Regular expression pattern defining what qualifies as a hotword.
    # @!attribute [rw] proximity
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity]
    #     Range of characters within which the entire hotword must reside.
    #     The total length of the window cannot exceed 1000 characters.
    #     The finding itself will be included in the window, so that hotwords can
    #     be used to match substrings of the finding itself. Suppose you
    #     want Cloud DLP to promote the likelihood of the phone number
    #     regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the
    #     area code of a company's office. In this case, use the hotword regex
    #     "\(xxx\)", where "xxx" is the area code in question.
    #
    #     For tabular data, if you want to modify the likelihood of an entire
    #     column of findngs, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] likelihood_adjustment
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment]
    #     Likelihood adjustment to apply to all matching findings.
    class HotwordRule
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Type of exclusion rule.
  module ExclusionType
    # A finding of this custom info type will not be excluded from results.
    EXCLUSION_TYPE_UNSPECIFIED = 0

    # A finding of this custom info type will be excluded from final results,
    # but can still affect rule execution.
    EXCLUSION_TYPE_EXCLUDE = 1
  end
end

#stored_type::Google::Cloud::Dlp::V2::StoredType

Returns Load an existing StoredInfoType resource for use in InspectDataSource. Not currently supported in InspectContent.

Returns:



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 141

class CustomInfoType
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom information type based on a dictionary of words or phrases. This can
  # be used to match sensitive information specific to the data, such as a list
  # of employee IDs or job titles.
  #
  # Dictionary words are case-insensitive and all characters other than letters
  # and digits in the unicode [Basic Multilingual
  # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
  # will be replaced with whitespace when scanning for matches, so the
  # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
  # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
  # surrounding any match must be of a different type than the adjacent
  # characters within the word, so letters must be next to non-letters and
  # digits next to non-digits. For example, the dictionary word "jen" will
  # match the first three letters of the text "jen123" but will return no
  # matches for "jennifer".
  #
  # Dictionary words containing a large number of characters that are not
  # letters or digits may result in unexpected findings because such characters
  # are treated as whitespace. The
  # [limits](https://cloud.google.com/sensitive-data-protection/limits) page
  # contains details about the size limits of dictionaries. For dictionaries
  # that do not fit within these constraints, consider using
  # `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
  # @!attribute [rw] word_list
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList]
  #     List of words or phrases to search for.
  # @!attribute [rw] cloud_storage_path
  #   @return [::Google::Cloud::Dlp::V2::CloudStoragePath]
  #     Newline-delimited file of words in Cloud Storage. Only a single file
  #     is accepted.
  class Dictionary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message defining a list of words or phrases to search for in the data.
    # @!attribute [rw] words
    #   @return [::Array<::String>]
    #     Words or phrases defining the dictionary. The dictionary must contain
    #     at least one phrase and every phrase must contain at least 2 characters
    #     that are letters or digits. [required]
    class WordList
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Message defining a custom regular expression.
  # @!attribute [rw] pattern
  #   @return [::String]
  #     Pattern defining the regular expression. Its syntax
  #     (https://github.com/google/re2/wiki/Syntax) can be found under the
  #     google/re2 repository on GitHub.
  # @!attribute [rw] group_indexes
  #   @return [::Array<::Integer>]
  #     The index of the submatch to extract as findings. When not
  #     specified, the entire match is returned. No more than 3 may be included.
  class Regex
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message for detecting output from deidentification transformations
  # such as
  # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
  # These types of transformations are
  # those that perform pseudonymization, thereby producing a "surrogate" as
  # output. This should be used in conjunction with a field on the
  # transformation such as `surrogate_info_type`. This CustomInfoType does
  # not support the use of `detection_rules`.
  class SurrogateType
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
  # `CustomInfoType` to alter behavior under certain circumstances, depending
  # on the specific details of the rule. Not supported for the `surrogate_type`
  # custom infoType.
  # @!attribute [rw] hotword_rule
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule]
  #     Hotword-based detection rule.
  class DetectionRule
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message for specifying a window around a finding to apply a detection
    # rule.
    # @!attribute [rw] window_before
    #   @return [::Integer]
    #     Number of characters before the finding to consider. For tabular data,
    #     if you want to modify the likelihood of an entire column of findngs,
    #     set this to 1. For more information, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] window_after
    #   @return [::Integer]
    #     Number of characters after the finding to consider.
    class Proximity
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Message for specifying an adjustment to the likelihood of a finding as
    # part of a detection rule.
    # @!attribute [rw] fixed_likelihood
    #   @return [::Google::Cloud::Dlp::V2::Likelihood]
    #     Set the likelihood of a finding to a fixed value.
    # @!attribute [rw] relative_likelihood
    #   @return [::Integer]
    #     Increase or decrease the likelihood by the specified number of
    #     levels. For example, if a finding would be `POSSIBLE` without the
    #     detection rule and `relative_likelihood` is 1, then it is upgraded to
    #     `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
    #     Likelihood may never drop below `VERY_UNLIKELY` or exceed
    #     `VERY_LIKELY`, so applying an adjustment of 1 followed by an
    #     adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
    #     a final likelihood of `LIKELY`.
    class LikelihoodAdjustment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The rule that adjusts the likelihood of findings within a certain
    # proximity of hotwords.
    # @!attribute [rw] hotword_regex
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex]
    #     Regular expression pattern defining what qualifies as a hotword.
    # @!attribute [rw] proximity
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity]
    #     Range of characters within which the entire hotword must reside.
    #     The total length of the window cannot exceed 1000 characters.
    #     The finding itself will be included in the window, so that hotwords can
    #     be used to match substrings of the finding itself. Suppose you
    #     want Cloud DLP to promote the likelihood of the phone number
    #     regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the
    #     area code of a company's office. In this case, use the hotword regex
    #     "\(xxx\)", where "xxx" is the area code in question.
    #
    #     For tabular data, if you want to modify the likelihood of an entire
    #     column of findngs, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] likelihood_adjustment
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment]
    #     Likelihood adjustment to apply to all matching findings.
    class HotwordRule
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Type of exclusion rule.
  module ExclusionType
    # A finding of this custom info type will not be excluded from results.
    EXCLUSION_TYPE_UNSPECIFIED = 0

    # A finding of this custom info type will be excluded from final results,
    # but can still affect rule execution.
    EXCLUSION_TYPE_EXCLUDE = 1
  end
end

#surrogate_type::Google::Cloud::Dlp::V2::CustomInfoType::SurrogateType

Returns Message for detecting output from deidentification transformations that support reversing.

Returns:



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'proto_docs/google/privacy/dlp/v2/storage.rb', line 141

class CustomInfoType
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Custom information type based on a dictionary of words or phrases. This can
  # be used to match sensitive information specific to the data, such as a list
  # of employee IDs or job titles.
  #
  # Dictionary words are case-insensitive and all characters other than letters
  # and digits in the unicode [Basic Multilingual
  # Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane)
  # will be replaced with whitespace when scanning for matches, so the
  # dictionary phrase "Sam Johnson" will match all three phrases "sam johnson",
  # "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters
  # surrounding any match must be of a different type than the adjacent
  # characters within the word, so letters must be next to non-letters and
  # digits next to non-digits. For example, the dictionary word "jen" will
  # match the first three letters of the text "jen123" but will return no
  # matches for "jennifer".
  #
  # Dictionary words containing a large number of characters that are not
  # letters or digits may result in unexpected findings because such characters
  # are treated as whitespace. The
  # [limits](https://cloud.google.com/sensitive-data-protection/limits) page
  # contains details about the size limits of dictionaries. For dictionaries
  # that do not fit within these constraints, consider using
  # `LargeCustomDictionaryConfig` in the `StoredInfoType` API.
  # @!attribute [rw] word_list
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Dictionary::WordList]
  #     List of words or phrases to search for.
  # @!attribute [rw] cloud_storage_path
  #   @return [::Google::Cloud::Dlp::V2::CloudStoragePath]
  #     Newline-delimited file of words in Cloud Storage. Only a single file
  #     is accepted.
  class Dictionary
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message defining a list of words or phrases to search for in the data.
    # @!attribute [rw] words
    #   @return [::Array<::String>]
    #     Words or phrases defining the dictionary. The dictionary must contain
    #     at least one phrase and every phrase must contain at least 2 characters
    #     that are letters or digits. [required]
    class WordList
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Message defining a custom regular expression.
  # @!attribute [rw] pattern
  #   @return [::String]
  #     Pattern defining the regular expression. Its syntax
  #     (https://github.com/google/re2/wiki/Syntax) can be found under the
  #     google/re2 repository on GitHub.
  # @!attribute [rw] group_indexes
  #   @return [::Array<::Integer>]
  #     The index of the submatch to extract as findings. When not
  #     specified, the entire match is returned. No more than 3 may be included.
  class Regex
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Message for detecting output from deidentification transformations
  # such as
  # [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig).
  # These types of transformations are
  # those that perform pseudonymization, thereby producing a "surrogate" as
  # output. This should be used in conjunction with a field on the
  # transformation such as `surrogate_info_type`. This CustomInfoType does
  # not support the use of `detection_rules`.
  class SurrogateType
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Deprecated; use `InspectionRuleSet` instead. Rule for modifying a
  # `CustomInfoType` to alter behavior under certain circumstances, depending
  # on the specific details of the rule. Not supported for the `surrogate_type`
  # custom infoType.
  # @!attribute [rw] hotword_rule
  #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule]
  #     Hotword-based detection rule.
  class DetectionRule
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # Message for specifying a window around a finding to apply a detection
    # rule.
    # @!attribute [rw] window_before
    #   @return [::Integer]
    #     Number of characters before the finding to consider. For tabular data,
    #     if you want to modify the likelihood of an entire column of findngs,
    #     set this to 1. For more information, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] window_after
    #   @return [::Integer]
    #     Number of characters after the finding to consider.
    class Proximity
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # Message for specifying an adjustment to the likelihood of a finding as
    # part of a detection rule.
    # @!attribute [rw] fixed_likelihood
    #   @return [::Google::Cloud::Dlp::V2::Likelihood]
    #     Set the likelihood of a finding to a fixed value.
    # @!attribute [rw] relative_likelihood
    #   @return [::Integer]
    #     Increase or decrease the likelihood by the specified number of
    #     levels. For example, if a finding would be `POSSIBLE` without the
    #     detection rule and `relative_likelihood` is 1, then it is upgraded to
    #     `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`.
    #     Likelihood may never drop below `VERY_UNLIKELY` or exceed
    #     `VERY_LIKELY`, so applying an adjustment of 1 followed by an
    #     adjustment of -1 when base likelihood is `VERY_LIKELY` will result in
    #     a final likelihood of `LIKELY`.
    class LikelihoodAdjustment
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end

    # The rule that adjusts the likelihood of findings within a certain
    # proximity of hotwords.
    # @!attribute [rw] hotword_regex
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::Regex]
    #     Regular expression pattern defining what qualifies as a hotword.
    # @!attribute [rw] proximity
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::Proximity]
    #     Range of characters within which the entire hotword must reside.
    #     The total length of the window cannot exceed 1000 characters.
    #     The finding itself will be included in the window, so that hotwords can
    #     be used to match substrings of the finding itself. Suppose you
    #     want Cloud DLP to promote the likelihood of the phone number
    #     regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" if the area code is known to be the
    #     area code of a company's office. In this case, use the hotword regex
    #     "\(xxx\)", where "xxx" is the area code in question.
    #
    #     For tabular data, if you want to modify the likelihood of an entire
    #     column of findngs, see
    #     [Hotword example: Set the match likelihood of a table column]
    #     (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values).
    # @!attribute [rw] likelihood_adjustment
    #   @return [::Google::Cloud::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment]
    #     Likelihood adjustment to apply to all matching findings.
    class HotwordRule
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # Type of exclusion rule.
  module ExclusionType
    # A finding of this custom info type will not be excluded from results.
    EXCLUSION_TYPE_UNSPECIFIED = 0

    # A finding of this custom info type will be excluded from final results,
    # but can still affect rule execution.
    EXCLUSION_TYPE_EXCLUDE = 1
  end
end