Cloud Vision V1 Client - Class CreateProductRequest (1.7.6)

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

Request message for the CreateProduct method.

Generated from protobuf message google.cloud.vision.v1.CreateProductRequest

Namespace

Google \ Cloud \ Vision \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ parent string

Required. The project in which the Product should be created. Format is projects/PROJECT_ID/locations/LOC_ID.

↳ product Google\Cloud\Vision\V1\Product

Required. The product to create.

↳ product_id string

A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

getParent

Required. The project in which the Product should be created.

Format is projects/PROJECT_ID/locations/LOC_ID.

Returns
TypeDescription
string

setParent

Required. The project in which the Product should be created.

Format is projects/PROJECT_ID/locations/LOC_ID.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getProduct

Required. The product to create.

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

hasProduct

clearProduct

setProduct

Required. The product to create.

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

getProductId

A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

Returns
TypeDescription
string

setProductId

A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

static::build

Parameters
NameDescription
parent string

Required. The project in which the Product should be created.

Format is projects/PROJECT_ID/locations/LOC_ID. Please see Google\Cloud\Vision\V1\ProductSearchClient::locationName() for help formatting this field.

product Google\Cloud\Vision\V1\Product

Required. The product to create.

productId string

A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character /.

Returns
TypeDescription
Google\Cloud\Vision\V1\CreateProductRequest