Google Cloud Vision Ai V1 Client - Class FacetGroup (0.1.0)

Reference documentation and code samples for the Google Cloud Vision Ai V1 Client class FacetGroup.

A group of facet buckets to be passed back and forth between backend & frontend.

Generated from protobuf message google.cloud.visionai.v1.FacetGroup

Namespace

Google \ Cloud \ VisionAI \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ facet_id string

Unique id of the facet group.

↳ display_name string

Display name of the facet. To be used by UI for facet rendering.

↳ buckets array<FacetBucket>

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

↳ bucket_type int

Facet bucket type.

↳ fetch_matched_annotations bool

If true, return query matched annotations for this facet group's selection. This option is only applicable for facets based on partition level annotations. It supports the following facet values: - INTEGER - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)

getFacetId

Unique id of the facet group.

Returns
Type Description
string

setFacetId

Unique id of the facet group.

Parameter
Name Description
var string
Returns
Type Description
$this

getDisplayName

Display name of the facet. To be used by UI for facet rendering.

Returns
Type Description
string

setDisplayName

Display name of the facet. To be used by UI for facet rendering.

Parameter
Name Description
var string
Returns
Type Description
$this

getBuckets

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setBuckets

Buckets associated with the facet. E.g. for "Team" facet, the bucket can be 49ers, patriots, etc.

Parameter
Name Description
var array<FacetBucket>
Returns
Type Description
$this

getBucketType

Facet bucket type.

Returns
Type Description
int Enum of type FacetBucketType.

setBucketType

Facet bucket type.

Parameter
Name Description
var int

Enum of type FacetBucketType.

Returns
Type Description
$this

getFetchMatchedAnnotations

If true, return query matched annotations for this facet group's selection.

This option is only applicable for facets based on partition level annotations. It supports the following facet values:

  • INTEGER
  • STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
Returns
Type Description
bool

setFetchMatchedAnnotations

If true, return query matched annotations for this facet group's selection.

This option is only applicable for facets based on partition level annotations. It supports the following facet values:

  • INTEGER
  • STRING (DataSchema.SearchStrategy.EXACT_SEARCH only)
Parameter
Name Description
var bool
Returns
Type Description
$this