Google Cloud Retail V2 Client - Class ImportProductsRequest (1.0.1)

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

Methods

__construct

Constructor.

Parameters
NameDescription
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.

↳ 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 service-<project number>&#64;gcp-sa-retail.iam.gserviceaccount.com has the pubsub.topics.publish IAM permission on the topic.

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.

Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {

Returns
TypeDescription
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.

Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getRequestId

Deprecated. This field has no effect.

Generated from protobuf field string request_id = 6 [deprecated = true];

Returns
TypeDescription
string

setRequestId

Deprecated. This field has no effect.

Generated from protobuf field string request_id = 6 [deprecated = true];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getInputConfig

Required. The desired input location of the data.

Generated from protobuf field .google.cloud.retail.v2.ProductInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Google\Cloud\Retail\V2\ProductInputConfig|null

hasInputConfig

clearInputConfig

setInputConfig

Required. The desired input location of the data.

Generated from protobuf field .google.cloud.retail.v2.ProductInputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
var Google\Cloud\Retail\V2\ProductInputConfig
Returns
TypeDescription
$this

getErrorsConfig

The desired location of errors incurred during the Import.

Generated from protobuf field .google.cloud.retail.v2.ImportErrorsConfig errors_config = 3;

Returns
TypeDescription
Google\Cloud\Retail\V2\ImportErrorsConfig|null

hasErrorsConfig

clearErrorsConfig

setErrorsConfig

The desired location of errors incurred during the Import.

Generated from protobuf field .google.cloud.retail.v2.ImportErrorsConfig errors_config = 3;

Parameter
NameDescription
var Google\Cloud\Retail\V2\ImportErrorsConfig
Returns
TypeDescription
$this

getUpdateMask

Indicates which fields in the provided imported products to update. If not set, all fields are updated.

Generated from protobuf field .google.protobuf.FieldMask update_mask = 4;

Returns
TypeDescription
Google\Protobuf\FieldMask|null

hasUpdateMask

clearUpdateMask

setUpdateMask

Indicates which fields in the provided imported products to update. If not set, all fields are updated.

Generated from protobuf field .google.protobuf.FieldMask update_mask = 4;

Parameter
NameDescription
var Google\Protobuf\FieldMask
Returns
TypeDescription
$this

getReconciliationMode

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

Generated from protobuf field .google.cloud.retail.v2.ImportProductsRequest.ReconciliationMode reconciliation_mode = 5;

Returns
TypeDescription
int

setReconciliationMode

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

Generated from protobuf field .google.cloud.retail.v2.ImportProductsRequest.ReconciliationMode reconciliation_mode = 5;

Parameter
NameDescription
var int
Returns
TypeDescription
$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 service-<project number>@gcp-sa-retail.iam.gserviceaccount.com has the pubsub.topics.publish IAM permission on the topic.

Generated from protobuf field string notification_pubsub_topic = 7;

Returns
TypeDescription
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 service-<project number>@gcp-sa-retail.iam.gserviceaccount.com has the pubsub.topics.publish IAM permission on the topic.

Generated from protobuf field string notification_pubsub_topic = 7;

Parameter
NameDescription
var string
Returns
TypeDescription
$this