Class: Google::Apis::JobsV3p1beta1::NumericBucketingOption

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

Overview

Input only. Use this field to specify bucketing option for the histogram search response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ NumericBucketingOption

Returns a new instance of NumericBucketingOption.



2300
2301
2302
# File 'generated/google/apis/jobs_v3p1beta1/classes.rb', line 2300

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

Instance Attribute Details

#bucket_boundsArray<Float>

Required. Two adjacent values form a histogram bucket. Values should be in ascending order. For example, if [5, 10, 15] are provided, four buckets are created: (-inf, 5), 5, 10), [10, 15), [15, inf). At most 20 [buckets_bound is supported. Corresponds to the JSON property bucketBounds

Returns:

  • (Array<Float>)


2291
2292
2293
# File 'generated/google/apis/jobs_v3p1beta1/classes.rb', line 2291

def bucket_bounds
  @bucket_bounds
end

#requires_min_maxBoolean Also known as: requires_min_max?

Optional. If set to true, the histogram result includes minimum/maximum value of the numeric field. Corresponds to the JSON property requiresMinMax

Returns:

  • (Boolean)


2297
2298
2299
# File 'generated/google/apis/jobs_v3p1beta1/classes.rb', line 2297

def requires_min_max
  @requires_min_max
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2305
2306
2307
2308
# File 'generated/google/apis/jobs_v3p1beta1/classes.rb', line 2305

def update!(**args)
  @bucket_bounds = args[:bucket_bounds] if args.key?(:bucket_bounds)
  @requires_min_max = args[:requires_min_max] if args.key?(:requires_min_max)
end