Reference documentation and code samples for the Google Cloud Retail V2 Client class ImportProductsRequest.
Request message for Import methods.
Generated from protobuf messagegoogle.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_branchIf no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.
Indicates which fields in the provided importedproductsto 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 toReconciliationMode.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 aOperation. Format of the Pub/Sub topic isprojects/{project}/topics/{topic}. It has to be within the same project asImportProductsRequest.parent. Make sure that bothcloud-retail-customer-data-access@system.gserviceaccount.comandservice-<project number>@gcp-sa-retail.iam.gserviceaccount.comhave thepubsub.topics.publishIAM permission on the topic. Only supported whenImportProductsRequest.reconciliation_modeis set toFULL.
getParent
Required.
projects/1234/locations/global/catalogs/default_catalog/branches/default_branchIf 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_branchIf no updateMask is specified, requires products.create permission.
If updateMask is specified, requires products.update permission.
Indicates which fields in the provided importedproductsto update. If
not set, all fields are updated. If provided, only the existing product
fields are updated. Missing products will not be created.
Indicates which fields in the provided importedproductsto update. If
not set, all fields are updated. If provided, only the existing product
fields are updated. Missing products will not be created.
The mode of reconciliation between existing products and the products to be
imported. Defaults toReconciliationMode.INCREMENTAL.
Returns
Type
Description
int
Enum of typeReconciliationMode.
setReconciliationMode
The mode of reconciliation between existing products and the products to be
imported. Defaults toReconciliationMode.INCREMENTAL.
Parameter
Name
Description
var
int
Enum of typeReconciliationMode.
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 aOperation.
Format of the Pub/Sub topic isprojects/{project}/topics/{topic}. It has
to be within the same project asImportProductsRequest.parent.
Make sure that bothcloud-retail-customer-data-access@system.gserviceaccount.comandservice-<project number>@gcp-sa-retail.iam.gserviceaccount.comhave thepubsub.topics.publishIAM permission on the topic.
Only supported whenImportProductsRequest.reconciliation_modeis set toFULL.
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 aOperation.
Format of the Pub/Sub topic isprojects/{project}/topics/{topic}. It has
to be within the same project asImportProductsRequest.parent.
Make sure that bothcloud-retail-customer-data-access@system.gserviceaccount.comandservice-<project number>@gcp-sa-retail.iam.gserviceaccount.comhave thepubsub.topics.publishIAM permission on the topic.
Only supported whenImportProductsRequest.reconciliation_modeis set toFULL.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Google Cloud Retail V2 Client - Class ImportProductsRequest (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-retail/latest/V2.ImportProductsRequest)\n- [2.3.0](/php/docs/reference/cloud-retail/2.3.0/V2.ImportProductsRequest)\n- [2.2.1](/php/docs/reference/cloud-retail/2.2.1/V2.ImportProductsRequest)\n- [2.1.3](/php/docs/reference/cloud-retail/2.1.3/V2.ImportProductsRequest)\n- [2.0.0](/php/docs/reference/cloud-retail/2.0.0/V2.ImportProductsRequest)\n- [1.7.0](/php/docs/reference/cloud-retail/1.7.0/V2.ImportProductsRequest)\n- [1.6.4](/php/docs/reference/cloud-retail/1.6.4/V2.ImportProductsRequest)\n- [1.5.0](/php/docs/reference/cloud-retail/1.5.0/V2.ImportProductsRequest)\n- [1.4.2](/php/docs/reference/cloud-retail/1.4.2/V2.ImportProductsRequest)\n- [1.3.1](/php/docs/reference/cloud-retail/1.3.1/V2.ImportProductsRequest)\n- [1.2.1](/php/docs/reference/cloud-retail/1.2.1/V2.ImportProductsRequest)\n- [1.1.1](/php/docs/reference/cloud-retail/1.1.1/V2.ImportProductsRequest)\n- [1.0.1](/php/docs/reference/cloud-retail/1.0.1/V2.ImportProductsRequest) \nReference documentation and code samples for the Google Cloud Retail V2 Client class ImportProductsRequest.\n\nRequest message for Import methods.\n\nGenerated from protobuf message `google.cloud.retail.v2.ImportProductsRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Retail \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getParent\n\nRequired.\n\n`projects/1234/locations/global/catalogs/default_catalog/branches/default_branch`\nIf no updateMask is specified, requires products.create permission.\nIf updateMask is specified, requires products.update permission.\n\n### setParent\n\nRequired.\n\n`projects/1234/locations/global/catalogs/default_catalog/branches/default_branch`\nIf no updateMask is specified, requires products.create permission.\nIf updateMask is specified, requires products.update permission.\n\n### getRequestId\n\nDeprecated. This field has no effect.\n\n### setRequestId\n\nDeprecated. This field has no effect.\n\n### getInputConfig\n\nRequired. The desired input location of the data.\n\n### hasInputConfig\n\n### clearInputConfig\n\n### setInputConfig\n\nRequired. The desired input location of the data.\n\n### getErrorsConfig\n\nThe desired location of errors incurred during the Import.\n\n### hasErrorsConfig\n\n### clearErrorsConfig\n\n### setErrorsConfig\n\nThe desired location of errors incurred during the Import.\n\n### getUpdateMask\n\nIndicates which fields in the provided imported `products` to update. If\nnot set, all fields are updated. If provided, only the existing product\nfields are updated. Missing products will not be created.\n\n### hasUpdateMask\n\n### clearUpdateMask\n\n### setUpdateMask\n\nIndicates which fields in the provided imported `products` to update. If\nnot set, all fields are updated. If provided, only the existing product\nfields are updated. Missing products will not be created.\n\n### getReconciliationMode\n\nThe mode of reconciliation between existing products and the products to be\nimported. Defaults to\n[ReconciliationMode.INCREMENTAL](/php/docs/reference/cloud-retail/latest/V2.ImportProductsRequest.ReconciliationMode#_Google_Cloud_Retail_V2_ImportProductsRequest_ReconciliationMode__INCREMENTAL).\n\n### setReconciliationMode\n\nThe mode of reconciliation between existing products and the products to be\nimported. Defaults to\n[ReconciliationMode.INCREMENTAL](/php/docs/reference/cloud-retail/latest/V2.ImportProductsRequest.ReconciliationMode#_Google_Cloud_Retail_V2_ImportProductsRequest_ReconciliationMode__INCREMENTAL).\n\n### getNotificationPubsubTopic\n\nFull Pub/Sub topic name for receiving notification. If this field is set,\nwhen the import is finished, a notification is sent to\nspecified Pub/Sub topic. The message data is JSON string of a\nOperation.\n\nFormat of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has\nto be within the same project as\n[ImportProductsRequest.parent](/php/docs/reference/cloud-retail/latest/V2.ImportProductsRequest#_Google_Cloud_Retail_V2_ImportProductsRequest__getParent__).\nMake sure that both\n`cloud-retail-customer-data-access@system.gserviceaccount.com` and\n`service-\u003cproject number\u003e@gcp-sa-retail.iam.gserviceaccount.com`\nhave the `pubsub.topics.publish` IAM permission on the topic.\nOnly supported when\n[ImportProductsRequest.reconciliation_mode](/php/docs/reference/cloud-retail/latest/V2.ImportProductsRequest#_Google_Cloud_Retail_V2_ImportProductsRequest__getReconciliationMode__)\nis set to `FULL`.\n\n### setNotificationPubsubTopic\n\nFull Pub/Sub topic name for receiving notification. If this field is set,\nwhen the import is finished, a notification is sent to\nspecified Pub/Sub topic. The message data is JSON string of a\nOperation.\n\nFormat of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has\nto be within the same project as\n[ImportProductsRequest.parent](/php/docs/reference/cloud-retail/latest/V2.ImportProductsRequest#_Google_Cloud_Retail_V2_ImportProductsRequest__getParent__).\nMake sure that both\n`cloud-retail-customer-data-access@system.gserviceaccount.com` and\n`service-\u003cproject number\u003e@gcp-sa-retail.iam.gserviceaccount.com`\nhave the `pubsub.topics.publish` IAM permission on the topic.\nOnly supported when\n[ImportProductsRequest.reconciliation_mode](/php/docs/reference/cloud-retail/latest/V2.ImportProductsRequest#_Google_Cloud_Retail_V2_ImportProductsRequest__getReconciliationMode__)\nis set to `FULL`."]]