Google Cloud Discovery Engine V1beta Client - Class FacetValue (0.7.1)

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

A facet value which contains value names and their count.

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

Namespace

Google \ Cloud \ DiscoveryEngine \ V1beta \ SearchResponse \ Facet

Methods

__construct

Constructor.

Parameters
NameDescription
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\V1beta\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
TypeDescription
string

hasValue

setValue

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getInterval

Returns
TypeDescription
Google\Cloud\DiscoveryEngine\V1beta\Interval|null

hasInterval

setInterval

Parameter
NameDescription
var Google\Cloud\DiscoveryEngine\V1beta\Interval
Returns
TypeDescription
$this

getCount

Number of items that have this facet value.

Returns
TypeDescription
int|string

setCount

Number of items that have this facet value.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getFacetValue

Returns
TypeDescription
string