google-apis-retail_v2alpha 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9321feea3ac3678091dc4f57385b0a7bb13be984dd8db5e63acc9e14f182a7a4
4
- data.tar.gz: 4b08a3e9c835e3e13b2ce8cf69249198c606304b191e521983b17d4bd0924c49
3
+ metadata.gz: c73d8cd80dd129bd29b3ef560fee850ecb2c4ede024d6522ef1280a5a8a8f796
4
+ data.tar.gz: 3bd3a36842da663394e8f9400c664aba3a2f7e453c4e9c4dde4b12ae710bb9c6
5
5
  SHA512:
6
- metadata.gz: 753b6609d7dc329403cd8e0e90497382989d89cfcab43ac7ed0f327bfeda80d172cb2cd584c94ed25d0c401bfb1f356d2c44417d0d1039ccf45c4af7989c456a
7
- data.tar.gz: c5d177645a23d928706e6aac85e755a9de4c4f35f604a63ad32f0569f189e4fdb98cb6d415efaed3456ce3098f0680219cd4326ed692a4d2e6073112c2a60709
6
+ metadata.gz: d9666df79784271cd7abda394c85937b3e1490f5155f5040026d38492ea4c0369d35e849cad4cb32325fe923f8b72bc3c96e1393a43c309814c1f4533a4ba5fd
7
+ data.tar.gz: b68de91975b8a6b89a2547027009764311eb60a6c3acbd3563f6e3aefafc3b12a0aa8aa87b79a9ae533a5a5a5a578362fc8dbad48f809ec665ab1cefca8911fa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-retail_v2alpha
2
2
 
3
+ ### v0.23.0 (2021-12-09)
4
+
5
+ * Regenerated from discovery document revision 20211203
6
+
3
7
  ### v0.22.0 (2021-11-17)
4
8
 
5
9
  * Regenerated from discovery document revision 20211116
@@ -751,7 +751,7 @@ module Google
751
751
  alias_method :allow_missing?, :allow_missing
752
752
 
753
753
  # Required. A list of inventory information at difference places. Each place is
754
- # identified by its place ID. At most 1000 inventories are allowed per request.
754
+ # identified by its place ID. At most 3000 inventories are allowed per request.
755
755
  # Corresponds to the JSON property `localInventories`
756
756
  # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLocalInventory>]
757
757
  attr_accessor :local_inventories
@@ -1122,9 +1122,8 @@ module Google
1122
1122
  alias_method :indexable?, :indexable
1123
1123
 
1124
1124
  # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when
1125
- # the key is "lengths_cm". At most 400 values are allowed.Otherwise, an
1126
- # INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be
1127
- # set. Otherwise, an INVALID_ARGUMENT error is returned.
1125
+ # the key is "lengths_cm". Exactly one of text or numbers should be set.
1126
+ # Otherwise, an INVALID_ARGUMENT error is returned.
1128
1127
  # Corresponds to the JSON property `numbers`
1129
1128
  # @return [Array<Float>]
1130
1129
  attr_accessor :numbers
@@ -1138,11 +1137,8 @@ module Google
1138
1137
  alias_method :searchable?, :searchable
1139
1138
 
1140
1139
  # The textual values of this custom attribute. For example, `["yellow", "green"]`
1141
- # when the key is "color". At most 400 values are allowed. Empty values are not
1142
- # allowed. Each value must be a UTF-8 encoded string with a length limit of 256
1143
- # characters. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of
1144
- # text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is
1145
- # returned.
1140
+ # when the key is "color". Exactly one of text or numbers should be set.
1141
+ # Otherwise, an INVALID_ARGUMENT error is returned.
1146
1142
  # Corresponds to the JSON property `text`
1147
1143
  # @return [Array<String>]
1148
1144
  attr_accessor :text
@@ -1777,13 +1773,15 @@ module Google
1777
1773
  include Google::Apis::Core::Hashable
1778
1774
 
1779
1775
  # Additional local inventory attributes, for example, store name, promotion tags,
1780
- # etc. * At most 5 values are allowed. Otherwise, an INVALID_ARGUMENT error is
1781
- # returned. * The key must be a UTF-8 encoded string with a length limit of 10
1782
- # characters. * The key must match the pattern: `a-zA-Z0-9*`. For example,
1783
- # key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same
1784
- # type (text or number). * The max number of values per attribute is 10. * For
1785
- # text values, the length limit is 10 UTF-8 characters. * The attribute does not
1786
- # support search. The `searchable` field should be unset or set to false.
1776
+ # etc. This field needs to pass all below criteria, otherwise an
1777
+ # INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The
1778
+ # key must be a UTF-8 encoded string with a length limit of 32 characters. * The
1779
+ # key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or
1780
+ # KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or
1781
+ # number). * The max number of values per attribute is 10. * For text values,
1782
+ # the length limit is 64 UTF-8 characters. * The attribute does not support
1783
+ # search. The `searchable` field should be unset or set to false. * The max
1784
+ # summed total bytes of custom attribute keys and values per product is 5MiB.
1787
1785
  # Corresponds to the JSON property `attributes`
1788
1786
  # @return [Hash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>]
1789
1787
  attr_accessor :attributes
@@ -1834,6 +1832,14 @@ module Google
1834
1832
  # @return [Array<String>]
1835
1833
  attr_accessor :destinations
1836
1834
 
1835
+ # Language of the title/description and other string attributes. Use language
1836
+ # tags defined by BCP 47. ISO 639-1. This specifies the language of offers in
1837
+ # Merchant Center that will be accepted. If empty no language filtering will be
1838
+ # performed.
1839
+ # Corresponds to the JSON property `languageCode`
1840
+ # @return [String]
1841
+ attr_accessor :language_code
1842
+
1837
1843
  # Required. The linked [Merchant center account id](https://developers.google.
1838
1844
  # com/shopping-content/guides/accountstatuses). The account must be a standalone
1839
1845
  # account or a sub-account of a MCA.
@@ -1841,6 +1847,14 @@ module Google
1841
1847
  # @return [Fixnum]
1842
1848
  attr_accessor :merchant_center_account_id
1843
1849
 
1850
+ # Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code.
1851
+ # List of values can be found here under the `region` tag. [https://www.iana.org/
1852
+ # assignments/language-subtag-registry/language-subtag-registry]. If left blank
1853
+ # no region filtering will be performed. Ex. `US`.
1854
+ # Corresponds to the JSON property `regionCode`
1855
+ # @return [String]
1856
+ attr_accessor :region_code
1857
+
1844
1858
  def initialize(**args)
1845
1859
  update!(**args)
1846
1860
  end
@@ -1849,7 +1863,9 @@ module Google
1849
1863
  def update!(**args)
1850
1864
  @branch_id = args[:branch_id] if args.key?(:branch_id)
1851
1865
  @destinations = args[:destinations] if args.key?(:destinations)
1866
+ @language_code = args[:language_code] if args.key?(:language_code)
1852
1867
  @merchant_center_account_id = args[:merchant_center_account_id] if args.key?(:merchant_center_account_id)
1868
+ @region_code = args[:region_code] if args.key?(:region_code)
1853
1869
  end
1854
1870
  end
1855
1871
 
@@ -2161,7 +2177,10 @@ module Google
2161
2177
  # INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must
2162
2178
  # be a UTF-8 encoded string with a length limit of 128 characters. * For
2163
2179
  # indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example,
2164
- # key0LikeThis or KEY_1_LIKE_THIS.
2180
+ # `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400
2181
+ # values are allowed. Empty values are not allowed. Each value must be a UTF-8
2182
+ # encoded string with a length limit of 256 characters. * For number attributes,
2183
+ # at most 400 values are allowed.
2165
2184
  # Corresponds to the JSON property `attributes`
2166
2185
  # @return [Hash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>]
2167
2186
  attr_accessor :attributes
@@ -2172,9 +2191,9 @@ module Google
2172
2191
  attr_accessor :audience
2173
2192
 
2174
2193
  # The online availability of the Product. Default to Availability.IN_STOCK.
2175
- # Google Merchant Center Property [availability](https://support.google.com/
2176
- # merchants/answer/6324448). Schema.org Property [Offer.availability](https://
2177
- # schema.org/availability).
2194
+ # Corresponding properties: Google Merchant Center property [availability](https:
2195
+ # //support.google.com/merchants/answer/6324448). Schema.org property [Offer.
2196
+ # availability](https://schema.org/availability).
2178
2197
  # Corresponds to the JSON property `availability`
2179
2198
  # @return [String]
2180
2199
  attr_accessor :availability
@@ -2191,9 +2210,9 @@ module Google
2191
2210
 
2192
2211
  # The brands of the product. A maximum of 30 brands are allowed. Each brand must
2193
2212
  # be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise,
2194
- # an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](
2195
- # https://support.google.com/merchants/answer/6324351). Schema.org property [
2196
- # Product.brand](https://schema.org/brand).
2213
+ # an INVALID_ARGUMENT error is returned. Corresponding properties: Google
2214
+ # Merchant Center property [brand](https://support.google.com/merchants/answer/
2215
+ # 6324351). Schema.org property [Product.brand](https://schema.org/brand).
2197
2216
  # Corresponds to the JSON property `brands`
2198
2217
  # @return [Array<String>]
2199
2218
  attr_accessor :brands
@@ -2210,10 +2229,10 @@ module Google
2210
2229
  # INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product.
2211
2230
  # Empty values are not allowed. Each value must be a UTF-8 encoded string with
2212
2231
  # a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
2213
- # returned. Google Merchant Center property google_product_category. Schema.org
2214
- # property [Product.category] (https://schema.org/category). [
2215
- # mc_google_product_category]: https://support.google.com/merchants/answer/
2216
- # 6324436
2232
+ # returned. Corresponding properties: Google Merchant Center property
2233
+ # google_product_category. Schema.org property [Product.category] (https://
2234
+ # schema.org/category). [mc_google_product_category]: https://support.google.com/
2235
+ # merchants/answer/6324436
2217
2236
  # Corresponds to the JSON property `categories`
2218
2237
  # @return [Array<String>]
2219
2238
  attr_accessor :categories
@@ -2233,19 +2252,19 @@ module Google
2233
2252
  # The condition of the product. Strongly encouraged to use the standard values: "
2234
2253
  # new", "refurbished", "used". A maximum of 5 values are allowed per Product.
2235
2254
  # Each value must be a UTF-8 encoded string with a length limit of 128
2236
- # characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant
2237
- # Center property [condition](https://support.google.com/merchants/answer/
2238
- # 6324469). Schema.org property [Offer.itemCondition](https://schema.org/
2239
- # itemCondition).
2255
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding
2256
+ # properties: Google Merchant Center property [condition](https://support.google.
2257
+ # com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https:
2258
+ # //schema.org/itemCondition).
2240
2259
  # Corresponds to the JSON property `conditions`
2241
2260
  # @return [Array<String>]
2242
2261
  attr_accessor :conditions
2243
2262
 
2244
2263
  # Product description. This field must be a UTF-8 encoded string with a length
2245
2264
  # limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
2246
- # Google Merchant Center property [description](https://support.google.com/
2247
- # merchants/answer/6324468). schema.org property [Product.description](https://
2248
- # schema.org/description).
2265
+ # Corresponding properties: Google Merchant Center property [description](https:/
2266
+ # /support.google.com/merchants/answer/6324468). Schema.org property [Product.
2267
+ # description](https://schema.org/description).
2249
2268
  # Corresponds to the JSON property `description`
2250
2269
  # @return [String]
2251
2270
  attr_accessor :description
@@ -2255,8 +2274,8 @@ module Google
2255
2274
  # expire_time. However, the product can still be retrieved by ProductService.
2256
2275
  # GetProduct and ProductService.ListProducts. expire_time must be later than
2257
2276
  # available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown.
2258
- # Google Merchant Center property [expiration_date](https://support.google.com/
2259
- # merchants/answer/6324499).
2277
+ # Corresponding properties: Google Merchant Center property [expiration_date](
2278
+ # https://support.google.com/merchants/answer/6324499).
2260
2279
  # Corresponds to the JSON property `expireTime`
2261
2280
  # @return [String]
2262
2281
  attr_accessor :expire_time
@@ -2271,12 +2290,13 @@ module Google
2271
2290
  # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8
2272
2291
  # encoded string with a length limit of 128 characters. Otherwise, an
2273
2292
  # INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise,
2274
- # an INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](
2275
- # https://support.google.com/merchants/answer/6324461). Schema.org property [
2276
- # Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/
2277
- # gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](
2278
- # https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If
2279
- # the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
2293
+ # an INVALID_ARGUMENT error is returned. Corresponding properties: Google
2294
+ # Merchant Center property [gtin](https://support.google.com/merchants/answer/
2295
+ # 6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [
2296
+ # Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/
2297
+ # gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](
2298
+ # https://schema.org/gtin14). If the value is not a valid GTIN, an
2299
+ # INVALID_ARGUMENT error is returned.
2280
2300
  # Corresponds to the JSON property `gtin`
2281
2301
  # @return [String]
2282
2302
  attr_accessor :gtin
@@ -2285,27 +2305,28 @@ module Google
2285
2305
  # example, this field is "id_1", if name is `projects/*/locations/global/
2286
2306
  # catalogs/default_catalog/branches/default_branch/products/id_1`. This field
2287
2307
  # must be a UTF-8 encoded string with a length limit of 128 characters.
2288
- # Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center
2289
- # property [id](https://support.google.com/merchants/answer/6324405). Schema.org
2290
- # Property [Product.sku](https://schema.org/sku).
2308
+ # Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties:
2309
+ # Google Merchant Center property [id](https://support.google.com/merchants/
2310
+ # answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
2291
2311
  # Corresponds to the JSON property `id`
2292
2312
  # @return [String]
2293
2313
  attr_accessor :id
2294
2314
 
2295
2315
  # Product images for the product.Highly recommended to put the main image to the
2296
- # first. A maximum of 300 images are allowed. Google Merchant Center property [
2297
- # image_link](https://support.google.com/merchants/answer/6324350). Schema.org
2298
- # property [Product.image](https://schema.org/image).
2316
+ # first. A maximum of 300 images are allowed. Corresponding properties: Google
2317
+ # Merchant Center property [image_link](https://support.google.com/merchants/
2318
+ # answer/6324350). Schema.org property [Product.image](https://schema.org/image).
2299
2319
  # Corresponds to the JSON property `images`
2300
2320
  # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImage>]
2301
2321
  attr_accessor :images
2302
2322
 
2303
2323
  # Language of the title/description and other string attributes. Use language
2304
- # tags defined by BCP 47. For product prediction, this field is ignored and the
2305
- # model automatically detects the text language. The Product can include text in
2306
- # different languages, but duplicating Products to provide text in multiple
2307
- # languages can result in degraded model performance. For product search this
2308
- # field is in use. It defaults to "en-US" if unset.
2324
+ # tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For
2325
+ # product prediction, this field is ignored and the model automatically detects
2326
+ # the text language. The Product can include text in different languages, but
2327
+ # duplicating Products to provide text in multiple languages can result in
2328
+ # degraded model performance. For product search this field is in use. It
2329
+ # defaults to "en-US" if unset.
2309
2330
  # Corresponds to the JSON property `languageCode`
2310
2331
  # @return [String]
2311
2332
  attr_accessor :language_code
@@ -2313,9 +2334,9 @@ module Google
2313
2334
  # The material of the product. For example, "leather", "wooden". A maximum of 20
2314
2335
  # values are allowed. Each value must be a UTF-8 encoded string with a length
2315
2336
  # limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
2316
- # Google Merchant Center property [material](https://support.google.com/
2317
- # merchants/answer/6324410). Schema.org property [Product.material](https://
2318
- # schema.org/material).
2337
+ # Corresponding properties: Google Merchant Center property [material](https://
2338
+ # support.google.com/merchants/answer/6324410). Schema.org property [Product.
2339
+ # material](https://schema.org/material).
2319
2340
  # Corresponds to the JSON property `materials`
2320
2341
  # @return [Array<String>]
2321
2342
  attr_accessor :materials
@@ -2329,9 +2350,10 @@ module Google
2329
2350
  # The pattern or graphic print of the product. For example, "striped", "polka
2330
2351
  # dot", "paisley". A maximum of 20 values are allowed per Product. Each value
2331
2352
  # must be a UTF-8 encoded string with a length limit of 128 characters.
2332
- # Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center
2333
- # property [pattern](https://support.google.com/merchants/answer/6324483).
2334
- # Schema.org property [Product.pattern](https://schema.org/pattern).
2353
+ # Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties:
2354
+ # Google Merchant Center property [pattern](https://support.google.com/merchants/
2355
+ # answer/6324483). Schema.org property [Product.pattern](https://schema.org/
2356
+ # pattern).
2335
2357
  # Corresponds to the JSON property `patterns`
2336
2358
  # @return [Array<String>]
2337
2359
  attr_accessor :patterns
@@ -2346,10 +2368,9 @@ module Google
2346
2368
  # can only be empty or set to the same value as id. For VARIANT Products, this
2347
2369
  # field cannot be empty. A maximum of 2,000 products are allowed to share the
2348
2370
  # same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned.
2349
- # Google Merchant Center Property [item_group_id](https://support.google.com/
2350
- # merchants/answer/6324507). Schema.org Property [Product.inProductGroupWithID](
2351
- # https://schema.org/inProductGroupWithID). This field must be enabled before it
2352
- # can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id).
2371
+ # Corresponding properties: Google Merchant Center property [item_group_id](
2372
+ # https://support.google.com/merchants/answer/6324507). Schema.org property [
2373
+ # Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
2353
2374
  # Corresponds to the JSON property `primaryProductId`
2354
2375
  # @return [String]
2355
2376
  attr_accessor :primary_product_id
@@ -2398,10 +2419,11 @@ module Google
2398
2419
  # system and size type are empty, while size value is "32 inches". A maximum of
2399
2420
  # 20 values are allowed per Product. Each value must be a UTF-8 encoded string
2400
2421
  # with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is
2401
- # returned. Google Merchant Center property [size](https://support.google.com/
2402
- # merchants/answer/6324492), [size_type](https://support.google.com/merchants/
2403
- # answer/6324497) and [size_system](https://support.google.com/merchants/answer/
2404
- # 6324502). Schema.org property [Product.size](https://schema.org/size).
2422
+ # returned. Corresponding properties: Google Merchant Center property [size](
2423
+ # https://support.google.com/merchants/answer/6324492), [size_type](https://
2424
+ # support.google.com/merchants/answer/6324497), and [size_system](https://
2425
+ # support.google.com/merchants/answer/6324502). Schema.org property [Product.
2426
+ # size](https://schema.org/size).
2405
2427
  # Corresponds to the JSON property `sizes`
2406
2428
  # @return [Array<String>]
2407
2429
  attr_accessor :sizes
@@ -2410,17 +2432,18 @@ module Google
2410
2432
  # Product. This value must be a UTF-8 encoded string with a length limit of 1,
2411
2433
  # 000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can
2412
2434
  # be used for filtering recommendation results by passing the tag as part of the
2413
- # PredictRequest.filter. Google Merchant Center property [custom_label_0–4](
2414
- # https://support.google.com/merchants/answer/6324473).
2435
+ # PredictRequest.filter. Corresponding properties: Google Merchant Center
2436
+ # property [custom_label_0–4](https://support.google.com/merchants/answer/
2437
+ # 6324473).
2415
2438
  # Corresponds to the JSON property `tags`
2416
2439
  # @return [Array<String>]
2417
2440
  attr_accessor :tags
2418
2441
 
2419
2442
  # Required. Product title. This field must be a UTF-8 encoded string with a
2420
2443
  # length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is
2421
- # returned. Google Merchant Center property [title](https://support.google.com/
2422
- # merchants/answer/6324415). Schema.org property [Product.name](https://schema.
2423
- # org/name).
2444
+ # returned. Corresponding properties: Google Merchant Center property [title](
2445
+ # https://support.google.com/merchants/answer/6324415). Schema.org property [
2446
+ # Product.name](https://schema.org/name).
2424
2447
  # Corresponds to the JSON property `title`
2425
2448
  # @return [String]
2426
2449
  attr_accessor :title
@@ -2446,9 +2469,9 @@ module Google
2446
2469
  # recommended to provide a valid uri for the product, otherwise the service
2447
2470
  # performance could be significantly degraded. This field must be a UTF-8
2448
2471
  # encoded string with a length limit of 5,000 characters. Otherwise, an
2449
- # INVALID_ARGUMENT error is returned. Google Merchant Center property [link](
2450
- # https://support.google.com/merchants/answer/6324416). Schema.org property [
2451
- # Offer.url](https://schema.org/url).
2472
+ # INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant
2473
+ # Center property [link](https://support.google.com/merchants/answer/6324416).
2474
+ # Schema.org property [Offer.url](https://schema.org/url).
2452
2475
  # Corresponds to the JSON property `uri`
2453
2476
  # @return [String]
2454
2477
  attr_accessor :uri
@@ -2974,7 +2997,7 @@ module Google
2974
2997
  attr_accessor :allow_missing
2975
2998
  alias_method :allow_missing?, :allow_missing
2976
2999
 
2977
- # Required. A list of place IDs to have their inventory deleted. At most 1000
3000
+ # Required. A list of place IDs to have their inventory deleted. At most 3000
2978
3001
  # place IDs are allowed per request.
2979
3002
  # Corresponds to the JSON property `placeIds`
2980
3003
  # @return [Array<String>]
@@ -3133,25 +3156,26 @@ module Google
3133
3156
  # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserInfo]
3134
3157
  attr_accessor :user_info
3135
3158
 
3136
- # The keys to fetch and rollup the matching variant Products attributes. The
3137
- # attributes from all the matching variant Products are merged and de-duplicated.
3138
- # Notice that rollup variant Products attributes will lead to extra query
3139
- # latency. Maximum number of keys is 10. For FulfillmentInfo, a fulfillment type
3140
- # and a fulfillment ID must be provided in the format of "fulfillmentType.
3141
- # fulfillmentId". E.g., in "pickupInStore.store123", "pickupInStore" is
3142
- # fulfillment type and "store123" is the store ID. Supported keys are: *
3143
- # colorFamilies * price * originalPrice * discount * inventory(place_id,price) *
3144
- # inventory(place_id,attributes.key), where key is any key in the Product.
3145
- # inventories.attributes map. * attributes.key, where key is any key in the
3146
- # Product.attributes map. * pickupInStore.id, where id is any FulfillmentInfo.
3147
- # place_ids for FulfillmentInfo.type "pickup-in-store". * shipToStore.id, where
3148
- # id is any FulfillmentInfo.place_ids for FulfillmentInfo.type "ship-to-store". *
3149
- # sameDayDelivery.id, where id is any FulfillmentInfo.place_ids for
3150
- # FulfillmentInfo.type "same-day-delivery". * nextDayDelivery.id, where id is
3151
- # any FulfillmentInfo.place_ids for FulfillmentInfo.type "next-day-delivery". *
3152
- # customFulfillment1.id, where id is any FulfillmentInfo.place_ids for
3153
- # FulfillmentInfo.type "custom-type-1". * customFulfillment2.id, where id is any
3154
- # FulfillmentInfo.place_ids for FulfillmentInfo.type "custom-type-2". *
3159
+ # The keys to fetch and rollup the matching variant Products attributes,
3160
+ # FulfillmentInfo or LocalInventorys attributes. The attributes from all the
3161
+ # matching variant Products or LocalInventorys are merged and de-duplicated.
3162
+ # Notice that rollup attributes will lead to extra query latency. Maximum number
3163
+ # of keys is 30. For FulfillmentInfo, a fulfillment type and a fulfillment ID
3164
+ # must be provided in the format of "fulfillmentType.fulfillmentId". E.g., in "
3165
+ # pickupInStore.store123", "pickupInStore" is fulfillment type and "store123" is
3166
+ # the store ID. Supported keys are: * colorFamilies * price * originalPrice *
3167
+ # discount * variantId * inventory(place_id,price) * inventory(place_id,
3168
+ # original_price) * inventory(place_id,attributes.key), where key is any key in
3169
+ # the Product.inventories.attributes map. * attributes.key, where key is any key
3170
+ # in the Product.attributes map. * pickupInStore.id, where id is any
3171
+ # FulfillmentInfo.place_ids for FulfillmentInfo.type "pickup-in-store". *
3172
+ # shipToStore.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.
3173
+ # type "ship-to-store". * sameDayDelivery.id, where id is any FulfillmentInfo.
3174
+ # place_ids for FulfillmentInfo.type "same-day-delivery". * nextDayDelivery.id,
3175
+ # where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type "next-day-
3176
+ # delivery". * customFulfillment1.id, where id is any FulfillmentInfo.place_ids
3177
+ # for FulfillmentInfo.type "custom-type-1". * customFulfillment2.id, where id is
3178
+ # any FulfillmentInfo.place_ids for FulfillmentInfo.type "custom-type-2". *
3155
3179
  # customFulfillment3.id, where id is any FulfillmentInfo.place_ids for
3156
3180
  # FulfillmentInfo.type "custom-type-3". * customFulfillment4.id, where id is any
3157
3181
  # FulfillmentInfo.place_ids for FulfillmentInfo.type "custom-type-4". *
@@ -3372,8 +3396,8 @@ module Google
3372
3396
  # customFulfillment1" * "customFulfillment2" * "customFulfillment3" * "
3373
3397
  # customFulfillment4" * "customFulfillment5" * "inventory(place_id,attributes.
3374
3398
  # key)" * numerical_field = * "price" * "discount" * "rating" * "ratingCount" * "
3375
- # attributes.key" * "inventory(place_id,price)" * "inventory(place_id,attributes.
3376
- # key)"
3399
+ # attributes.key" * "inventory(place_id,price)" * "inventory(place_id,
3400
+ # original_price)" * "inventory(place_id,attributes.key)"
3377
3401
  # Corresponds to the JSON property `key`
3378
3402
  # @return [String]
3379
3403
  attr_accessor :key
@@ -3472,6 +3496,12 @@ module Google
3472
3496
  class GoogleCloudRetailV2alphaSearchResponse
3473
3497
  include Google::Apis::Core::Hashable
3474
3498
 
3499
+ # The fully qualified resource name of applied [controls](https://cloud.google.
3500
+ # com/retail/docs/serving-control-rules).
3501
+ # Corresponds to the JSON property `appliedControls`
3502
+ # @return [Array<String>]
3503
+ attr_accessor :applied_controls
3504
+
3475
3505
  # A unique search token. This should be included in the UserEvent logs resulting
3476
3506
  # from this search, which enables accurate attribution of search model
3477
3507
  # performance.
@@ -3526,6 +3556,7 @@ module Google
3526
3556
 
3527
3557
  # Update properties of this object
3528
3558
  def update!(**args)
3559
+ @applied_controls = args[:applied_controls] if args.key?(:applied_controls)
3529
3560
  @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
3530
3561
  @corrected_query = args[:corrected_query] if args.key?(:corrected_query)
3531
3562
  @facets = args[:facets] if args.key?(:facets)
@@ -3793,17 +3824,90 @@ module Google
3793
3824
  end
3794
3825
  end
3795
3826
 
3827
+ # Metadata related to the progress of the SetLocalInventories operation.
3828
+ # Currently empty because there is no meaningful metadata populated from the
3829
+ # SetLocalInventories method.
3830
+ class GoogleCloudRetailV2alphaSetLocalInventoriesMetadata
3831
+ include Google::Apis::Core::Hashable
3832
+
3833
+ def initialize(**args)
3834
+ update!(**args)
3835
+ end
3836
+
3837
+ # Update properties of this object
3838
+ def update!(**args)
3839
+ end
3840
+ end
3841
+
3842
+ # Request message for SetLocalInventories method.
3843
+ class GoogleCloudRetailV2alphaSetLocalInventoriesRequest
3844
+ include Google::Apis::Core::Hashable
3845
+
3846
+ # If set to true, and the Product is not found, the local inventory will still
3847
+ # be processed and retained for at most 1 day and processed once the Product is
3848
+ # created. If set to false, a NOT_FOUND error is returned if the Product is not
3849
+ # found.
3850
+ # Corresponds to the JSON property `allowMissing`
3851
+ # @return [Boolean]
3852
+ attr_accessor :allow_missing
3853
+ alias_method :allow_missing?, :allow_missing
3854
+
3855
+ # A list of inventory information at difference places. Each place is identified
3856
+ # by its place ID. For example, if `place1` and `place2` are stored, and this
3857
+ # list is `[place1, place3]` with a fresher set timestamp, then the stored
3858
+ # places will become `place1` and `place3`. An empty list removes all existing
3859
+ # places with staler fields. At most 3000 inventories are allowed per request.
3860
+ # Corresponds to the JSON property `localInventories`
3861
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLocalInventory>]
3862
+ attr_accessor :local_inventories
3863
+
3864
+ # The time when the inventory updates are issued. Used to prevent out-of-order
3865
+ # updates on local inventory fields. If not provided, the internal system time
3866
+ # will be used.
3867
+ # Corresponds to the JSON property `setTime`
3868
+ # @return [String]
3869
+ attr_accessor :set_time
3870
+
3871
+ def initialize(**args)
3872
+ update!(**args)
3873
+ end
3874
+
3875
+ # Update properties of this object
3876
+ def update!(**args)
3877
+ @allow_missing = args[:allow_missing] if args.key?(:allow_missing)
3878
+ @local_inventories = args[:local_inventories] if args.key?(:local_inventories)
3879
+ @set_time = args[:set_time] if args.key?(:set_time)
3880
+ end
3881
+ end
3882
+
3883
+ # Response of the SetLocalInventories API. Currently empty because there is no
3884
+ # meaningful response populated from the SetLocalInventories method.
3885
+ class GoogleCloudRetailV2alphaSetLocalInventoriesResponse
3886
+ include Google::Apis::Core::Hashable
3887
+
3888
+ def initialize(**args)
3889
+ update!(**args)
3890
+ end
3891
+
3892
+ # Update properties of this object
3893
+ def update!(**args)
3894
+ end
3895
+ end
3896
+
3796
3897
  # UserEvent captures all metadata information Retail API needs to know about how
3797
3898
  # end users interact with customers' website.
3798
3899
  class GoogleCloudRetailV2alphaUserEvent
3799
3900
  include Google::Apis::Core::Hashable
3800
3901
 
3801
- # Extra user event features to include in the recommendation model. The key must
3802
- # be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise,
3803
- # an INVALID_ARGUMENT error is returned. For product recommendation, an example
3804
- # of extra user information is traffic_channel, i.e. how user arrives at the
3805
- # site. Users can arrive at the site by coming to the site directly, or coming
3806
- # through Google search, and etc.
3902
+ # Extra user event features to include in the recommendation model. This field
3903
+ # needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is
3904
+ # returned: * The key must be a UTF-8 encoded string with a length limit of 5,
3905
+ # 000 characters. * For text attributes, at most 400 values are allowed. Empty
3906
+ # values are not allowed. Each value must be a UTF-8 encoded string with a
3907
+ # length limit of 256 characters. * For number attributes, at most 400 values
3908
+ # are allowed. For product recommendation, an example of extra user information
3909
+ # is traffic_channel, i.e. how user arrives at the site. Users can arrive at the
3910
+ # site by coming to the site directly, or coming through Google search, and etc.
3807
3911
  # Corresponds to the JSON property `attributes`
3808
3912
  # @return [Hash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>]
3809
3913
  attr_accessor :attributes
@@ -3845,12 +3949,11 @@ module Google
3845
3949
 
3846
3950
  # Required. User event type. Allowed values are: * `add-to-cart`: Products being
3847
3951
  # added to cart. * `category-page-view`: Special pages such as sale or promotion
3848
- # pages viewed. * `completion`: Completion query result showed/clicked. * `
3849
- # detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage
3850
- # viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-
3851
- # not-offered`: Promotion is not offered to a user. * `purchase-complete`: User
3852
- # finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`:
3853
- # User viewing a shopping cart.
3952
+ # pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-
3953
+ # view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user.
3954
+ # * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-
3955
+ # complete`: User finishing a purchase. * `search`: Product search. * `shopping-
3956
+ # cart-page-view`: User viewing a shopping cart.
3854
3957
  # Corresponds to the JSON property `eventType`
3855
3958
  # @return [String]
3856
3959
  attr_accessor :event_type
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module RetailV2alpha
18
18
  # Version of the google-apis-retail_v2alpha gem
19
- GEM_VERSION = "0.22.0"
19
+ GEM_VERSION = "0.23.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.4.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20211116"
25
+ REVISION = "20211203"
26
26
  end
27
27
  end
28
28
  end
@@ -634,6 +634,24 @@ module Google
634
634
  include Google::Apis::Core::JsonObjectSupport
635
635
  end
636
636
 
637
+ class GoogleCloudRetailV2alphaSetLocalInventoriesMetadata
638
+ class Representation < Google::Apis::Core::JsonRepresentation; end
639
+
640
+ include Google::Apis::Core::JsonObjectSupport
641
+ end
642
+
643
+ class GoogleCloudRetailV2alphaSetLocalInventoriesRequest
644
+ class Representation < Google::Apis::Core::JsonRepresentation; end
645
+
646
+ include Google::Apis::Core::JsonObjectSupport
647
+ end
648
+
649
+ class GoogleCloudRetailV2alphaSetLocalInventoriesResponse
650
+ class Representation < Google::Apis::Core::JsonRepresentation; end
651
+
652
+ include Google::Apis::Core::JsonObjectSupport
653
+ end
654
+
637
655
  class GoogleCloudRetailV2alphaUserEvent
638
656
  class Representation < Google::Apis::Core::JsonRepresentation; end
639
657
 
@@ -1338,7 +1356,9 @@ module Google
1338
1356
  class Representation < Google::Apis::Core::JsonRepresentation
1339
1357
  property :branch_id, as: 'branchId'
1340
1358
  collection :destinations, as: 'destinations'
1359
+ property :language_code, as: 'languageCode'
1341
1360
  property :merchant_center_account_id, :numeric_string => true, as: 'merchantCenterAccountId'
1361
+ property :region_code, as: 'regionCode'
1342
1362
  end
1343
1363
  end
1344
1364
 
@@ -1691,6 +1711,7 @@ module Google
1691
1711
  class GoogleCloudRetailV2alphaSearchResponse
1692
1712
  # @private
1693
1713
  class Representation < Google::Apis::Core::JsonRepresentation
1714
+ collection :applied_controls, as: 'appliedControls'
1694
1715
  property :attribution_token, as: 'attributionToken'
1695
1716
  property :corrected_query, as: 'correctedQuery'
1696
1717
  collection :facets, as: 'facets', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseFacet, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseFacet::Representation
@@ -1776,6 +1797,28 @@ module Google
1776
1797
  end
1777
1798
  end
1778
1799
 
1800
+ class GoogleCloudRetailV2alphaSetLocalInventoriesMetadata
1801
+ # @private
1802
+ class Representation < Google::Apis::Core::JsonRepresentation
1803
+ end
1804
+ end
1805
+
1806
+ class GoogleCloudRetailV2alphaSetLocalInventoriesRequest
1807
+ # @private
1808
+ class Representation < Google::Apis::Core::JsonRepresentation
1809
+ property :allow_missing, as: 'allowMissing'
1810
+ collection :local_inventories, as: 'localInventories', class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLocalInventory, decorator: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaLocalInventory::Representation
1811
+
1812
+ property :set_time, as: 'setTime'
1813
+ end
1814
+ end
1815
+
1816
+ class GoogleCloudRetailV2alphaSetLocalInventoriesResponse
1817
+ # @private
1818
+ class Representation < Google::Apis::Core::JsonRepresentation
1819
+ end
1820
+ end
1821
+
1779
1822
  class GoogleCloudRetailV2alphaUserEvent
1780
1823
  # @private
1781
1824
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -373,7 +373,7 @@ module Google
373
373
  # inventory information. If the request is valid, the update will be enqueued
374
374
  # and processed downstream. As a consequence, when a response is returned,
375
375
  # updates are not immediately manifested in the Product queried by GetProduct or
376
- # ListProducts. Store inventory information can only be modified using this
376
+ # ListProducts. Local inventory information can only be modified using this
377
377
  # method. CreateProduct and UpdateProduct has no effect on local inventories.
378
378
  # This feature is only available for users who have Retail Search enabled.
379
379
  # Please submit a form [here](https://cloud.google.com/contact) to contact Cloud
@@ -729,7 +729,7 @@ module Google
729
729
  # removal timestamp. This process is asynchronous. If the request is valid, the
730
730
  # removal will be enqueued and processed downstream. As a consequence, when a
731
731
  # response is returned, removals are not immediately manifested in the Product
732
- # queried by GetProduct or ListProducts. Store inventory information can only be
732
+ # queried by GetProduct or ListProducts. Local inventory information can only be
733
733
  # removed using this method. CreateProduct and UpdateProduct has no effect on
734
734
  # local inventories. This feature is only available for users who have Retail
735
735
  # Search enabled. Please submit a form [here](https://cloud.google.com/contact)
@@ -821,6 +821,59 @@ module Google
821
821
  execute_or_queue_command(command, &block)
822
822
  end
823
823
 
824
+ # Set local inventory information for a Product with the provided list of places
825
+ # at a set timestamp. If a place in the provided list does not exist, the place
826
+ # will be created. If a place in the provided list already exists, it will be
827
+ # updated while respecting the last update timestamps of each inventory field.
828
+ # If an existing place is not in the provided list, it will be removed. This
829
+ # process is asynchronous. If the request is valid, the set operation will be
830
+ # enqueued and processed downstream. As a consequence, when a response is
831
+ # returned, set operations are not immediately manifested in the Product queried
832
+ # by GetProduct or ListProducts. When applying the set operation, this process
833
+ # takes a snapshot of currently existing places and their corresponding
834
+ # timestamps to determine the places to update. Avoid concurrent
835
+ # AddLocalInventories and RemoveLocalInventories calls, since they can introduce
836
+ # asynchronous updates that could be missed by the set operation. Local
837
+ # inventory information can only be updated with this method and other local
838
+ # inventory-specific methods. CreateProduct and UpdateProduct has no effect on
839
+ # local inventories. This feature is only available for users who have Retail
840
+ # Search enabled. Please submit a form [here](https://cloud.google.com/contact)
841
+ # to contact Cloud sales if you are interested in using Retail Search.
842
+ # @param [String] product
843
+ # Required. Full resource name of Product, such as `projects/*/locations/global/
844
+ # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
845
+ # the caller does not have permission to access the Product, regardless of
846
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
847
+ # @param [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetLocalInventoriesRequest] google_cloud_retail_v2alpha_set_local_inventories_request_object
848
+ # @param [String] fields
849
+ # Selector specifying which fields to include in a partial response.
850
+ # @param [String] quota_user
851
+ # Available to use for quota purposes for server-side applications. Can be any
852
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
853
+ # @param [Google::Apis::RequestOptions] options
854
+ # Request-specific options
855
+ #
856
+ # @yield [result, err] Result & error if block supplied
857
+ # @yieldparam result [Google::Apis::RetailV2alpha::GoogleLongrunningOperation] parsed result object
858
+ # @yieldparam err [StandardError] error object if request failed
859
+ #
860
+ # @return [Google::Apis::RetailV2alpha::GoogleLongrunningOperation]
861
+ #
862
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
863
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
864
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
865
+ def set_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2alpha_set_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
866
+ command = make_simple_command(:post, 'v2alpha/{+product}:setLocalInventories', options)
867
+ command.request_representation = Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSetLocalInventoriesRequest::Representation
868
+ command.request_object = google_cloud_retail_v2alpha_set_local_inventories_request_object
869
+ command.response_representation = Google::Apis::RetailV2alpha::GoogleLongrunningOperation::Representation
870
+ command.response_class = Google::Apis::RetailV2alpha::GoogleLongrunningOperation
871
+ command.params['product'] = product unless product.nil?
872
+ command.query['fields'] = fields unless fields.nil?
873
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
874
+ execute_or_queue_command(command, &block)
875
+ end
876
+
824
877
  # Bulk import of processed completion dataset. Request processing may be
825
878
  # synchronous. Partial updating is not supported. This feature is only available
826
879
  # for users who have Retail Search enabled. Please submit a form [here](https://
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-retail_v2alpha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-06 00:00:00.000000000 Z
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-retail_v2alpha/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-retail_v2alpha/v0.22.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-retail_v2alpha/v0.23.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-retail_v2alpha
63
63
  post_install_message:
64
64
  rdoc_options: []