google-apis-retail_v2 0.31.0 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7026215dee691483ee2220eea2f1b0925c01316973a526ee493dddc65252ccc
4
- data.tar.gz: 2a09466d24ed7c69217c82db15ec62af850dadc841e47b0257fd3a2441da5b66
3
+ metadata.gz: a813962e4570bfe41ed865ea4b7ad39a2947507cee3a4810020185ff1b71ba51
4
+ data.tar.gz: '078ff530d7ab11b7cd3121ae3a6a880047fb98af9c53ecc8e1641d1214ae4f8b'
5
5
  SHA512:
6
- metadata.gz: a648d9b561aa369bb0c0fdc189a64a95df5c205f35d3904e7e3b7c2391782d0b2bf8fdb653eb035b8ea4e066eefa00ab68b97de5f727106b01461275e8066ad8
7
- data.tar.gz: 38c5765a7e13b5ce937559f351409a4e170bd4ed1f47ce29fdedfb25a26b92a5dd3b9a933ab9cb78afff6bd8891e9e6c1eabf60f0051b0ce77a0dc2c69bd2c9e
6
+ metadata.gz: 15cfe72834120580d3152e2d4fa47340b7dbe30b3a41f7c4f179dd1345934e5bf38250600cceaeeb3623d4861c6c6b9ae29b7b11247f2380414b198ee14843df
7
+ data.tar.gz: 228d224d330e862b8bf89f448a61b7be1cb782bbe683a8e35d95a44c8088cd1daa95a9f6fa4fccc826b421e4f26a782ea33a760d8fc50f08cef098395642bf27
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Release history for google-apis-retail_v2
2
2
 
3
+ ### v0.34.0 (2022-04-14)
4
+
5
+ * Regenerated from discovery document revision 20220408
6
+
7
+ ### v0.33.0 (2022-03-31)
8
+
9
+ * Regenerated from discovery document revision 20220324
10
+
11
+ ### v0.32.0 (2022-03-24)
12
+
13
+ * Regenerated from discovery document revision 20220319
14
+
3
15
  ### v0.31.0 (2022-03-16)
4
16
 
5
17
  * Regenerated from discovery document revision 20220310
@@ -364,6 +364,86 @@ module Google
364
364
  end
365
365
  end
366
366
 
367
+ # Metadata related to the progress of the AddLocalInventories operation.
368
+ # Currently empty because there is no meaningful metadata populated from the
369
+ # AddLocalInventories method.
370
+ class GoogleCloudRetailV2AddLocalInventoriesMetadata
371
+ include Google::Apis::Core::Hashable
372
+
373
+ def initialize(**args)
374
+ update!(**args)
375
+ end
376
+
377
+ # Update properties of this object
378
+ def update!(**args)
379
+ end
380
+ end
381
+
382
+ # Request message for AddLocalInventories method.
383
+ class GoogleCloudRetailV2AddLocalInventoriesRequest
384
+ include Google::Apis::Core::Hashable
385
+
386
+ # Indicates which inventory fields in the provided list of LocalInventory to
387
+ # update. The field is updated to the provided value. If a field is set while
388
+ # the place does not have a previous local inventory, the local inventory at
389
+ # that store is created. If a field is set while the value of that field is not
390
+ # provided, the original field value, if it exists, is deleted. If the mask is
391
+ # not set or set with empty paths, all inventory fields will be updated. If an
392
+ # unsupported or unknown field is provided, an INVALID_ARGUMENT error is
393
+ # returned and the entire update will be ignored.
394
+ # Corresponds to the JSON property `addMask`
395
+ # @return [String]
396
+ attr_accessor :add_mask
397
+
398
+ # The time when the inventory updates are issued. Used to prevent out-of-order
399
+ # updates on local inventory fields. If not provided, the internal system time
400
+ # will be used.
401
+ # Corresponds to the JSON property `addTime`
402
+ # @return [String]
403
+ attr_accessor :add_time
404
+
405
+ # If set to true, and the Product is not found, the local inventory will still
406
+ # be processed and retained for at most 1 day and processed once the Product is
407
+ # created. If set to false, a NOT_FOUND error is returned if the Product is not
408
+ # found.
409
+ # Corresponds to the JSON property `allowMissing`
410
+ # @return [Boolean]
411
+ attr_accessor :allow_missing
412
+ alias_method :allow_missing?, :allow_missing
413
+
414
+ # Required. A list of inventory information at difference places. Each place is
415
+ # identified by its place ID. At most 3000 inventories are allowed per request.
416
+ # Corresponds to the JSON property `localInventories`
417
+ # @return [Array<Google::Apis::RetailV2::GoogleCloudRetailV2LocalInventory>]
418
+ attr_accessor :local_inventories
419
+
420
+ def initialize(**args)
421
+ update!(**args)
422
+ end
423
+
424
+ # Update properties of this object
425
+ def update!(**args)
426
+ @add_mask = args[:add_mask] if args.key?(:add_mask)
427
+ @add_time = args[:add_time] if args.key?(:add_time)
428
+ @allow_missing = args[:allow_missing] if args.key?(:allow_missing)
429
+ @local_inventories = args[:local_inventories] if args.key?(:local_inventories)
430
+ end
431
+ end
432
+
433
+ # Response of the AddLocalInventories API. Currently empty because there is no
434
+ # meaningful response populated from the AddLocalInventories method.
435
+ class GoogleCloudRetailV2AddLocalInventoriesResponse
436
+ include Google::Apis::Core::Hashable
437
+
438
+ def initialize(**args)
439
+ update!(**args)
440
+ end
441
+
442
+ # Update properties of this object
443
+ def update!(**args)
444
+ end
445
+ end
446
+
367
447
  # An intended audience of the Product for whom it's sold.
368
448
  class GoogleCloudRetailV2Audience
369
449
  include Google::Apis::Core::Hashable
@@ -416,7 +496,9 @@ module Google
416
496
  # analytics/answer/3437719. * `user_event_ga4`: This feature is in private
417
497
  # preview. Please contact the support team for importing Google Analytics 4
418
498
  # events. The schema is available here: https://support.google.com/analytics/
419
- # answer/7029846.
499
+ # answer/7029846. Supported values for auto-completion imports: * `suggestions` (
500
+ # default): One JSON completion suggestion per line. * `denylist`: One JSON deny
501
+ # suggestion per line. * `allowlist`: One JSON allow suggestion per line.
420
502
  # Corresponds to the JSON property `dataSchema`
421
503
  # @return [String]
422
504
  attr_accessor :data_schema
@@ -552,9 +634,9 @@ module Google
552
634
  class GoogleCloudRetailV2CompleteQueryResponse
553
635
  include Google::Apis::Core::Hashable
554
636
 
555
- # A unique complete token. This should be included in the SearchRequest
556
- # resulting from this completion, which enables accurate attribution of complete
557
- # model performance.
637
+ # A unique complete token. This should be included in the UserEvent.
638
+ # completion_detail for search events resulting from this completion, which
639
+ # enables accurate attribution of complete model performance.
558
640
  # Corresponds to the JSON property `attributionToken`
559
641
  # @return [String]
560
642
  attr_accessor :attribution_token
@@ -594,7 +676,9 @@ module Google
594
676
  class GoogleCloudRetailV2CompleteQueryResponseCompletionResult
595
677
  include Google::Apis::Core::Hashable
596
678
 
597
- # Additional custom attributes ingested through BigQuery.
679
+ # Custom attributes for the suggestion term. * For "user-data", the attributes
680
+ # are additional custom attributes ingested through BigQuery. * For "cloud-
681
+ # retail", the attributes are product attributes generated by Cloud Retail.
598
682
  # Corresponds to the JSON property `attributes`
599
683
  # @return [Hash<String,Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute>]
600
684
  attr_accessor :attributes
@@ -980,8 +1064,7 @@ module Google
980
1064
  # @return [String]
981
1065
  attr_accessor :notification_pubsub_topic
982
1066
 
983
- # Id of the request / operation. This is parroting back the requestId that was
984
- # passed in the request.
1067
+ # Deprecated. This field is never set.
985
1068
  # Corresponds to the JSON property `requestId`
986
1069
  # @return [String]
987
1070
  attr_accessor :request_id
@@ -1041,11 +1124,7 @@ module Google
1041
1124
  # @return [String]
1042
1125
  attr_accessor :reconciliation_mode
1043
1126
 
1044
- # Unique identifier provided by client, within the ancestor dataset scope.
1045
- # Ensures idempotency and used for request deduplication. Server-generated if
1046
- # unspecified. Up to 128 characters long and must match the pattern: `[a-zA-Z0-
1047
- # 9_]+`. This is returned as Operation.name in ImportMetadata. Only supported
1048
- # when ImportProductsRequest.reconciliation_mode is set to `FULL`.
1127
+ # Deprecated. This field has no effect.
1049
1128
  # Corresponds to the JSON property `requestId`
1050
1129
  # @return [String]
1051
1130
  attr_accessor :request_id
@@ -1246,6 +1325,59 @@ module Google
1246
1325
  end
1247
1326
  end
1248
1327
 
1328
+ # The inventory information at a place (e.g. a store) identified by a place ID.
1329
+ class GoogleCloudRetailV2LocalInventory
1330
+ include Google::Apis::Core::Hashable
1331
+
1332
+ # Additional local inventory attributes, for example, store name, promotion tags,
1333
+ # etc. This field needs to pass all below criteria, otherwise an
1334
+ # INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The
1335
+ # key must be a UTF-8 encoded string with a length limit of 32 characters. * The
1336
+ # key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or
1337
+ # KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or
1338
+ # number). * Only 1 value is allowed for each attribute. * For text values, the
1339
+ # length limit is 256 UTF-8 characters. * The attribute does not support search.
1340
+ # The `searchable` field should be unset or set to false. * The max summed total
1341
+ # bytes of custom attribute keys and values per product is 5MiB.
1342
+ # Corresponds to the JSON property `attributes`
1343
+ # @return [Hash<String,Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute>]
1344
+ attr_accessor :attributes
1345
+
1346
+ # Input only. Supported fulfillment types. Valid fulfillment type values include
1347
+ # commonly used types (such as pickup in store and same day delivery), and
1348
+ # custom types. Customers have to map custom types to their display names before
1349
+ # rendering UI. Supported values: * "pickup-in-store" * "ship-to-store" * "same-
1350
+ # day-delivery" * "next-day-delivery" * "custom-type-1" * "custom-type-2" * "
1351
+ # custom-type-3" * "custom-type-4" * "custom-type-5" If this field is set to an
1352
+ # invalid value other than these, an INVALID_ARGUMENT error is returned. All the
1353
+ # elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.
1354
+ # Corresponds to the JSON property `fulfillmentTypes`
1355
+ # @return [Array<String>]
1356
+ attr_accessor :fulfillment_types
1357
+
1358
+ # The place ID for the current set of inventory information.
1359
+ # Corresponds to the JSON property `placeId`
1360
+ # @return [String]
1361
+ attr_accessor :place_id
1362
+
1363
+ # The price information of a Product.
1364
+ # Corresponds to the JSON property `priceInfo`
1365
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2PriceInfo]
1366
+ attr_accessor :price_info
1367
+
1368
+ def initialize(**args)
1369
+ update!(**args)
1370
+ end
1371
+
1372
+ # Update properties of this object
1373
+ def update!(**args)
1374
+ @attributes = args[:attributes] if args.key?(:attributes)
1375
+ @fulfillment_types = args[:fulfillment_types] if args.key?(:fulfillment_types)
1376
+ @place_id = args[:place_id] if args.key?(:place_id)
1377
+ @price_info = args[:price_info] if args.key?(:price_info)
1378
+ end
1379
+ end
1380
+
1249
1381
  # Request message for Predict method.
1250
1382
  class GoogleCloudRetailV2PredictRequest
1251
1383
  include Google::Apis::Core::Hashable
@@ -1977,13 +2109,13 @@ module Google
1977
2109
  # The type of Products allowed to be ingested into the catalog. Acceptable
1978
2110
  # values are: * `primary` (default): You can ingest Products of all types. When
1979
2111
  # ingesting a Product, its type will default to Product.Type.PRIMARY if unset. *
1980
- # `variant`: You can only ingest Product.Type.VARIANT Products. This means
1981
- # Product.primary_product_id cannot be empty. If this field is set to an invalid
1982
- # value other than these, an INVALID_ARGUMENT error is returned. If this field
1983
- # is `variant` and merchant_center_product_id_field is `itemGroupId`, an
1984
- # INVALID_ARGUMENT error is returned. See [Using product levels](https://cloud.
1985
- # google.com/retail/recommendations-ai/docs/catalog#product-levels) for more
1986
- # details.
2112
+ # `variant` (incompatible with Retail Search): You can only ingest Product.Type.
2113
+ # VARIANT Products. This means Product.primary_product_id cannot be empty. If
2114
+ # this field is set to an invalid value other than these, an INVALID_ARGUMENT
2115
+ # error is returned. If this field is `variant` and
2116
+ # merchant_center_product_id_field is `itemGroupId`, an INVALID_ARGUMENT error
2117
+ # is returned. See [Product levels](https://cloud.google.com/retail/docs/catalog#
2118
+ # product-levels) for more details.
1987
2119
  # Corresponds to the JSON property `ingestionProductType`
1988
2120
  # @return [String]
1989
2121
  attr_accessor :ingestion_product_type
@@ -1996,8 +2128,8 @@ module Google
1996
2128
  # the item group. If this field is set to an invalid value other than these, an
1997
2129
  # INVALID_ARGUMENT error is returned. If this field is `itemGroupId` and
1998
2130
  # ingestion_product_type is `variant`, an INVALID_ARGUMENT error is returned.
1999
- # See [Using product levels](https://cloud.google.com/retail/recommendations-ai/
2000
- # docs/catalog#product-levels) for more details.
2131
+ # See [Product levels](https://cloud.google.com/retail/docs/catalog#product-
2132
+ # levels) for more details.
2001
2133
  # Corresponds to the JSON property `merchantCenterProductIdField`
2002
2134
  # @return [String]
2003
2135
  attr_accessor :merchant_center_product_id_field
@@ -2331,6 +2463,73 @@ module Google
2331
2463
  end
2332
2464
  end
2333
2465
 
2466
+ # Metadata related to the progress of the RemoveLocalInventories operation.
2467
+ # Currently empty because there is no meaningful metadata populated from the
2468
+ # RemoveLocalInventories method.
2469
+ class GoogleCloudRetailV2RemoveLocalInventoriesMetadata
2470
+ include Google::Apis::Core::Hashable
2471
+
2472
+ def initialize(**args)
2473
+ update!(**args)
2474
+ end
2475
+
2476
+ # Update properties of this object
2477
+ def update!(**args)
2478
+ end
2479
+ end
2480
+
2481
+ # Request message for RemoveLocalInventories method.
2482
+ class GoogleCloudRetailV2RemoveLocalInventoriesRequest
2483
+ include Google::Apis::Core::Hashable
2484
+
2485
+ # If set to true, and the Product is not found, the local inventory removal
2486
+ # request will still be processed and retained for at most 1 day and processed
2487
+ # once the Product is created. If set to false, a NOT_FOUND error is returned if
2488
+ # the Product is not found.
2489
+ # Corresponds to the JSON property `allowMissing`
2490
+ # @return [Boolean]
2491
+ attr_accessor :allow_missing
2492
+ alias_method :allow_missing?, :allow_missing
2493
+
2494
+ # Required. A list of place IDs to have their inventory deleted. At most 3000
2495
+ # place IDs are allowed per request.
2496
+ # Corresponds to the JSON property `placeIds`
2497
+ # @return [Array<String>]
2498
+ attr_accessor :place_ids
2499
+
2500
+ # The time when the inventory deletions are issued. Used to prevent out-of-order
2501
+ # updates and deletions on local inventory fields. If not provided, the internal
2502
+ # system time will be used.
2503
+ # Corresponds to the JSON property `removeTime`
2504
+ # @return [String]
2505
+ attr_accessor :remove_time
2506
+
2507
+ def initialize(**args)
2508
+ update!(**args)
2509
+ end
2510
+
2511
+ # Update properties of this object
2512
+ def update!(**args)
2513
+ @allow_missing = args[:allow_missing] if args.key?(:allow_missing)
2514
+ @place_ids = args[:place_ids] if args.key?(:place_ids)
2515
+ @remove_time = args[:remove_time] if args.key?(:remove_time)
2516
+ end
2517
+ end
2518
+
2519
+ # Response of the RemoveLocalInventories API. Currently empty because there is
2520
+ # no meaningful response populated from the RemoveLocalInventories method.
2521
+ class GoogleCloudRetailV2RemoveLocalInventoriesResponse
2522
+ include Google::Apis::Core::Hashable
2523
+
2524
+ def initialize(**args)
2525
+ update!(**args)
2526
+ end
2527
+
2528
+ # Update properties of this object
2529
+ def update!(**args)
2530
+ end
2531
+ end
2532
+
2334
2533
  # Request message for SearchService.Search method.
2335
2534
  class GoogleCloudRetailV2SearchRequest
2336
2535
  include Google::Apis::Core::Hashable
@@ -2428,7 +2627,8 @@ module Google
2428
2627
  # @return [Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequestPersonalizationSpec]
2429
2628
  attr_accessor :personalization_spec
2430
2629
 
2431
- # Raw search query.
2630
+ # Raw search query. If this field is empty, the request is considered a category
2631
+ # browsing request and returned results are based on filter and page_categories.
2432
2632
  # Corresponds to the JSON property `query`
2433
2633
  # @return [String]
2434
2634
  attr_accessor :query
@@ -3348,10 +3548,12 @@ module Google
3348
3548
  # Required. A unique identifier for tracking visitors. For example, this could
3349
3549
  # be implemented with an HTTP cookie, which should be able to uniquely identify
3350
3550
  # a visitor on a single device. This unique identifier should not change if the
3351
- # visitor log in/out of the website. The field must be a UTF-8 encoded string
3352
- # with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is
3353
- # returned. The field should not contain PII or user-data. We recommend to use
3354
- # Google Analystics [Client ID](https://developers.google.com/analytics/
3551
+ # visitor log in/out of the website. Don't set the field to the same fixed ID
3552
+ # for different users. This mixes the event history of those users together,
3553
+ # which results in degraded model quality. The field must be a UTF-8 encoded
3554
+ # string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT
3555
+ # error is returned. The field should not contain PII or user-data. We recommend
3556
+ # to use Google Analystics [Client ID](https://developers.google.com/analytics/
3355
3557
  # devguides/collection/analyticsjs/field-reference#clientId) for this field.
3356
3558
  # Corresponds to the JSON property `visitorId`
3357
3559
  # @return [String]
@@ -3478,13 +3680,12 @@ module Google
3478
3680
  attr_accessor :direct_user_request
3479
3681
  alias_method :direct_user_request?, :direct_user_request
3480
3682
 
3481
- # The end user's IP address. Required for getting SearchResponse.
3482
- # sponsored_results. This field is used to extract location information for
3483
- # personalization. This field must be either an IPv4 address (e.g. "104.133.9.80"
3484
- # ) or an IPv6 address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334").
3485
- # Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when
3486
- # using the JavaScript tag in UserEventService.CollectUserEvent or if
3487
- # direct_user_request is set.
3683
+ # The end user's IP address. This field is used to extract location information
3684
+ # for personalization. This field must be either an IPv4 address (e.g. "104.133.
3685
+ # 9.80") or an IPv6 address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334").
3686
+ # Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when:
3687
+ # * setting SearchRequest.user_info. * using the JavaScript tag in
3688
+ # UserEventService.CollectUserEvent or if direct_user_request is set.
3488
3689
  # Corresponds to the JSON property `ipAddress`
3489
3690
  # @return [String]
3490
3691
  attr_accessor :ip_address
@@ -3500,7 +3701,10 @@ module Google
3500
3701
  attr_accessor :user_agent
3501
3702
 
3502
3703
  # Highly recommended for logged-in users. Unique identifier for logged-in user,
3503
- # such as a user name. The field must be a UTF-8 encoded string with a length
3704
+ # such as a user name. Don't set for anonymous users. Always use a hashed value
3705
+ # for this ID. Don't set the field to the same fixed ID for different users.
3706
+ # This mixes the event history of those users together, which results in
3707
+ # degraded model quality. The field must be a UTF-8 encoded string with a length
3504
3708
  # limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
3505
3709
  # Corresponds to the JSON property `userId`
3506
3710
  # @return [String]
@@ -3744,8 +3948,7 @@ module Google
3744
3948
  # @return [String]
3745
3949
  attr_accessor :notification_pubsub_topic
3746
3950
 
3747
- # Id of the request / operation. This is parroting back the requestId that was
3748
- # passed in the request.
3951
+ # Deprecated. This field is never set.
3749
3952
  # Corresponds to the JSON property `requestId`
3750
3953
  # @return [String]
3751
3954
  attr_accessor :request_id
@@ -4115,6 +4318,35 @@ module Google
4115
4318
  end
4116
4319
  end
4117
4320
 
4321
+ # Metadata related to the progress of the AddLocalInventories operation.
4322
+ # Currently empty because there is no meaningful metadata populated from the
4323
+ # AddLocalInventories method.
4324
+ class GoogleCloudRetailV2betaAddLocalInventoriesMetadata
4325
+ include Google::Apis::Core::Hashable
4326
+
4327
+ def initialize(**args)
4328
+ update!(**args)
4329
+ end
4330
+
4331
+ # Update properties of this object
4332
+ def update!(**args)
4333
+ end
4334
+ end
4335
+
4336
+ # Response of the AddLocalInventories API. Currently empty because there is no
4337
+ # meaningful response populated from the AddLocalInventories method.
4338
+ class GoogleCloudRetailV2betaAddLocalInventoriesResponse
4339
+ include Google::Apis::Core::Hashable
4340
+
4341
+ def initialize(**args)
4342
+ update!(**args)
4343
+ end
4344
+
4345
+ # Update properties of this object
4346
+ def update!(**args)
4347
+ end
4348
+ end
4349
+
4118
4350
  # Configuration of destination for Export related errors.
4119
4351
  class GoogleCloudRetailV2betaExportErrorsConfig
4120
4352
  include Google::Apis::Core::Hashable
@@ -4282,8 +4514,7 @@ module Google
4282
4514
  # @return [String]
4283
4515
  attr_accessor :notification_pubsub_topic
4284
4516
 
4285
- # Id of the request / operation. This is parroting back the requestId that was
4286
- # passed in the request.
4517
+ # Deprecated. This field is never set.
4287
4518
  # Corresponds to the JSON property `requestId`
4288
4519
  # @return [String]
4289
4520
  attr_accessor :request_id
@@ -4471,6 +4702,35 @@ module Google
4471
4702
  end
4472
4703
  end
4473
4704
 
4705
+ # Metadata related to the progress of the RemoveLocalInventories operation.
4706
+ # Currently empty because there is no meaningful metadata populated from the
4707
+ # RemoveLocalInventories method.
4708
+ class GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata
4709
+ include Google::Apis::Core::Hashable
4710
+
4711
+ def initialize(**args)
4712
+ update!(**args)
4713
+ end
4714
+
4715
+ # Update properties of this object
4716
+ def update!(**args)
4717
+ end
4718
+ end
4719
+
4720
+ # Response of the RemoveLocalInventories API. Currently empty because there is
4721
+ # no meaningful response populated from the RemoveLocalInventories method.
4722
+ class GoogleCloudRetailV2betaRemoveLocalInventoriesResponse
4723
+ include Google::Apis::Core::Hashable
4724
+
4725
+ def initialize(**args)
4726
+ update!(**args)
4727
+ end
4728
+
4729
+ # Update properties of this object
4730
+ def update!(**args)
4731
+ end
4732
+ end
4733
+
4474
4734
  # Metadata related to the progress of the SetInventory operation. Currently
4475
4735
  # empty because there is no meaningful metadata populated from the SetInventory
4476
4736
  # method.
@@ -4617,8 +4877,7 @@ module Google
4617
4877
  # A generic empty message that you can re-use to avoid defining duplicated empty
4618
4878
  # messages in your APIs. A typical example is to use it as the request or the
4619
4879
  # response type of an API method. For instance: service Foo ` rpc Bar(google.
4620
- # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
4621
- # `Empty` is empty JSON object ````.
4880
+ # protobuf.Empty) returns (google.protobuf.Empty); `
4622
4881
  class GoogleProtobufEmpty
4623
4882
  include Google::Apis::Core::Hashable
4624
4883
 
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module RetailV2
18
18
  # Version of the google-apis-retail_v2 gem
19
- GEM_VERSION = "0.31.0"
19
+ GEM_VERSION = "0.34.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.4.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20220310"
25
+ REVISION = "20220408"
26
26
  end
27
27
  end
28
28
  end
@@ -82,6 +82,24 @@ module Google
82
82
  include Google::Apis::Core::JsonObjectSupport
83
83
  end
84
84
 
85
+ class GoogleCloudRetailV2AddLocalInventoriesMetadata
86
+ class Representation < Google::Apis::Core::JsonRepresentation; end
87
+
88
+ include Google::Apis::Core::JsonObjectSupport
89
+ end
90
+
91
+ class GoogleCloudRetailV2AddLocalInventoriesRequest
92
+ class Representation < Google::Apis::Core::JsonRepresentation; end
93
+
94
+ include Google::Apis::Core::JsonObjectSupport
95
+ end
96
+
97
+ class GoogleCloudRetailV2AddLocalInventoriesResponse
98
+ class Representation < Google::Apis::Core::JsonRepresentation; end
99
+
100
+ include Google::Apis::Core::JsonObjectSupport
101
+ end
102
+
85
103
  class GoogleCloudRetailV2Audience
86
104
  class Representation < Google::Apis::Core::JsonRepresentation; end
87
105
 
@@ -232,6 +250,12 @@ module Google
232
250
  include Google::Apis::Core::JsonObjectSupport
233
251
  end
234
252
 
253
+ class GoogleCloudRetailV2LocalInventory
254
+ class Representation < Google::Apis::Core::JsonRepresentation; end
255
+
256
+ include Google::Apis::Core::JsonObjectSupport
257
+ end
258
+
235
259
  class GoogleCloudRetailV2PredictRequest
236
260
  class Representation < Google::Apis::Core::JsonRepresentation; end
237
261
 
@@ -364,6 +388,24 @@ module Google
364
388
  include Google::Apis::Core::JsonObjectSupport
365
389
  end
366
390
 
391
+ class GoogleCloudRetailV2RemoveLocalInventoriesMetadata
392
+ class Representation < Google::Apis::Core::JsonRepresentation; end
393
+
394
+ include Google::Apis::Core::JsonObjectSupport
395
+ end
396
+
397
+ class GoogleCloudRetailV2RemoveLocalInventoriesRequest
398
+ class Representation < Google::Apis::Core::JsonRepresentation; end
399
+
400
+ include Google::Apis::Core::JsonObjectSupport
401
+ end
402
+
403
+ class GoogleCloudRetailV2RemoveLocalInventoriesResponse
404
+ class Representation < Google::Apis::Core::JsonRepresentation; end
405
+
406
+ include Google::Apis::Core::JsonObjectSupport
407
+ end
408
+
367
409
  class GoogleCloudRetailV2SearchRequest
368
410
  class Representation < Google::Apis::Core::JsonRepresentation; end
369
411
 
@@ -664,6 +706,18 @@ module Google
664
706
  include Google::Apis::Core::JsonObjectSupport
665
707
  end
666
708
 
709
+ class GoogleCloudRetailV2betaAddLocalInventoriesMetadata
710
+ class Representation < Google::Apis::Core::JsonRepresentation; end
711
+
712
+ include Google::Apis::Core::JsonObjectSupport
713
+ end
714
+
715
+ class GoogleCloudRetailV2betaAddLocalInventoriesResponse
716
+ class Representation < Google::Apis::Core::JsonRepresentation; end
717
+
718
+ include Google::Apis::Core::JsonObjectSupport
719
+ end
720
+
667
721
  class GoogleCloudRetailV2betaExportErrorsConfig
668
722
  class Representation < Google::Apis::Core::JsonRepresentation; end
669
723
 
@@ -754,6 +808,18 @@ module Google
754
808
  include Google::Apis::Core::JsonObjectSupport
755
809
  end
756
810
 
811
+ class GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata
812
+ class Representation < Google::Apis::Core::JsonRepresentation; end
813
+
814
+ include Google::Apis::Core::JsonObjectSupport
815
+ end
816
+
817
+ class GoogleCloudRetailV2betaRemoveLocalInventoriesResponse
818
+ class Representation < Google::Apis::Core::JsonRepresentation; end
819
+
820
+ include Google::Apis::Core::JsonObjectSupport
821
+ end
822
+
757
823
  class GoogleCloudRetailV2betaSetInventoryMetadata
758
824
  class Representation < Google::Apis::Core::JsonRepresentation; end
759
825
 
@@ -893,6 +959,29 @@ module Google
893
959
  end
894
960
  end
895
961
 
962
+ class GoogleCloudRetailV2AddLocalInventoriesMetadata
963
+ # @private
964
+ class Representation < Google::Apis::Core::JsonRepresentation
965
+ end
966
+ end
967
+
968
+ class GoogleCloudRetailV2AddLocalInventoriesRequest
969
+ # @private
970
+ class Representation < Google::Apis::Core::JsonRepresentation
971
+ property :add_mask, as: 'addMask'
972
+ property :add_time, as: 'addTime'
973
+ property :allow_missing, as: 'allowMissing'
974
+ collection :local_inventories, as: 'localInventories', class: Google::Apis::RetailV2::GoogleCloudRetailV2LocalInventory, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2LocalInventory::Representation
975
+
976
+ end
977
+ end
978
+
979
+ class GoogleCloudRetailV2AddLocalInventoriesResponse
980
+ # @private
981
+ class Representation < Google::Apis::Core::JsonRepresentation
982
+ end
983
+ end
984
+
896
985
  class GoogleCloudRetailV2Audience
897
986
  # @private
898
987
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1130,6 +1219,18 @@ module Google
1130
1219
  end
1131
1220
  end
1132
1221
 
1222
+ class GoogleCloudRetailV2LocalInventory
1223
+ # @private
1224
+ class Representation < Google::Apis::Core::JsonRepresentation
1225
+ hash :attributes, as: 'attributes', class: Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute::Representation
1226
+
1227
+ collection :fulfillment_types, as: 'fulfillmentTypes'
1228
+ property :place_id, as: 'placeId'
1229
+ property :price_info, as: 'priceInfo', class: Google::Apis::RetailV2::GoogleCloudRetailV2PriceInfo, decorator: Google::Apis::RetailV2::GoogleCloudRetailV2PriceInfo::Representation
1230
+
1231
+ end
1232
+ end
1233
+
1133
1234
  class GoogleCloudRetailV2PredictRequest
1134
1235
  # @private
1135
1236
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1362,6 +1463,27 @@ module Google
1362
1463
  end
1363
1464
  end
1364
1465
 
1466
+ class GoogleCloudRetailV2RemoveLocalInventoriesMetadata
1467
+ # @private
1468
+ class Representation < Google::Apis::Core::JsonRepresentation
1469
+ end
1470
+ end
1471
+
1472
+ class GoogleCloudRetailV2RemoveLocalInventoriesRequest
1473
+ # @private
1474
+ class Representation < Google::Apis::Core::JsonRepresentation
1475
+ property :allow_missing, as: 'allowMissing'
1476
+ collection :place_ids, as: 'placeIds'
1477
+ property :remove_time, as: 'removeTime'
1478
+ end
1479
+ end
1480
+
1481
+ class GoogleCloudRetailV2RemoveLocalInventoriesResponse
1482
+ # @private
1483
+ class Representation < Google::Apis::Core::JsonRepresentation
1484
+ end
1485
+ end
1486
+
1365
1487
  class GoogleCloudRetailV2SearchRequest
1366
1488
  # @private
1367
1489
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1825,6 +1947,18 @@ module Google
1825
1947
  end
1826
1948
  end
1827
1949
 
1950
+ class GoogleCloudRetailV2betaAddLocalInventoriesMetadata
1951
+ # @private
1952
+ class Representation < Google::Apis::Core::JsonRepresentation
1953
+ end
1954
+ end
1955
+
1956
+ class GoogleCloudRetailV2betaAddLocalInventoriesResponse
1957
+ # @private
1958
+ class Representation < Google::Apis::Core::JsonRepresentation
1959
+ end
1960
+ end
1961
+
1828
1962
  class GoogleCloudRetailV2betaExportErrorsConfig
1829
1963
  # @private
1830
1964
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1947,6 +2081,18 @@ module Google
1947
2081
  end
1948
2082
  end
1949
2083
 
2084
+ class GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata
2085
+ # @private
2086
+ class Representation < Google::Apis::Core::JsonRepresentation
2087
+ end
2088
+ end
2089
+
2090
+ class GoogleCloudRetailV2betaRemoveLocalInventoriesResponse
2091
+ # @private
2092
+ class Representation < Google::Apis::Core::JsonRepresentation
2093
+ end
2094
+ end
2095
+
1950
2096
  class GoogleCloudRetailV2betaSetInventoryMetadata
1951
2097
  # @private
1952
2098
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -52,9 +52,8 @@ module Google
52
52
  end
53
53
 
54
54
  # Completes the specified prefix with keyword suggestions. This feature is only
55
- # available for users who have Retail Search enabled. Please submit a form [here]
56
- # (https://cloud.google.com/contact) to contact cloud sales if you are
57
- # interested in using Retail Search.
55
+ # available for users who have Retail Search enabled. Please enable Retail
56
+ # Search on Cloud Console before using this feature.
58
57
  # @param [String] catalog
59
58
  # Required. Catalog for which the completion is performed. Full resource name of
60
59
  # catalog, such as `projects/*/locations/global/catalogs/default_catalog`.
@@ -326,9 +325,8 @@ module Google
326
325
  # enqueued and processed downstream. As a consequence, when a response is
327
326
  # returned, the added place IDs are not immediately manifested in the Product
328
327
  # queried by GetProduct or ListProducts. This feature is only available for
329
- # users who have Retail Search enabled. Please submit a form [here](https://
330
- # cloud.google.com/contact) to contact cloud sales if you are interested in
331
- # using Retail Search.
328
+ # users who have Retail Search enabled. Please enable Retail Search on Cloud
329
+ # Console before using this feature.
332
330
  # @param [String] product
333
331
  # Required. Full resource name of Product, such as `projects/*/locations/global/
334
332
  # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
@@ -364,6 +362,51 @@ module Google
364
362
  execute_or_queue_command(command, &block)
365
363
  end
366
364
 
365
+ # Updates local inventory information for a Product at a list of places, while
366
+ # respecting the last update timestamps of each inventory field. This process is
367
+ # asynchronous and does not require the Product to exist before updating
368
+ # inventory information. If the request is valid, the update will be enqueued
369
+ # and processed downstream. As a consequence, when a response is returned,
370
+ # updates are not immediately manifested in the Product queried by GetProduct or
371
+ # ListProducts. Local inventory information can only be modified using this
372
+ # method. CreateProduct and UpdateProduct has no effect on local inventories.
373
+ # This feature is only available for users who have Retail Search enabled.
374
+ # Please enable Retail Search on Cloud Console before using this feature.
375
+ # @param [String] product
376
+ # Required. Full resource name of Product, such as `projects/*/locations/global/
377
+ # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
378
+ # the caller does not have permission to access the Product, regardless of
379
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
380
+ # @param [Google::Apis::RetailV2::GoogleCloudRetailV2AddLocalInventoriesRequest] google_cloud_retail_v2_add_local_inventories_request_object
381
+ # @param [String] fields
382
+ # Selector specifying which fields to include in a partial response.
383
+ # @param [String] quota_user
384
+ # Available to use for quota purposes for server-side applications. Can be any
385
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
386
+ # @param [Google::Apis::RequestOptions] options
387
+ # Request-specific options
388
+ #
389
+ # @yield [result, err] Result & error if block supplied
390
+ # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningOperation] parsed result object
391
+ # @yieldparam err [StandardError] error object if request failed
392
+ #
393
+ # @return [Google::Apis::RetailV2::GoogleLongrunningOperation]
394
+ #
395
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
396
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
397
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
398
+ def add_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2_add_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
399
+ command = make_simple_command(:post, 'v2/{+product}:addLocalInventories', options)
400
+ command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2AddLocalInventoriesRequest::Representation
401
+ command.request_object = google_cloud_retail_v2_add_local_inventories_request_object
402
+ command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
403
+ command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
404
+ command.params['product'] = product unless product.nil?
405
+ command.query['fields'] = fields unless fields.nil?
406
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
407
+ execute_or_queue_command(command, &block)
408
+ end
409
+
367
410
  # Creates a Product.
368
411
  # @param [String] parent
369
412
  # Required. The parent catalog resource name, such as `projects/*/locations/
@@ -595,7 +638,9 @@ module Google
595
638
  # output only fields are NOT supported. If not set, all supported fields (the
596
639
  # fields that are neither immutable nor output only) are updated. If an
597
640
  # unsupported or unknown field is provided, an INVALID_ARGUMENT error is
598
- # returned.
641
+ # returned. The attribute key can be updated by setting the mask path as "
642
+ # attributes.$`key_name`". If a key name is present in the mask but not in the
643
+ # patching product from the request, this key will be deleted after the update.
599
644
  # @param [String] fields
600
645
  # Selector specifying which fields to include in a partial response.
601
646
  # @param [String] quota_user
@@ -633,9 +678,8 @@ module Google
633
678
  # enqueued and processed downstream. As a consequence, when a response is
634
679
  # returned, the removed place IDs are not immediately manifested in the Product
635
680
  # queried by GetProduct or ListProducts. This feature is only available for
636
- # users who have Retail Search enabled. Please submit a form [here](https://
637
- # cloud.google.com/contact) to contact cloud sales if you are interested in
638
- # using Retail Search.
681
+ # users who have Retail Search enabled. Please enable Retail Search on Cloud
682
+ # Console before using this feature.
639
683
  # @param [String] product
640
684
  # Required. Full resource name of Product, such as `projects/*/locations/global/
641
685
  # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
@@ -671,6 +715,50 @@ module Google
671
715
  execute_or_queue_command(command, &block)
672
716
  end
673
717
 
718
+ # Remove local inventory information for a Product at a list of places at a
719
+ # removal timestamp. This process is asynchronous. If the request is valid, the
720
+ # removal will be enqueued and processed downstream. As a consequence, when a
721
+ # response is returned, removals are not immediately manifested in the Product
722
+ # queried by GetProduct or ListProducts. Local inventory information can only be
723
+ # removed using this method. CreateProduct and UpdateProduct has no effect on
724
+ # local inventories. This feature is only available for users who have Retail
725
+ # Search enabled. Please enable Retail Search on Cloud Console before using this
726
+ # feature.
727
+ # @param [String] product
728
+ # Required. Full resource name of Product, such as `projects/*/locations/global/
729
+ # catalogs/default_catalog/branches/default_branch/products/some_product_id`. If
730
+ # the caller does not have permission to access the Product, regardless of
731
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
732
+ # @param [Google::Apis::RetailV2::GoogleCloudRetailV2RemoveLocalInventoriesRequest] google_cloud_retail_v2_remove_local_inventories_request_object
733
+ # @param [String] fields
734
+ # Selector specifying which fields to include in a partial response.
735
+ # @param [String] quota_user
736
+ # Available to use for quota purposes for server-side applications. Can be any
737
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
738
+ # @param [Google::Apis::RequestOptions] options
739
+ # Request-specific options
740
+ #
741
+ # @yield [result, err] Result & error if block supplied
742
+ # @yieldparam result [Google::Apis::RetailV2::GoogleLongrunningOperation] parsed result object
743
+ # @yieldparam err [StandardError] error object if request failed
744
+ #
745
+ # @return [Google::Apis::RetailV2::GoogleLongrunningOperation]
746
+ #
747
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
748
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
749
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
750
+ def remove_project_location_catalog_branch_product_local_inventories(product, google_cloud_retail_v2_remove_local_inventories_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
751
+ command = make_simple_command(:post, 'v2/{+product}:removeLocalInventories', options)
752
+ command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2RemoveLocalInventoriesRequest::Representation
753
+ command.request_object = google_cloud_retail_v2_remove_local_inventories_request_object
754
+ command.response_representation = Google::Apis::RetailV2::GoogleLongrunningOperation::Representation
755
+ command.response_class = Google::Apis::RetailV2::GoogleLongrunningOperation
756
+ command.params['product'] = product unless product.nil?
757
+ command.query['fields'] = fields unless fields.nil?
758
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
759
+ execute_or_queue_command(command, &block)
760
+ end
761
+
674
762
  # Updates inventory information for a Product while respecting the last update
675
763
  # timestamps of each inventory field. This process is asynchronous and does not
676
764
  # require the Product to exist before updating fulfillment information. If the
@@ -687,9 +775,8 @@ module Google
687
775
  # SetInventoryRequest.set_mask, then any existing inventory information will be
688
776
  # preserved. Pre-existing inventory information can only be updated with
689
777
  # SetInventory, AddFulfillmentPlaces, and RemoveFulfillmentPlaces. This feature
690
- # is only available for users who have Retail Search enabled. Please submit a
691
- # form [here](https://cloud.google.com/contact) to contact cloud sales if you
692
- # are interested in using Retail Search.
778
+ # is only available for users who have Retail Search enabled. Please enable
779
+ # Retail Search on Cloud Console before using this feature.
693
780
  # @param [String] name
694
781
  # Immutable. Full resource name of the product, such as `projects/*/locations/
695
782
  # global/catalogs/default_catalog/branches/default_branch/products/product_id`.
@@ -723,11 +810,12 @@ module Google
723
810
  execute_or_queue_command(command, &block)
724
811
  end
725
812
 
726
- # Bulk import of processed completion dataset. Request processing may be
727
- # synchronous. Partial updating is not supported. This feature is only available
728
- # for users who have Retail Search enabled. Please submit a form [here](https://
729
- # cloud.google.com/contact) to contact cloud sales if you are interested in
730
- # using Retail Search.
813
+ # Bulk import of processed completion dataset. Request processing is
814
+ # asynchronous. Partial updating is not supported. The operation is successfully
815
+ # finished only after the imported suggestions are indexed successfully and
816
+ # ready for serving. The process takes hours. This feature is only available for
817
+ # users who have Retail Search enabled. Please enable Retail Search on Cloud
818
+ # Console before using this feature.
731
819
  # @param [String] parent
732
820
  # Required. The catalog which the suggestions dataset belongs to. Format: `
733
821
  # projects/1234/locations/global/catalogs/default_catalog`.
@@ -841,12 +929,15 @@ module Google
841
929
  # Makes a recommendation prediction.
842
930
  # @param [String] placement
843
931
  # Required. Full resource name of the format: `name=projects/*/locations/global/
844
- # catalogs/default_catalog/placements/*` The ID of the Recommendations AI
845
- # placement. Before you can request predictions from your model, you must create
846
- # at least one placement for it. For more information, see [Managing placements](
847
- # https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
848
- # The full list of available placements can be seen at https://console.cloud.
849
- # google.com/recommendation/catalogs/default_catalog/placements
932
+ # catalogs/default_catalog/servingConfigs/*` or `name=projects/*/locations/
933
+ # global/catalogs/default_catalog/placements/*`. We recommend using the `
934
+ # servingConfigs` resource. `placements` is a legacy resource. The ID of the
935
+ # Recommendations AI serving config or placement. Before you can request
936
+ # predictions from your model, you must create at least one serving config or
937
+ # placement for it. For more information, see [Managing serving configurations].
938
+ # (https://cloud.google.com/retail/docs/manage-configs). The full list of
939
+ # available serving configs can be seen at https://console.cloud.google.com/ai/
940
+ # retail/catalogs/default_catalog/configs
850
941
  # @param [Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest] google_cloud_retail_v2_predict_request_object
851
942
  # @param [String] fields
852
943
  # Selector specifying which fields to include in a partial response.
@@ -878,13 +969,15 @@ module Google
878
969
  end
879
970
 
880
971
  # Performs a search. This feature is only available for users who have Retail
881
- # Search enabled. Please submit a form [here](https://cloud.google.com/contact)
882
- # to contact cloud sales if you are interested in using Retail Search.
972
+ # Search enabled. Please enable Retail Search on Cloud Console before using this
973
+ # feature.
883
974
  # @param [String] placement
884
- # Required. The resource name of the search engine placement, such as `projects/*
885
- # /locations/global/catalogs/default_catalog/placements/default_search`. This
886
- # field is used to identify the serving configuration name and the set of models
887
- # that will be used to make the search.
975
+ # Required. The resource name of the Retail Search serving config, such as `
976
+ # projects/*/locations/global/catalogs/default_catalog/servingConfigs/
977
+ # default_serving_config` or the name of the legacy placement resource, such as `
978
+ # projects/*/locations/global/catalogs/default_catalog/placements/default_search`
979
+ # . This field is used to identify the serving configuration name and the set of
980
+ # models that will be used to make the search.
888
981
  # @param [Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequest] google_cloud_retail_v2_search_request_object
889
982
  # @param [String] fields
890
983
  # Selector specifying which fields to include in a partial response.
@@ -915,6 +1008,88 @@ module Google
915
1008
  execute_or_queue_command(command, &block)
916
1009
  end
917
1010
 
1011
+ # Makes a recommendation prediction.
1012
+ # @param [String] placement
1013
+ # Required. Full resource name of the format: `name=projects/*/locations/global/
1014
+ # catalogs/default_catalog/servingConfigs/*` or `name=projects/*/locations/
1015
+ # global/catalogs/default_catalog/placements/*`. We recommend using the `
1016
+ # servingConfigs` resource. `placements` is a legacy resource. The ID of the
1017
+ # Recommendations AI serving config or placement. Before you can request
1018
+ # predictions from your model, you must create at least one serving config or
1019
+ # placement for it. For more information, see [Managing serving configurations].
1020
+ # (https://cloud.google.com/retail/docs/manage-configs). The full list of
1021
+ # available serving configs can be seen at https://console.cloud.google.com/ai/
1022
+ # retail/catalogs/default_catalog/configs
1023
+ # @param [Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest] google_cloud_retail_v2_predict_request_object
1024
+ # @param [String] fields
1025
+ # Selector specifying which fields to include in a partial response.
1026
+ # @param [String] quota_user
1027
+ # Available to use for quota purposes for server-side applications. Can be any
1028
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1029
+ # @param [Google::Apis::RequestOptions] options
1030
+ # Request-specific options
1031
+ #
1032
+ # @yield [result, err] Result & error if block supplied
1033
+ # @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse] parsed result object
1034
+ # @yieldparam err [StandardError] error object if request failed
1035
+ #
1036
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse]
1037
+ #
1038
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1039
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1040
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1041
+ def predict_project_location_catalog_serving_config(placement, google_cloud_retail_v2_predict_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1042
+ command = make_simple_command(:post, 'v2/{+placement}:predict', options)
1043
+ command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PredictRequest::Representation
1044
+ command.request_object = google_cloud_retail_v2_predict_request_object
1045
+ command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse::Representation
1046
+ command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2PredictResponse
1047
+ command.params['placement'] = placement unless placement.nil?
1048
+ command.query['fields'] = fields unless fields.nil?
1049
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1050
+ execute_or_queue_command(command, &block)
1051
+ end
1052
+
1053
+ # Performs a search. This feature is only available for users who have Retail
1054
+ # Search enabled. Please enable Retail Search on Cloud Console before using this
1055
+ # feature.
1056
+ # @param [String] placement
1057
+ # Required. The resource name of the Retail Search serving config, such as `
1058
+ # projects/*/locations/global/catalogs/default_catalog/servingConfigs/
1059
+ # default_serving_config` or the name of the legacy placement resource, such as `
1060
+ # projects/*/locations/global/catalogs/default_catalog/placements/default_search`
1061
+ # . This field is used to identify the serving configuration name and the set of
1062
+ # models that will be used to make the search.
1063
+ # @param [Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequest] google_cloud_retail_v2_search_request_object
1064
+ # @param [String] fields
1065
+ # Selector specifying which fields to include in a partial response.
1066
+ # @param [String] quota_user
1067
+ # Available to use for quota purposes for server-side applications. Can be any
1068
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1069
+ # @param [Google::Apis::RequestOptions] options
1070
+ # Request-specific options
1071
+ #
1072
+ # @yield [result, err] Result & error if block supplied
1073
+ # @yieldparam result [Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse] parsed result object
1074
+ # @yieldparam err [StandardError] error object if request failed
1075
+ #
1076
+ # @return [Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse]
1077
+ #
1078
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1079
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1080
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1081
+ def search_project_location_catalog_serving_configs(placement, google_cloud_retail_v2_search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1082
+ command = make_simple_command(:post, 'v2/{+placement}:search', options)
1083
+ command.request_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SearchRequest::Representation
1084
+ command.request_object = google_cloud_retail_v2_search_request_object
1085
+ command.response_representation = Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse::Representation
1086
+ command.response_class = Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponse
1087
+ command.params['placement'] = placement unless placement.nil?
1088
+ command.query['fields'] = fields unless fields.nil?
1089
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1090
+ execute_or_queue_command(command, &block)
1091
+ end
1092
+
918
1093
  # Writes a single user event from the browser. This uses a GET request to due to
919
1094
  # browser restriction of POST-ing to a 3rd party domain. This method is used
920
1095
  # only by the Retail API JavaScript pixel and Google Tag Manager. Users should
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-retail_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.0
4
+ version: 0.34.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: 2022-03-21 00:00:00.000000000 Z
11
+ date: 2022-04-18 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_v2/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-retail_v2/v0.31.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-retail_v2/v0.34.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-retail_v2
63
63
  post_install_message:
64
64
  rdoc_options: []