Class BucketingConfig.Builder (3.56.0)

public static final class BucketingConfig.Builder extends GeneratedMessageV3.Builder<BucketingConfig.Builder> implements BucketingConfigOrBuilder

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.

Protobuf type google.privacy.dlp.v2.BucketingConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllBuckets(Iterable<? extends BucketingConfig.Bucket> values)

public BucketingConfig.Builder addAllBuckets(Iterable<? extends BucketingConfig.Bucket> values)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameter
Name Description
values Iterable<? extends com.google.privacy.dlp.v2.BucketingConfig.Bucket>
Returns
Type Description
BucketingConfig.Builder

addBuckets(BucketingConfig.Bucket value)

public BucketingConfig.Builder addBuckets(BucketingConfig.Bucket value)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameter
Name Description
value BucketingConfig.Bucket
Returns
Type Description
BucketingConfig.Builder

addBuckets(BucketingConfig.Bucket.Builder builderForValue)

public BucketingConfig.Builder addBuckets(BucketingConfig.Bucket.Builder builderForValue)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameter
Name Description
builderForValue BucketingConfig.Bucket.Builder
Returns
Type Description
BucketingConfig.Builder

addBuckets(int index, BucketingConfig.Bucket value)

public BucketingConfig.Builder addBuckets(int index, BucketingConfig.Bucket value)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameters
Name Description
index int
value BucketingConfig.Bucket
Returns
Type Description
BucketingConfig.Builder

addBuckets(int index, BucketingConfig.Bucket.Builder builderForValue)

public BucketingConfig.Builder addBuckets(int index, BucketingConfig.Bucket.Builder builderForValue)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameters
Name Description
index int
builderForValue BucketingConfig.Bucket.Builder
Returns
Type Description
BucketingConfig.Builder

addBucketsBuilder()

public BucketingConfig.Bucket.Builder addBucketsBuilder()

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Returns
Type Description
BucketingConfig.Bucket.Builder

addBucketsBuilder(int index)

public BucketingConfig.Bucket.Builder addBucketsBuilder(int index)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameter
Name Description
index int
Returns
Type Description
BucketingConfig.Bucket.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BucketingConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BucketingConfig.Builder
Overrides

build()

public BucketingConfig build()
Returns
Type Description
BucketingConfig

buildPartial()

public BucketingConfig buildPartial()
Returns
Type Description
BucketingConfig

clear()

public BucketingConfig.Builder clear()
Returns
Type Description
BucketingConfig.Builder
Overrides

clearBuckets()

public BucketingConfig.Builder clearBuckets()

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Returns
Type Description
BucketingConfig.Builder

clearField(Descriptors.FieldDescriptor field)

public BucketingConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BucketingConfig.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public BucketingConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BucketingConfig.Builder
Overrides

clone()

public BucketingConfig.Builder clone()
Returns
Type Description
BucketingConfig.Builder
Overrides

getBuckets(int index)

public BucketingConfig.Bucket getBuckets(int index)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameter
Name Description
index int
Returns
Type Description
BucketingConfig.Bucket

getBucketsBuilder(int index)

public BucketingConfig.Bucket.Builder getBucketsBuilder(int index)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameter
Name Description
index int
Returns
Type Description
BucketingConfig.Bucket.Builder

getBucketsBuilderList()

public List<BucketingConfig.Bucket.Builder> getBucketsBuilderList()

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Returns
Type Description
List<Builder>

getBucketsCount()

public int getBucketsCount()

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Returns
Type Description
int

getBucketsList()

public List<BucketingConfig.Bucket> getBucketsList()

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Returns
Type Description
List<Bucket>

getBucketsOrBuilder(int index)

public BucketingConfig.BucketOrBuilder getBucketsOrBuilder(int index)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameter
Name Description
index int
Returns
Type Description
BucketingConfig.BucketOrBuilder

getBucketsOrBuilderList()

public List<? extends BucketingConfig.BucketOrBuilder> getBucketsOrBuilderList()

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Returns
Type Description
List<? extends com.google.privacy.dlp.v2.BucketingConfig.BucketOrBuilder>

getDefaultInstanceForType()

public BucketingConfig getDefaultInstanceForType()
Returns
Type Description
BucketingConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(BucketingConfig other)

public BucketingConfig.Builder mergeFrom(BucketingConfig other)
Parameter
Name Description
other BucketingConfig
Returns
Type Description
BucketingConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BucketingConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BucketingConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BucketingConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BucketingConfig.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BucketingConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BucketingConfig.Builder
Overrides

removeBuckets(int index)

public BucketingConfig.Builder removeBuckets(int index)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameter
Name Description
index int
Returns
Type Description
BucketingConfig.Builder

setBuckets(int index, BucketingConfig.Bucket value)

public BucketingConfig.Builder setBuckets(int index, BucketingConfig.Bucket value)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameters
Name Description
index int
value BucketingConfig.Bucket
Returns
Type Description
BucketingConfig.Builder

setBuckets(int index, BucketingConfig.Bucket.Builder builderForValue)

public BucketingConfig.Builder setBuckets(int index, BucketingConfig.Bucket.Builder builderForValue)

Set of buckets. Ranges must be non-overlapping.

repeated .google.privacy.dlp.v2.BucketingConfig.Bucket buckets = 1;

Parameters
Name Description
index int
builderForValue BucketingConfig.Bucket.Builder
Returns
Type Description
BucketingConfig.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public BucketingConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BucketingConfig.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BucketingConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BucketingConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final BucketingConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BucketingConfig.Builder
Overrides