Class AddLocalInventoriesRequest.Builder (2.32.0)

public static final class AddLocalInventoriesRequest.Builder extends GeneratedMessageV3.Builder<AddLocalInventoriesRequest.Builder> implements AddLocalInventoriesRequestOrBuilder

Request message for ProductService.AddLocalInventories method.

Protobuf type google.cloud.retail.v2.AddLocalInventoriesRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllLocalInventories(Iterable<? extends LocalInventory> values)

public AddLocalInventoriesRequest.Builder addAllLocalInventories(Iterable<? extends LocalInventory> values)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.retail.v2.LocalInventory>
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

addLocalInventories(LocalInventory value)

public AddLocalInventoriesRequest.Builder addLocalInventories(LocalInventory value)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueLocalInventory
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

addLocalInventories(LocalInventory.Builder builderForValue)

public AddLocalInventoriesRequest.Builder addLocalInventories(LocalInventory.Builder builderForValue)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueLocalInventory.Builder
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

addLocalInventories(int index, LocalInventory value)

public AddLocalInventoriesRequest.Builder addLocalInventories(int index, LocalInventory value)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
valueLocalInventory
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

addLocalInventories(int index, LocalInventory.Builder builderForValue)

public AddLocalInventoriesRequest.Builder addLocalInventories(int index, LocalInventory.Builder builderForValue)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
builderForValueLocalInventory.Builder
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

addLocalInventoriesBuilder()

public LocalInventory.Builder addLocalInventoriesBuilder()

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
LocalInventory.Builder

addLocalInventoriesBuilder(int index)

public LocalInventory.Builder addLocalInventoriesBuilder(int index)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
LocalInventory.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AddLocalInventoriesRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides

build()

public AddLocalInventoriesRequest build()
Returns
TypeDescription
AddLocalInventoriesRequest

buildPartial()

public AddLocalInventoriesRequest buildPartial()
Returns
TypeDescription
AddLocalInventoriesRequest

clear()

public AddLocalInventoriesRequest.Builder clear()
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides

clearAddMask()

public AddLocalInventoriesRequest.Builder clearAddMask()

Indicates which inventory fields in the provided list of LocalInventory to 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.

.google.protobuf.FieldMask add_mask = 4;

Returns
TypeDescription
AddLocalInventoriesRequest.Builder

clearAddTime()

public AddLocalInventoriesRequest.Builder clearAddTime()

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.

.google.protobuf.Timestamp add_time = 5;

Returns
TypeDescription
AddLocalInventoriesRequest.Builder

clearAllowMissing()

public AddLocalInventoriesRequest.Builder clearAllowMissing()

If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.

bool allow_missing = 6;

Returns
TypeDescription
AddLocalInventoriesRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AddLocalInventoriesRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides

clearLocalInventories()

public AddLocalInventoriesRequest.Builder clearLocalInventories()

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
AddLocalInventoriesRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AddLocalInventoriesRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides

clearProduct()

public AddLocalInventoriesRequest.Builder clearProduct()

Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.

If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

string product = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
AddLocalInventoriesRequest.Builder

This builder for chaining.

clone()

public AddLocalInventoriesRequest.Builder clone()
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides

getAddMask()

public FieldMask getAddMask()

Indicates which inventory fields in the provided list of LocalInventory to 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.

.google.protobuf.FieldMask add_mask = 4;

Returns
TypeDescription
FieldMask

The addMask.

getAddMaskBuilder()

public FieldMask.Builder getAddMaskBuilder()

Indicates which inventory fields in the provided list of LocalInventory to 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.

.google.protobuf.FieldMask add_mask = 4;

Returns
TypeDescription
Builder

getAddMaskOrBuilder()

public FieldMaskOrBuilder getAddMaskOrBuilder()

Indicates which inventory fields in the provided list of LocalInventory to 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.

.google.protobuf.FieldMask add_mask = 4;

Returns
TypeDescription
FieldMaskOrBuilder

getAddTime()

public Timestamp getAddTime()

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.

.google.protobuf.Timestamp add_time = 5;

Returns
TypeDescription
Timestamp

The addTime.

getAddTimeBuilder()

public Timestamp.Builder getAddTimeBuilder()

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.

.google.protobuf.Timestamp add_time = 5;

Returns
TypeDescription
Builder

getAddTimeOrBuilder()

public TimestampOrBuilder getAddTimeOrBuilder()

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.

.google.protobuf.Timestamp add_time = 5;

Returns
TypeDescription
TimestampOrBuilder

getAllowMissing()

public boolean getAllowMissing()

If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.

bool allow_missing = 6;

Returns
TypeDescription
boolean

The allowMissing.

getDefaultInstanceForType()

public AddLocalInventoriesRequest getDefaultInstanceForType()
Returns
TypeDescription
AddLocalInventoriesRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLocalInventories(int index)

public LocalInventory getLocalInventories(int index)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
LocalInventory

getLocalInventoriesBuilder(int index)

public LocalInventory.Builder getLocalInventoriesBuilder(int index)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
LocalInventory.Builder

getLocalInventoriesBuilderList()

public List<LocalInventory.Builder> getLocalInventoriesBuilderList()

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<Builder>

getLocalInventoriesCount()

public int getLocalInventoriesCount()

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

getLocalInventoriesList()

public List<LocalInventory> getLocalInventoriesList()

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<LocalInventory>

getLocalInventoriesOrBuilder(int index)

public LocalInventoryOrBuilder getLocalInventoriesOrBuilder(int index)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
LocalInventoryOrBuilder

getLocalInventoriesOrBuilderList()

public List<? extends LocalInventoryOrBuilder> getLocalInventoriesOrBuilderList()

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<? extends com.google.cloud.retail.v2.LocalInventoryOrBuilder>

getProduct()

public String getProduct()

Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.

If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

string product = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The product.

getProductBytes()

public ByteString getProductBytes()

Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.

If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

string product = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for product.

hasAddMask()

public boolean hasAddMask()

Indicates which inventory fields in the provided list of LocalInventory to 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.

.google.protobuf.FieldMask add_mask = 4;

Returns
TypeDescription
boolean

Whether the addMask field is set.

hasAddTime()

public boolean hasAddTime()

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.

.google.protobuf.Timestamp add_time = 5;

Returns
TypeDescription
boolean

Whether the addTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAddMask(FieldMask value)

public AddLocalInventoriesRequest.Builder mergeAddMask(FieldMask value)

Indicates which inventory fields in the provided list of LocalInventory to 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.

.google.protobuf.FieldMask add_mask = 4;

Parameter
NameDescription
valueFieldMask
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

mergeAddTime(Timestamp value)

public AddLocalInventoriesRequest.Builder mergeAddTime(Timestamp value)

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.

.google.protobuf.Timestamp add_time = 5;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

mergeFrom(AddLocalInventoriesRequest other)

public AddLocalInventoriesRequest.Builder mergeFrom(AddLocalInventoriesRequest other)
Parameter
NameDescription
otherAddLocalInventoriesRequest
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AddLocalInventoriesRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AddLocalInventoriesRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AddLocalInventoriesRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides

removeLocalInventories(int index)

public AddLocalInventoriesRequest.Builder removeLocalInventories(int index)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

setAddMask(FieldMask value)

public AddLocalInventoriesRequest.Builder setAddMask(FieldMask value)

Indicates which inventory fields in the provided list of LocalInventory to 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.

.google.protobuf.FieldMask add_mask = 4;

Parameter
NameDescription
valueFieldMask
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

setAddMask(FieldMask.Builder builderForValue)

public AddLocalInventoriesRequest.Builder setAddMask(FieldMask.Builder builderForValue)

Indicates which inventory fields in the provided list of LocalInventory to 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.

.google.protobuf.FieldMask add_mask = 4;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

setAddTime(Timestamp value)

public AddLocalInventoriesRequest.Builder setAddTime(Timestamp value)

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.

.google.protobuf.Timestamp add_time = 5;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

setAddTime(Timestamp.Builder builderForValue)

public AddLocalInventoriesRequest.Builder setAddTime(Timestamp.Builder builderForValue)

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.

.google.protobuf.Timestamp add_time = 5;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

setAllowMissing(boolean value)

public AddLocalInventoriesRequest.Builder setAllowMissing(boolean value)

If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.

bool allow_missing = 6;

Parameter
NameDescription
valueboolean

The allowMissing to set.

Returns
TypeDescription
AddLocalInventoriesRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AddLocalInventoriesRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides

setLocalInventories(int index, LocalInventory value)

public AddLocalInventoriesRequest.Builder setLocalInventories(int index, LocalInventory value)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
valueLocalInventory
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

setLocalInventories(int index, LocalInventory.Builder builderForValue)

public AddLocalInventoriesRequest.Builder setLocalInventories(int index, LocalInventory.Builder builderForValue)

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.

repeated .google.cloud.retail.v2.LocalInventory local_inventories = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint
builderForValueLocalInventory.Builder
Returns
TypeDescription
AddLocalInventoriesRequest.Builder

setProduct(String value)

public AddLocalInventoriesRequest.Builder setProduct(String value)

Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.

If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

string product = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The product to set.

Returns
TypeDescription
AddLocalInventoriesRequest.Builder

This builder for chaining.

setProductBytes(ByteString value)

public AddLocalInventoriesRequest.Builder setProductBytes(ByteString value)

Required. Full resource name of Product, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id.

If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

string product = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for product to set.

Returns
TypeDescription
AddLocalInventoriesRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AddLocalInventoriesRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AddLocalInventoriesRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AddLocalInventoriesRequest.Builder
Overrides