Class: Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponseFacetFacetValue

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

Overview

A facet value which contains value names and their count.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2SearchResponseFacetFacetValue

Returns a new instance of GoogleCloudRetailV2SearchResponseFacetFacetValue.



5234
5235
5236
# File 'lib/google/apis/retail_v2/classes.rb', line 5234

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

Instance Attribute Details

#countFixnum

Number of items that have this facet value. Corresponds to the JSON property count

Returns:

  • (Fixnum)


5210
5211
5212
# File 'lib/google/apis/retail_v2/classes.rb', line 5210

def count
  @count
end

#intervalGoogle::Apis::RetailV2::GoogleCloudRetailV2Interval

A floating point interval. Corresponds to the JSON property interval



5215
5216
5217
# File 'lib/google/apis/retail_v2/classes.rb', line 5215

def interval
  @interval
end

#max_valueFloat

The maximum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true. Corresponds to the JSON property maxValue

Returns:

  • (Float)


5221
5222
5223
# File 'lib/google/apis/retail_v2/classes.rb', line 5221

def max_value
  @max_value
end

#min_valueFloat

The minimum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true. Corresponds to the JSON property minValue

Returns:

  • (Float)


5227
5228
5229
# File 'lib/google/apis/retail_v2/classes.rb', line 5227

def min_value
  @min_value
end

#valueString

Text value of a facet, such as "Black" for facet "colorFamilies". Corresponds to the JSON property value

Returns:

  • (String)


5232
5233
5234
# File 'lib/google/apis/retail_v2/classes.rb', line 5232

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5239
5240
5241
5242
5243
5244
5245
# File 'lib/google/apis/retail_v2/classes.rb', line 5239

def update!(**args)
  @count = args[:count] if args.key?(:count)
  @interval = args[:interval] if args.key?(:interval)
  @max_value = args[:max_value] if args.key?(:max_value)
  @min_value = args[:min_value] if args.key?(:min_value)
  @value = args[:value] if args.key?(:value)
end