Reference documentation and code samples for the Data Loss Prevention V2 Client class BucketingConfig.
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.
See
https://cloud.google.com/sensitive-data-protection/docs/concepts-bucketing to
learn more.
Generated from protobuf message google.privacy.dlp.v2.BucketingConfig
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Data Loss Prevention V2 Client - Class BucketingConfig (2.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.1 (latest)](/php/docs/reference/cloud-dlp/latest/V2.BucketingConfig)\n- [2.6.0](/php/docs/reference/cloud-dlp/2.6.0/V2.BucketingConfig)\n- [2.4.1](/php/docs/reference/cloud-dlp/2.4.1/V2.BucketingConfig)\n- [2.3.0](/php/docs/reference/cloud-dlp/2.3.0/V2.BucketingConfig)\n- [2.2.3](/php/docs/reference/cloud-dlp/2.2.3/V2.BucketingConfig)\n- [2.1.0](/php/docs/reference/cloud-dlp/2.1.0/V2.BucketingConfig)\n- [2.0.0](/php/docs/reference/cloud-dlp/2.0.0/V2.BucketingConfig)\n- [1.19.0](/php/docs/reference/cloud-dlp/1.19.0/V2.BucketingConfig)\n- [1.18.0](/php/docs/reference/cloud-dlp/1.18.0/V2.BucketingConfig)\n- [1.17.0](/php/docs/reference/cloud-dlp/1.17.0/V2.BucketingConfig)\n- [1.16.0](/php/docs/reference/cloud-dlp/1.16.0/V2.BucketingConfig)\n- [1.15.1](/php/docs/reference/cloud-dlp/1.15.1/V2.BucketingConfig)\n- [1.14.0](/php/docs/reference/cloud-dlp/1.14.0/V2.BucketingConfig)\n- [1.13.2](/php/docs/reference/cloud-dlp/1.13.2/V2.BucketingConfig)\n- [1.12.0](/php/docs/reference/cloud-dlp/1.12.0/V2.BucketingConfig)\n- [1.11.0](/php/docs/reference/cloud-dlp/1.11.0/V2.BucketingConfig)\n- [1.10.2](/php/docs/reference/cloud-dlp/1.10.2/V2.BucketingConfig)\n- [1.9.0](/php/docs/reference/cloud-dlp/1.9.0/V2.BucketingConfig)\n- [1.8.6](/php/docs/reference/cloud-dlp/1.8.6/V2.BucketingConfig) \nReference documentation and code samples for the Data Loss Prevention V2 Client class BucketingConfig.\n\nGeneralization function that buckets values based on ranges. The ranges and\nreplacement values are dynamically provided by the user for custom behavior,\nsuch as 1-30 -\\\u003e LOW, 31-65 -\\\u003e MEDIUM, 66-100 -\\\u003e HIGH.\n\nThis can be used on data of type: number, long, string, timestamp.\nIf the bound `Value` type differs from the type of data being transformed, we\nwill first attempt converting the type of the data to be transformed to match\nthe type of the bound before comparing.\nSee\n\u003chttps://cloud.google.com/sensitive-data-protection/docs/concepts-bucketing\u003e to\nlearn more.\n\nGenerated from protobuf message `google.privacy.dlp.v2.BucketingConfig`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Dlp \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getBuckets\n\nSet of buckets. Ranges must be non-overlapping.\n\n### setBuckets\n\nSet of buckets. Ranges must be non-overlapping."]]