class Google::Apis::RetailV2::GoogleCloudRetailV2SetInventoryRequest

Request message for SetInventory method.

Attributes

allow_missing[RW]

If set to true, and the Product with name Product.name is not found, the inventory update will still be processed and retained for at most 1 day until the Product is created. If set to false, an INVALID_ARGUMENT error is returned if the Product is not found. Corresponds to the JSON property `allowMissing` @return [Boolean]

allow_missing?[RW]

If set to true, and the Product with name Product.name is not found, the inventory update will still be processed and retained for at most 1 day until the Product is created. If set to false, an INVALID_ARGUMENT error is returned if the Product is not found. Corresponds to the JSON property `allowMissing` @return [Boolean]

inventory[RW]

Product captures all metadata information of items to be recommended or searched. Corresponds to the JSON property `inventory` @return [Google::Apis::RetailV2::GoogleCloudRetailV2Product]

set_mask[RW]

Indicates which inventory fields in the provided Product to update. If 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. Corresponds to the JSON property `setMask` @return [String]

set_time[RW]

The time when the request is issued, used to prevent out-of-order updates on inventory fields with the last update time recorded. If not provided, the internal system time will be used. Corresponds to the JSON property `setTime` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/retail_v2/classes.rb, line 3042
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/retail_v2/classes.rb, line 3047
def update!(**args)
  @allow_missing = args[:allow_missing] if args.key?(:allow_missing)
  @inventory = args[:inventory] if args.key?(:inventory)
  @set_mask = args[:set_mask] if args.key?(:set_mask)
  @set_time = args[:set_time] if args.key?(:set_time)
end