Class: Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponseFacet

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 result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2SearchResponseFacet

Returns a new instance of GoogleCloudRetailV2SearchResponseFacet.



5646
5647
5648
# File 'lib/google/apis/retail_v2/classes.rb', line 5646

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

Instance Attribute Details

#dynamic_facetBoolean Also known as: dynamic_facet?

Whether the facet is dynamically generated. Corresponds to the JSON property dynamicFacet

Returns:

  • (Boolean)


5633
5634
5635
# File 'lib/google/apis/retail_v2/classes.rb', line 5633

def dynamic_facet
  @dynamic_facet
end

#keyString

The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1". Corresponds to the JSON property key

Returns:

  • (String)


5639
5640
5641
# File 'lib/google/apis/retail_v2/classes.rb', line 5639

def key
  @key
end

#valuesArray<Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponseFacetFacetValue>

The facet values for this field. Corresponds to the JSON property values



5644
5645
5646
# File 'lib/google/apis/retail_v2/classes.rb', line 5644

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5651
5652
5653
5654
5655
# File 'lib/google/apis/retail_v2/classes.rb', line 5651

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