Reference documentation and code samples for the Google Cloud Retail V2 Client class CreateProductRequest.
Request message for ProductService.CreateProduct method.
Generated from protobuf message google.cloud.retail.v2.CreateProductRequest
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ parent |
string
Required. The parent catalog resource name, such as |
↳ product |
Google\Cloud\Retail\V2\Product
Required. The Product to create. |
↳ product_id |
string
Required. The ID to use for the Product, which will become the final component of the Product.name. If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
getParent
Required. The parent catalog resource name, such as
projects/*/locations/global/catalogs/default_catalog/branches/default_branch
.
Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
Returns | |
---|---|
Type | Description |
string |
setParent
Required. The parent catalog resource name, such as
projects/*/locations/global/catalogs/default_catalog/branches/default_branch
.
Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getProduct
Required. The Product to create.
Generated from protobuf field .google.cloud.retail.v2.Product product = 2 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
Google\Cloud\Retail\V2\Product|null |
hasProduct
clearProduct
setProduct
Required. The Product to create.
Generated from protobuf field .google.cloud.retail.v2.Product product = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Retail\V2\Product
|
Returns | |
---|---|
Type | Description |
$this |
getProductId
Required. The ID to use for the Product, which will become the final component of the Product.name.
If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
Generated from protobuf field string product_id = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
string |
setProductId
Required. The ID to use for the Product, which will become the final component of the Product.name.
If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
Generated from protobuf field string product_id = 3 [(.google.api.field_behavior) = REQUIRED];
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |