Class: Google::Privacy::Dlp::V2::CustomInfoType::DetectionRule
- Inherits:
-
Object
- Object
- Google::Privacy::Dlp::V2::CustomInfoType::DetectionRule
- Defined in:
- lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/storage.rb
Overview
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 info type.
Defined Under Namespace
Classes: HotwordRule, LikelihoodAdjustment, Proximity
Instance Attribute Summary collapse
-
#hotword_rule ⇒ Google::Privacy::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule
Hotword-based detection rule.
Instance Attribute Details
#hotword_rule ⇒ Google::Privacy::Dlp::V2::CustomInfoType::DetectionRule::HotwordRule
Returns Hotword-based detection rule.
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 |
# File 'lib/google/cloud/dlp/v2/doc/google/privacy/dlp/v2/storage.rb', line 145 class DetectionRule # 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. # @!attribute [rw] window_after # @return [Integer] # Number of characters after the finding to consider. class Proximity; end # Message for specifying an adjustment to the likelihood of a finding as # part of a detection rule. # @!attribute [rw] fixed_likelihood # @return [Google::Privacy::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; end # The rule that adjusts the likelihood of findings within a certain # proximity of hotwords. # @!attribute [rw] hotword_regex # @return [Google::Privacy::Dlp::V2::CustomInfoType::Regex] # Regular expression pattern defining what qualifies as a hotword. # @!attribute [rw] proximity # @return [Google::Privacy::Dlp::V2::CustomInfoType::DetectionRule::Proximity] # Proximity of the finding within which the entire hotword must reside. # The total length of the window cannot exceed 1000 characters. Note that # the finding itself will be included in the window, so that hotwords may # be used to match substrings of the finding itself. For example, the # certainty of a phone number regex "\(\d\\{3}\) \d\\{3}-\d\\{4}" could be # adjusted upwards if the area code is known to be the local area code of # a company office using the hotword regex "\(xxx\)", where "xxx" # is the area code in question. # @!attribute [rw] likelihood_adjustment # @return [Google::Privacy::Dlp::V2::CustomInfoType::DetectionRule::LikelihoodAdjustment] # Likelihood adjustment to apply to all matching findings. class HotwordRule; end end |