Cloud Vision V1 Client - Class Result (1.6.8)

Reference documentation and code samples for the Cloud Vision V1 Client class Result.

Information about a product.

Generated from protobuf message google.cloud.vision.v1.ProductSearchResults.Result

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ product Google\Cloud\Vision\V1\Product

The Product.

↳ score float

A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).

↳ image string

The resource name of the image from the product that is the closest match to the query.

getProduct

The Product.

Returns
TypeDescription
Google\Cloud\Vision\V1\Product|null

hasProduct

clearProduct

setProduct

The Product.

Parameter
NameDescription
var Google\Cloud\Vision\V1\Product
Returns
TypeDescription
$this

getScore

A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).

Returns
TypeDescription
float

setScore

A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getImage

The resource name of the image from the product that is the closest match to the query.

Returns
TypeDescription
string

setImage

The resource name of the image from the product that is the closest match to the query.

Parameter
NameDescription
var string
Returns
TypeDescription
$this