Class: Google::Apis::DlpV2::GooglePrivacyDlpV2FixedSizeBucketingConfig

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

Overview

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 transformed value will be a hyphenated string of lower_bound- upper_bound. For example, if lower_bound = 10 and upper_bound = 20, all values that are within this bucket will be replaced with "10-20". 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. See https://cloud.google.com/sensitive-data-protection/docs/concepts-bucketing to learn more.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GooglePrivacyDlpV2FixedSizeBucketingConfig

Returns a new instance of GooglePrivacyDlpV2FixedSizeBucketingConfig.



4920
4921
4922
# File 'lib/google/apis/dlp_v2/classes.rb', line 4920

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

Instance Attribute Details

#bucket_sizeFloat

Required. Size of each bucket (except for minimum and maximum buckets). So if lower_bound = 10, upper_bound = 89, and bucket_size = 10, then the following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. Corresponds to the JSON property bucketSize

Returns:

  • (Float)


4900
4901
4902
# File 'lib/google/apis/dlp_v2/classes.rb', line 4900

def bucket_size
  @bucket_size
end

#lower_boundGoogle::Apis::DlpV2::GooglePrivacyDlpV2Value

Set of primitive values supported by the system. Note that for the purposes of inspection or transformation, the number of bytes considered to comprise a ' Value' is based on its representation as a UTF-8 encoded string. For example, if 'integer_value' is set to 123456789, the number of bytes would be counted as 9, even though an int64 only holds up to 8 bytes of data. Corresponds to the JSON property lowerBound



4909
4910
4911
# File 'lib/google/apis/dlp_v2/classes.rb', line 4909

def lower_bound
  @lower_bound
end

#upper_boundGoogle::Apis::DlpV2::GooglePrivacyDlpV2Value

Set of primitive values supported by the system. Note that for the purposes of inspection or transformation, the number of bytes considered to comprise a ' Value' is based on its representation as a UTF-8 encoded string. For example, if 'integer_value' is set to 123456789, the number of bytes would be counted as 9, even though an int64 only holds up to 8 bytes of data. Corresponds to the JSON property upperBound



4918
4919
4920
# File 'lib/google/apis/dlp_v2/classes.rb', line 4918

def upper_bound
  @upper_bound
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4925
4926
4927
4928
4929
# File 'lib/google/apis/dlp_v2/classes.rb', line 4925

def update!(**args)
  @bucket_size = args[:bucket_size] if args.key?(:bucket_size)
  @lower_bound = args[:lower_bound] if args.key?(:lower_bound)
  @upper_bound = args[:upper_bound] if args.key?(:upper_bound)
end