Class FixedSizeBucketingConfig.Builder

  • All Implemented Interfaces:
    FixedSizeBucketingConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    FixedSizeBucketingConfig

    public static final class FixedSizeBucketingConfig.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<FixedSizeBucketingConfig.Builder>
    implements FixedSizeBucketingConfigOrBuilder
     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/dlp/docs/concepts-bucketing to learn more.
     
    Protobuf type google.privacy.dlp.v2.FixedSizeBucketingConfig
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<FixedSizeBucketingConfig.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<FixedSizeBucketingConfig.Builder>
      • getDefaultInstanceForType

        public FixedSizeBucketingConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public FixedSizeBucketingConfig build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public FixedSizeBucketingConfig buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • setRepeatedField

        public FixedSizeBucketingConfig.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                 int index,
                                                                 Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<FixedSizeBucketingConfig.Builder>
      • addRepeatedField

        public FixedSizeBucketingConfig.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                 Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<FixedSizeBucketingConfig.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<FixedSizeBucketingConfig.Builder>
      • mergeFrom

        public FixedSizeBucketingConfig.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                   throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<FixedSizeBucketingConfig.Builder>
        Throws:
        IOException
      • hasLowerBound

        public boolean hasLowerBound()
         Required. Lower bound value of buckets. All values less than `lower_bound` are
         grouped together into a single bucket; for example if `lower_bound` = 10,
         then all values less than 10 are replaced with the value "-10".
         
        .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasLowerBound in interface FixedSizeBucketingConfigOrBuilder
        Returns:
        Whether the lowerBound field is set.
      • getLowerBound

        public Value getLowerBound()
         Required. Lower bound value of buckets. All values less than `lower_bound` are
         grouped together into a single bucket; for example if `lower_bound` = 10,
         then all values less than 10 are replaced with the value "-10".
         
        .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLowerBound in interface FixedSizeBucketingConfigOrBuilder
        Returns:
        The lowerBound.
      • setLowerBound

        public FixedSizeBucketingConfig.Builder setLowerBound​(Value value)
         Required. Lower bound value of buckets. All values less than `lower_bound` are
         grouped together into a single bucket; for example if `lower_bound` = 10,
         then all values less than 10 are replaced with the value "-10".
         
        .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED];
      • setLowerBound

        public FixedSizeBucketingConfig.Builder setLowerBound​(Value.Builder builderForValue)
         Required. Lower bound value of buckets. All values less than `lower_bound` are
         grouped together into a single bucket; for example if `lower_bound` = 10,
         then all values less than 10 are replaced with the value "-10".
         
        .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED];
      • mergeLowerBound

        public FixedSizeBucketingConfig.Builder mergeLowerBound​(Value value)
         Required. Lower bound value of buckets. All values less than `lower_bound` are
         grouped together into a single bucket; for example if `lower_bound` = 10,
         then all values less than 10 are replaced with the value "-10".
         
        .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED];
      • clearLowerBound

        public FixedSizeBucketingConfig.Builder clearLowerBound()
         Required. Lower bound value of buckets. All values less than `lower_bound` are
         grouped together into a single bucket; for example if `lower_bound` = 10,
         then all values less than 10 are replaced with the value "-10".
         
        .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED];
      • getLowerBoundBuilder

        public Value.Builder getLowerBoundBuilder()
         Required. Lower bound value of buckets. All values less than `lower_bound` are
         grouped together into a single bucket; for example if `lower_bound` = 10,
         then all values less than 10 are replaced with the value "-10".
         
        .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED];
      • getLowerBoundOrBuilder

        public ValueOrBuilder getLowerBoundOrBuilder()
         Required. Lower bound value of buckets. All values less than `lower_bound` are
         grouped together into a single bucket; for example if `lower_bound` = 10,
         then all values less than 10 are replaced with the value "-10".
         
        .google.privacy.dlp.v2.Value lower_bound = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getLowerBoundOrBuilder in interface FixedSizeBucketingConfigOrBuilder
      • hasUpperBound

        public boolean hasUpperBound()
         Required. Upper bound value of buckets. All values greater than upper_bound are
         grouped together into a single bucket; for example if `upper_bound` = 89,
         then all values greater than 89 are replaced with the value "89+".
         
        .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasUpperBound in interface FixedSizeBucketingConfigOrBuilder
        Returns:
        Whether the upperBound field is set.
      • getUpperBound

        public Value getUpperBound()
         Required. Upper bound value of buckets. All values greater than upper_bound are
         grouped together into a single bucket; for example if `upper_bound` = 89,
         then all values greater than 89 are replaced with the value "89+".
         
        .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getUpperBound in interface FixedSizeBucketingConfigOrBuilder
        Returns:
        The upperBound.
      • setUpperBound

        public FixedSizeBucketingConfig.Builder setUpperBound​(Value value)
         Required. Upper bound value of buckets. All values greater than upper_bound are
         grouped together into a single bucket; for example if `upper_bound` = 89,
         then all values greater than 89 are replaced with the value "89+".
         
        .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED];
      • setUpperBound

        public FixedSizeBucketingConfig.Builder setUpperBound​(Value.Builder builderForValue)
         Required. Upper bound value of buckets. All values greater than upper_bound are
         grouped together into a single bucket; for example if `upper_bound` = 89,
         then all values greater than 89 are replaced with the value "89+".
         
        .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED];
      • mergeUpperBound

        public FixedSizeBucketingConfig.Builder mergeUpperBound​(Value value)
         Required. Upper bound value of buckets. All values greater than upper_bound are
         grouped together into a single bucket; for example if `upper_bound` = 89,
         then all values greater than 89 are replaced with the value "89+".
         
        .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED];
      • clearUpperBound

        public FixedSizeBucketingConfig.Builder clearUpperBound()
         Required. Upper bound value of buckets. All values greater than upper_bound are
         grouped together into a single bucket; for example if `upper_bound` = 89,
         then all values greater than 89 are replaced with the value "89+".
         
        .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED];
      • getUpperBoundBuilder

        public Value.Builder getUpperBoundBuilder()
         Required. Upper bound value of buckets. All values greater than upper_bound are
         grouped together into a single bucket; for example if `upper_bound` = 89,
         then all values greater than 89 are replaced with the value "89+".
         
        .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED];
      • getUpperBoundOrBuilder

        public ValueOrBuilder getUpperBoundOrBuilder()
         Required. Upper bound value of buckets. All values greater than upper_bound are
         grouped together into a single bucket; for example if `upper_bound` = 89,
         then all values greater than 89 are replaced with the value "89+".
         
        .google.privacy.dlp.v2.Value upper_bound = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getUpperBoundOrBuilder in interface FixedSizeBucketingConfigOrBuilder
      • getBucketSize

        public double getBucketSize()
         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.
         
        double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getBucketSize in interface FixedSizeBucketingConfigOrBuilder
        Returns:
        The bucketSize.
      • setBucketSize

        public FixedSizeBucketingConfig.Builder setBucketSize​(double value)
         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.
         
        double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bucketSize to set.
        Returns:
        This builder for chaining.
      • clearBucketSize

        public FixedSizeBucketingConfig.Builder clearBucketSize()
         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.
         
        double bucket_size = 3 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final FixedSizeBucketingConfig.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<FixedSizeBucketingConfig.Builder>
      • mergeUnknownFields

        public final FixedSizeBucketingConfig.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<FixedSizeBucketingConfig.Builder>