Generated from protobuf messagegoogle.cloud.retail.v2.AddLocalInventoriesRequest
Namespace
Google \ Cloud \ Retail \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ product
string
Required. Full resource name ofProduct, such asprojects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id. If the caller does not have permission to access theProduct, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.
Required. A list of inventory information at difference places. Each place is identified by its place ID. At most 3000 inventories are allowed per request.
Indicates which inventory fields in the provided list ofLocalInventoryto update. The field is updated to the provided value. If a field is set while the place does not have a previous local inventory, the local inventory at that store is created. If a field is set while the value of that field is not provided, the original field value, if it exists, is deleted. If the mask is not set or set with empty paths, all inventory fields will be updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored.
The time when the inventory updates are issued. Used to prevent out-of-order updates on local inventory fields. If not provided, the internal system time will be used.
↳ allow_missing
bool
If set to true, and theProductis not found, the local inventory will still be processed and retained for at most 1 day and processed once theProductis created. If set to false, a NOT_FOUND error is returned if theProductis not found.
getProduct
Required. Full resource name ofProduct,
such asprojects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.
If the caller does not have permission to access theProduct, regardless of whether or not it
exists, a PERMISSION_DENIED error is returned.
Returns
Type
Description
string
setProduct
Required. Full resource name ofProduct,
such asprojects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.
If the caller does not have permission to access theProduct, regardless of whether or not it
exists, a PERMISSION_DENIED error is returned.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getLocalInventories
Required. A list of inventory information at difference places. Each place
is identified by its place ID. At most 3000 inventories are allowed per
request.
Required. A list of inventory information at difference places. Each place
is identified by its place ID. At most 3000 inventories are allowed per
request.
Indicates which inventory fields in the provided list ofLocalInventoryto update. The
field is updated to the provided value.
If a field is set while the place does not have a previous local inventory,
the local inventory at that store is created.
If a field is set while the value of that field is not provided, the
original field value, if it exists, is deleted.
If the mask is not set or set with empty paths, all inventory fields will
be updated.
If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
is returned and the entire update will be ignored.
Indicates which inventory fields in the provided list ofLocalInventoryto update. The
field is updated to the provided value.
If a field is set while the place does not have a previous local inventory,
the local inventory at that store is created.
If a field is set while the value of that field is not provided, the
original field value, if it exists, is deleted.
If the mask is not set or set with empty paths, all inventory fields will
be updated.
If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
is returned and the entire update will be ignored.
The time when the inventory updates are issued. Used to prevent
out-of-order updates on local inventory fields. If not provided, the
internal system time will be used.
The time when the inventory updates are issued. Used to prevent
out-of-order updates on local inventory fields. If not provided, the
internal system time will be used.
If set to true, and theProductis not
found, the local inventory will still be processed and retained for at most
1 day and processed once theProductis
created. If set to false, a NOT_FOUND error is returned if theProductis not found.
Returns
Type
Description
bool
setAllowMissing
If set to true, and theProductis not
found, the local inventory will still be processed and retained for at most
1 day and processed once theProductis
created. If set to false, a NOT_FOUND error is returned if theProductis not found.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
static::build
Parameter
Name
Description
product
string
Required. Full resource name ofProduct,
such asprojects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.
If the caller does not have permission to access theProduct, regardless of whether or not it
exists, a PERMISSION_DENIED error is returned. Please seeProductServiceClient::productName()for help formatting this field.
[[["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-04 UTC."],[],[],null,["# Google Cloud Retail V2 Client - Class AddLocalInventoriesRequest (2.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.3.1 (latest)](/php/docs/reference/cloud-retail/latest/V2.AddLocalInventoriesRequest)\n- [2.3.0](/php/docs/reference/cloud-retail/2.3.0/V2.AddLocalInventoriesRequest)\n- [2.2.1](/php/docs/reference/cloud-retail/2.2.1/V2.AddLocalInventoriesRequest)\n- [2.1.3](/php/docs/reference/cloud-retail/2.1.3/V2.AddLocalInventoriesRequest)\n- [2.0.0](/php/docs/reference/cloud-retail/2.0.0/V2.AddLocalInventoriesRequest)\n- [1.7.0](/php/docs/reference/cloud-retail/1.7.0/V2.AddLocalInventoriesRequest)\n- [1.6.4](/php/docs/reference/cloud-retail/1.6.4/V2.AddLocalInventoriesRequest)\n- [1.5.0](/php/docs/reference/cloud-retail/1.5.0/V2.AddLocalInventoriesRequest)\n- [1.4.2](/php/docs/reference/cloud-retail/1.4.2/V2.AddLocalInventoriesRequest)\n- [1.3.1](/php/docs/reference/cloud-retail/1.3.1/V2.AddLocalInventoriesRequest)\n- [1.2.1](/php/docs/reference/cloud-retail/1.2.1/V2.AddLocalInventoriesRequest)\n- [1.1.1](/php/docs/reference/cloud-retail/1.1.1/V2.AddLocalInventoriesRequest)\n- [1.0.1](/php/docs/reference/cloud-retail/1.0.1/V2.AddLocalInventoriesRequest) \nReference documentation and code samples for the Google Cloud Retail V2 Client class AddLocalInventoriesRequest.\n\nRequest message for\n[ProductService.AddLocalInventories](/php/docs/reference/cloud-retail/latest/V2.Client.ProductServiceClient#_Google_Cloud_Retail_V2_Client_ProductServiceClient__addLocalInventories__)\nmethod.\n\nGenerated from protobuf message `google.cloud.retail.v2.AddLocalInventoriesRequest`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Retail \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getProduct\n\nRequired. Full resource name of [Product](/php/docs/reference/cloud-retail/latest/V2.Product),\nsuch as\n`projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.\n\nIf the caller does not have permission to access the\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product), regardless of whether or not it\nexists, a PERMISSION_DENIED error is returned.\n\n### setProduct\n\nRequired. Full resource name of [Product](/php/docs/reference/cloud-retail/latest/V2.Product),\nsuch as\n`projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`.\n\nIf the caller does not have permission to access the\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product), regardless of whether or not it\nexists, a PERMISSION_DENIED error is returned.\n\n### getLocalInventories\n\nRequired. A list of inventory information at difference places. Each place\nis identified by its place ID. At most 3000 inventories are allowed per\nrequest.\n\n### setLocalInventories\n\nRequired. A list of inventory information at difference places. Each place\nis identified by its place ID. At most 3000 inventories are allowed per\nrequest.\n\n### getAddMask\n\nIndicates which inventory fields in the provided list of\n[LocalInventory](/php/docs/reference/cloud-retail/latest/V2.LocalInventory) to update. The\nfield is updated to the provided value.\n\nIf a field is set while the place does not have a previous local inventory,\nthe local inventory at that store is created.\nIf a field is set while the value of that field is not provided, the\noriginal field value, if it exists, is deleted.\nIf the mask is not set or set with empty paths, all inventory fields will\nbe updated.\nIf an unsupported or unknown field is provided, an INVALID_ARGUMENT error\nis returned and the entire update will be ignored.\n\n### hasAddMask\n\n### clearAddMask\n\n### setAddMask\n\nIndicates which inventory fields in the provided list of\n[LocalInventory](/php/docs/reference/cloud-retail/latest/V2.LocalInventory) to update. The\nfield is updated to the provided value.\n\nIf a field is set while the place does not have a previous local inventory,\nthe local inventory at that store is created.\nIf a field is set while the value of that field is not provided, the\noriginal field value, if it exists, is deleted.\nIf the mask is not set or set with empty paths, all inventory fields will\nbe updated.\nIf an unsupported or unknown field is provided, an INVALID_ARGUMENT error\nis returned and the entire update will be ignored.\n\n### getAddTime\n\nThe time when the inventory updates are issued. Used to prevent\nout-of-order updates on local inventory fields. If not provided, the\ninternal system time will be used.\n\n### hasAddTime\n\n### clearAddTime\n\n### setAddTime\n\nThe time when the inventory updates are issued. Used to prevent\nout-of-order updates on local inventory fields. If not provided, the\ninternal system time will be used.\n\n### getAllowMissing\n\nIf set to true, and the [Product](/php/docs/reference/cloud-retail/latest/V2.Product) is not\nfound, the local inventory will still be processed and retained for at most\n1 day and processed once the [Product](/php/docs/reference/cloud-retail/latest/V2.Product) is\ncreated. If set to false, a NOT_FOUND error is returned if the\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product) is not found.\n\n### setAllowMissing\n\nIf set to true, and the [Product](/php/docs/reference/cloud-retail/latest/V2.Product) is not\nfound, the local inventory will still be processed and retained for at most\n1 day and processed once the [Product](/php/docs/reference/cloud-retail/latest/V2.Product) is\ncreated. If set to false, a NOT_FOUND error is returned if the\n[Product](/php/docs/reference/cloud-retail/latest/V2.Product) is not found.\n\n### static::build"]]