Class: Google::Apis::HealthcareV1beta1::InfoTypeTransformation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/healthcare_v1beta1/classes.rb,
generated/google/apis/healthcare_v1beta1/representations.rb,
generated/google/apis/healthcare_v1beta1/representations.rb

Overview

A transformation to apply to text that is identified as a specific info_type.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ InfoTypeTransformation

Returns a new instance of InfoTypeTransformation



1356
1357
1358
# File 'generated/google/apis/healthcare_v1beta1/classes.rb', line 1356

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#character_mask_configGoogle::Apis::HealthcareV1beta1::CharacterMaskConfig

Mask a string by replacing its characters with a fixed character. Corresponds to the JSON property characterMaskConfig



1321
1322
1323
# File 'generated/google/apis/healthcare_v1beta1/classes.rb', line 1321

def character_mask_config
  @character_mask_config
end

#crypto_hash_configGoogle::Apis::HealthcareV1beta1::CryptoHashConfig

Pseudonymization method that generates surrogates via cryptographic hashing. Uses SHA-256. Outputs a base64-encoded representation of the hashed output (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). Corresponds to the JSON property cryptoHashConfig



1329
1330
1331
# File 'generated/google/apis/healthcare_v1beta1/classes.rb', line 1329

def crypto_hash_config
  @crypto_hash_config
end

#date_shift_configGoogle::Apis::HealthcareV1beta1::DateShiftConfig

Shift a date forward or backward in time by a random amount which is consistent for a given patient and crypto key combination. Corresponds to the JSON property dateShiftConfig



1335
1336
1337
# File 'generated/google/apis/healthcare_v1beta1/classes.rb', line 1335

def date_shift_config
  @date_shift_config
end

#info_typesArray<String>

InfoTypes to apply this transformation to. If this is not specified, the transformation applies to any info_type. Corresponds to the JSON property infoTypes

Returns:

  • (Array<String>)


1341
1342
1343
# File 'generated/google/apis/healthcare_v1beta1/classes.rb', line 1341

def info_types
  @info_types
end

#redact_configGoogle::Apis::HealthcareV1beta1::RedactConfig

Define how to redact sensitive values. Default behaviour is erase, e.g. "My name is Jake." becomes "My name is ." Corresponds to the JSON property redactConfig



1347
1348
1349
# File 'generated/google/apis/healthcare_v1beta1/classes.rb', line 1347

def redact_config
  @redact_config
end

#replace_with_info_type_configGoogle::Apis::HealthcareV1beta1::ReplaceWithInfoTypeConfig

When using the INSPECT_AND_TRANSFORM action, each match is replaced with the name of the info_type. For example, "My name is Jake" becomes "My name is [PERSON_NAME]." The TRANSFORM action is equivalent to redacting. Corresponds to the JSON property replaceWithInfoTypeConfig



1354
1355
1356
# File 'generated/google/apis/healthcare_v1beta1/classes.rb', line 1354

def replace_with_info_type_config
  @replace_with_info_type_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1361
1362
1363
1364
1365
1366
1367
1368
# File 'generated/google/apis/healthcare_v1beta1/classes.rb', line 1361

def update!(**args)
  @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)
  @date_shift_config = args[:date_shift_config] if args.key?(:date_shift_config)
  @info_types = args[:info_types] if args.key?(:info_types)
  @redact_config = args[:redact_config] if args.key?(:redact_config)
  @replace_with_info_type_config = args[:replace_with_info_type_config] if args.key?(:replace_with_info_type_config)
end