Google Cloud Vision Ai V1 Client - Class FixedRangeBucketSpec (0.1.0)

Reference documentation and code samples for the Google Cloud Vision Ai V1 Client class FixedRangeBucketSpec.

If bucket type is FIXED_RANGE, specify how values are bucketized. Use FixedRangeBucketSpec when you want to create multiple buckets with equal granularities. Using integer bucket value as an example, when bucket_start = 0, bucket_granularity = 10, bucket_count = 5, this facet will be aggregated via the following buckets: [-inf, 0), [0, 10), [10, 20), [20, 30), [30, inf).

Notably, bucket_count <= 1 is an invalid spec.

Generated from protobuf message google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec

Namespace

Google \ Cloud \ VisionAI \ V1 \ FacetProperty

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ bucket_start Google\Cloud\VisionAI\V1\FacetValue

Lower bound of the bucket. NOTE: Only integer type is currently supported for this field.

↳ bucket_granularity Google\Cloud\VisionAI\V1\FacetValue

Bucket granularity. NOTE: Only integer type is currently supported for this field.

↳ bucket_count int

Total number of buckets.

getBucketStart

Lower bound of the bucket. NOTE: Only integer type is currently supported for this field.

Returns
Type Description
Google\Cloud\VisionAI\V1\FacetValue|null

hasBucketStart

clearBucketStart

setBucketStart

Lower bound of the bucket. NOTE: Only integer type is currently supported for this field.

Parameter
Name Description
var Google\Cloud\VisionAI\V1\FacetValue
Returns
Type Description
$this

getBucketGranularity

Bucket granularity. NOTE: Only integer type is currently supported for this field.

Returns
Type Description
Google\Cloud\VisionAI\V1\FacetValue|null

hasBucketGranularity

clearBucketGranularity

setBucketGranularity

Bucket granularity. NOTE: Only integer type is currently supported for this field.

Parameter
Name Description
var Google\Cloud\VisionAI\V1\FacetValue
Returns
Type Description
$this

getBucketCount

Total number of buckets.

Returns
Type Description
int

setBucketCount

Total number of buckets.

Parameter
Name Description
var int
Returns
Type Description
$this