google-apis-retail_v2alpha 0.12.0 → 0.13.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: 217dc8f9d5b7bce078f1d66ff914aa857f5b6dc5ee97585c7c22e1ba1120776d
4
- data.tar.gz: 76ede69fd2c4a66bd2288c2f74dd72109d013d7f6feabc88224a42d0169c8b80
3
+ metadata.gz: 7eff994be02b1880715b24a8c7be2fdcfa6bafed959b5d299c1a86adac7e48ed
4
+ data.tar.gz: 3fc5c775d839cfed35349dd179405a564c9b85a251bb1c2c332a7500980131e8
5
5
  SHA512:
6
- metadata.gz: be75ac6c1750575f107430a03224171b43876a35ff5a594c9293282b116428d8aedda0bdb7cc53329fff57c5afe4e38e1c8fc06f9deb57b2f007caf42e09f19c
7
- data.tar.gz: 528b8ff6e7c24b787385184982d5a1734af9c7814e018d55a37f277cb2297a4b256da1b61b1e4518bda93834b405e6d618d4861d5200dcca1ec7725401eb3683
6
+ metadata.gz: 86279591044bf3a1087868a6a22c4206fcb7e6a0285700cb08b898778b80c44f5925fa802f5b3c28c6054838dec18e056e1b3d4b414915cc38b00ab566805903
7
+ data.tar.gz: 3bde47ac0ddf2778f156c0d1189af6d520a8db22fa3c6a2c9d30af42f04710235cbcd023f352457e248b1c38cd4362ebaf08e4e197cb68513ef7bafec08e501e
data/CHANGELOG.md CHANGED
@@ -1,7 +1,12 @@
1
1
  # Release history for google-apis-retail_v2alpha
2
2
 
3
- ### v0.12.0 (2021-06-29)
3
+ ### v0.13.0 (2021-07-24)
4
4
 
5
+ * Regenerated from discovery document revision 20210723
6
+
7
+ ### v0.12.0 (2021-07-03)
8
+
9
+ * Regenerated from discovery document revision 20210625
5
10
  * Regenerated using generator version 0.4.0
6
11
 
7
12
  ### v0.11.0 (2021-06-24)
@@ -279,6 +279,56 @@ module Google
279
279
  end
280
280
  end
281
281
 
282
+ # Metadata related to the progress of the AddFulfillmentPlaces operation.
283
+ # Currently empty because there is no meaningful metadata populated from the
284
+ # AddFulfillmentPlaces method.
285
+ class GoogleCloudRetailV2AddFulfillmentPlacesMetadata
286
+ include Google::Apis::Core::Hashable
287
+
288
+ def initialize(**args)
289
+ update!(**args)
290
+ end
291
+
292
+ # Update properties of this object
293
+ def update!(**args)
294
+ end
295
+ end
296
+
297
+ # Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
298
+ # is no meaningful response populated from the AddFulfillmentPlaces method.
299
+ class GoogleCloudRetailV2AddFulfillmentPlacesResponse
300
+ include Google::Apis::Core::Hashable
301
+
302
+ def initialize(**args)
303
+ update!(**args)
304
+ end
305
+
306
+ # Update properties of this object
307
+ def update!(**args)
308
+ end
309
+ end
310
+
311
+ # Response of the ImportCompletionDataRequest. If the long running operation is
312
+ # done, this message is returned by the google.longrunning.Operations.response
313
+ # field if the operation is successful.
314
+ class GoogleCloudRetailV2ImportCompletionDataResponse
315
+ include Google::Apis::Core::Hashable
316
+
317
+ # A sample of errors encountered while processing the request.
318
+ # Corresponds to the JSON property `errorSamples`
319
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
320
+ attr_accessor :error_samples
321
+
322
+ def initialize(**args)
323
+ update!(**args)
324
+ end
325
+
326
+ # Update properties of this object
327
+ def update!(**args)
328
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
329
+ end
330
+ end
331
+
282
332
  # Configuration of destination for Import related errors.
283
333
  class GoogleCloudRetailV2ImportErrorsConfig
284
334
  include Google::Apis::Core::Hashable
@@ -315,6 +365,20 @@ module Google
315
365
  # @return [Fixnum]
316
366
  attr_accessor :failure_count
317
367
 
368
+ # Pub/Sub topic for receiving notification. If this field is set, when the
369
+ # import is finished, a notification will be sent to specified Pub/Sub topic.
370
+ # The message data will be JSON string of a Operation. Format of the Pub/Sub
371
+ # topic is `projects/`project`/topics/`topic``.
372
+ # Corresponds to the JSON property `notificationPubsubTopic`
373
+ # @return [String]
374
+ attr_accessor :notification_pubsub_topic
375
+
376
+ # Id of the request / operation. This is parroting back the requestId that was
377
+ # passed in the request.
378
+ # Corresponds to the JSON property `requestId`
379
+ # @return [String]
380
+ attr_accessor :request_id
381
+
318
382
  # Count of entries that were processed successfully.
319
383
  # Corresponds to the JSON property `successCount`
320
384
  # @return [Fixnum]
@@ -334,6 +398,8 @@ module Google
334
398
  def update!(**args)
335
399
  @create_time = args[:create_time] if args.key?(:create_time)
336
400
  @failure_count = args[:failure_count] if args.key?(:failure_count)
401
+ @notification_pubsub_topic = args[:notification_pubsub_topic] if args.key?(:notification_pubsub_topic)
402
+ @request_id = args[:request_id] if args.key?(:request_id)
337
403
  @success_count = args[:success_count] if args.key?(:success_count)
338
404
  @update_time = args[:update_time] if args.key?(:update_time)
339
405
  end
@@ -467,6 +533,64 @@ module Google
467
533
  end
468
534
  end
469
535
 
536
+ # Metadata related to the progress of the RemoveFulfillmentPlaces operation.
537
+ # Currently empty because there is no meaningful metadata populated from the
538
+ # RemoveFulfillmentPlaces method.
539
+ class GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata
540
+ include Google::Apis::Core::Hashable
541
+
542
+ def initialize(**args)
543
+ update!(**args)
544
+ end
545
+
546
+ # Update properties of this object
547
+ def update!(**args)
548
+ end
549
+ end
550
+
551
+ # Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
552
+ # is no meaningful response populated from the RemoveFulfillmentPlaces method.
553
+ class GoogleCloudRetailV2RemoveFulfillmentPlacesResponse
554
+ include Google::Apis::Core::Hashable
555
+
556
+ def initialize(**args)
557
+ update!(**args)
558
+ end
559
+
560
+ # Update properties of this object
561
+ def update!(**args)
562
+ end
563
+ end
564
+
565
+ # Metadata related to the progress of the SetInventory operation. Currently
566
+ # empty because there is no meaningful metadata populated from the SetInventory
567
+ # method.
568
+ class GoogleCloudRetailV2SetInventoryMetadata
569
+ include Google::Apis::Core::Hashable
570
+
571
+ def initialize(**args)
572
+ update!(**args)
573
+ end
574
+
575
+ # Update properties of this object
576
+ def update!(**args)
577
+ end
578
+ end
579
+
580
+ # Response of the SetInventoryRequest. Currently empty because there is no
581
+ # meaningful response populated from the SetInventory method.
582
+ class GoogleCloudRetailV2SetInventoryResponse
583
+ include Google::Apis::Core::Hashable
584
+
585
+ def initialize(**args)
586
+ update!(**args)
587
+ end
588
+
589
+ # Update properties of this object
590
+ def update!(**args)
591
+ end
592
+ end
593
+
470
594
  # A summary of import result. The UserEventImportSummary summarizes the import
471
595
  # status for user events.
472
596
  class GoogleCloudRetailV2UserEventImportSummary
@@ -494,6 +618,129 @@ module Google
494
618
  end
495
619
  end
496
620
 
621
+ # Metadata related to the progress of the AddFulfillmentPlaces operation.
622
+ # Currently empty because there is no meaningful metadata populated from the
623
+ # AddFulfillmentPlaces method.
624
+ class GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata
625
+ include Google::Apis::Core::Hashable
626
+
627
+ def initialize(**args)
628
+ update!(**args)
629
+ end
630
+
631
+ # Update properties of this object
632
+ def update!(**args)
633
+ end
634
+ end
635
+
636
+ # Request message for AddFulfillmentPlaces method.
637
+ class GoogleCloudRetailV2alphaAddFulfillmentPlacesRequest
638
+ include Google::Apis::Core::Hashable
639
+
640
+ # The time when the fulfillment updates are issued, used to prevent out-of-order
641
+ # updates on fulfillment information. If not provided, the internal system time
642
+ # will be used.
643
+ # Corresponds to the JSON property `addTime`
644
+ # @return [String]
645
+ attr_accessor :add_time
646
+
647
+ # If set to true, and the Product is not found, the fulfillment information will
648
+ # still be processed and retained for at most 1 day and processed once the
649
+ # Product is created. If set to false, an INVALID_ARGUMENT error is returned if
650
+ # the Product is not found.
651
+ # Corresponds to the JSON property `allowMissing`
652
+ # @return [Boolean]
653
+ attr_accessor :allow_missing
654
+ alias_method :allow_missing?, :allow_missing
655
+
656
+ # Required. The IDs for this type, such as the store IDs for "pickup-in-store"
657
+ # or the region IDs for "same-day-delivery" to be added for this type. Duplicate
658
+ # IDs will be automatically ignored. At least 1 value is required, and a maximum
659
+ # of 2000 values are allowed. Each value must be a string with a length limit of
660
+ # 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1" or "
661
+ # REGION-2". Otherwise, an INVALID_ARGUMENT error is returned. If the total
662
+ # number of place IDs exceeds 2000 for this type after adding, then the update
663
+ # will be rejected.
664
+ # Corresponds to the JSON property `placeIds`
665
+ # @return [Array<String>]
666
+ attr_accessor :place_ids
667
+
668
+ # Required. The fulfillment type, including commonly used types (such as pickup
669
+ # in store and same day delivery), and custom types. Supported values: * "pickup-
670
+ # in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "
671
+ # custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-
672
+ # type-5" If this field is set to an invalid value other than these, an
673
+ # INVALID_ARGUMENT error is returned. This field directly corresponds to Product.
674
+ # fulfillment_info.type.
675
+ # Corresponds to the JSON property `type`
676
+ # @return [String]
677
+ attr_accessor :type
678
+
679
+ def initialize(**args)
680
+ update!(**args)
681
+ end
682
+
683
+ # Update properties of this object
684
+ def update!(**args)
685
+ @add_time = args[:add_time] if args.key?(:add_time)
686
+ @allow_missing = args[:allow_missing] if args.key?(:allow_missing)
687
+ @place_ids = args[:place_ids] if args.key?(:place_ids)
688
+ @type = args[:type] if args.key?(:type)
689
+ end
690
+ end
691
+
692
+ # Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
693
+ # is no meaningful response populated from the AddFulfillmentPlaces method.
694
+ class GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse
695
+ include Google::Apis::Core::Hashable
696
+
697
+ def initialize(**args)
698
+ update!(**args)
699
+ end
700
+
701
+ # Update properties of this object
702
+ def update!(**args)
703
+ end
704
+ end
705
+
706
+ # An intended audience of the Product for whom it's sold.
707
+ class GoogleCloudRetailV2alphaAudience
708
+ include Google::Apis::Core::Hashable
709
+
710
+ # The age groups of the audience. Strongly encouraged to use the standard values:
711
+ # "newborn" (up to 3 months old), "infant" (3–12 months old), "toddler" (1–5
712
+ # years old), "kids" (5–13 years old), "adult" (typically teens or older). At
713
+ # most 5 values are allowed. Each value must be a UTF-8 encoded string with a
714
+ # length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is
715
+ # returned. Google Merchant Center property [age_group](https://support.google.
716
+ # com/merchants/answer/6324463). Schema.org property [Product.audience.
717
+ # suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.
718
+ # suggestedMaxAge](https://schema.org/suggestedMaxAge).
719
+ # Corresponds to the JSON property `ageGroups`
720
+ # @return [Array<String>]
721
+ attr_accessor :age_groups
722
+
723
+ # The genders of the audience. Strongly encouraged to use the standard values: "
724
+ # male", "female", "unisex". At most 5 values are allowed. Each value must be a
725
+ # UTF-8 encoded string with a length limit of 128 characters. Otherwise, an
726
+ # INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](
727
+ # https://support.google.com/merchants/answer/6324479). Schema.org property [
728
+ # Product.audience.suggestedGender](https://schema.org/suggestedGender).
729
+ # Corresponds to the JSON property `genders`
730
+ # @return [Array<String>]
731
+ attr_accessor :genders
732
+
733
+ def initialize(**args)
734
+ update!(**args)
735
+ end
736
+
737
+ # Update properties of this object
738
+ def update!(**args)
739
+ @age_groups = args[:age_groups] if args.key?(:age_groups)
740
+ @genders = args[:genders] if args.key?(:genders)
741
+ end
742
+ end
743
+
497
744
  # BigQuery source import data from.
498
745
  class GoogleCloudRetailV2alphaBigQuerySource
499
746
  include Google::Apis::Core::Hashable
@@ -504,8 +751,7 @@ module Google
504
751
  # Importing catalog data from Merchant Center](https://cloud.google.com/retail/
505
752
  # recommendations-ai/docs/upload-catalog#mc). Supported values for user events
506
753
  # imports: * `user_event` (default): One JSON UserEvent per line. * `
507
- # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719?
508
- # hl=en.
754
+ # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719.
509
755
  # Corresponds to the JSON property `dataSchema`
510
756
  # @return [String]
511
757
  attr_accessor :data_schema
@@ -523,6 +769,18 @@ module Google
523
769
  # @return [String]
524
770
  attr_accessor :gcs_staging_dir
525
771
 
772
+ # Represents a whole or partial calendar date, such as a birthday. The time of
773
+ # day and time zone are either specified elsewhere or are insignificant. The
774
+ # date is relative to the Gregorian Calendar. This can represent one of the
775
+ # following: * A full date, with non-zero year, month, and day values * A month
776
+ # and day value, with a zero year, such as an anniversary * A year on its own,
777
+ # with zero month and day values * A year and month value, with a zero day, such
778
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
779
+ # google.protobuf.Timestamp`.
780
+ # Corresponds to the JSON property `partitionDate`
781
+ # @return [Google::Apis::RetailV2alpha::GoogleTypeDate]
782
+ attr_accessor :partition_date
783
+
526
784
  # The project ID (can be project # or ID) that the BigQuery source is in with a
527
785
  # length limit of 128 characters. If not specified, inherits the project ID from
528
786
  # the parent request.
@@ -545,6 +803,7 @@ module Google
545
803
  @data_schema = args[:data_schema] if args.key?(:data_schema)
546
804
  @dataset_id = args[:dataset_id] if args.key?(:dataset_id)
547
805
  @gcs_staging_dir = args[:gcs_staging_dir] if args.key?(:gcs_staging_dir)
806
+ @partition_date = args[:partition_date] if args.key?(:partition_date)
548
807
  @project_id = args[:project_id] if args.key?(:project_id)
549
808
  @table_id = args[:table_id] if args.key?(:table_id)
550
809
  end
@@ -561,6 +820,12 @@ module Google
561
820
  # @return [String]
562
821
  attr_accessor :display_name
563
822
 
823
+ # Configures Merchant Center linking. Links contained in the config will be used
824
+ # to sync data from a Merchant Center account to a Cloud Retail branch.
825
+ # Corresponds to the JSON property `merchantCenterLinkingConfig`
826
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaMerchantCenterLinkingConfig]
827
+ attr_accessor :merchant_center_linking_config
828
+
564
829
  # Required. Immutable. The fully qualified resource name of the catalog.
565
830
  # Corresponds to the JSON property `name`
566
831
  # @return [String]
@@ -579,15 +844,203 @@ module Google
579
844
  # Update properties of this object
580
845
  def update!(**args)
581
846
  @display_name = args[:display_name] if args.key?(:display_name)
847
+ @merchant_center_linking_config = args[:merchant_center_linking_config] if args.key?(:merchant_center_linking_config)
582
848
  @name = args[:name] if args.key?(:name)
583
849
  @product_level_config = args[:product_level_config] if args.key?(:product_level_config)
584
850
  end
585
851
  end
586
852
 
853
+ # The color information of a Product.
854
+ class GoogleCloudRetailV2alphaColorInfo
855
+ include Google::Apis::Core::Hashable
856
+
857
+ # The standard color families. Strongly recommended to use the following
858
+ # standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", "
859
+ # Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is
860
+ # expected to have only 1 color family. May consider using single "Mixed"
861
+ # instead of multiple values. A maximum of 5 values are allowed. Each value must
862
+ # be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an
863
+ # INVALID_ARGUMENT error is returned. Google Merchant Center property [color](
864
+ # https://support.google.com/merchants/answer/6324487). Schema.org property [
865
+ # Product.color](https://schema.org/color).
866
+ # Corresponds to the JSON property `colorFamilies`
867
+ # @return [Array<String>]
868
+ attr_accessor :color_families
869
+
870
+ # The color display names, which may be different from standard color family
871
+ # names, such as the color aliases used in the website frontend. Normally it is
872
+ # expected to have only 1 color. May consider using single "Mixed" instead of
873
+ # multiple values. A maximum of 5 colors are allowed. Each value must be a UTF-8
874
+ # encoded string with a length limit of 128 characters. Otherwise, an
875
+ # INVALID_ARGUMENT error is returned. Google Merchant Center property [color](
876
+ # https://support.google.com/merchants/answer/6324487). Schema.org property [
877
+ # Product.color](https://schema.org/color).
878
+ # Corresponds to the JSON property `colors`
879
+ # @return [Array<String>]
880
+ attr_accessor :colors
881
+
882
+ def initialize(**args)
883
+ update!(**args)
884
+ end
885
+
886
+ # Update properties of this object
887
+ def update!(**args)
888
+ @color_families = args[:color_families] if args.key?(:color_families)
889
+ @colors = args[:colors] if args.key?(:colors)
890
+ end
891
+ end
892
+
893
+ # Response of the auto-complete query.
894
+ class GoogleCloudRetailV2alphaCompleteQueryResponse
895
+ include Google::Apis::Core::Hashable
896
+
897
+ # A unique complete token. This should be included in the SearchRequest
898
+ # resulting from this completion, which enables accurate attribution of complete
899
+ # model performance.
900
+ # Corresponds to the JSON property `attributionToken`
901
+ # @return [String]
902
+ attr_accessor :attribution_token
903
+
904
+ # Results of the matching suggestions. The result list is ordered and the first
905
+ # result is top suggestion.
906
+ # Corresponds to the JSON property `completionResults`
907
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult>]
908
+ attr_accessor :completion_results
909
+
910
+ # Matched recent searches of this user. This field is a restricted feature.
911
+ # Contact Retail Support (retail-search-support@google.com) if you are
912
+ # interested in enabling it. This feature is only available when
913
+ # CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The
914
+ # recent searches satisfy the follow rules: * They are ordered from latest to
915
+ # oldest. * They are matched with CompleteQueryRequest.query case insensitively.
916
+ # * They are transformed to lower cases. * They are UTF-8 safe. Recent searches
917
+ # are deduplicated. More recent searches will be reserved when duplication
918
+ # happens.
919
+ # Corresponds to the JSON property `recentSearchResults`
920
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult>]
921
+ attr_accessor :recent_search_results
922
+
923
+ def initialize(**args)
924
+ update!(**args)
925
+ end
926
+
927
+ # Update properties of this object
928
+ def update!(**args)
929
+ @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
930
+ @completion_results = args[:completion_results] if args.key?(:completion_results)
931
+ @recent_search_results = args[:recent_search_results] if args.key?(:recent_search_results)
932
+ end
933
+ end
934
+
935
+ # Resource that represents completion results.
936
+ class GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult
937
+ include Google::Apis::Core::Hashable
938
+
939
+ # Additional custom attributes ingested through BigQuery.
940
+ # Corresponds to the JSON property `attributes`
941
+ # @return [Hash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>]
942
+ attr_accessor :attributes
943
+
944
+ # The suggestion for the query.
945
+ # Corresponds to the JSON property `suggestion`
946
+ # @return [String]
947
+ attr_accessor :suggestion
948
+
949
+ def initialize(**args)
950
+ update!(**args)
951
+ end
952
+
953
+ # Update properties of this object
954
+ def update!(**args)
955
+ @attributes = args[:attributes] if args.key?(:attributes)
956
+ @suggestion = args[:suggestion] if args.key?(:suggestion)
957
+ end
958
+ end
959
+
960
+ # Recent search of this user.
961
+ class GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult
962
+ include Google::Apis::Core::Hashable
963
+
964
+ # The recent search query.
965
+ # Corresponds to the JSON property `recentSearch`
966
+ # @return [String]
967
+ attr_accessor :recent_search
968
+
969
+ def initialize(**args)
970
+ update!(**args)
971
+ end
972
+
973
+ # Update properties of this object
974
+ def update!(**args)
975
+ @recent_search = args[:recent_search] if args.key?(:recent_search)
976
+ end
977
+ end
978
+
979
+ # The input config source for completion data.
980
+ class GoogleCloudRetailV2alphaCompletionDataInputConfig
981
+ include Google::Apis::Core::Hashable
982
+
983
+ # BigQuery source import data from.
984
+ # Corresponds to the JSON property `bigQuerySource`
985
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaBigQuerySource]
986
+ attr_accessor :big_query_source
987
+
988
+ def initialize(**args)
989
+ update!(**args)
990
+ end
991
+
992
+ # Update properties of this object
993
+ def update!(**args)
994
+ @big_query_source = args[:big_query_source] if args.key?(:big_query_source)
995
+ end
996
+ end
997
+
998
+ # Detailed completion information including completion attribution token and
999
+ # clicked completion info.
1000
+ class GoogleCloudRetailV2alphaCompletionDetail
1001
+ include Google::Apis::Core::Hashable
1002
+
1003
+ # Completion attribution token in CompleteQueryResponse.attribution_token.
1004
+ # Corresponds to the JSON property `completionAttributionToken`
1005
+ # @return [String]
1006
+ attr_accessor :completion_attribution_token
1007
+
1008
+ # End user selected CompleteQueryResponse.CompletionResult.suggestion position,
1009
+ # starting from 0.
1010
+ # Corresponds to the JSON property `selectedPosition`
1011
+ # @return [Fixnum]
1012
+ attr_accessor :selected_position
1013
+
1014
+ # End user selected CompleteQueryResponse.CompletionResult.suggestion.
1015
+ # Corresponds to the JSON property `selectedSuggestion`
1016
+ # @return [String]
1017
+ attr_accessor :selected_suggestion
1018
+
1019
+ def initialize(**args)
1020
+ update!(**args)
1021
+ end
1022
+
1023
+ # Update properties of this object
1024
+ def update!(**args)
1025
+ @completion_attribution_token = args[:completion_attribution_token] if args.key?(:completion_attribution_token)
1026
+ @selected_position = args[:selected_position] if args.key?(:selected_position)
1027
+ @selected_suggestion = args[:selected_suggestion] if args.key?(:selected_suggestion)
1028
+ end
1029
+ end
1030
+
587
1031
  # A custom attribute that is not explicitly modeled in Product.
588
1032
  class GoogleCloudRetailV2alphaCustomAttribute
589
1033
  include Google::Apis::Core::Hashable
590
1034
 
1035
+ # If true, custom attribute values are indexed, so that it can be filtered,
1036
+ # faceted or boosted in SearchService.Search. This field is ignored in a
1037
+ # UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and
1038
+ # SearchRequest.boost_spec for more details.
1039
+ # Corresponds to the JSON property `indexable`
1040
+ # @return [Boolean]
1041
+ attr_accessor :indexable
1042
+ alias_method :indexable?, :indexable
1043
+
591
1044
  # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when
592
1045
  # the key is "lengths_cm". At most 400 values are allowed.Otherwise, an
593
1046
  # INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be
@@ -596,6 +1049,14 @@ module Google
596
1049
  # @return [Array<Float>]
597
1050
  attr_accessor :numbers
598
1051
 
1052
+ # If true, custom attribute values are searchable by text queries in
1053
+ # SearchService.Search. This field is ignored in a UserEvent. Only set if type
1054
+ # text is set. Otherwise, a INVALID_ARGUMENT error is returned.
1055
+ # Corresponds to the JSON property `searchable`
1056
+ # @return [Boolean]
1057
+ attr_accessor :searchable
1058
+ alias_method :searchable?, :searchable
1059
+
599
1060
  # The textual values of this custom attribute. For example, `["yellow", "green"]`
600
1061
  # when the key is "color". At most 400 values are allowed. Empty values are not
601
1062
  # allowed. Each value must be a UTF-8 encoded string with a length limit of 256
@@ -612,7 +1073,9 @@ module Google
612
1073
 
613
1074
  # Update properties of this object
614
1075
  def update!(**args)
1076
+ @indexable = args[:indexable] if args.key?(:indexable)
615
1077
  @numbers = args[:numbers] if args.key?(:numbers)
1078
+ @searchable = args[:searchable] if args.key?(:searchable)
616
1079
  @text = args[:text] if args.key?(:text)
617
1080
  end
618
1081
  end
@@ -719,19 +1182,54 @@ module Google
719
1182
  end
720
1183
  end
721
1184
 
722
- # Google Cloud Storage location for input content. format.
723
- class GoogleCloudRetailV2alphaGcsSource
1185
+ # Fulfillment information, such as the store IDs for in-store pickup or region
1186
+ # IDs for different shipping methods.
1187
+ class GoogleCloudRetailV2alphaFulfillmentInfo
724
1188
  include Google::Apis::Core::Hashable
725
1189
 
726
- # The schema to use when parsing the data from the source. Supported values for
727
- # product imports: * `product` (default): One JSON Product per line. Each
728
- # product must have a valid Product.id. * `product_merchant_center`: See [
729
- # Importing catalog data from Merchant Center](https://cloud.google.com/retail/
730
- # recommendations-ai/docs/upload-catalog#mc). Supported values for user events
731
- # imports: * `user_event` (default): One JSON UserEvent per line. * `
732
- # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719?
733
- # hl=en.
734
- # Corresponds to the JSON property `dataSchema`
1190
+ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-
1191
+ # in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A
1192
+ # maximum of 2000 values are allowed. Each value must be a string with a length
1193
+ # limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1"
1194
+ # or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned.
1195
+ # Corresponds to the JSON property `placeIds`
1196
+ # @return [Array<String>]
1197
+ attr_accessor :place_ids
1198
+
1199
+ # The fulfillment type, including commonly used types (such as pickup in store
1200
+ # and same day delivery), and custom types. Customers have to map custom types
1201
+ # to their display names before rendering UI. Supported values: * "pickup-in-
1202
+ # store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-
1203
+ # type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5"
1204
+ # If this field is set to an invalid value other than these, an
1205
+ # INVALID_ARGUMENT error is returned.
1206
+ # Corresponds to the JSON property `type`
1207
+ # @return [String]
1208
+ attr_accessor :type
1209
+
1210
+ def initialize(**args)
1211
+ update!(**args)
1212
+ end
1213
+
1214
+ # Update properties of this object
1215
+ def update!(**args)
1216
+ @place_ids = args[:place_ids] if args.key?(:place_ids)
1217
+ @type = args[:type] if args.key?(:type)
1218
+ end
1219
+ end
1220
+
1221
+ # Google Cloud Storage location for input content. format.
1222
+ class GoogleCloudRetailV2alphaGcsSource
1223
+ include Google::Apis::Core::Hashable
1224
+
1225
+ # The schema to use when parsing the data from the source. Supported values for
1226
+ # product imports: * `product` (default): One JSON Product per line. Each
1227
+ # product must have a valid Product.id. * `product_merchant_center`: See [
1228
+ # Importing catalog data from Merchant Center](https://cloud.google.com/retail/
1229
+ # recommendations-ai/docs/upload-catalog#mc). Supported values for user events
1230
+ # imports: * `user_event` (default): One JSON UserEvent per line. * `
1231
+ # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719.
1232
+ # Corresponds to the JSON property `dataSchema`
735
1233
  # @return [String]
736
1234
  attr_accessor :data_schema
737
1235
 
@@ -757,6 +1255,38 @@ module Google
757
1255
  end
758
1256
  end
759
1257
 
1258
+ # Response message of CatalogService.GetDefaultBranch.
1259
+ class GoogleCloudRetailV2alphaGetDefaultBranchResponse
1260
+ include Google::Apis::Core::Hashable
1261
+
1262
+ # Full resource name of the branch id currently set as default branch.
1263
+ # Corresponds to the JSON property `branch`
1264
+ # @return [String]
1265
+ attr_accessor :branch
1266
+
1267
+ # This corresponds to SetDefaultBranchRequest.note field, when this branch was
1268
+ # set as default.
1269
+ # Corresponds to the JSON property `note`
1270
+ # @return [String]
1271
+ attr_accessor :note
1272
+
1273
+ # The time when this branch is set to default.
1274
+ # Corresponds to the JSON property `setTime`
1275
+ # @return [String]
1276
+ attr_accessor :set_time
1277
+
1278
+ def initialize(**args)
1279
+ update!(**args)
1280
+ end
1281
+
1282
+ # Update properties of this object
1283
+ def update!(**args)
1284
+ @branch = args[:branch] if args.key?(:branch)
1285
+ @note = args[:note] if args.key?(:note)
1286
+ @set_time = args[:set_time] if args.key?(:set_time)
1287
+ end
1288
+ end
1289
+
760
1290
  # Product thumbnail/detail image.
761
1291
  class GoogleCloudRetailV2alphaImage
762
1292
  include Google::Apis::Core::Hashable
@@ -794,6 +1324,55 @@ module Google
794
1324
  end
795
1325
  end
796
1326
 
1327
+ # Request message for ImportCompletionData methods.
1328
+ class GoogleCloudRetailV2alphaImportCompletionDataRequest
1329
+ include Google::Apis::Core::Hashable
1330
+
1331
+ # The input config source for completion data.
1332
+ # Corresponds to the JSON property `inputConfig`
1333
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionDataInputConfig]
1334
+ attr_accessor :input_config
1335
+
1336
+ # Pub/Sub topic for receiving notification. If this field is set, when the
1337
+ # import is finished, a notification will be sent to specified Pub/Sub topic.
1338
+ # The message data will be JSON string of a Operation. Format of the Pub/Sub
1339
+ # topic is `projects/`project`/topics/`topic``.
1340
+ # Corresponds to the JSON property `notificationPubsubTopic`
1341
+ # @return [String]
1342
+ attr_accessor :notification_pubsub_topic
1343
+
1344
+ def initialize(**args)
1345
+ update!(**args)
1346
+ end
1347
+
1348
+ # Update properties of this object
1349
+ def update!(**args)
1350
+ @input_config = args[:input_config] if args.key?(:input_config)
1351
+ @notification_pubsub_topic = args[:notification_pubsub_topic] if args.key?(:notification_pubsub_topic)
1352
+ end
1353
+ end
1354
+
1355
+ # Response of the ImportCompletionDataRequest. If the long running operation is
1356
+ # done, this message is returned by the google.longrunning.Operations.response
1357
+ # field if the operation is successful.
1358
+ class GoogleCloudRetailV2alphaImportCompletionDataResponse
1359
+ include Google::Apis::Core::Hashable
1360
+
1361
+ # A sample of errors encountered while processing the request.
1362
+ # Corresponds to the JSON property `errorSamples`
1363
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
1364
+ attr_accessor :error_samples
1365
+
1366
+ def initialize(**args)
1367
+ update!(**args)
1368
+ end
1369
+
1370
+ # Update properties of this object
1371
+ def update!(**args)
1372
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
1373
+ end
1374
+ end
1375
+
797
1376
  # Configuration of destination for Import related errors.
798
1377
  class GoogleCloudRetailV2alphaImportErrorsConfig
799
1378
  include Google::Apis::Core::Hashable
@@ -830,6 +1409,20 @@ module Google
830
1409
  # @return [Fixnum]
831
1410
  attr_accessor :failure_count
832
1411
 
1412
+ # Pub/Sub topic for receiving notification. If this field is set, when the
1413
+ # import is finished, a notification will be sent to specified Pub/Sub topic.
1414
+ # The message data will be JSON string of a Operation. Format of the Pub/Sub
1415
+ # topic is `projects/`project`/topics/`topic``.
1416
+ # Corresponds to the JSON property `notificationPubsubTopic`
1417
+ # @return [String]
1418
+ attr_accessor :notification_pubsub_topic
1419
+
1420
+ # Id of the request / operation. This is parroting back the requestId that was
1421
+ # passed in the request.
1422
+ # Corresponds to the JSON property `requestId`
1423
+ # @return [String]
1424
+ attr_accessor :request_id
1425
+
833
1426
  # Count of entries that were processed successfully.
834
1427
  # Corresponds to the JSON property `successCount`
835
1428
  # @return [Fixnum]
@@ -849,6 +1442,8 @@ module Google
849
1442
  def update!(**args)
850
1443
  @create_time = args[:create_time] if args.key?(:create_time)
851
1444
  @failure_count = args[:failure_count] if args.key?(:failure_count)
1445
+ @notification_pubsub_topic = args[:notification_pubsub_topic] if args.key?(:notification_pubsub_topic)
1446
+ @request_id = args[:request_id] if args.key?(:request_id)
852
1447
  @success_count = args[:success_count] if args.key?(:success_count)
853
1448
  @update_time = args[:update_time] if args.key?(:update_time)
854
1449
  end
@@ -868,6 +1463,30 @@ module Google
868
1463
  # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductInputConfig]
869
1464
  attr_accessor :input_config
870
1465
 
1466
+ # Pub/Sub topic for receiving notification. If this field is set, when the
1467
+ # import is finished, a notification will be sent to specified Pub/Sub topic.
1468
+ # The message data will be JSON string of a Operation. Format of the Pub/Sub
1469
+ # topic is `projects/`project`/topics/`topic``. Only supported when
1470
+ # ImportProductsRequest.reconciliation_mode is set to `FULL`.
1471
+ # Corresponds to the JSON property `notificationPubsubTopic`
1472
+ # @return [String]
1473
+ attr_accessor :notification_pubsub_topic
1474
+
1475
+ # The mode of reconciliation between existing products and the products to be
1476
+ # imported. Defaults to ReconciliationMode.INCREMENTAL.
1477
+ # Corresponds to the JSON property `reconciliationMode`
1478
+ # @return [String]
1479
+ attr_accessor :reconciliation_mode
1480
+
1481
+ # Unique identifier provided by client, within the ancestor dataset scope.
1482
+ # Ensures idempotency and used for request deduplication. Server-generated if
1483
+ # unspecified. Up to 128 characters long and must match the pattern: "[a-zA-Z0-
1484
+ # 9_]+". This is returned as Operation.name in ImportMetadata. Only supported
1485
+ # when ImportProductsRequest.reconciliation_mode is set to `FULL`.
1486
+ # Corresponds to the JSON property `requestId`
1487
+ # @return [String]
1488
+ attr_accessor :request_id
1489
+
871
1490
  # Indicates which fields in the provided imported 'products' to update. If not
872
1491
  # set, will by default update all fields.
873
1492
  # Corresponds to the JSON property `updateMask`
@@ -882,6 +1501,9 @@ module Google
882
1501
  def update!(**args)
883
1502
  @errors_config = args[:errors_config] if args.key?(:errors_config)
884
1503
  @input_config = args[:input_config] if args.key?(:input_config)
1504
+ @notification_pubsub_topic = args[:notification_pubsub_topic] if args.key?(:notification_pubsub_topic)
1505
+ @reconciliation_mode = args[:reconciliation_mode] if args.key?(:reconciliation_mode)
1506
+ @request_id = args[:request_id] if args.key?(:request_id)
885
1507
  @update_mask = args[:update_mask] if args.key?(:update_mask)
886
1508
  end
887
1509
  end
@@ -972,6 +1594,43 @@ module Google
972
1594
  end
973
1595
  end
974
1596
 
1597
+ # A floating point interval.
1598
+ class GoogleCloudRetailV2alphaInterval
1599
+ include Google::Apis::Core::Hashable
1600
+
1601
+ # Exclusive upper bound.
1602
+ # Corresponds to the JSON property `exclusiveMaximum`
1603
+ # @return [Float]
1604
+ attr_accessor :exclusive_maximum
1605
+
1606
+ # Exclusive lower bound.
1607
+ # Corresponds to the JSON property `exclusiveMinimum`
1608
+ # @return [Float]
1609
+ attr_accessor :exclusive_minimum
1610
+
1611
+ # Inclusive upper bound.
1612
+ # Corresponds to the JSON property `maximum`
1613
+ # @return [Float]
1614
+ attr_accessor :maximum
1615
+
1616
+ # Inclusive lower bound.
1617
+ # Corresponds to the JSON property `minimum`
1618
+ # @return [Float]
1619
+ attr_accessor :minimum
1620
+
1621
+ def initialize(**args)
1622
+ update!(**args)
1623
+ end
1624
+
1625
+ # Update properties of this object
1626
+ def update!(**args)
1627
+ @exclusive_maximum = args[:exclusive_maximum] if args.key?(:exclusive_maximum)
1628
+ @exclusive_minimum = args[:exclusive_minimum] if args.key?(:exclusive_minimum)
1629
+ @maximum = args[:maximum] if args.key?(:maximum)
1630
+ @minimum = args[:minimum] if args.key?(:minimum)
1631
+ end
1632
+ end
1633
+
975
1634
  # Response for CatalogService.ListCatalogs method.
976
1635
  class GoogleCloudRetailV2alphaListCatalogsResponse
977
1636
  include Google::Apis::Core::Hashable
@@ -998,6 +1657,104 @@ module Google
998
1657
  end
999
1658
  end
1000
1659
 
1660
+ # Response message for ProductService.ListProducts method.
1661
+ class GoogleCloudRetailV2alphaListProductsResponse
1662
+ include Google::Apis::Core::Hashable
1663
+
1664
+ # A token that can be sent as ListProductsRequest.page_token to retrieve the
1665
+ # next page. If this field is omitted, there are no subsequent pages.
1666
+ # Corresponds to the JSON property `nextPageToken`
1667
+ # @return [String]
1668
+ attr_accessor :next_page_token
1669
+
1670
+ # The Products.
1671
+ # Corresponds to the JSON property `products`
1672
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct>]
1673
+ attr_accessor :products
1674
+
1675
+ # The total count of matched Products irrespective of pagination. The total
1676
+ # number of Products returned by pagination may be less than the total_size that
1677
+ # matches. This field is ignored if ListProductsRequest.require_total_size is
1678
+ # not set or ListProductsRequest.page_token is not empty.
1679
+ # Corresponds to the JSON property `totalSize`
1680
+ # @return [Fixnum]
1681
+ attr_accessor :total_size
1682
+
1683
+ def initialize(**args)
1684
+ update!(**args)
1685
+ end
1686
+
1687
+ # Update properties of this object
1688
+ def update!(**args)
1689
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1690
+ @products = args[:products] if args.key?(:products)
1691
+ @total_size = args[:total_size] if args.key?(:total_size)
1692
+ end
1693
+ end
1694
+
1695
+ # Represents a link between a Merchant Center account and a branch. Once a link
1696
+ # is established, products from the linked merchant center account will be
1697
+ # streamed to the linked branch.
1698
+ class GoogleCloudRetailV2alphaMerchantCenterLink
1699
+ include Google::Apis::Core::Hashable
1700
+
1701
+ # The branch id (e.g. 0/1/2) within this catalog that products from
1702
+ # merchant_center_account_id are streamed to. When updating this field, an empty
1703
+ # value will use the currently configured default branch. However, changing the
1704
+ # default branch later on won't change the linked branch here. A single branch
1705
+ # id can only have one linked merchant center account id.
1706
+ # Corresponds to the JSON property `branchId`
1707
+ # @return [String]
1708
+ attr_accessor :branch_id
1709
+
1710
+ # String representing the destination to import for, all if left empty. List of
1711
+ # possible values can be found here. [https://support.google.com/merchants/
1712
+ # answer/7501026?hl=en] List of allowed string values: "shopping-ads", "buy-on-
1713
+ # google-listings", "display-ads", "local-inventory -ads", "free-listings", "
1714
+ # free-local-listings" NOTE: The string values are case sensitive.
1715
+ # Corresponds to the JSON property `destinations`
1716
+ # @return [Array<String>]
1717
+ attr_accessor :destinations
1718
+
1719
+ # Required. The linked [Merchant center account id](https://developers.google.
1720
+ # com/shopping-content/guides/accountstatuses). The account must be a standalone
1721
+ # account or a sub-account of a MCA.
1722
+ # Corresponds to the JSON property `merchantCenterAccountId`
1723
+ # @return [Fixnum]
1724
+ attr_accessor :merchant_center_account_id
1725
+
1726
+ def initialize(**args)
1727
+ update!(**args)
1728
+ end
1729
+
1730
+ # Update properties of this object
1731
+ def update!(**args)
1732
+ @branch_id = args[:branch_id] if args.key?(:branch_id)
1733
+ @destinations = args[:destinations] if args.key?(:destinations)
1734
+ @merchant_center_account_id = args[:merchant_center_account_id] if args.key?(:merchant_center_account_id)
1735
+ end
1736
+ end
1737
+
1738
+ # Configures Merchant Center linking. Links contained in the config will be used
1739
+ # to sync data from a Merchant Center account to a Cloud Retail branch.
1740
+ class GoogleCloudRetailV2alphaMerchantCenterLinkingConfig
1741
+ include Google::Apis::Core::Hashable
1742
+
1743
+ # Links between Merchant Center accounts and branches.
1744
+ # Corresponds to the JSON property `links`
1745
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaMerchantCenterLink>]
1746
+ attr_accessor :links
1747
+
1748
+ def initialize(**args)
1749
+ update!(**args)
1750
+ end
1751
+
1752
+ # Update properties of this object
1753
+ def update!(**args)
1754
+ @links = args[:links] if args.key?(:links)
1755
+ end
1756
+ end
1757
+
1001
1758
  # Request message for Predict method.
1002
1759
  class GoogleCloudRetailV2alphaPredictRequest
1003
1760
  include Google::Apis::Core::Hashable
@@ -1061,11 +1818,11 @@ module Google
1061
1818
  # blocks all prediction results. * `priceRerankLevel`: String. Default empty. If
1062
1819
  # set to be non-empty, then it needs to be one of `'no-price-reranking', 'low-
1063
1820
  # price-reranking', 'medium-price-reranking', 'high-price-reranking'`. This
1064
- # gives request level control and adjust prediction results based on product
1821
+ # gives request-level control and adjusts prediction results based on product
1065
1822
  # price. * `diversityLevel`: String. Default empty. If set to be non-empty, then
1066
1823
  # it needs to be one of `'no-diversity', 'low-diversity', 'medium-diversity', '
1067
- # high-diversity', 'auto-diversity'`. This gives request level control and
1068
- # adjust prediction results based on product category.
1824
+ # high-diversity', 'auto-diversity'`. This gives request-level control and
1825
+ # adjusts prediction results based on product category.
1069
1826
  # Corresponds to the JSON property `params`
1070
1827
  # @return [Hash<String,Object>]
1071
1828
  attr_accessor :params
@@ -1183,7 +1940,9 @@ module Google
1183
1940
 
1184
1941
  # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-
1185
1942
  # currency-codes.html). If this field is an unrecognizable currency code, an
1186
- # INVALID_ARGUMENT error is returned.
1943
+ # INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the
1944
+ # same Product.primary_product_id must share the same currency_code. Otherwise,
1945
+ # a FAILED_PRECONDITION error is returned.
1187
1946
  # Corresponds to the JSON property `currencyCode`
1188
1947
  # @return [String]
1189
1948
  attr_accessor :currency_code
@@ -1201,6 +1960,29 @@ module Google
1201
1960
  # @return [Float]
1202
1961
  attr_accessor :price
1203
1962
 
1963
+ # The timestamp when the price starts to be effective. This can be set as a
1964
+ # future timestamp, and the price is only used for search after
1965
+ # price_effective_time. If so, the original_price must be set and original_price
1966
+ # is used before price_effective_time. Do not set if price is always effective
1967
+ # because it will cause additional latency during search.
1968
+ # Corresponds to the JSON property `priceEffectiveTime`
1969
+ # @return [String]
1970
+ attr_accessor :price_effective_time
1971
+
1972
+ # The timestamp when the price stops to be effective. The price is used for
1973
+ # search before price_expire_time. If this field is set, the original_price must
1974
+ # be set and original_price is used after price_expire_time. Do not set if price
1975
+ # is always effective because it will cause additional latency during search.
1976
+ # Corresponds to the JSON property `priceExpireTime`
1977
+ # @return [String]
1978
+ attr_accessor :price_expire_time
1979
+
1980
+ # The price range of all variant Product having the same Product.
1981
+ # primary_product_id.
1982
+ # Corresponds to the JSON property `priceRange`
1983
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfoPriceRange]
1984
+ attr_accessor :price_range
1985
+
1204
1986
  def initialize(**args)
1205
1987
  update!(**args)
1206
1988
  end
@@ -1211,6 +1993,35 @@ module Google
1211
1993
  @currency_code = args[:currency_code] if args.key?(:currency_code)
1212
1994
  @original_price = args[:original_price] if args.key?(:original_price)
1213
1995
  @price = args[:price] if args.key?(:price)
1996
+ @price_effective_time = args[:price_effective_time] if args.key?(:price_effective_time)
1997
+ @price_expire_time = args[:price_expire_time] if args.key?(:price_expire_time)
1998
+ @price_range = args[:price_range] if args.key?(:price_range)
1999
+ end
2000
+ end
2001
+
2002
+ # The price range of all variant Product having the same Product.
2003
+ # primary_product_id.
2004
+ class GoogleCloudRetailV2alphaPriceInfoPriceRange
2005
+ include Google::Apis::Core::Hashable
2006
+
2007
+ # A floating point interval.
2008
+ # Corresponds to the JSON property `originalPrice`
2009
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval]
2010
+ attr_accessor :original_price
2011
+
2012
+ # A floating point interval.
2013
+ # Corresponds to the JSON property `price`
2014
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval]
2015
+ attr_accessor :price
2016
+
2017
+ def initialize(**args)
2018
+ update!(**args)
2019
+ end
2020
+
2021
+ # Update properties of this object
2022
+ def update!(**args)
2023
+ @original_price = args[:original_price] if args.key?(:original_price)
2024
+ @price = args[:price] if args.key?(:price)
1214
2025
  end
1215
2026
  end
1216
2027
 
@@ -1231,11 +2042,19 @@ module Google
1231
2042
  # :[8.1, 6.4]` ``. This field needs to pass all below criteria, otherwise an
1232
2043
  # INVALID_ARGUMENT error is returned: * Max entries count: 200 by default; 100
1233
2044
  # for Type.VARIANT. * The key must be a UTF-8 encoded string with a length limit
1234
- # of 128 characters.
2045
+ # of 128 characters. * Max indexable entries count: 200 by default; 40 for Type.
2046
+ # VARIANT. * Max searchable entries count: 30. * For indexable attribute, the
2047
+ # key must match the pattern: a-zA-Z0-9*. For example, key0LikeThis or
2048
+ # KEY_1_LIKE_THIS.
1235
2049
  # Corresponds to the JSON property `attributes`
1236
2050
  # @return [Hash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>]
1237
2051
  attr_accessor :attributes
1238
2052
 
2053
+ # An intended audience of the Product for whom it's sold.
2054
+ # Corresponds to the JSON property `audience`
2055
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAudience]
2056
+ attr_accessor :audience
2057
+
1239
2058
  # The online availability of the Product. Default to Availability.IN_STOCK.
1240
2059
  # Google Merchant Center Property [availability](https://support.google.com/
1241
2060
  # merchants/answer/6324448). Schema.org Property [Offer.availability](https://
@@ -1249,11 +2068,20 @@ module Google
1249
2068
  # @return [Fixnum]
1250
2069
  attr_accessor :available_quantity
1251
2070
 
1252
- # The timestamp when this Product becomes available for recommendation.
2071
+ # The timestamp when this Product becomes available for SearchService.Search.
1253
2072
  # Corresponds to the JSON property `availableTime`
1254
2073
  # @return [String]
1255
2074
  attr_accessor :available_time
1256
2075
 
2076
+ # The brands of the product. A maximum of 30 brands are allowed. Each brand must
2077
+ # be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise,
2078
+ # an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](
2079
+ # https://support.google.com/merchants/answer/6324351). Schema.org property [
2080
+ # Product.brand](https://schema.org/brand).
2081
+ # Corresponds to the JSON property `brands`
2082
+ # @return [Array<String>]
2083
+ attr_accessor :brands
2084
+
1257
2085
  # Product categories. This field is repeated for supporting one product
1258
2086
  # belonging to several parallel categories. Strongly recommended using the full
1259
2087
  # path for better search / recommendation quality. To represent full path of
@@ -1274,6 +2102,29 @@ module Google
1274
2102
  # @return [Array<String>]
1275
2103
  attr_accessor :categories
1276
2104
 
2105
+ # The id of the collection members when type is Type.COLLECTION. Should not set
2106
+ # it for other types. A maximum of 1000 values are allowed. Otherwise, an
2107
+ # INVALID_ARGUMENT error is return.
2108
+ # Corresponds to the JSON property `collectionMemberIds`
2109
+ # @return [Array<String>]
2110
+ attr_accessor :collection_member_ids
2111
+
2112
+ # The color information of a Product.
2113
+ # Corresponds to the JSON property `colorInfo`
2114
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaColorInfo]
2115
+ attr_accessor :color_info
2116
+
2117
+ # The condition of the product. Strongly encouraged to use the standard values: "
2118
+ # new", "refurbished", "used". A maximum of 5 values are allowed per Product.
2119
+ # Each value must be a UTF-8 encoded string with a length limit of 128
2120
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant
2121
+ # Center property [condition](https://support.google.com/merchants/answer/
2122
+ # 6324469). Schema.org property [Offer.itemCondition](https://schema.org/
2123
+ # itemCondition).
2124
+ # Corresponds to the JSON property `conditions`
2125
+ # @return [Array<String>]
2126
+ attr_accessor :conditions
2127
+
1277
2128
  # Product description. This field must be a UTF-8 encoded string with a length
1278
2129
  # limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
1279
2130
  # Google Merchant Center property [description](https://support.google.com/
@@ -1283,6 +2134,34 @@ module Google
1283
2134
  # @return [String]
1284
2135
  attr_accessor :description
1285
2136
 
2137
+ # The timestamp when this product becomes unavailable for SearchService.Search.
2138
+ # If it is set, the Product is not available for SearchService.Search after
2139
+ # expire_time. However, the product can still be retrieved by ProductService.
2140
+ # GetProduct and ProductService.ListProducts. Google Merchant Center property [
2141
+ # expiration_date](https://support.google.com/merchants/answer/6324499).
2142
+ # Corresponds to the JSON property `expireTime`
2143
+ # @return [String]
2144
+ attr_accessor :expire_time
2145
+
2146
+ # Fulfillment information, such as the store IDs for in-store pickup or region
2147
+ # IDs for different shipping methods. All the elements must have distinct
2148
+ # FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
2149
+ # Corresponds to the JSON property `fulfillmentInfo`
2150
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaFulfillmentInfo>]
2151
+ attr_accessor :fulfillment_info
2152
+
2153
+ # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8
2154
+ # encoded string with a length limit of 128 characters. Otherwise, an
2155
+ # INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](
2156
+ # https://support.google.com/merchants/answer/6324461). Schema.org property [
2157
+ # Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/
2158
+ # gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](
2159
+ # https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If
2160
+ # the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
2161
+ # Corresponds to the JSON property `gtin`
2162
+ # @return [String]
2163
+ attr_accessor :gtin
2164
+
1286
2165
  # Immutable. Product identifier, which is the final component of name. For
1287
2166
  # example, this field is "id_1", if name is `projects/*/locations/global/
1288
2167
  # catalogs/default_catalog/branches/default_branch/products/id_1`. This field
@@ -1302,6 +2181,26 @@ module Google
1302
2181
  # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImage>]
1303
2182
  attr_accessor :images
1304
2183
 
2184
+ # Language of the title/description and other string attributes. Use language
2185
+ # tags defined by BCP 47. For product prediction, this field is ignored and the
2186
+ # model automatically detects the text language. The Product can include text in
2187
+ # different languages, but duplicating Products to provide text in multiple
2188
+ # languages can result in degraded model performance. For product search this
2189
+ # field is in use. It defaults to "en-US" if unset.
2190
+ # Corresponds to the JSON property `languageCode`
2191
+ # @return [String]
2192
+ attr_accessor :language_code
2193
+
2194
+ # The material of the product. For example, "leather", "wooden". A maximum of 5
2195
+ # values are allowed. Each value must be a UTF-8 encoded string with a length
2196
+ # limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
2197
+ # Google Merchant Center property [material](https://support.google.com/
2198
+ # merchants/answer/6324410). Schema.org property [Product.material](https://
2199
+ # schema.org/material).
2200
+ # Corresponds to the JSON property `materials`
2201
+ # @return [Array<String>]
2202
+ attr_accessor :materials
2203
+
1305
2204
  # Immutable. Full resource name of the product, such as `projects/*/locations/
1306
2205
  # global/catalogs/default_catalog/branches/default_branch/products/product_id`.
1307
2206
  # The branch ID must be "default_branch".
@@ -1309,6 +2208,16 @@ module Google
1309
2208
  # @return [String]
1310
2209
  attr_accessor :name
1311
2210
 
2211
+ # The pattern or graphic print of the product. For example, "striped", "polka
2212
+ # dot", "paisley". A maximum of 5 values are allowed per Product. Each value
2213
+ # must be a UTF-8 encoded string with a length limit of 128 characters.
2214
+ # Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center
2215
+ # property [pattern](https://support.google.com/merchants/answer/6324483).
2216
+ # Schema.org property [Product.pattern](https://schema.org/pattern).
2217
+ # Corresponds to the JSON property `patterns`
2218
+ # @return [Array<String>]
2219
+ attr_accessor :patterns
2220
+
1312
2221
  # The price information of a Product.
1313
2222
  # Corresponds to the JSON property `priceInfo`
1314
2223
  # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfo]
@@ -1327,6 +2236,57 @@ module Google
1327
2236
  # @return [String]
1328
2237
  attr_accessor :primary_product_id
1329
2238
 
2239
+ # The promotions applied to the product. A maximum of 10 values are allowed per
2240
+ # Product.
2241
+ # Corresponds to the JSON property `promotions`
2242
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPromotion>]
2243
+ attr_accessor :promotions
2244
+
2245
+ # The timestamp when the product is published by the retailer for the first time,
2246
+ # which indicates the freshness of the products. Note that this field is
2247
+ # different from available_time, given it purely describes product freshness
2248
+ # regardless of when it is available on search and recommendation.
2249
+ # Corresponds to the JSON property `publishTime`
2250
+ # @return [String]
2251
+ attr_accessor :publish_time
2252
+
2253
+ # The rating of a Product.
2254
+ # Corresponds to the JSON property `rating`
2255
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRating]
2256
+ attr_accessor :rating
2257
+
2258
+ # Indicates which fields in the Products are returned in SearchResponse.
2259
+ # Supported fields for all types: * audience * availability * brands *
2260
+ # color_info * conditions * gtin * materials * name * patterns * price_info *
2261
+ # rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.
2262
+ # COLLECTION: * categories * description * images Supported fields only for Type.
2263
+ # VARIANT: * Only the first image in images To mark attributes as retrievable,
2264
+ # include paths of the form "attributes.key" where "key" is the key of a custom
2265
+ # attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION,
2266
+ # the following fields are always returned in SearchResponse by default: * name
2267
+ # For Type.VARIANT, the following fields are always returned in by default: *
2268
+ # name * color_info Maximum number of paths is 20. Otherwise, an
2269
+ # INVALID_ARGUMENT error is returned.
2270
+ # Corresponds to the JSON property `retrievableFields`
2271
+ # @return [String]
2272
+ attr_accessor :retrievable_fields
2273
+
2274
+ # The size of the product. To represent different size systems or size types,
2275
+ # consider using this format: [[[size_system:]size_type:]size_value]. For
2276
+ # example, in "US:MENS:M", "US" represents size system; "MENS" represents size
2277
+ # type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS"
2278
+ # represents size type; "27" represents size value. In "32 inches", both size
2279
+ # system and size type are empty, while size value is "32 inches". A maximum of
2280
+ # 20 values are allowed per Product. Each value must be a UTF-8 encoded string
2281
+ # with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is
2282
+ # returned. Google Merchant Center property [size](https://support.google.com/
2283
+ # merchants/answer/6324492), [size_type](https://support.google.com/merchants/
2284
+ # answer/6324497) and [size_system](https://support.google.com/merchants/answer/
2285
+ # 6324502). Schema.org property [Product.size](https://schema.org/size).
2286
+ # Corresponds to the JSON property `sizes`
2287
+ # @return [Array<String>]
2288
+ attr_accessor :sizes
2289
+
1330
2290
  # Custom tags associated with the product. At most 250 values are allowed per
1331
2291
  # Product. This value must be a UTF-8 encoded string with a length limit of 1,
1332
2292
  # 000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can
@@ -1346,6 +2306,16 @@ module Google
1346
2306
  # @return [String]
1347
2307
  attr_accessor :title
1348
2308
 
2309
+ # Input only. The TTL (time to live) of the product. If it is set, expire_time
2310
+ # is set as current timestamp plus ttl. The derived expire_time is returned in
2311
+ # the output and ttl is left blank when retrieving the Product. If it is set,
2312
+ # the product is not available for SearchService.Search after current timestamp
2313
+ # plus ttl. However, the product can still be retrieved by ProductService.
2314
+ # GetProduct and ProductService.ListProducts.
2315
+ # Corresponds to the JSON property `ttl`
2316
+ # @return [String]
2317
+ attr_accessor :ttl
2318
+
1349
2319
  # Immutable. The type of the product. Default to Catalog.product_level_config.
1350
2320
  # ingestion_product_type if unset.
1351
2321
  # Corresponds to the JSON property `type`
@@ -1363,6 +2333,15 @@ module Google
1363
2333
  # @return [String]
1364
2334
  attr_accessor :uri
1365
2335
 
2336
+ # Output only. Product variants grouped together on primary product which share
2337
+ # similar product attributes. It's automatically grouped by primary_product_id
2338
+ # for all the product variants. Only populated for Type.PRIMARY Products. Note:
2339
+ # This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field
2340
+ # in API requests.
2341
+ # Corresponds to the JSON property `variants`
2342
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct>]
2343
+ attr_accessor :variants
2344
+
1366
2345
  def initialize(**args)
1367
2346
  update!(**args)
1368
2347
  end
@@ -1370,20 +2349,38 @@ module Google
1370
2349
  # Update properties of this object
1371
2350
  def update!(**args)
1372
2351
  @attributes = args[:attributes] if args.key?(:attributes)
2352
+ @audience = args[:audience] if args.key?(:audience)
1373
2353
  @availability = args[:availability] if args.key?(:availability)
1374
2354
  @available_quantity = args[:available_quantity] if args.key?(:available_quantity)
1375
2355
  @available_time = args[:available_time] if args.key?(:available_time)
2356
+ @brands = args[:brands] if args.key?(:brands)
1376
2357
  @categories = args[:categories] if args.key?(:categories)
2358
+ @collection_member_ids = args[:collection_member_ids] if args.key?(:collection_member_ids)
2359
+ @color_info = args[:color_info] if args.key?(:color_info)
2360
+ @conditions = args[:conditions] if args.key?(:conditions)
1377
2361
  @description = args[:description] if args.key?(:description)
2362
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
2363
+ @fulfillment_info = args[:fulfillment_info] if args.key?(:fulfillment_info)
2364
+ @gtin = args[:gtin] if args.key?(:gtin)
1378
2365
  @id = args[:id] if args.key?(:id)
1379
2366
  @images = args[:images] if args.key?(:images)
2367
+ @language_code = args[:language_code] if args.key?(:language_code)
2368
+ @materials = args[:materials] if args.key?(:materials)
1380
2369
  @name = args[:name] if args.key?(:name)
2370
+ @patterns = args[:patterns] if args.key?(:patterns)
1381
2371
  @price_info = args[:price_info] if args.key?(:price_info)
1382
2372
  @primary_product_id = args[:primary_product_id] if args.key?(:primary_product_id)
2373
+ @promotions = args[:promotions] if args.key?(:promotions)
2374
+ @publish_time = args[:publish_time] if args.key?(:publish_time)
2375
+ @rating = args[:rating] if args.key?(:rating)
2376
+ @retrievable_fields = args[:retrievable_fields] if args.key?(:retrievable_fields)
2377
+ @sizes = args[:sizes] if args.key?(:sizes)
1383
2378
  @tags = args[:tags] if args.key?(:tags)
1384
2379
  @title = args[:title] if args.key?(:title)
2380
+ @ttl = args[:ttl] if args.key?(:ttl)
1385
2381
  @type = args[:type] if args.key?(:type)
1386
2382
  @uri = args[:uri] if args.key?(:uri)
2383
+ @variants = args[:variants] if args.key?(:variants)
1387
2384
  end
1388
2385
  end
1389
2386
 
@@ -1421,7 +2418,7 @@ module Google
1421
2418
  include Google::Apis::Core::Hashable
1422
2419
 
1423
2420
  # Required. A list of products to update/create. Each product must have a valid
1424
- # Product.id. Recommended max of 10k items.
2421
+ # Product.id. Recommended max of 100 items.
1425
2422
  # Corresponds to the JSON property `products`
1426
2423
  # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct>]
1427
2424
  attr_accessor :products
@@ -1506,43 +2503,903 @@ module Google
1506
2503
 
1507
2504
  # Update properties of this object
1508
2505
  def update!(**args)
1509
- @ingestion_product_type = args[:ingestion_product_type] if args.key?(:ingestion_product_type)
1510
- @merchant_center_product_id_field = args[:merchant_center_product_id_field] if args.key?(:merchant_center_product_id_field)
2506
+ @ingestion_product_type = args[:ingestion_product_type] if args.key?(:ingestion_product_type)
2507
+ @merchant_center_product_id_field = args[:merchant_center_product_id_field] if args.key?(:merchant_center_product_id_field)
2508
+ end
2509
+ end
2510
+
2511
+ # Promotion information.
2512
+ class GoogleCloudRetailV2alphaPromotion
2513
+ include Google::Apis::Core::Hashable
2514
+
2515
+ # ID of the promotion. For example, "free gift". The value value must be a UTF-8
2516
+ # encoded string with a length limit of 128 characters, and match the pattern: a-
2517
+ # zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an
2518
+ # INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion]
2519
+ # (https://support.google.com/merchants/answer/7050148).
2520
+ # Corresponds to the JSON property `promotionId`
2521
+ # @return [String]
2522
+ attr_accessor :promotion_id
2523
+
2524
+ def initialize(**args)
2525
+ update!(**args)
2526
+ end
2527
+
2528
+ # Update properties of this object
2529
+ def update!(**args)
2530
+ @promotion_id = args[:promotion_id] if args.key?(:promotion_id)
2531
+ end
2532
+ end
2533
+
2534
+ # A transaction represents the entire purchase transaction.
2535
+ class GoogleCloudRetailV2alphaPurchaseTransaction
2536
+ include Google::Apis::Core::Hashable
2537
+
2538
+ # All the costs associated with the products. These can be manufacturing costs,
2539
+ # shipping expenses not borne by the end user, or any other costs, such that: *
2540
+ # Profit = revenue - tax - cost
2541
+ # Corresponds to the JSON property `cost`
2542
+ # @return [Float]
2543
+ attr_accessor :cost
2544
+
2545
+ # Required. Currency code. Use three-character ISO-4217 code.
2546
+ # Corresponds to the JSON property `currencyCode`
2547
+ # @return [String]
2548
+ attr_accessor :currency_code
2549
+
2550
+ # The transaction ID with a length limit of 128 characters.
2551
+ # Corresponds to the JSON property `id`
2552
+ # @return [String]
2553
+ attr_accessor :id
2554
+
2555
+ # Required. Total non-zero revenue or grand total associated with the
2556
+ # transaction. This value include shipping, tax, or other adjustments to total
2557
+ # revenue that you want to include as part of your revenue calculations.
2558
+ # Corresponds to the JSON property `revenue`
2559
+ # @return [Float]
2560
+ attr_accessor :revenue
2561
+
2562
+ # All the taxes associated with the transaction.
2563
+ # Corresponds to the JSON property `tax`
2564
+ # @return [Float]
2565
+ attr_accessor :tax
2566
+
2567
+ def initialize(**args)
2568
+ update!(**args)
2569
+ end
2570
+
2571
+ # Update properties of this object
2572
+ def update!(**args)
2573
+ @cost = args[:cost] if args.key?(:cost)
2574
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
2575
+ @id = args[:id] if args.key?(:id)
2576
+ @revenue = args[:revenue] if args.key?(:revenue)
2577
+ @tax = args[:tax] if args.key?(:tax)
2578
+ end
2579
+ end
2580
+
2581
+ # Metadata related to the progress of the Purge operation. This will be returned
2582
+ # by the google.longrunning.Operation.metadata field.
2583
+ class GoogleCloudRetailV2alphaPurgeMetadata
2584
+ include Google::Apis::Core::Hashable
2585
+
2586
+ def initialize(**args)
2587
+ update!(**args)
2588
+ end
2589
+
2590
+ # Update properties of this object
2591
+ def update!(**args)
2592
+ end
2593
+ end
2594
+
2595
+ # Request message for PurgeUserEvents method.
2596
+ class GoogleCloudRetailV2alphaPurgeUserEventsRequest
2597
+ include Google::Apis::Core::Hashable
2598
+
2599
+ # Required. The filter string to specify the events to be deleted with a length
2600
+ # limit of 5,000 characters. Empty string filter is not allowed. The eligible
2601
+ # fields for filtering are: * `eventType`: Double quoted UserEvent.event_type
2602
+ # string. * `eventTime`: in ISO 8601 "zulu" format. * `visitorId`: Double quoted
2603
+ # string. Specifying this will delete all events associated with a visitor. * `
2604
+ # userId`: Double quoted string. Specifying this will delete all events
2605
+ # associated with a user. Examples: * Deleting all events in a time range: `
2606
+ # eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"`
2607
+ # * Deleting specific eventType in time range: `eventTime > "2012-04-23T18:25:43.
2608
+ # 511Z" eventType = "detail-page-view"` * Deleting all events for a specific
2609
+ # visitor: `visitorId = "visitor1024"` The filtering fields are assumed to have
2610
+ # an implicit AND.
2611
+ # Corresponds to the JSON property `filter`
2612
+ # @return [String]
2613
+ attr_accessor :filter
2614
+
2615
+ # Actually perform the purge. If `force` is set to false, the method will return
2616
+ # the expected purge count without deleting any user events.
2617
+ # Corresponds to the JSON property `force`
2618
+ # @return [Boolean]
2619
+ attr_accessor :force
2620
+ alias_method :force?, :force
2621
+
2622
+ def initialize(**args)
2623
+ update!(**args)
2624
+ end
2625
+
2626
+ # Update properties of this object
2627
+ def update!(**args)
2628
+ @filter = args[:filter] if args.key?(:filter)
2629
+ @force = args[:force] if args.key?(:force)
2630
+ end
2631
+ end
2632
+
2633
+ # Response of the PurgeUserEventsRequest. If the long running operation is
2634
+ # successfully done, then this message is returned by the google.longrunning.
2635
+ # Operations.response field.
2636
+ class GoogleCloudRetailV2alphaPurgeUserEventsResponse
2637
+ include Google::Apis::Core::Hashable
2638
+
2639
+ # The total count of events purged as a result of the operation.
2640
+ # Corresponds to the JSON property `purgedEventsCount`
2641
+ # @return [Fixnum]
2642
+ attr_accessor :purged_events_count
2643
+
2644
+ def initialize(**args)
2645
+ update!(**args)
2646
+ end
2647
+
2648
+ # Update properties of this object
2649
+ def update!(**args)
2650
+ @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count)
2651
+ end
2652
+ end
2653
+
2654
+ # The rating of a Product.
2655
+ class GoogleCloudRetailV2alphaRating
2656
+ include Google::Apis::Core::Hashable
2657
+
2658
+ # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an
2659
+ # INVALID_ARGUMENT error is returned.
2660
+ # Corresponds to the JSON property `averageRating`
2661
+ # @return [Float]
2662
+ attr_accessor :average_rating
2663
+
2664
+ # The total number of ratings. This value is independent of the value of
2665
+ # rating_histogram. This value must be nonnegative. Otherwise, an
2666
+ # INVALID_ARGUMENT error is returned.
2667
+ # Corresponds to the JSON property `ratingCount`
2668
+ # @return [Fixnum]
2669
+ attr_accessor :rating_count
2670
+
2671
+ # List of rating counts per rating value (index = rating - 1). The list is empty
2672
+ # if there is no rating. If the list is non-empty, its size is always 5.
2673
+ # Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47,
2674
+ # 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2
2675
+ # star, and so on.
2676
+ # Corresponds to the JSON property `ratingHistogram`
2677
+ # @return [Array<Fixnum>]
2678
+ attr_accessor :rating_histogram
2679
+
2680
+ def initialize(**args)
2681
+ update!(**args)
2682
+ end
2683
+
2684
+ # Update properties of this object
2685
+ def update!(**args)
2686
+ @average_rating = args[:average_rating] if args.key?(:average_rating)
2687
+ @rating_count = args[:rating_count] if args.key?(:rating_count)
2688
+ @rating_histogram = args[:rating_histogram] if args.key?(:rating_histogram)
2689
+ end
2690
+ end
2691
+
2692
+ # Metadata for RejoinUserEvents method.
2693
+ class GoogleCloudRetailV2alphaRejoinUserEventsMetadata
2694
+ include Google::Apis::Core::Hashable
2695
+
2696
+ def initialize(**args)
2697
+ update!(**args)
2698
+ end
2699
+
2700
+ # Update properties of this object
2701
+ def update!(**args)
2702
+ end
2703
+ end
2704
+
2705
+ # Request message for RejoinUserEvents method.
2706
+ class GoogleCloudRetailV2alphaRejoinUserEventsRequest
2707
+ include Google::Apis::Core::Hashable
2708
+
2709
+ # The type of the user event rejoin to define the scope and range of the user
2710
+ # events to be rejoined with the latest product catalog. Defaults to
2711
+ # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
2712
+ # invalid integer value.
2713
+ # Corresponds to the JSON property `userEventRejoinScope`
2714
+ # @return [String]
2715
+ attr_accessor :user_event_rejoin_scope
2716
+
2717
+ def initialize(**args)
2718
+ update!(**args)
2719
+ end
2720
+
2721
+ # Update properties of this object
2722
+ def update!(**args)
2723
+ @user_event_rejoin_scope = args[:user_event_rejoin_scope] if args.key?(:user_event_rejoin_scope)
2724
+ end
2725
+ end
2726
+
2727
+ # Response message for RejoinUserEvents method.
2728
+ class GoogleCloudRetailV2alphaRejoinUserEventsResponse
2729
+ include Google::Apis::Core::Hashable
2730
+
2731
+ # Number of user events that were joined with latest product catalog.
2732
+ # Corresponds to the JSON property `rejoinedUserEventsCount`
2733
+ # @return [Fixnum]
2734
+ attr_accessor :rejoined_user_events_count
2735
+
2736
+ def initialize(**args)
2737
+ update!(**args)
2738
+ end
2739
+
2740
+ # Update properties of this object
2741
+ def update!(**args)
2742
+ @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count)
2743
+ end
2744
+ end
2745
+
2746
+ # Metadata related to the progress of the RemoveFulfillmentPlaces operation.
2747
+ # Currently empty because there is no meaningful metadata populated from the
2748
+ # RemoveFulfillmentPlaces method.
2749
+ class GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata
2750
+ include Google::Apis::Core::Hashable
2751
+
2752
+ def initialize(**args)
2753
+ update!(**args)
2754
+ end
2755
+
2756
+ # Update properties of this object
2757
+ def update!(**args)
2758
+ end
2759
+ end
2760
+
2761
+ # Request message for RemoveFulfillmentPlaces method.
2762
+ class GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest
2763
+ include Google::Apis::Core::Hashable
2764
+
2765
+ # If set to true, and the Product is not found, the fulfillment information will
2766
+ # still be processed and retained for at most 1 day and processed once the
2767
+ # Product is created. If set to false, an INVALID_ARGUMENT error is returned if
2768
+ # the Product is not found.
2769
+ # Corresponds to the JSON property `allowMissing`
2770
+ # @return [Boolean]
2771
+ attr_accessor :allow_missing
2772
+ alias_method :allow_missing?, :allow_missing
2773
+
2774
+ # Required. The IDs for this type, such as the store IDs for "pickup-in-store"
2775
+ # or the region IDs for "same-day-delivery", to be removed for this type. At
2776
+ # least 1 value is required, and a maximum of 2000 values are allowed. Each
2777
+ # value must be a string with a length limit of 10 characters, matching the
2778
+ # pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an
2779
+ # INVALID_ARGUMENT error is returned.
2780
+ # Corresponds to the JSON property `placeIds`
2781
+ # @return [Array<String>]
2782
+ attr_accessor :place_ids
2783
+
2784
+ # The time when the fulfillment updates are issued, used to prevent out-of-order
2785
+ # updates on fulfillment information. If not provided, the internal system time
2786
+ # will be used.
2787
+ # Corresponds to the JSON property `removeTime`
2788
+ # @return [String]
2789
+ attr_accessor :remove_time
2790
+
2791
+ # Required. The fulfillment type, including commonly used types (such as pickup
2792
+ # in store and same day delivery), and custom types. Supported values: * "pickup-
2793
+ # in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "
2794
+ # custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-
2795
+ # type-5" If this field is set to an invalid value other than these, an
2796
+ # INVALID_ARGUMENT error is returned. This field directly corresponds to Product.
2797
+ # fulfillment_info.type.
2798
+ # Corresponds to the JSON property `type`
2799
+ # @return [String]
2800
+ attr_accessor :type
2801
+
2802
+ def initialize(**args)
2803
+ update!(**args)
2804
+ end
2805
+
2806
+ # Update properties of this object
2807
+ def update!(**args)
2808
+ @allow_missing = args[:allow_missing] if args.key?(:allow_missing)
2809
+ @place_ids = args[:place_ids] if args.key?(:place_ids)
2810
+ @remove_time = args[:remove_time] if args.key?(:remove_time)
2811
+ @type = args[:type] if args.key?(:type)
2812
+ end
2813
+ end
2814
+
2815
+ # Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
2816
+ # is no meaningful response populated from the RemoveFulfillmentPlaces method.
2817
+ class GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse
2818
+ include Google::Apis::Core::Hashable
2819
+
2820
+ def initialize(**args)
2821
+ update!(**args)
2822
+ end
2823
+
2824
+ # Update properties of this object
2825
+ def update!(**args)
2826
+ end
2827
+ end
2828
+
2829
+ # Request message for SearchService.Search method.
2830
+ class GoogleCloudRetailV2alphaSearchRequest
2831
+ include Google::Apis::Core::Hashable
2832
+
2833
+ # Boost specification to boost certain items.
2834
+ # Corresponds to the JSON property `boostSpec`
2835
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestBoostSpec]
2836
+ attr_accessor :boost_spec
2837
+
2838
+ # The branch resource name, such as `projects/*/locations/global/catalogs/
2839
+ # default_catalog/branches/0`. Use "default_branch" as the branch ID or leave
2840
+ # this field empty, to search products under the default branch.
2841
+ # Corresponds to the JSON property `branch`
2842
+ # @return [String]
2843
+ attr_accessor :branch
2844
+
2845
+ # The filter applied to every search request when quality improvement such as
2846
+ # query expansion is needed. For example, if a query does not have enough
2847
+ # results, an expanded query with SearchRequest.canonical_filter will be
2848
+ # returned as a supplement of the original query. This field is strongly
2849
+ # recommended to achieve high search quality. See SearchRequest.filter for more
2850
+ # details about filter syntax.
2851
+ # Corresponds to the JSON property `canonicalFilter`
2852
+ # @return [String]
2853
+ attr_accessor :canonical_filter
2854
+
2855
+ # The specifications of dynamically generated facets.
2856
+ # Corresponds to the JSON property `dynamicFacetSpec`
2857
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec]
2858
+ attr_accessor :dynamic_facet_spec
2859
+
2860
+ # Facet specifications for faceted search. If empty, no facets are returned. A
2861
+ # maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is
2862
+ # returned.
2863
+ # Corresponds to the JSON property `facetSpecs`
2864
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestFacetSpec>]
2865
+ attr_accessor :facet_specs
2866
+
2867
+ # The filter syntax consists of an expression language for constructing a
2868
+ # predicate from one or more fields of the products being filtered. Filter
2869
+ # expression is case-sensitive. See more details at this [user guide](/retail/
2870
+ # private/docs/filter-and-order#filter). If this field is unrecognizable, an
2871
+ # INVALID_ARGUMENT is returned.
2872
+ # Corresponds to the JSON property `filter`
2873
+ # @return [String]
2874
+ attr_accessor :filter
2875
+
2876
+ # A 0-indexed integer that specifies the current offset (that is, starting
2877
+ # result location, amongst the Products deemed by the API as relevant) in search
2878
+ # results. This field is only considered if page_token is unset. If this field
2879
+ # is negative, an INVALID_ARGUMENT is returned.
2880
+ # Corresponds to the JSON property `offset`
2881
+ # @return [Fixnum]
2882
+ attr_accessor :offset
2883
+
2884
+ # The order in which products are returned. Products can be ordered by a field
2885
+ # in an Product object. Leave it unset if ordered by relevance. OrderBy
2886
+ # expression is case-sensitive. See more details at this [user guide](/retail/
2887
+ # private/docs/filter-and-order#order). If this field is unrecognizable, an
2888
+ # INVALID_ARGUMENT is returned.
2889
+ # Corresponds to the JSON property `orderBy`
2890
+ # @return [String]
2891
+ attr_accessor :order_by
2892
+
2893
+ # The categories associated with a category page. Required for category
2894
+ # navigation queries to achieve good search quality. The format should be the
2895
+ # same as UserEvent.page_categories; To represent full path of category, use '>'
2896
+ # sign to separate different hierarchies. If '>' is part of the category name,
2897
+ # please replace it with other character(s). Category pages include special
2898
+ # pages such as sales or promotions. For instance, a special sale page may have
2899
+ # the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].
2900
+ # Corresponds to the JSON property `pageCategories`
2901
+ # @return [Array<String>]
2902
+ attr_accessor :page_categories
2903
+
2904
+ # Maximum number of Products to return. If unspecified, defaults to a reasonable
2905
+ # value. The maximum allowed value is 120. Values above 120 will be coerced to
2906
+ # 120. If this field is negative, an INVALID_ARGUMENT is returned.
2907
+ # Corresponds to the JSON property `pageSize`
2908
+ # @return [Fixnum]
2909
+ attr_accessor :page_size
2910
+
2911
+ # A page token SearchResponse.next_page_token, received from a previous
2912
+ # SearchService.Search call. Provide this to retrieve the subsequent page. When
2913
+ # paginating, all other parameters provided to SearchService.Search must match
2914
+ # the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is
2915
+ # returned.
2916
+ # Corresponds to the JSON property `pageToken`
2917
+ # @return [String]
2918
+ attr_accessor :page_token
2919
+
2920
+ # Raw search query.
2921
+ # Corresponds to the JSON property `query`
2922
+ # @return [String]
2923
+ attr_accessor :query
2924
+
2925
+ # Specification to determine under which conditions query expansion should occur.
2926
+ # Corresponds to the JSON property `queryExpansionSpec`
2927
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestQueryExpansionSpec]
2928
+ attr_accessor :query_expansion_spec
2929
+
2930
+ # The relevance threshold of the search results. Defaults to RelevanceThreshold.
2931
+ # HIGH, which means only the most relevant results are shown, and the least
2932
+ # number of results are returned. See more details at this [user guide](/retail/
2933
+ # private/docs/result-size#relevance_thresholding).
2934
+ # Corresponds to the JSON property `relevanceThreshold`
2935
+ # @return [String]
2936
+ attr_accessor :relevance_threshold
2937
+
2938
+ # Information of an end user.
2939
+ # Corresponds to the JSON property `userInfo`
2940
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserInfo]
2941
+ attr_accessor :user_info
2942
+
2943
+ # The keys to fetch and rollup the matching variant Products attributes. The
2944
+ # attributes from all the matching variant Products are merged and de-duplicated.
2945
+ # Notice that rollup variant Products attributes will lead to extra query
2946
+ # latency. Maximum number of keys is 10. For Product.fulfillment_info, a
2947
+ # fulfillment type and a fulfillment ID must be provided in the format of "
2948
+ # fulfillmentType.filfillmentId". E.g., in "pickupInStore.store123", "
2949
+ # pickupInStore" is fulfillment type and "store123" is the store ID. Supported
2950
+ # keys are: * colorFamilies * price * originalPrice * discount * attributes.key,
2951
+ # where key is any key in the Product.attributes map. * pickupInStore.id, where
2952
+ # id is any FulfillmentInfo.ids for type FulfillmentInfo.Type.PICKUP_IN_STORE. *
2953
+ # shipToStore.id, where id is any FulfillmentInfo.ids for type FulfillmentInfo.
2954
+ # Type.SHIP_TO_STORE. * sameDayDelivery.id, where id is any FulfillmentInfo.ids
2955
+ # for type FulfillmentInfo.Type.SAME_DAY_DELIVERY. * nextDayDelivery.id, where
2956
+ # id is any FulfillmentInfo.ids for type FulfillmentInfo.Type.NEXT_DAY_DELIVERY.
2957
+ # * customFulfillment1.id, where id is any FulfillmentInfo.ids for type
2958
+ # FulfillmentInfo.Type.CUSTOM_TYPE_1. * customFulfillment2.id, where id is any
2959
+ # FulfillmentInfo.ids for type FulfillmentInfo.Type.CUSTOM_TYPE_2. *
2960
+ # customFulfillment3.id, where id is any FulfillmentInfo.ids for type
2961
+ # FulfillmentInfo.Type.CUSTOM_TYPE_3. * customFulfillment4.id, where id is any
2962
+ # FulfillmentInfo.ids for type FulfillmentInfo.Type.CUSTOM_TYPE_4. *
2963
+ # customFulfillment5.id, where id is any FulfillmentInfo.ids for type
2964
+ # FulfillmentInfo.Type.CUSTOM_TYPE_5. If this field is set to an invalid value
2965
+ # other than these, an INVALID_ARGUMENT error is returned.
2966
+ # Corresponds to the JSON property `variantRollupKeys`
2967
+ # @return [Array<String>]
2968
+ attr_accessor :variant_rollup_keys
2969
+
2970
+ # Required. A unique identifier for tracking visitors. For example, this could
2971
+ # be implemented with an HTTP cookie, which should be able to uniquely identify
2972
+ # a visitor on a single device. This unique identifier should not change if the
2973
+ # visitor logs in or out of the website. The field must be a UTF-8 encoded
2974
+ # string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT
2975
+ # error is returned.
2976
+ # Corresponds to the JSON property `visitorId`
2977
+ # @return [String]
2978
+ attr_accessor :visitor_id
2979
+
2980
+ def initialize(**args)
2981
+ update!(**args)
2982
+ end
2983
+
2984
+ # Update properties of this object
2985
+ def update!(**args)
2986
+ @boost_spec = args[:boost_spec] if args.key?(:boost_spec)
2987
+ @branch = args[:branch] if args.key?(:branch)
2988
+ @canonical_filter = args[:canonical_filter] if args.key?(:canonical_filter)
2989
+ @dynamic_facet_spec = args[:dynamic_facet_spec] if args.key?(:dynamic_facet_spec)
2990
+ @facet_specs = args[:facet_specs] if args.key?(:facet_specs)
2991
+ @filter = args[:filter] if args.key?(:filter)
2992
+ @offset = args[:offset] if args.key?(:offset)
2993
+ @order_by = args[:order_by] if args.key?(:order_by)
2994
+ @page_categories = args[:page_categories] if args.key?(:page_categories)
2995
+ @page_size = args[:page_size] if args.key?(:page_size)
2996
+ @page_token = args[:page_token] if args.key?(:page_token)
2997
+ @query = args[:query] if args.key?(:query)
2998
+ @query_expansion_spec = args[:query_expansion_spec] if args.key?(:query_expansion_spec)
2999
+ @relevance_threshold = args[:relevance_threshold] if args.key?(:relevance_threshold)
3000
+ @user_info = args[:user_info] if args.key?(:user_info)
3001
+ @variant_rollup_keys = args[:variant_rollup_keys] if args.key?(:variant_rollup_keys)
3002
+ @visitor_id = args[:visitor_id] if args.key?(:visitor_id)
3003
+ end
3004
+ end
3005
+
3006
+ # Boost specification to boost certain items.
3007
+ class GoogleCloudRetailV2alphaSearchRequestBoostSpec
3008
+ include Google::Apis::Core::Hashable
3009
+
3010
+ # Condition boost specifications. If a product matches multiple conditions in
3011
+ # the specifictions, boost scores from these specifications are all applied and
3012
+ # combined in a non-linear way. Maximum number of specifications is 10.
3013
+ # Corresponds to the JSON property `conditionBoostSpecs`
3014
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestBoostSpecConditionBoostSpec>]
3015
+ attr_accessor :condition_boost_specs
3016
+
3017
+ def initialize(**args)
3018
+ update!(**args)
3019
+ end
3020
+
3021
+ # Update properties of this object
3022
+ def update!(**args)
3023
+ @condition_boost_specs = args[:condition_boost_specs] if args.key?(:condition_boost_specs)
3024
+ end
3025
+ end
3026
+
3027
+ # Boost applies to products which match a condition.
3028
+ class GoogleCloudRetailV2alphaSearchRequestBoostSpecConditionBoostSpec
3029
+ include Google::Apis::Core::Hashable
3030
+
3031
+ # Strength of the condition boost, which should be in [-1, 1]. Negative boost
3032
+ # means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion.
3033
+ # However, it does not necessarily mean that the boosted item will be the top
3034
+ # result at all times, nor that other items will be excluded. Results could
3035
+ # still be shown even when none of them matches the condition. And results that
3036
+ # are significantly more relevant to the search query can still trump your
3037
+ # heavily favored but irrelevant items. Setting to -1.0 gives the item a big
3038
+ # demotion. However, results that are deeply relevant might still be shown. The
3039
+ # item will have an upstream battle to get a fairly high ranking, but it is not
3040
+ # blocked out completely. Setting to 0.0 means no boost applied. The boosting
3041
+ # condition is ignored.
3042
+ # Corresponds to the JSON property `boost`
3043
+ # @return [Float]
3044
+ attr_accessor :boost
3045
+
3046
+ # An expression which specifies a boost condition. The syntax and supported
3047
+ # fields are the same as a filter expression. See SearchRequest.filter for
3048
+ # detail syntax and limitations. Examples: * To boost products with product ID "
3049
+ # product_1" or "product_2", and color "Red" or "Blue": *(id: ANY("product_1", "
3050
+ # product_2")) * *AND * *(colorFamilies: ANY("Red", "Blue")) *
3051
+ # Corresponds to the JSON property `condition`
3052
+ # @return [String]
3053
+ attr_accessor :condition
3054
+
3055
+ def initialize(**args)
3056
+ update!(**args)
3057
+ end
3058
+
3059
+ # Update properties of this object
3060
+ def update!(**args)
3061
+ @boost = args[:boost] if args.key?(:boost)
3062
+ @condition = args[:condition] if args.key?(:condition)
3063
+ end
3064
+ end
3065
+
3066
+ # The specifications of dynamically generated facets.
3067
+ class GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec
3068
+ include Google::Apis::Core::Hashable
3069
+
3070
+ # Mode of the DynamicFacet feature. Defaults to Mode.DISABLED if it's unset.
3071
+ # Corresponds to the JSON property `mode`
3072
+ # @return [String]
3073
+ attr_accessor :mode
3074
+
3075
+ def initialize(**args)
3076
+ update!(**args)
3077
+ end
3078
+
3079
+ # Update properties of this object
3080
+ def update!(**args)
3081
+ @mode = args[:mode] if args.key?(:mode)
3082
+ end
3083
+ end
3084
+
3085
+ # A facet specification to perform faceted search.
3086
+ class GoogleCloudRetailV2alphaSearchRequestFacetSpec
3087
+ include Google::Apis::Core::Hashable
3088
+
3089
+ # Enables dynamic position for this facet. If set to true, the position of this
3090
+ # facet among all facets in the response is determined by Google Retail Search.
3091
+ # It will be ordered together with dynamic facets if dynamic facets is enabled.
3092
+ # If set to false, the position of this facet in the response will be the same
3093
+ # as in the request, and it will be ranked before the facets with dynamic
3094
+ # position enable and all dynamic facets. For example, you may always want to
3095
+ # have rating facet returned in the response, but it's not necessarily to always
3096
+ # display the rating facet at the top. In that case, you can set
3097
+ # enable_dynamic_position to true so that the position of rating facet in
3098
+ # response will be determined by Google Retail Search. Another example, assuming
3099
+ # you have the following facets in the request: * "rating",
3100
+ # enable_dynamic_position = true * "price", enable_dynamic_position = false * "
3101
+ # brands", enable_dynamic_position = false And also you have a dynamic facets
3102
+ # enable, which will generate a facet 'gender'. Then the final order of the
3103
+ # facets in the response can be ("price", "brands", "rating", "gender") or ("
3104
+ # price", "brands", "gender", "rating") depends on how Google Retail Search
3105
+ # orders "gender" and "rating" facets. However, notice that "price" and "brands"
3106
+ # will always be ranked at 1st and 2nd position since their
3107
+ # enable_dynamic_position are false.
3108
+ # Corresponds to the JSON property `enableDynamicPosition`
3109
+ # @return [Boolean]
3110
+ attr_accessor :enable_dynamic_position
3111
+ alias_method :enable_dynamic_position?, :enable_dynamic_position
3112
+
3113
+ # List of keys to exclude when faceting. By default, FacetKey.key is not
3114
+ # excluded from the filter unless it is listed in this field. For example,
3115
+ # suppose there are 100 products with color facet "Red" and 200 products with
3116
+ # color facet "Blue". A query containing the filter "colorFamilies:ANY("Red")"
3117
+ # and have "colorFamilies" as FacetKey.key will by default return the "Red" with
3118
+ # count 100. If this field contains "colorFamilies", then the query returns both
3119
+ # the "Red" with count 100 and "Blue" with count 200, because the "colorFamilies"
3120
+ # key is now excluded from the filter. A maximum of 100 values are allowed.
3121
+ # Otherwise, an INVALID_ARGUMENT error is returned.
3122
+ # Corresponds to the JSON property `excludedFilterKeys`
3123
+ # @return [Array<String>]
3124
+ attr_accessor :excluded_filter_keys
3125
+
3126
+ # Specifies how a facet is computed.
3127
+ # Corresponds to the JSON property `facetKey`
3128
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKey]
3129
+ attr_accessor :facet_key
3130
+
3131
+ # Maximum of facet values that should be returned for this facet. If unspecified,
3132
+ # defaults to 20. The maximum allowed value is 300. Values above 300 will be
3133
+ # coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.
3134
+ # Corresponds to the JSON property `limit`
3135
+ # @return [Fixnum]
3136
+ attr_accessor :limit
3137
+
3138
+ def initialize(**args)
3139
+ update!(**args)
3140
+ end
3141
+
3142
+ # Update properties of this object
3143
+ def update!(**args)
3144
+ @enable_dynamic_position = args[:enable_dynamic_position] if args.key?(:enable_dynamic_position)
3145
+ @excluded_filter_keys = args[:excluded_filter_keys] if args.key?(:excluded_filter_keys)
3146
+ @facet_key = args[:facet_key] if args.key?(:facet_key)
3147
+ @limit = args[:limit] if args.key?(:limit)
3148
+ end
3149
+ end
3150
+
3151
+ # Specifies how a facet is computed.
3152
+ class GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKey
3153
+ include Google::Apis::Core::Hashable
3154
+
3155
+ # Only get facet values that contains the given strings. For example, suppose "
3156
+ # categories" has three values "Women > Shoe", "Women > Dress" and "Men > Shoe".
3157
+ # If set "contains" to "Shoe", the "categories" facet will give only "Women >
3158
+ # Shoe" and "Men > Shoe". Only supported on textual fields. Maximum is 10.
3159
+ # Corresponds to the JSON property `contains`
3160
+ # @return [Array<String>]
3161
+ attr_accessor :contains
3162
+
3163
+ # Set only if values should be bucketized into intervals. Must be set for facets
3164
+ # with numerical values. Must not be set for facet with text values. Maximum
3165
+ # number of intervals is 30.
3166
+ # Corresponds to the JSON property `intervals`
3167
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval>]
3168
+ attr_accessor :intervals
3169
+
3170
+ # Required. Supported textual and numerical facet keys in Product object, over
3171
+ # which the facet values are computed. Facet key is case-sensitive. Allowed
3172
+ # facet keys when FacetKey.query is not specified: * textual_field = *# The
3173
+ # Product.brands. * "brands"; *# The Product.categories. * "categories"; *# The
3174
+ # Audience.genders. * | "genders"; *# The Audience.age_groups. * | "ageGroups"; *
3175
+ # # The Product.availability. Value is one of * *# "IN_STOCK", "OUT_OF_STOCK",
3176
+ # PREORDER", "BACKORDER". * | "availability"; *# The ColorInfo.color_families. *
3177
+ # | "colorFamilies"; *# The ColorInfo.colors. * | "colors"; *# The Product.sizes.
3178
+ # * | "sizes"; *# The Product.materials. * | "materials"; *# The Product.
3179
+ # patterns. * | "patterns"; *# The Product.conditions. * | "conditions"; *# The
3180
+ # textual custom attribute in Product object. Key can * *# be any key in the
3181
+ # Product.attributes map * *# if the attribute values are textual. * *# map. * |
3182
+ # "attributes.key"; *# The FulfillmentInfo.ids for type *# FulfillmentInfo.Type.
3183
+ # PICKUP_IN_STORE. * | "pickupInStore"; *# The FulfillmentInfo.ids for type *#
3184
+ # FulfillmentInfo.Type.SHIP_TO_STORE. * | "shipToStore"; *# The FulfillmentInfo.
3185
+ # ids for type *# FulfillmentInfo.Type.SAME_DAY_DELIVERY. * | "sameDayDelivery";
3186
+ # *# The FulfillmentInfo.ids for type *# FulfillmentInfo.Type.NEXT_DAY_DELIVERY.
3187
+ # * | "nextDayDelivery"; *# The FulfillmentInfo.ids for type *# FulfillmentInfo.
3188
+ # Type.CUSTOM_TYPE_1. * | "customFulfillment1"; *# The FulfillmentInfo.ids for
3189
+ # type *# FulfillmentInfo.Type.CUSTOM_TYPE_2. * | "customFulfillment2"; *# The
3190
+ # FulfillmentInfo.ids for type *# FulfillmentInfo.Type.CUSTOM_TYPE_3. * | "
3191
+ # customFulfillment3"; *# The FulfillmentInfo.ids for type *# FulfillmentInfo.
3192
+ # Type.CUSTOM_TYPE_4. * | "customFulfillment4"; *# The FulfillmentInfo.ids for
3193
+ # type *# FulfillmentInfo.Type.CUSTOM_TYPE_5. * | "customFulfillment5"; *
3194
+ # numerical_field = *# The PriceInfo.price. * "price"; *# The discount. Computed
3195
+ # by (original_price-price)/price * "discount"; *# The Rating.average_rating. * "
3196
+ # rating"; *# The Rating.rating_count. * "ratingCount"; *# The numerical custom
3197
+ # attribute in Product object. Key can * *# be any key in the Product.attributes
3198
+ # map * *# if the attribute values are numerical. * | "attributes.key";
3199
+ # Corresponds to the JSON property `key`
3200
+ # @return [String]
3201
+ attr_accessor :key
3202
+
3203
+ # The order in which Facet.values are returned. Allowed values are: * "count
3204
+ # desc", which means order by Facet.FacetValue.count descending. * "value desc",
3205
+ # which means order by Facet.FacetValue.value descending. Only applies to
3206
+ # textual facets. If not set, textual values are sorted in [natural order](https:
3207
+ # //en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in
3208
+ # the order given by FacetSpec.FacetKey.intervals; FulfillmentInfo.ids are
3209
+ # sorted in the order given by FacetSpec.FacetKey.restricted_values.
3210
+ # Corresponds to the JSON property `orderBy`
3211
+ # @return [String]
3212
+ attr_accessor :order_by
3213
+
3214
+ # Only get facet values that start with the given string prefix. For example,
3215
+ # suppose "categories" has three values "Women > Shoe", "Women > Dress" and "Men
3216
+ # > Shoe". If set "prefixes" to "Women", the "categories" facet will give only "
3217
+ # Women > Shoe" and "Women > Dress". Only supported on textual fields. Maximum
3218
+ # is 10.
3219
+ # Corresponds to the JSON property `prefixes`
3220
+ # @return [Array<String>]
3221
+ attr_accessor :prefixes
3222
+
3223
+ # The query that is used to compute facet for the given facet key. When provided,
3224
+ # it will override the default behavior of facet computation. The query syntax
3225
+ # is the same as a filter expression. See SearchRequest.filter for detail syntax
3226
+ # and limitations. Notice that there is no limitation on FacetKey.key when query
3227
+ # is specified. In the response, FacetValue.value will be always "1" and
3228
+ # FacetValue.count will be the number of results that matches the query. For
3229
+ # example, you can set a customized facet for "shipToStore", where FacetKey.key
3230
+ # is "customizedShipToStore", and FacetKey.query is "availability: ANY(\"
3231
+ # IN_STOCK\") AND shipToStore: ANY(\"123\")". Then the facet will count the
3232
+ # products that are both in stock and ship to store "123".
3233
+ # Corresponds to the JSON property `query`
3234
+ # @return [String]
3235
+ attr_accessor :query
3236
+
3237
+ # Only get facet for the given restricted values. For example, when using "
3238
+ # pickupInStore" as key and set restricted values to ["store123", "store456"],
3239
+ # only facets for "store123" and "store456" are returned. Only supported on
3240
+ # textual fields and fulfillments. Maximum is 20. Must be set for the
3241
+ # fulfillment facet keys: * pickupInStore * shipToStore * sameDayDelivery *
3242
+ # nextDayDelivery * customFulfillment1 * customFulfillment2 * customFulfillment3
3243
+ # * customFulfillment4 * customFulfillment5
3244
+ # Corresponds to the JSON property `restrictedValues`
3245
+ # @return [Array<String>]
3246
+ attr_accessor :restricted_values
3247
+
3248
+ def initialize(**args)
3249
+ update!(**args)
3250
+ end
3251
+
3252
+ # Update properties of this object
3253
+ def update!(**args)
3254
+ @contains = args[:contains] if args.key?(:contains)
3255
+ @intervals = args[:intervals] if args.key?(:intervals)
3256
+ @key = args[:key] if args.key?(:key)
3257
+ @order_by = args[:order_by] if args.key?(:order_by)
3258
+ @prefixes = args[:prefixes] if args.key?(:prefixes)
3259
+ @query = args[:query] if args.key?(:query)
3260
+ @restricted_values = args[:restricted_values] if args.key?(:restricted_values)
3261
+ end
3262
+ end
3263
+
3264
+ # Specification to determine under which conditions query expansion should occur.
3265
+ class GoogleCloudRetailV2alphaSearchRequestQueryExpansionSpec
3266
+ include Google::Apis::Core::Hashable
3267
+
3268
+ # The condition under which query expansion should occur. Default to Condition.
3269
+ # DISABLED.
3270
+ # Corresponds to the JSON property `condition`
3271
+ # @return [String]
3272
+ attr_accessor :condition
3273
+
3274
+ def initialize(**args)
3275
+ update!(**args)
3276
+ end
3277
+
3278
+ # Update properties of this object
3279
+ def update!(**args)
3280
+ @condition = args[:condition] if args.key?(:condition)
3281
+ end
3282
+ end
3283
+
3284
+ # Response message for SearchService.Search method.
3285
+ class GoogleCloudRetailV2alphaSearchResponse
3286
+ include Google::Apis::Core::Hashable
3287
+
3288
+ # A unique search token. This should be included in the UserEvent logs resulting
3289
+ # from this search, which enables accurate attribution of search model
3290
+ # performance.
3291
+ # Corresponds to the JSON property `attributionToken`
3292
+ # @return [String]
3293
+ attr_accessor :attribution_token
3294
+
3295
+ # If spell correction applies, the corrected query. Otherwise, empty.
3296
+ # Corresponds to the JSON property `correctedQuery`
3297
+ # @return [String]
3298
+ attr_accessor :corrected_query
3299
+
3300
+ # Results of facets requested by user.
3301
+ # Corresponds to the JSON property `facets`
3302
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseFacet>]
3303
+ attr_accessor :facets
3304
+
3305
+ # A token that can be sent as SearchRequest.page_token to retrieve the next page.
3306
+ # If this field is omitted, there are no subsequent pages.
3307
+ # Corresponds to the JSON property `nextPageToken`
3308
+ # @return [String]
3309
+ attr_accessor :next_page_token
3310
+
3311
+ # Information describing query expansion including whether expansion has
3312
+ # occurred.
3313
+ # Corresponds to the JSON property `queryExpansionInfo`
3314
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseQueryExpansionInfo]
3315
+ attr_accessor :query_expansion_info
3316
+
3317
+ # The URI of a customer-defined redirect page. If redirect action is triggered,
3318
+ # no search will be performed, and only redirect_uri and attribution_token will
3319
+ # be set in the response.
3320
+ # Corresponds to the JSON property `redirectUri`
3321
+ # @return [String]
3322
+ attr_accessor :redirect_uri
3323
+
3324
+ # A list of matched items. The order represents the ranking.
3325
+ # Corresponds to the JSON property `results`
3326
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseSearchResult>]
3327
+ attr_accessor :results
3328
+
3329
+ # The estimated total count of matched items irrespective of pagination. The
3330
+ # count of results returned by pagination may be less than the total_size that
3331
+ # matches.
3332
+ # Corresponds to the JSON property `totalSize`
3333
+ # @return [Fixnum]
3334
+ attr_accessor :total_size
3335
+
3336
+ def initialize(**args)
3337
+ update!(**args)
3338
+ end
3339
+
3340
+ # Update properties of this object
3341
+ def update!(**args)
3342
+ @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
3343
+ @corrected_query = args[:corrected_query] if args.key?(:corrected_query)
3344
+ @facets = args[:facets] if args.key?(:facets)
3345
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
3346
+ @query_expansion_info = args[:query_expansion_info] if args.key?(:query_expansion_info)
3347
+ @redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
3348
+ @results = args[:results] if args.key?(:results)
3349
+ @total_size = args[:total_size] if args.key?(:total_size)
1511
3350
  end
1512
3351
  end
1513
3352
 
1514
- # A transaction represents the entire purchase transaction.
1515
- class GoogleCloudRetailV2alphaPurchaseTransaction
3353
+ # A facet result.
3354
+ class GoogleCloudRetailV2alphaSearchResponseFacet
1516
3355
  include Google::Apis::Core::Hashable
1517
3356
 
1518
- # All the costs associated with the products. These can be manufacturing costs,
1519
- # shipping expenses not borne by the end user, or any other costs, such that: *
1520
- # Profit = revenue - tax - cost
1521
- # Corresponds to the JSON property `cost`
1522
- # @return [Float]
1523
- attr_accessor :cost
3357
+ # Whether the facet is dynamically generated.
3358
+ # Corresponds to the JSON property `dynamicFacet`
3359
+ # @return [Boolean]
3360
+ attr_accessor :dynamic_facet
3361
+ alias_method :dynamic_facet?, :dynamic_facet
1524
3362
 
1525
- # Required. Currency code. Use three-character ISO-4217 code.
1526
- # Corresponds to the JSON property `currencyCode`
3363
+ # The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1".
3364
+ # Corresponds to the JSON property `key`
1527
3365
  # @return [String]
1528
- attr_accessor :currency_code
3366
+ attr_accessor :key
1529
3367
 
1530
- # The transaction ID with a length limit of 128 characters.
1531
- # Corresponds to the JSON property `id`
1532
- # @return [String]
1533
- attr_accessor :id
3368
+ # The facet values for this field.
3369
+ # Corresponds to the JSON property `values`
3370
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseFacetFacetValue>]
3371
+ attr_accessor :values
1534
3372
 
1535
- # Required. Total non-zero revenue or grand total associated with the
1536
- # transaction. This value include shipping, tax, or other adjustments to total
1537
- # revenue that you want to include as part of your revenue calculations.
1538
- # Corresponds to the JSON property `revenue`
1539
- # @return [Float]
1540
- attr_accessor :revenue
3373
+ def initialize(**args)
3374
+ update!(**args)
3375
+ end
1541
3376
 
1542
- # All the taxes associated with the transaction.
1543
- # Corresponds to the JSON property `tax`
1544
- # @return [Float]
1545
- attr_accessor :tax
3377
+ # Update properties of this object
3378
+ def update!(**args)
3379
+ @dynamic_facet = args[:dynamic_facet] if args.key?(:dynamic_facet)
3380
+ @key = args[:key] if args.key?(:key)
3381
+ @values = args[:values] if args.key?(:values)
3382
+ end
3383
+ end
3384
+
3385
+ # A facet value which contains value names and their count.
3386
+ class GoogleCloudRetailV2alphaSearchResponseFacetFacetValue
3387
+ include Google::Apis::Core::Hashable
3388
+
3389
+ # Number of items that have this facet value.
3390
+ # Corresponds to the JSON property `count`
3391
+ # @return [Fixnum]
3392
+ attr_accessor :count
3393
+
3394
+ # A floating point interval.
3395
+ # Corresponds to the JSON property `interval`
3396
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval]
3397
+ attr_accessor :interval
3398
+
3399
+ # Text value of a facet, such as "Black" for facet "colorFamilies".
3400
+ # Corresponds to the JSON property `value`
3401
+ # @return [String]
3402
+ attr_accessor :value
1546
3403
 
1547
3404
  def initialize(**args)
1548
3405
  update!(**args)
@@ -1550,54 +3407,78 @@ module Google
1550
3407
 
1551
3408
  # Update properties of this object
1552
3409
  def update!(**args)
1553
- @cost = args[:cost] if args.key?(:cost)
1554
- @currency_code = args[:currency_code] if args.key?(:currency_code)
1555
- @id = args[:id] if args.key?(:id)
1556
- @revenue = args[:revenue] if args.key?(:revenue)
1557
- @tax = args[:tax] if args.key?(:tax)
3410
+ @count = args[:count] if args.key?(:count)
3411
+ @interval = args[:interval] if args.key?(:interval)
3412
+ @value = args[:value] if args.key?(:value)
1558
3413
  end
1559
3414
  end
1560
3415
 
1561
- # Metadata related to the progress of the Purge operation. This will be returned
1562
- # by the google.longrunning.Operation.metadata field.
1563
- class GoogleCloudRetailV2alphaPurgeMetadata
3416
+ # Information describing query expansion including whether expansion has
3417
+ # occurred.
3418
+ class GoogleCloudRetailV2alphaSearchResponseQueryExpansionInfo
1564
3419
  include Google::Apis::Core::Hashable
1565
3420
 
3421
+ # Bool describing whether query expansion has occurred.
3422
+ # Corresponds to the JSON property `expandedQuery`
3423
+ # @return [Boolean]
3424
+ attr_accessor :expanded_query
3425
+ alias_method :expanded_query?, :expanded_query
3426
+
1566
3427
  def initialize(**args)
1567
3428
  update!(**args)
1568
3429
  end
1569
3430
 
1570
3431
  # Update properties of this object
1571
3432
  def update!(**args)
3433
+ @expanded_query = args[:expanded_query] if args.key?(:expanded_query)
1572
3434
  end
1573
3435
  end
1574
3436
 
1575
- # Request message for PurgeUserEvents method.
1576
- class GoogleCloudRetailV2alphaPurgeUserEventsRequest
3437
+ # Represents the search results.
3438
+ class GoogleCloudRetailV2alphaSearchResponseSearchResult
1577
3439
  include Google::Apis::Core::Hashable
1578
3440
 
1579
- # Required. The filter string to specify the events to be deleted with a length
1580
- # limit of 5,000 characters. Empty string filter is not allowed. The eligible
1581
- # fields for filtering are: * `eventType`: Double quoted UserEvent.event_type
1582
- # string. * `eventTime`: in ISO 8601 "zulu" format. * `visitorId`: Double quoted
1583
- # string. Specifying this will delete all events associated with a visitor. * `
1584
- # userId`: Double quoted string. Specifying this will delete all events
1585
- # associated with a user. Examples: * Deleting all events in a time range: `
1586
- # eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"`
1587
- # * Deleting specific eventType in time range: `eventTime > "2012-04-23T18:25:43.
1588
- # 511Z" eventType = "detail-page-view"` * Deleting all events for a specific
1589
- # visitor: `visitorId = "visitor1024"` The filtering fields are assumed to have
1590
- # an implicit AND.
1591
- # Corresponds to the JSON property `filter`
3441
+ # Product.id of the searched Product.
3442
+ # Corresponds to the JSON property `id`
1592
3443
  # @return [String]
1593
- attr_accessor :filter
3444
+ attr_accessor :id
1594
3445
 
1595
- # Actually perform the purge. If `force` is set to false, the method will return
1596
- # the expected purge count without deleting any user events.
1597
- # Corresponds to the JSON property `force`
1598
- # @return [Boolean]
1599
- attr_accessor :force
1600
- alias_method :force?, :force
3446
+ # The count of matched variant Products.
3447
+ # Corresponds to the JSON property `matchingVariantCount`
3448
+ # @return [Fixnum]
3449
+ attr_accessor :matching_variant_count
3450
+
3451
+ # If a variant Product matches the search query, this map indicates which
3452
+ # Product fields are matched. The key is the Product.name, the value is a field
3453
+ # mask of the matched Product fields. If matched attributes cannot be determined,
3454
+ # this map will be empty. For example, a key "sku1" with field mask "products.
3455
+ # color_info" indicates there is a match between "sku1" ColorInfo and the query.
3456
+ # Corresponds to the JSON property `matchingVariantFields`
3457
+ # @return [Hash<String,String>]
3458
+ attr_accessor :matching_variant_fields
3459
+
3460
+ # Product captures all metadata information of items to be recommended or
3461
+ # searched.
3462
+ # Corresponds to the JSON property `product`
3463
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct]
3464
+ attr_accessor :product
3465
+
3466
+ # The rollup matching variant Product attributes. The key is one of the
3467
+ # SearchRequest.variant_rollup_keys. The values are the merged and de-duplicated
3468
+ # Product attributes. Notice that the rollup values are respect filter. For
3469
+ # example, when filtering by "colorFamilies:ANY(\"red\")" and rollup "
3470
+ # colorFamilies", only "red" is returned. For textual and numerical attributes,
3471
+ # the rollup values is a list of string or double values with type google.
3472
+ # protobuf.ListValue. For example, if there are two variants with colors "red"
3473
+ # and "blue", the rollup values are ` key: "colorFamilies" value ` list_value `
3474
+ # values ` string_value: "red" ` values ` string_value: "blue" ` ` ` ` For
3475
+ # Product.fulfillment_info, the rollup values is a double value with type google.
3476
+ # protobuf.Value. For example, `key: "pickupInStore.store1" value ` number_value:
3477
+ # 10 `` means a there are 10 variants in this product are available in the
3478
+ # store "store1".
3479
+ # Corresponds to the JSON property `variantRollupValues`
3480
+ # @return [Hash<String,Object>]
3481
+ attr_accessor :variant_rollup_values
1601
3482
 
1602
3483
  def initialize(**args)
1603
3484
  update!(**args)
@@ -1605,21 +3486,31 @@ module Google
1605
3486
 
1606
3487
  # Update properties of this object
1607
3488
  def update!(**args)
1608
- @filter = args[:filter] if args.key?(:filter)
1609
- @force = args[:force] if args.key?(:force)
3489
+ @id = args[:id] if args.key?(:id)
3490
+ @matching_variant_count = args[:matching_variant_count] if args.key?(:matching_variant_count)
3491
+ @matching_variant_fields = args[:matching_variant_fields] if args.key?(:matching_variant_fields)
3492
+ @product = args[:product] if args.key?(:product)
3493
+ @variant_rollup_values = args[:variant_rollup_values] if args.key?(:variant_rollup_values)
1610
3494
  end
1611
3495
  end
1612
3496
 
1613
- # Response of the PurgeUserEventsRequest. If the long running operation is
1614
- # successfully done, then this message is returned by the google.longrunning.
1615
- # Operations.response field.
1616
- class GoogleCloudRetailV2alphaPurgeUserEventsResponse
3497
+ # Request message to set a specified branch as new default_branch.
3498
+ class GoogleCloudRetailV2alphaSetDefaultBranchRequest
1617
3499
  include Google::Apis::Core::Hashable
1618
3500
 
1619
- # The total count of events purged as a result of the operation.
1620
- # Corresponds to the JSON property `purgedEventsCount`
1621
- # @return [Fixnum]
1622
- attr_accessor :purged_events_count
3501
+ # The final component of the resource name of a branch. This field must be one
3502
+ # of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT error is returned.
3503
+ # Corresponds to the JSON property `branchId`
3504
+ # @return [String]
3505
+ attr_accessor :branch_id
3506
+
3507
+ # Some note on this request, this can be retrieved by CatalogService.
3508
+ # GetDefaultBranch before next valid default branch set occurs. This field must
3509
+ # be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise,
3510
+ # an INVALID_ARGUMENT error is returned.
3511
+ # Corresponds to the JSON property `note`
3512
+ # @return [String]
3513
+ attr_accessor :note
1623
3514
 
1624
3515
  def initialize(**args)
1625
3516
  update!(**args)
@@ -1627,12 +3518,15 @@ module Google
1627
3518
 
1628
3519
  # Update properties of this object
1629
3520
  def update!(**args)
1630
- @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count)
3521
+ @branch_id = args[:branch_id] if args.key?(:branch_id)
3522
+ @note = args[:note] if args.key?(:note)
1631
3523
  end
1632
3524
  end
1633
3525
 
1634
- # Metadata for RejoinUserEvents method.
1635
- class GoogleCloudRetailV2alphaRejoinUserEventsMetadata
3526
+ # Metadata related to the progress of the SetInventory operation. Currently
3527
+ # empty because there is no meaningful metadata populated from the SetInventory
3528
+ # method.
3529
+ class GoogleCloudRetailV2alphaSetInventoryMetadata
1636
3530
  include Google::Apis::Core::Hashable
1637
3531
 
1638
3532
  def initialize(**args)
@@ -1644,17 +3538,39 @@ module Google
1644
3538
  end
1645
3539
  end
1646
3540
 
1647
- # Request message for RejoinUserEvents method.
1648
- class GoogleCloudRetailV2alphaRejoinUserEventsRequest
3541
+ # Request message for SetInventory method.
3542
+ class GoogleCloudRetailV2alphaSetInventoryRequest
1649
3543
  include Google::Apis::Core::Hashable
1650
3544
 
1651
- # The type of the user event rejoin to define the scope and range of the user
1652
- # events to be rejoined with the latest product catalog. Defaults to
1653
- # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
1654
- # invalid integer value.
1655
- # Corresponds to the JSON property `userEventRejoinScope`
3545
+ # If set to true, and the Product with name Product.name is not found, the
3546
+ # inventory update will still be processed and retained for at most 1 day until
3547
+ # the Product is created. If set to false, an INVALID_ARGUMENT error is returned
3548
+ # if the Product is not found.
3549
+ # Corresponds to the JSON property `allowMissing`
3550
+ # @return [Boolean]
3551
+ attr_accessor :allow_missing
3552
+ alias_method :allow_missing?, :allow_missing
3553
+
3554
+ # Product captures all metadata information of items to be recommended or
3555
+ # searched.
3556
+ # Corresponds to the JSON property `inventory`
3557
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct]
3558
+ attr_accessor :inventory
3559
+
3560
+ # Indicates which inventory fields in the provided Product to update. If not set
3561
+ # or set with empty paths, all inventory fields will be updated. If an
3562
+ # unsupported or unknown field is provided, an INVALID_ARGUMENT error is
3563
+ # returned and the entire update will be ignored.
3564
+ # Corresponds to the JSON property `setMask`
1656
3565
  # @return [String]
1657
- attr_accessor :user_event_rejoin_scope
3566
+ attr_accessor :set_mask
3567
+
3568
+ # The time when the request is issued, used to prevent out-of-order updates on
3569
+ # inventory fields with the last update time recorded. If not provided, the
3570
+ # internal system time will be used.
3571
+ # Corresponds to the JSON property `setTime`
3572
+ # @return [String]
3573
+ attr_accessor :set_time
1658
3574
 
1659
3575
  def initialize(**args)
1660
3576
  update!(**args)
@@ -1662,26 +3578,24 @@ module Google
1662
3578
 
1663
3579
  # Update properties of this object
1664
3580
  def update!(**args)
1665
- @user_event_rejoin_scope = args[:user_event_rejoin_scope] if args.key?(:user_event_rejoin_scope)
3581
+ @allow_missing = args[:allow_missing] if args.key?(:allow_missing)
3582
+ @inventory = args[:inventory] if args.key?(:inventory)
3583
+ @set_mask = args[:set_mask] if args.key?(:set_mask)
3584
+ @set_time = args[:set_time] if args.key?(:set_time)
1666
3585
  end
1667
3586
  end
1668
3587
 
1669
- # Response message for RejoinUserEvents method.
1670
- class GoogleCloudRetailV2alphaRejoinUserEventsResponse
3588
+ # Response of the SetInventoryRequest. Currently empty because there is no
3589
+ # meaningful response populated from the SetInventory method.
3590
+ class GoogleCloudRetailV2alphaSetInventoryResponse
1671
3591
  include Google::Apis::Core::Hashable
1672
3592
 
1673
- # Number of user events that were joined with latest product catalog.
1674
- # Corresponds to the JSON property `rejoinedUserEventsCount`
1675
- # @return [Fixnum]
1676
- attr_accessor :rejoined_user_events_count
1677
-
1678
3593
  def initialize(**args)
1679
3594
  update!(**args)
1680
3595
  end
1681
3596
 
1682
3597
  # Update properties of this object
1683
3598
  def update!(**args)
1684
- @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count)
1685
3599
  end
1686
3600
  end
1687
3601
 
@@ -1703,13 +3617,14 @@ module Google
1703
3617
  # Highly recommended for user events that are the result of PredictionService.
1704
3618
  # Predict. This field enables accurate attribution of recommendation model
1705
3619
  # performance. The value must be a valid PredictResponse.attribution_token for
1706
- # user events that are the result of PredictionService.Predict. This token
1707
- # enables us to accurately attribute page view or purchase back to the event and
1708
- # the particular predict response containing this clicked/purchased product. If
1709
- # user clicks on product K in the recommendation results, pass PredictResponse.
1710
- # attribution_token as a URL parameter to product K's page. When recording
1711
- # events on product K's page, log the PredictResponse.attribution_token to this
1712
- # field.
3620
+ # user events that are the result of PredictionService.Predict. The value must
3621
+ # be a valid SearchResponse.attribution_token for user events that are the
3622
+ # result of SearchService.Search. This token enables us to accurately attribute
3623
+ # page view or purchase back to the event and the particular predict response
3624
+ # containing this clicked/purchased product. If user clicks on product K in the
3625
+ # recommendation results, pass PredictResponse.attribution_token as a URL
3626
+ # parameter to product K's page. When recording events on product K's page, log
3627
+ # the PredictResponse.attribution_token to this field.
1713
3628
  # Corresponds to the JSON property `attributionToken`
1714
3629
  # @return [String]
1715
3630
  attr_accessor :attribution_token
@@ -1722,6 +3637,12 @@ module Google
1722
3637
  # @return [String]
1723
3638
  attr_accessor :cart_id
1724
3639
 
3640
+ # Detailed completion information including completion attribution token and
3641
+ # clicked completion info.
3642
+ # Corresponds to the JSON property `completionDetail`
3643
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionDetail]
3644
+ attr_accessor :completion_detail
3645
+
1725
3646
  # Only required for UserEventService.ImportUserEvents method. Timestamp of when
1726
3647
  # the user event happened.
1727
3648
  # Corresponds to the JSON property `eventTime`
@@ -1748,6 +3669,34 @@ module Google
1748
3669
  # @return [Array<String>]
1749
3670
  attr_accessor :experiment_ids
1750
3671
 
3672
+ # The filter syntax consists of an expression language for constructing a
3673
+ # predicate from one or more fields of the products being filtered. See
3674
+ # SearchRequest.filter for definition and syntax. The value must be a UTF-8
3675
+ # encoded string with a length limit of 1,000 characters. Otherwise, an
3676
+ # INVALID_ARGUMENT error is returned.
3677
+ # Corresponds to the JSON property `filter`
3678
+ # @return [String]
3679
+ attr_accessor :filter
3680
+
3681
+ # An integer that specifies the current offset for pagination (the 0-indexed
3682
+ # starting location, amongst the products deemed by the API as relevant). See
3683
+ # SearchRequest.offset for definition. If this field is negative, an
3684
+ # INVALID_ARGUMENT is returned. This can only be set for `search` events. Other
3685
+ # event types should not set this field. Otherwise, an INVALID_ARGUMENT error is
3686
+ # returned.
3687
+ # Corresponds to the JSON property `offset`
3688
+ # @return [Fixnum]
3689
+ attr_accessor :offset
3690
+
3691
+ # The order in which products are returned. See SearchRequest.order_by for
3692
+ # definition and syntax. The value must be a UTF-8 encoded string with a length
3693
+ # limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
3694
+ # This can only be set for `search` events. Other event types should not set
3695
+ # this field. Otherwise, an INVALID_ARGUMENT error is returned.
3696
+ # Corresponds to the JSON property `orderBy`
3697
+ # @return [String]
3698
+ attr_accessor :order_by
3699
+
1751
3700
  # The categories associated with a category page. To represent full path of
1752
3701
  # category, use '>' sign to separate different hierarchies. If '>' is part of
1753
3702
  # the category name, please replace it with other character(s). Category pages
@@ -1796,15 +3745,24 @@ module Google
1796
3745
  # @return [String]
1797
3746
  attr_accessor :referrer_uri
1798
3747
 
1799
- # The user's search query. The value must be a UTF-8 encoded string with a
1800
- # length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is
1801
- # returned. At least one of search_query or page_categories is required for `
1802
- # search` events. Other event types should not set this field. Otherwise, an
1803
- # INVALID_ARGUMENT error is returned.
3748
+ # The user's search query. See SearchRequest.query for definition. The value
3749
+ # must be a UTF-8 encoded string with a length limit of 5,000 characters.
3750
+ # Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query
3751
+ # or page_categories is required for `search` events. Other event types should
3752
+ # not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
1804
3753
  # Corresponds to the JSON property `searchQuery`
1805
3754
  # @return [String]
1806
3755
  attr_accessor :search_query
1807
3756
 
3757
+ # A unique identifier for tracking a visitor session with a length limit of 128
3758
+ # bytes. A session is an aggregation of an end user behavior in a time span. A
3759
+ # general guideline to populate the sesion_id: 1. If user has no activity for 30
3760
+ # min, a new session_id should be assigned. 2. The session_id should be unique
3761
+ # across users, suggest use uuid or add visitor_id as prefix.
3762
+ # Corresponds to the JSON property `sessionId`
3763
+ # @return [String]
3764
+ attr_accessor :session_id
3765
+
1808
3766
  # Complete URL (window.location.href) of the user's current page. When using the
1809
3767
  # client side event reporting with JavaScript pixel and Google Tag Manager, this
1810
3768
  # value is filled in automatically. Maximum length 5,000 characters.
@@ -1838,15 +3796,20 @@ module Google
1838
3796
  @attributes = args[:attributes] if args.key?(:attributes)
1839
3797
  @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
1840
3798
  @cart_id = args[:cart_id] if args.key?(:cart_id)
3799
+ @completion_detail = args[:completion_detail] if args.key?(:completion_detail)
1841
3800
  @event_time = args[:event_time] if args.key?(:event_time)
1842
3801
  @event_type = args[:event_type] if args.key?(:event_type)
1843
3802
  @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids)
3803
+ @filter = args[:filter] if args.key?(:filter)
3804
+ @offset = args[:offset] if args.key?(:offset)
3805
+ @order_by = args[:order_by] if args.key?(:order_by)
1844
3806
  @page_categories = args[:page_categories] if args.key?(:page_categories)
1845
3807
  @page_view_id = args[:page_view_id] if args.key?(:page_view_id)
1846
3808
  @product_details = args[:product_details] if args.key?(:product_details)
1847
3809
  @purchase_transaction = args[:purchase_transaction] if args.key?(:purchase_transaction)
1848
3810
  @referrer_uri = args[:referrer_uri] if args.key?(:referrer_uri)
1849
3811
  @search_query = args[:search_query] if args.key?(:search_query)
3812
+ @session_id = args[:session_id] if args.key?(:session_id)
1850
3813
  @uri = args[:uri] if args.key?(:uri)
1851
3814
  @user_info = args[:user_info] if args.key?(:user_info)
1852
3815
  @visitor_id = args[:visitor_id] if args.key?(:visitor_id)
@@ -1945,9 +3908,10 @@ module Google
1945
3908
  attr_accessor :direct_user_request
1946
3909
  alias_method :direct_user_request?, :direct_user_request
1947
3910
 
1948
- # The end user's IP address. This field is used to extract location information
1949
- # for personalization. This field must be either an IPv4 address (e.g. "104.133.
1950
- # 9.80") or an IPv6 address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334").
3911
+ # The end user's IP address. Required for getting SearchResponse.
3912
+ # sponsored_results. This field is used to extract location information for
3913
+ # personalization. This field must be either an IPv4 address (e.g. "104.133.9.80"
3914
+ # ) or an IPv6 address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334").
1951
3915
  # Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when
1952
3916
  # using the JavaScript tag in UserEventService.CollectUserEvent or if
1953
3917
  # direct_user_request is set.
@@ -1955,11 +3919,12 @@ module Google
1955
3919
  # @return [String]
1956
3920
  attr_accessor :ip_address
1957
3921
 
1958
- # User agent as included in the HTTP header. The field must be a UTF-8 encoded
1959
- # string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT
1960
- # error is returned. This should not be set when using the client side event
1961
- # reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or
1962
- # if direct_user_request is set.
3922
+ # User agent as included in the HTTP header. Required for getting SearchResponse.
3923
+ # sponsored_results. The field must be a UTF-8 encoded string with a length
3924
+ # limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
3925
+ # This should not be set when using the client side event reporting with GTM or
3926
+ # JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request
3927
+ # is set.
1963
3928
  # Corresponds to the JSON property `userAgent`
1964
3929
  # @return [String]
1965
3930
  attr_accessor :user_agent
@@ -1984,6 +3949,35 @@ module Google
1984
3949
  end
1985
3950
  end
1986
3951
 
3952
+ # Metadata related to the progress of the AddFulfillmentPlaces operation.
3953
+ # Currently empty because there is no meaningful metadata populated from the
3954
+ # AddFulfillmentPlaces method.
3955
+ class GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata
3956
+ include Google::Apis::Core::Hashable
3957
+
3958
+ def initialize(**args)
3959
+ update!(**args)
3960
+ end
3961
+
3962
+ # Update properties of this object
3963
+ def update!(**args)
3964
+ end
3965
+ end
3966
+
3967
+ # Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
3968
+ # is no meaningful response populated from the AddFulfillmentPlaces method.
3969
+ class GoogleCloudRetailV2betaAddFulfillmentPlacesResponse
3970
+ include Google::Apis::Core::Hashable
3971
+
3972
+ def initialize(**args)
3973
+ update!(**args)
3974
+ end
3975
+
3976
+ # Update properties of this object
3977
+ def update!(**args)
3978
+ end
3979
+ end
3980
+
1987
3981
  # Configuration of destination for Export related errors.
1988
3982
  class GoogleCloudRetailV2betaExportErrorsConfig
1989
3983
  include Google::Apis::Core::Hashable
@@ -2086,6 +4080,27 @@ module Google
2086
4080
  end
2087
4081
  end
2088
4082
 
4083
+ # Response of the ImportCompletionDataRequest. If the long running operation is
4084
+ # done, this message is returned by the google.longrunning.Operations.response
4085
+ # field if the operation is successful.
4086
+ class GoogleCloudRetailV2betaImportCompletionDataResponse
4087
+ include Google::Apis::Core::Hashable
4088
+
4089
+ # A sample of errors encountered while processing the request.
4090
+ # Corresponds to the JSON property `errorSamples`
4091
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
4092
+ attr_accessor :error_samples
4093
+
4094
+ def initialize(**args)
4095
+ update!(**args)
4096
+ end
4097
+
4098
+ # Update properties of this object
4099
+ def update!(**args)
4100
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
4101
+ end
4102
+ end
4103
+
2089
4104
  # Configuration of destination for Import related errors.
2090
4105
  class GoogleCloudRetailV2betaImportErrorsConfig
2091
4106
  include Google::Apis::Core::Hashable
@@ -2122,6 +4137,20 @@ module Google
2122
4137
  # @return [Fixnum]
2123
4138
  attr_accessor :failure_count
2124
4139
 
4140
+ # Pub/Sub topic for receiving notification. If this field is set, when the
4141
+ # import is finished, a notification will be sent to specified Pub/Sub topic.
4142
+ # The message data will be JSON string of a Operation. Format of the Pub/Sub
4143
+ # topic is `projects/`project`/topics/`topic``.
4144
+ # Corresponds to the JSON property `notificationPubsubTopic`
4145
+ # @return [String]
4146
+ attr_accessor :notification_pubsub_topic
4147
+
4148
+ # Id of the request / operation. This is parroting back the requestId that was
4149
+ # passed in the request.
4150
+ # Corresponds to the JSON property `requestId`
4151
+ # @return [String]
4152
+ attr_accessor :request_id
4153
+
2125
4154
  # Count of entries that were processed successfully.
2126
4155
  # Corresponds to the JSON property `successCount`
2127
4156
  # @return [Fixnum]
@@ -2141,6 +4170,8 @@ module Google
2141
4170
  def update!(**args)
2142
4171
  @create_time = args[:create_time] if args.key?(:create_time)
2143
4172
  @failure_count = args[:failure_count] if args.key?(:failure_count)
4173
+ @notification_pubsub_topic = args[:notification_pubsub_topic] if args.key?(:notification_pubsub_topic)
4174
+ @request_id = args[:request_id] if args.key?(:request_id)
2144
4175
  @success_count = args[:success_count] if args.key?(:success_count)
2145
4176
  @update_time = args[:update_time] if args.key?(:update_time)
2146
4177
  end
@@ -2274,6 +4305,64 @@ module Google
2274
4305
  end
2275
4306
  end
2276
4307
 
4308
+ # Metadata related to the progress of the RemoveFulfillmentPlaces operation.
4309
+ # Currently empty because there is no meaningful metadata populated from the
4310
+ # RemoveFulfillmentPlaces method.
4311
+ class GoogleCloudRetailV2betaRemoveFulfillmentPlacesMetadata
4312
+ include Google::Apis::Core::Hashable
4313
+
4314
+ def initialize(**args)
4315
+ update!(**args)
4316
+ end
4317
+
4318
+ # Update properties of this object
4319
+ def update!(**args)
4320
+ end
4321
+ end
4322
+
4323
+ # Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
4324
+ # is no meaningful response populated from the RemoveFulfillmentPlaces method.
4325
+ class GoogleCloudRetailV2betaRemoveFulfillmentPlacesResponse
4326
+ include Google::Apis::Core::Hashable
4327
+
4328
+ def initialize(**args)
4329
+ update!(**args)
4330
+ end
4331
+
4332
+ # Update properties of this object
4333
+ def update!(**args)
4334
+ end
4335
+ end
4336
+
4337
+ # Metadata related to the progress of the SetInventory operation. Currently
4338
+ # empty because there is no meaningful metadata populated from the SetInventory
4339
+ # method.
4340
+ class GoogleCloudRetailV2betaSetInventoryMetadata
4341
+ include Google::Apis::Core::Hashable
4342
+
4343
+ def initialize(**args)
4344
+ update!(**args)
4345
+ end
4346
+
4347
+ # Update properties of this object
4348
+ def update!(**args)
4349
+ end
4350
+ end
4351
+
4352
+ # Response of the SetInventoryRequest. Currently empty because there is no
4353
+ # meaningful response populated from the SetInventory method.
4354
+ class GoogleCloudRetailV2betaSetInventoryResponse
4355
+ include Google::Apis::Core::Hashable
4356
+
4357
+ def initialize(**args)
4358
+ update!(**args)
4359
+ end
4360
+
4361
+ # Update properties of this object
4362
+ def update!(**args)
4363
+ end
4364
+ end
4365
+
2277
4366
  # A summary of import result. The UserEventImportSummary summarizes the import
2278
4367
  # status for user events.
2279
4368
  class GoogleCloudRetailV2betaUserEventImportSummary
@@ -2443,6 +4532,47 @@ module Google
2443
4532
  @message = args[:message] if args.key?(:message)
2444
4533
  end
2445
4534
  end
4535
+
4536
+ # Represents a whole or partial calendar date, such as a birthday. The time of
4537
+ # day and time zone are either specified elsewhere or are insignificant. The
4538
+ # date is relative to the Gregorian Calendar. This can represent one of the
4539
+ # following: * A full date, with non-zero year, month, and day values * A month
4540
+ # and day value, with a zero year, such as an anniversary * A year on its own,
4541
+ # with zero month and day values * A year and month value, with a zero day, such
4542
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
4543
+ # google.protobuf.Timestamp`.
4544
+ class GoogleTypeDate
4545
+ include Google::Apis::Core::Hashable
4546
+
4547
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
4548
+ # specify a year by itself or a year and month where the day isn't significant.
4549
+ # Corresponds to the JSON property `day`
4550
+ # @return [Fixnum]
4551
+ attr_accessor :day
4552
+
4553
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
4554
+ # and day.
4555
+ # Corresponds to the JSON property `month`
4556
+ # @return [Fixnum]
4557
+ attr_accessor :month
4558
+
4559
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
4560
+ # year.
4561
+ # Corresponds to the JSON property `year`
4562
+ # @return [Fixnum]
4563
+ attr_accessor :year
4564
+
4565
+ def initialize(**args)
4566
+ update!(**args)
4567
+ end
4568
+
4569
+ # Update properties of this object
4570
+ def update!(**args)
4571
+ @day = args[:day] if args.key?(:day)
4572
+ @month = args[:month] if args.key?(:month)
4573
+ @year = args[:year] if args.key?(:year)
4574
+ end
4575
+ end
2446
4576
  end
2447
4577
  end
2448
4578
  end