Class: Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1PrimitiveTransformation
- Inherits:
-
Object
- Object
- Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1PrimitiveTransformation
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/dlp_v2beta1/classes.rb,
generated/google/apis/dlp_v2beta1/representations.rb,
generated/google/apis/dlp_v2beta1/representations.rb
Overview
A rule for transforming a value.
Instance Attribute Summary collapse
-
#bucketing_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1BucketingConfig
Generalization function that buckets values based on ranges.
-
#character_mask_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1CharacterMaskConfig
Partially mask a string by replacing a given number of characters with a fixed character.
-
#crypto_hash_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1CryptoHashConfig
Pseudonymization method that generates surrogates via cryptographic hashing.
-
#crypto_replace_ffx_fpe_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig
Replaces an identifier with an surrogate using FPE with the FFX mode of operation.
-
#fixed_size_bucketing_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1FixedSizeBucketingConfig
Buckets values based on fixed size ranges.
-
#redact_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1RedactConfig
Redact a given value.
-
#replace_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1ReplaceValueConfig
Replace each input value with a given
Value
. -
#replace_with_info_type_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1ReplaceWithInfoTypeConfig
Replace each matching finding with the name of the info_type.
-
#time_part_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1TimePartConfig
For use with
Date
,Timestamp
, andTimeOfDay
, extract or preserve a portion of the value.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GooglePrivacyDlpV2beta1PrimitiveTransformation
constructor
A new instance of GooglePrivacyDlpV2beta1PrimitiveTransformation.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GooglePrivacyDlpV2beta1PrimitiveTransformation
Returns a new instance of GooglePrivacyDlpV2beta1PrimitiveTransformation
2367 2368 2369 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2367 def initialize(**args) update!(**args) end |
Instance Attribute Details
#bucketing_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1BucketingConfig
Generalization function that buckets values based on ranges. The ranges and
replacement values are dynamically provided by the user for custom behavior,
such as 1-30 -> LOW 31-65 -> MEDIUM 66-100 -> HIGH
This can be used on
data of type: number, long, string, timestamp.
If the bound Value
type differs from the type of data being transformed, we
will first attempt converting the type of the data to be transformed to match
the type of the bound before comparing.
Corresponds to the JSON property bucketingConfig
2297 2298 2299 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2297 def bucketing_config @bucketing_config end |
#character_mask_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1CharacterMaskConfig
Partially mask a string by replacing a given number of characters with a
fixed character. Masking can start from the beginning or end of the string.
This can be used on data of any type (numbers, longs, and so on) and when
de-identifying structured data we'll attempt to preserve the original data's
type. (This allows you to take a long like 123 and modify it to a string like
**3.
Corresponds to the JSON property characterMaskConfig
2307 2308 2309 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2307 def character_mask_config @character_mask_config end |
#crypto_hash_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1CryptoHashConfig
Pseudonymization method that generates surrogates via cryptographic hashing.
Uses SHA-256.
The key size must be either 32 or 64 bytes.
Outputs a 32 byte digest as an uppercase hex string
(for example, 41D1567F7F99F1DC2A5FAB886DEE5BEE).
Currently, only string and integer values can be hashed.
Corresponds to the JSON property cryptoHashConfig
2317 2318 2319 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2317 def crypto_hash_config @crypto_hash_config end |
#crypto_replace_ffx_fpe_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1CryptoReplaceFfxFpeConfig
Replaces an identifier with an surrogate using FPE with the FFX
mode of operation.
The identifier must be encoded as ASCII.
For a given crypto key and context, the same identifier will be
replaced with the same surrogate.
Note that a given identifier must be either the empty string or be at
least two characters long.
Corresponds to the JSON property cryptoReplaceFfxFpeConfig
2328 2329 2330 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2328 def crypto_replace_ffx_fpe_config @crypto_replace_ffx_fpe_config end |
#fixed_size_bucketing_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1FixedSizeBucketingConfig
Buckets values based on fixed size ranges. The
Bucketing transformation can provide all of this functionality,
but requires more configuration. This message is provided as a convenience to
the user for simple bucketing strategies.
The resulting value will be a hyphenated string of
lower_bound-upper_bound.
This can be used on data of type: double, long.
If the bound Value type differs from the type of data
being transformed, we will first attempt converting the type of the data to
be transformed to match the type of the bound before comparing.
Corresponds to the JSON property fixedSizeBucketingConfig
2342 2343 2344 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2342 def fixed_size_bucketing_config @fixed_size_bucketing_config end |
#redact_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1RedactConfig
Redact a given value. For example, if used with an InfoTypeTransformation
transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the
output would be 'My phone number is '.
Corresponds to the JSON property redactConfig
2349 2350 2351 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2349 def redact_config @redact_config end |
#replace_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1ReplaceValueConfig
Replace each input value with a given Value
.
Corresponds to the JSON property replaceConfig
2354 2355 2356 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2354 def replace_config @replace_config end |
#replace_with_info_type_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1ReplaceWithInfoTypeConfig
Replace each matching finding with the name of the info_type.
Corresponds to the JSON property replaceWithInfoTypeConfig
2359 2360 2361 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2359 def replace_with_info_type_config @replace_with_info_type_config end |
#time_part_config ⇒ Google::Apis::DlpV2beta1::GooglePrivacyDlpV2beta1TimePartConfig
For use with Date
, Timestamp
, and TimeOfDay
, extract or preserve a
portion of the value.
Corresponds to the JSON property timePartConfig
2365 2366 2367 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2365 def time_part_config @time_part_config end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 |
# File 'generated/google/apis/dlp_v2beta1/classes.rb', line 2372 def update!(**args) @bucketing_config = args[:bucketing_config] if args.key?(:bucketing_config) @character_mask_config = args[:character_mask_config] if args.key?(:character_mask_config) @crypto_hash_config = args[:crypto_hash_config] if args.key?(:crypto_hash_config) @crypto_replace_ffx_fpe_config = args[:crypto_replace_ffx_fpe_config] if args.key?(:crypto_replace_ffx_fpe_config) @fixed_size_bucketing_config = args[:fixed_size_bucketing_config] if args.key?(:fixed_size_bucketing_config) @redact_config = args[:redact_config] if args.key?(:redact_config) @replace_config = args[:replace_config] if args.key?(:replace_config) @replace_with_info_type_config = args[:replace_with_info_type_config] if args.key?(:replace_with_info_type_config) @time_part_config = args[:time_part_config] if args.key?(:time_part_config) end |