Google Cloud Retail V2 Client - Class ImportProductsRequest (2.1.0)

Reference documentation and code samples for the Google Cloud Retail V2 Client class ImportProductsRequest.

Request message for Import methods.

Generated from protobuf message google.cloud.retail.v2.ImportProductsRequest

Namespace

Google \ Cloud \ Retail \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ parent string

Required. projects/1234/locations/global/catalogs/default_catalog/branches/default_branch If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.

↳ request_id string

Deprecated. This field has no effect.

↳ input_config Google\Cloud\Retail\V2\ProductInputConfig

Required. The desired input location of the data.

↳ errors_config Google\Cloud\Retail\V2\ImportErrorsConfig

The desired location of errors incurred during the Import.

↳ update_mask Google\Protobuf\FieldMask

Indicates which fields in the provided imported products to update. If not set, all fields are updated. If provided, only the existing product fields are updated. Missing products will not be created.

↳ reconciliation_mode int

The mode of reconciliation between existing products and the products to be imported. Defaults to ReconciliationMode.INCREMENTAL.

↳ notification_pubsub_topic string

Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is projects/{project}/topics/{topic}. It has to be within the same project as ImportProductsRequest.parent. Make sure that both cloud-retail-customer-data-access@system.gserviceaccount.com and service-<project number>@gcp-sa-retail.iam.gserviceaccount.com have the pubsub.topics.publish IAM permission on the topic. Only supported when ImportProductsRequest.reconciliation_mode is set to FULL.

getParent

Required.

projects/1234/locations/global/catalogs/default_catalog/branches/default_branch If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.

Returns
Type Description
string

setParent

Required.

projects/1234/locations/global/catalogs/default_catalog/branches/default_branch If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.

Parameter
Name Description
var string
Returns
Type Description
$this

getRequestId

Deprecated. This field has no effect.

Returns
Type Description
string

setRequestId

Deprecated. This field has no effect.

Parameter
Name Description
var string
Returns
Type Description
$this

getInputConfig

Required. The desired input location of the data.

Returns
Type Description
Google\Cloud\Retail\V2\ProductInputConfig|null

hasInputConfig

clearInputConfig

setInputConfig

Required. The desired input location of the data.

Parameter
Name Description
var Google\Cloud\Retail\V2\ProductInputConfig
Returns
Type Description
$this

getErrorsConfig

The desired location of errors incurred during the Import.

Returns
Type Description
Google\Cloud\Retail\V2\ImportErrorsConfig|null

hasErrorsConfig

clearErrorsConfig

setErrorsConfig

The desired location of errors incurred during the Import.

Parameter
Name Description
var Google\Cloud\Retail\V2\ImportErrorsConfig
Returns
Type Description
$this

getUpdateMask

Indicates which fields in the provided imported products to update. If not set, all fields are updated. If provided, only the existing product fields are updated. Missing products will not be created.

Returns
Type Description
Google\Protobuf\FieldMask|null

hasUpdateMask

clearUpdateMask

setUpdateMask

Indicates which fields in the provided imported products to update. If not set, all fields are updated. If provided, only the existing product fields are updated. Missing products will not be created.

Parameter
Name Description
var Google\Protobuf\FieldMask
Returns
Type Description
$this

getReconciliationMode

The mode of reconciliation between existing products and the products to be imported. Defaults to ReconciliationMode.INCREMENTAL.

Returns
Type Description
int

setReconciliationMode

The mode of reconciliation between existing products and the products to be imported. Defaults to ReconciliationMode.INCREMENTAL.

Parameter
Name Description
var int
Returns
Type Description
$this

getNotificationPubsubTopic

Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation.

Format of the Pub/Sub topic is projects/{project}/topics/{topic}. It has to be within the same project as ImportProductsRequest.parent. Make sure that both cloud-retail-customer-data-access@system.gserviceaccount.com and service-<project number>@gcp-sa-retail.iam.gserviceaccount.com have the pubsub.topics.publish IAM permission on the topic. Only supported when ImportProductsRequest.reconciliation_mode is set to FULL.

Returns
Type Description
string

setNotificationPubsubTopic

Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation.

Format of the Pub/Sub topic is projects/{project}/topics/{topic}. It has to be within the same project as ImportProductsRequest.parent. Make sure that both cloud-retail-customer-data-access@system.gserviceaccount.com and service-<project number>@gcp-sa-retail.iam.gserviceaccount.com have the pubsub.topics.publish IAM permission on the topic. Only supported when ImportProductsRequest.reconciliation_mode is set to FULL.

Parameter
Name Description
var string
Returns
Type Description
$this