Google Cloud Discovery Engine V1 Client - Class FacetValue (0.11.1)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class FacetValue.

A facet value which contains value names and their count.

Generated from protobuf message google.cloud.discoveryengine.v1.SearchResponse.Facet.FacetValue

Namespace

Google \ Cloud \ DiscoveryEngine \ V1 \ SearchResponse \ Facet

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ value string

Text value of a facet, such as "Black" for facet "colors".

↳ interval Google\Cloud\DiscoveryEngine\V1\Interval

Interval value for a facet, such as 10, 20) for facet "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals.

↳ count int|string

Number of items that have this facet value.

getValue

Text value of a facet, such as "Black" for facet "colors".

Returns
Type Description
string

hasValue

setValue

Text value of a facet, such as "Black" for facet "colors".

Parameter
Name Description
var string
Returns
Type Description
$this

getInterval

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1\Interval|null

hasInterval

setInterval

Parameter
Name Description
var Google\Cloud\DiscoveryEngine\V1\Interval
Returns
Type Description
$this

getCount

Number of items that have this facet value.

Returns
Type Description
int|string

setCount

Number of items that have this facet value.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getFacetValue

Returns
Type Description
string