Reference documentation and code samples for the Google Cloud Retail V2 Client class Image.
Product image. Recommendations AI and Retail Search do not use product images to improve prediction and search results. However, product images can be returned in results, and are shown in prediction or search previews in the console.
Generated from protobuf message google.cloud.retail.v2.Image
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ uri |
string
Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property image_link. Schema.org property Product.image. |
↳ height |
int
Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
↳ width |
int
Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned. |
getUri
Required. URI of the image.
This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property image_link. Schema.org property Product.image.
Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
string |
setUri
Required. URI of the image.
This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property image_link. Schema.org property Product.image.
Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getHeight
Height of the image in number of pixels.
This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
Generated from protobuf field int32 height = 2;
Returns | |
---|---|
Type | Description |
int |
setHeight
Height of the image in number of pixels.
This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
Generated from protobuf field int32 height = 2;
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getWidth
Width of the image in number of pixels.
This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
Generated from protobuf field int32 width = 3;
Returns | |
---|---|
Type | Description |
int |
setWidth
Width of the image in number of pixels.
This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
Generated from protobuf field int32 width = 3;
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |