Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchResponseFacet

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

Overview

A facet result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1SearchResponseFacet

Returns a new instance of GoogleCloudDiscoveryengineV1SearchResponseFacet.



8218
8219
8220
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 8218

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)


8204
8205
8206
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 8204

def dynamic_facet
  @dynamic_facet
end

#keyString

The key for this facet. For example, "colors" or "price". It matches SearchRequest.FacetSpec.FacetKey.key. Corresponds to the JSON property key

Returns:

  • (String)


8211
8212
8213
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 8211

def key
  @key
end

#valuesArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1SearchResponseFacetFacetValue>

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



8216
8217
8218
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 8216

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8223
8224
8225
8226
8227
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 8223

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