google-apis-retail_v2alpha 0.12.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 25 colors are allowed. Each value must be a UTF-
874
+ # 8 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. The maximum number of recent searches is
911
+ # 10. This field is a restricted feature. Contact Retail Search support team if
912
+ # you are 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,11 +1073,27 @@ 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
619
1082
 
1083
+ # Metadata related to the EnrollSolution method. This will be returned by the
1084
+ # google.longrunning.Operation.metadata field.
1085
+ class GoogleCloudRetailV2alphaEnrollSolutionMetadata
1086
+ include Google::Apis::Core::Hashable
1087
+
1088
+ def initialize(**args)
1089
+ update!(**args)
1090
+ end
1091
+
1092
+ # Update properties of this object
1093
+ def update!(**args)
1094
+ end
1095
+ end
1096
+
620
1097
  # Configuration of destination for Export related errors.
621
1098
  class GoogleCloudRetailV2alphaExportErrorsConfig
622
1099
  include Google::Apis::Core::Hashable
@@ -719,6 +1196,42 @@ module Google
719
1196
  end
720
1197
  end
721
1198
 
1199
+ # Fulfillment information, such as the store IDs for in-store pickup or region
1200
+ # IDs for different shipping methods.
1201
+ class GoogleCloudRetailV2alphaFulfillmentInfo
1202
+ include Google::Apis::Core::Hashable
1203
+
1204
+ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-
1205
+ # in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A
1206
+ # maximum of 3000 values are allowed. Each value must be a string with a length
1207
+ # limit of 30 characters, matching the pattern [a-zA-Z0-9_-]+, such as "store1"
1208
+ # or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned.
1209
+ # Corresponds to the JSON property `placeIds`
1210
+ # @return [Array<String>]
1211
+ attr_accessor :place_ids
1212
+
1213
+ # The fulfillment type, including commonly used types (such as pickup in store
1214
+ # and same day delivery), and custom types. Customers have to map custom types
1215
+ # to their display names before rendering UI. Supported values: * "pickup-in-
1216
+ # store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "custom-
1217
+ # type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-type-5"
1218
+ # If this field is set to an invalid value other than these, an
1219
+ # INVALID_ARGUMENT error is returned.
1220
+ # Corresponds to the JSON property `type`
1221
+ # @return [String]
1222
+ attr_accessor :type
1223
+
1224
+ def initialize(**args)
1225
+ update!(**args)
1226
+ end
1227
+
1228
+ # Update properties of this object
1229
+ def update!(**args)
1230
+ @place_ids = args[:place_ids] if args.key?(:place_ids)
1231
+ @type = args[:type] if args.key?(:type)
1232
+ end
1233
+ end
1234
+
722
1235
  # Google Cloud Storage location for input content. format.
723
1236
  class GoogleCloudRetailV2alphaGcsSource
724
1237
  include Google::Apis::Core::Hashable
@@ -729,8 +1242,7 @@ module Google
729
1242
  # Importing catalog data from Merchant Center](https://cloud.google.com/retail/
730
1243
  # recommendations-ai/docs/upload-catalog#mc). Supported values for user events
731
1244
  # imports: * `user_event` (default): One JSON UserEvent per line. * `
732
- # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719?
733
- # hl=en.
1245
+ # user_event_ga360`: Using https://support.google.com/analytics/answer/3437719.
734
1246
  # Corresponds to the JSON property `dataSchema`
735
1247
  # @return [String]
736
1248
  attr_accessor :data_schema
@@ -757,6 +1269,38 @@ module Google
757
1269
  end
758
1270
  end
759
1271
 
1272
+ # Response message of CatalogService.GetDefaultBranch.
1273
+ class GoogleCloudRetailV2alphaGetDefaultBranchResponse
1274
+ include Google::Apis::Core::Hashable
1275
+
1276
+ # Full resource name of the branch id currently set as default branch.
1277
+ # Corresponds to the JSON property `branch`
1278
+ # @return [String]
1279
+ attr_accessor :branch
1280
+
1281
+ # This corresponds to SetDefaultBranchRequest.note field, when this branch was
1282
+ # set as default.
1283
+ # Corresponds to the JSON property `note`
1284
+ # @return [String]
1285
+ attr_accessor :note
1286
+
1287
+ # The time when this branch is set to default.
1288
+ # Corresponds to the JSON property `setTime`
1289
+ # @return [String]
1290
+ attr_accessor :set_time
1291
+
1292
+ def initialize(**args)
1293
+ update!(**args)
1294
+ end
1295
+
1296
+ # Update properties of this object
1297
+ def update!(**args)
1298
+ @branch = args[:branch] if args.key?(:branch)
1299
+ @note = args[:note] if args.key?(:note)
1300
+ @set_time = args[:set_time] if args.key?(:set_time)
1301
+ end
1302
+ end
1303
+
760
1304
  # Product thumbnail/detail image.
761
1305
  class GoogleCloudRetailV2alphaImage
762
1306
  include Google::Apis::Core::Hashable
@@ -794,6 +1338,55 @@ module Google
794
1338
  end
795
1339
  end
796
1340
 
1341
+ # Request message for ImportCompletionData methods.
1342
+ class GoogleCloudRetailV2alphaImportCompletionDataRequest
1343
+ include Google::Apis::Core::Hashable
1344
+
1345
+ # The input config source for completion data.
1346
+ # Corresponds to the JSON property `inputConfig`
1347
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionDataInputConfig]
1348
+ attr_accessor :input_config
1349
+
1350
+ # Pub/Sub topic for receiving notification. If this field is set, when the
1351
+ # import is finished, a notification will be sent to specified Pub/Sub topic.
1352
+ # The message data will be JSON string of a Operation. Format of the Pub/Sub
1353
+ # topic is `projects/`project`/topics/`topic``.
1354
+ # Corresponds to the JSON property `notificationPubsubTopic`
1355
+ # @return [String]
1356
+ attr_accessor :notification_pubsub_topic
1357
+
1358
+ def initialize(**args)
1359
+ update!(**args)
1360
+ end
1361
+
1362
+ # Update properties of this object
1363
+ def update!(**args)
1364
+ @input_config = args[:input_config] if args.key?(:input_config)
1365
+ @notification_pubsub_topic = args[:notification_pubsub_topic] if args.key?(:notification_pubsub_topic)
1366
+ end
1367
+ end
1368
+
1369
+ # Response of the ImportCompletionDataRequest. If the long running operation is
1370
+ # done, this message is returned by the google.longrunning.Operations.response
1371
+ # field if the operation is successful.
1372
+ class GoogleCloudRetailV2alphaImportCompletionDataResponse
1373
+ include Google::Apis::Core::Hashable
1374
+
1375
+ # A sample of errors encountered while processing the request.
1376
+ # Corresponds to the JSON property `errorSamples`
1377
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
1378
+ attr_accessor :error_samples
1379
+
1380
+ def initialize(**args)
1381
+ update!(**args)
1382
+ end
1383
+
1384
+ # Update properties of this object
1385
+ def update!(**args)
1386
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
1387
+ end
1388
+ end
1389
+
797
1390
  # Configuration of destination for Import related errors.
798
1391
  class GoogleCloudRetailV2alphaImportErrorsConfig
799
1392
  include Google::Apis::Core::Hashable
@@ -830,6 +1423,20 @@ module Google
830
1423
  # @return [Fixnum]
831
1424
  attr_accessor :failure_count
832
1425
 
1426
+ # Pub/Sub topic for receiving notification. If this field is set, when the
1427
+ # import is finished, a notification will be sent to specified Pub/Sub topic.
1428
+ # The message data will be JSON string of a Operation. Format of the Pub/Sub
1429
+ # topic is `projects/`project`/topics/`topic``.
1430
+ # Corresponds to the JSON property `notificationPubsubTopic`
1431
+ # @return [String]
1432
+ attr_accessor :notification_pubsub_topic
1433
+
1434
+ # Id of the request / operation. This is parroting back the requestId that was
1435
+ # passed in the request.
1436
+ # Corresponds to the JSON property `requestId`
1437
+ # @return [String]
1438
+ attr_accessor :request_id
1439
+
833
1440
  # Count of entries that were processed successfully.
834
1441
  # Corresponds to the JSON property `successCount`
835
1442
  # @return [Fixnum]
@@ -849,6 +1456,8 @@ module Google
849
1456
  def update!(**args)
850
1457
  @create_time = args[:create_time] if args.key?(:create_time)
851
1458
  @failure_count = args[:failure_count] if args.key?(:failure_count)
1459
+ @notification_pubsub_topic = args[:notification_pubsub_topic] if args.key?(:notification_pubsub_topic)
1460
+ @request_id = args[:request_id] if args.key?(:request_id)
852
1461
  @success_count = args[:success_count] if args.key?(:success_count)
853
1462
  @update_time = args[:update_time] if args.key?(:update_time)
854
1463
  end
@@ -868,6 +1477,30 @@ module Google
868
1477
  # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductInputConfig]
869
1478
  attr_accessor :input_config
870
1479
 
1480
+ # Pub/Sub topic for receiving notification. If this field is set, when the
1481
+ # import is finished, a notification will be sent to specified Pub/Sub topic.
1482
+ # The message data will be JSON string of a Operation. Format of the Pub/Sub
1483
+ # topic is `projects/`project`/topics/`topic``. Only supported when
1484
+ # ImportProductsRequest.reconciliation_mode is set to `FULL`.
1485
+ # Corresponds to the JSON property `notificationPubsubTopic`
1486
+ # @return [String]
1487
+ attr_accessor :notification_pubsub_topic
1488
+
1489
+ # The mode of reconciliation between existing products and the products to be
1490
+ # imported. Defaults to ReconciliationMode.INCREMENTAL.
1491
+ # Corresponds to the JSON property `reconciliationMode`
1492
+ # @return [String]
1493
+ attr_accessor :reconciliation_mode
1494
+
1495
+ # Unique identifier provided by client, within the ancestor dataset scope.
1496
+ # Ensures idempotency and used for request deduplication. Server-generated if
1497
+ # unspecified. Up to 128 characters long and must match the pattern: "[a-zA-Z0-
1498
+ # 9_]+". This is returned as Operation.name in ImportMetadata. Only supported
1499
+ # when ImportProductsRequest.reconciliation_mode is set to `FULL`.
1500
+ # Corresponds to the JSON property `requestId`
1501
+ # @return [String]
1502
+ attr_accessor :request_id
1503
+
871
1504
  # Indicates which fields in the provided imported 'products' to update. If not
872
1505
  # set, will by default update all fields.
873
1506
  # Corresponds to the JSON property `updateMask`
@@ -882,6 +1515,9 @@ module Google
882
1515
  def update!(**args)
883
1516
  @errors_config = args[:errors_config] if args.key?(:errors_config)
884
1517
  @input_config = args[:input_config] if args.key?(:input_config)
1518
+ @notification_pubsub_topic = args[:notification_pubsub_topic] if args.key?(:notification_pubsub_topic)
1519
+ @reconciliation_mode = args[:reconciliation_mode] if args.key?(:reconciliation_mode)
1520
+ @request_id = args[:request_id] if args.key?(:request_id)
885
1521
  @update_mask = args[:update_mask] if args.key?(:update_mask)
886
1522
  end
887
1523
  end
@@ -972,6 +1608,43 @@ module Google
972
1608
  end
973
1609
  end
974
1610
 
1611
+ # A floating point interval.
1612
+ class GoogleCloudRetailV2alphaInterval
1613
+ include Google::Apis::Core::Hashable
1614
+
1615
+ # Exclusive upper bound.
1616
+ # Corresponds to the JSON property `exclusiveMaximum`
1617
+ # @return [Float]
1618
+ attr_accessor :exclusive_maximum
1619
+
1620
+ # Exclusive lower bound.
1621
+ # Corresponds to the JSON property `exclusiveMinimum`
1622
+ # @return [Float]
1623
+ attr_accessor :exclusive_minimum
1624
+
1625
+ # Inclusive upper bound.
1626
+ # Corresponds to the JSON property `maximum`
1627
+ # @return [Float]
1628
+ attr_accessor :maximum
1629
+
1630
+ # Inclusive lower bound.
1631
+ # Corresponds to the JSON property `minimum`
1632
+ # @return [Float]
1633
+ attr_accessor :minimum
1634
+
1635
+ def initialize(**args)
1636
+ update!(**args)
1637
+ end
1638
+
1639
+ # Update properties of this object
1640
+ def update!(**args)
1641
+ @exclusive_maximum = args[:exclusive_maximum] if args.key?(:exclusive_maximum)
1642
+ @exclusive_minimum = args[:exclusive_minimum] if args.key?(:exclusive_minimum)
1643
+ @maximum = args[:maximum] if args.key?(:maximum)
1644
+ @minimum = args[:minimum] if args.key?(:minimum)
1645
+ end
1646
+ end
1647
+
975
1648
  # Response for CatalogService.ListCatalogs method.
976
1649
  class GoogleCloudRetailV2alphaListCatalogsResponse
977
1650
  include Google::Apis::Core::Hashable
@@ -998,6 +1671,104 @@ module Google
998
1671
  end
999
1672
  end
1000
1673
 
1674
+ # Response message for ProductService.ListProducts method.
1675
+ class GoogleCloudRetailV2alphaListProductsResponse
1676
+ include Google::Apis::Core::Hashable
1677
+
1678
+ # A token that can be sent as ListProductsRequest.page_token to retrieve the
1679
+ # next page. If this field is omitted, there are no subsequent pages.
1680
+ # Corresponds to the JSON property `nextPageToken`
1681
+ # @return [String]
1682
+ attr_accessor :next_page_token
1683
+
1684
+ # The Products.
1685
+ # Corresponds to the JSON property `products`
1686
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct>]
1687
+ attr_accessor :products
1688
+
1689
+ # The total count of matched Products irrespective of pagination. The total
1690
+ # number of Products returned by pagination may be less than the total_size that
1691
+ # matches. This field is ignored if ListProductsRequest.require_total_size is
1692
+ # not set or ListProductsRequest.page_token is not empty.
1693
+ # Corresponds to the JSON property `totalSize`
1694
+ # @return [Fixnum]
1695
+ attr_accessor :total_size
1696
+
1697
+ def initialize(**args)
1698
+ update!(**args)
1699
+ end
1700
+
1701
+ # Update properties of this object
1702
+ def update!(**args)
1703
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1704
+ @products = args[:products] if args.key?(:products)
1705
+ @total_size = args[:total_size] if args.key?(:total_size)
1706
+ end
1707
+ end
1708
+
1709
+ # Represents a link between a Merchant Center account and a branch. Once a link
1710
+ # is established, products from the linked merchant center account will be
1711
+ # streamed to the linked branch.
1712
+ class GoogleCloudRetailV2alphaMerchantCenterLink
1713
+ include Google::Apis::Core::Hashable
1714
+
1715
+ # The branch id (e.g. 0/1/2) within this catalog that products from
1716
+ # merchant_center_account_id are streamed to. When updating this field, an empty
1717
+ # value will use the currently configured default branch. However, changing the
1718
+ # default branch later on won't change the linked branch here. A single branch
1719
+ # id can only have one linked merchant center account id.
1720
+ # Corresponds to the JSON property `branchId`
1721
+ # @return [String]
1722
+ attr_accessor :branch_id
1723
+
1724
+ # String representing the destination to import for, all if left empty. List of
1725
+ # possible values can be found here. [https://support.google.com/merchants/
1726
+ # answer/7501026] List of allowed string values: "shopping-ads", "buy-on-google-
1727
+ # listings", "display-ads", "local-inventory -ads", "free-listings", "free-local-
1728
+ # listings" NOTE: The string values are case sensitive.
1729
+ # Corresponds to the JSON property `destinations`
1730
+ # @return [Array<String>]
1731
+ attr_accessor :destinations
1732
+
1733
+ # Required. The linked [Merchant center account id](https://developers.google.
1734
+ # com/shopping-content/guides/accountstatuses). The account must be a standalone
1735
+ # account or a sub-account of a MCA.
1736
+ # Corresponds to the JSON property `merchantCenterAccountId`
1737
+ # @return [Fixnum]
1738
+ attr_accessor :merchant_center_account_id
1739
+
1740
+ def initialize(**args)
1741
+ update!(**args)
1742
+ end
1743
+
1744
+ # Update properties of this object
1745
+ def update!(**args)
1746
+ @branch_id = args[:branch_id] if args.key?(:branch_id)
1747
+ @destinations = args[:destinations] if args.key?(:destinations)
1748
+ @merchant_center_account_id = args[:merchant_center_account_id] if args.key?(:merchant_center_account_id)
1749
+ end
1750
+ end
1751
+
1752
+ # Configures Merchant Center linking. Links contained in the config will be used
1753
+ # to sync data from a Merchant Center account to a Cloud Retail branch.
1754
+ class GoogleCloudRetailV2alphaMerchantCenterLinkingConfig
1755
+ include Google::Apis::Core::Hashable
1756
+
1757
+ # Links between Merchant Center accounts and branches.
1758
+ # Corresponds to the JSON property `links`
1759
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaMerchantCenterLink>]
1760
+ attr_accessor :links
1761
+
1762
+ def initialize(**args)
1763
+ update!(**args)
1764
+ end
1765
+
1766
+ # Update properties of this object
1767
+ def update!(**args)
1768
+ @links = args[:links] if args.key?(:links)
1769
+ end
1770
+ end
1771
+
1001
1772
  # Request message for Predict method.
1002
1773
  class GoogleCloudRetailV2alphaPredictRequest
1003
1774
  include Google::Apis::Core::Hashable
@@ -1061,11 +1832,11 @@ module Google
1061
1832
  # blocks all prediction results. * `priceRerankLevel`: String. Default empty. If
1062
1833
  # set to be non-empty, then it needs to be one of `'no-price-reranking', 'low-
1063
1834
  # price-reranking', 'medium-price-reranking', 'high-price-reranking'`. This
1064
- # gives request level control and adjust prediction results based on product
1835
+ # gives request-level control and adjusts prediction results based on product
1065
1836
  # price. * `diversityLevel`: String. Default empty. If set to be non-empty, then
1066
1837
  # 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.
1838
+ # high-diversity', 'auto-diversity'`. This gives request-level control and
1839
+ # adjusts prediction results based on product category.
1069
1840
  # Corresponds to the JSON property `params`
1070
1841
  # @return [Hash<String,Object>]
1071
1842
  attr_accessor :params
@@ -1183,7 +1954,9 @@ module Google
1183
1954
 
1184
1955
  # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-
1185
1956
  # currency-codes.html). If this field is an unrecognizable currency code, an
1186
- # INVALID_ARGUMENT error is returned.
1957
+ # INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the
1958
+ # same Product.primary_product_id must share the same currency_code. Otherwise,
1959
+ # a FAILED_PRECONDITION error is returned.
1187
1960
  # Corresponds to the JSON property `currencyCode`
1188
1961
  # @return [String]
1189
1962
  attr_accessor :currency_code
@@ -1201,6 +1974,29 @@ module Google
1201
1974
  # @return [Float]
1202
1975
  attr_accessor :price
1203
1976
 
1977
+ # The timestamp when the price starts to be effective. This can be set as a
1978
+ # future timestamp, and the price is only used for search after
1979
+ # price_effective_time. If so, the original_price must be set and original_price
1980
+ # is used before price_effective_time. Do not set if price is always effective
1981
+ # because it will cause additional latency during search.
1982
+ # Corresponds to the JSON property `priceEffectiveTime`
1983
+ # @return [String]
1984
+ attr_accessor :price_effective_time
1985
+
1986
+ # The timestamp when the price stops to be effective. The price is used for
1987
+ # search before price_expire_time. If this field is set, the original_price must
1988
+ # be set and original_price is used after price_expire_time. Do not set if price
1989
+ # is always effective because it will cause additional latency during search.
1990
+ # Corresponds to the JSON property `priceExpireTime`
1991
+ # @return [String]
1992
+ attr_accessor :price_expire_time
1993
+
1994
+ # The price range of all variant Product having the same Product.
1995
+ # primary_product_id.
1996
+ # Corresponds to the JSON property `priceRange`
1997
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfoPriceRange]
1998
+ attr_accessor :price_range
1999
+
1204
2000
  def initialize(**args)
1205
2001
  update!(**args)
1206
2002
  end
@@ -1211,6 +2007,35 @@ module Google
1211
2007
  @currency_code = args[:currency_code] if args.key?(:currency_code)
1212
2008
  @original_price = args[:original_price] if args.key?(:original_price)
1213
2009
  @price = args[:price] if args.key?(:price)
2010
+ @price_effective_time = args[:price_effective_time] if args.key?(:price_effective_time)
2011
+ @price_expire_time = args[:price_expire_time] if args.key?(:price_expire_time)
2012
+ @price_range = args[:price_range] if args.key?(:price_range)
2013
+ end
2014
+ end
2015
+
2016
+ # The price range of all variant Product having the same Product.
2017
+ # primary_product_id.
2018
+ class GoogleCloudRetailV2alphaPriceInfoPriceRange
2019
+ include Google::Apis::Core::Hashable
2020
+
2021
+ # A floating point interval.
2022
+ # Corresponds to the JSON property `originalPrice`
2023
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval]
2024
+ attr_accessor :original_price
2025
+
2026
+ # A floating point interval.
2027
+ # Corresponds to the JSON property `price`
2028
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval]
2029
+ attr_accessor :price
2030
+
2031
+ def initialize(**args)
2032
+ update!(**args)
2033
+ end
2034
+
2035
+ # Update properties of this object
2036
+ def update!(**args)
2037
+ @original_price = args[:original_price] if args.key?(:original_price)
2038
+ @price = args[:price] if args.key?(:price)
1214
2039
  end
1215
2040
  end
1216
2041
 
@@ -1229,13 +2054,19 @@ module Google
1229
2054
  # product, or age of a customer. For example: `` "vendor": `"text": ["vendor123",
1230
2055
  # "vendor456"]`, "lengths_cm": `"numbers":[2.3, 15.4]`, "heights_cm": `"numbers"
1231
2056
  # :[8.1, 6.4]` ``. This field needs to pass all below criteria, otherwise an
1232
- # INVALID_ARGUMENT error is returned: * Max entries count: 200 by default; 100
1233
- # for Type.VARIANT. * The key must be a UTF-8 encoded string with a length limit
1234
- # of 128 characters.
2057
+ # INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must
2058
+ # be a UTF-8 encoded string with a length limit of 128 characters. * For
2059
+ # indexable attribute, the key must match the pattern: a-zA-Z0-9*. For example,
2060
+ # key0LikeThis or KEY_1_LIKE_THIS.
1235
2061
  # Corresponds to the JSON property `attributes`
1236
2062
  # @return [Hash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>]
1237
2063
  attr_accessor :attributes
1238
2064
 
2065
+ # An intended audience of the Product for whom it's sold.
2066
+ # Corresponds to the JSON property `audience`
2067
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaAudience]
2068
+ attr_accessor :audience
2069
+
1239
2070
  # The online availability of the Product. Default to Availability.IN_STOCK.
1240
2071
  # Google Merchant Center Property [availability](https://support.google.com/
1241
2072
  # merchants/answer/6324448). Schema.org Property [Offer.availability](https://
@@ -1249,11 +2080,20 @@ module Google
1249
2080
  # @return [Fixnum]
1250
2081
  attr_accessor :available_quantity
1251
2082
 
1252
- # The timestamp when this Product becomes available for recommendation.
2083
+ # The timestamp when this Product becomes available for SearchService.Search.
1253
2084
  # Corresponds to the JSON property `availableTime`
1254
2085
  # @return [String]
1255
2086
  attr_accessor :available_time
1256
2087
 
2088
+ # The brands of the product. A maximum of 30 brands are allowed. Each brand must
2089
+ # be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise,
2090
+ # an INVALID_ARGUMENT error is returned. Google Merchant Center property [brand](
2091
+ # https://support.google.com/merchants/answer/6324351). Schema.org property [
2092
+ # Product.brand](https://schema.org/brand).
2093
+ # Corresponds to the JSON property `brands`
2094
+ # @return [Array<String>]
2095
+ attr_accessor :brands
2096
+
1257
2097
  # Product categories. This field is repeated for supporting one product
1258
2098
  # belonging to several parallel categories. Strongly recommended using the full
1259
2099
  # path for better search / recommendation quality. To represent full path of
@@ -1274,6 +2114,29 @@ module Google
1274
2114
  # @return [Array<String>]
1275
2115
  attr_accessor :categories
1276
2116
 
2117
+ # The id of the collection members when type is Type.COLLECTION. Should not set
2118
+ # it for other types. A maximum of 1000 values are allowed. Otherwise, an
2119
+ # INVALID_ARGUMENT error is return.
2120
+ # Corresponds to the JSON property `collectionMemberIds`
2121
+ # @return [Array<String>]
2122
+ attr_accessor :collection_member_ids
2123
+
2124
+ # The color information of a Product.
2125
+ # Corresponds to the JSON property `colorInfo`
2126
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaColorInfo]
2127
+ attr_accessor :color_info
2128
+
2129
+ # The condition of the product. Strongly encouraged to use the standard values: "
2130
+ # new", "refurbished", "used". A maximum of 5 values are allowed per Product.
2131
+ # Each value must be a UTF-8 encoded string with a length limit of 128
2132
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant
2133
+ # Center property [condition](https://support.google.com/merchants/answer/
2134
+ # 6324469). Schema.org property [Offer.itemCondition](https://schema.org/
2135
+ # itemCondition).
2136
+ # Corresponds to the JSON property `conditions`
2137
+ # @return [Array<String>]
2138
+ attr_accessor :conditions
2139
+
1277
2140
  # Product description. This field must be a UTF-8 encoded string with a length
1278
2141
  # limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
1279
2142
  # Google Merchant Center property [description](https://support.google.com/
@@ -1283,6 +2146,35 @@ module Google
1283
2146
  # @return [String]
1284
2147
  attr_accessor :description
1285
2148
 
2149
+ # The timestamp when this product becomes unavailable for SearchService.Search.
2150
+ # If it is set, the Product is not available for SearchService.Search after
2151
+ # expire_time. However, the product can still be retrieved by ProductService.
2152
+ # GetProduct and ProductService.ListProducts. Google Merchant Center property [
2153
+ # expiration_date](https://support.google.com/merchants/answer/6324499).
2154
+ # Corresponds to the JSON property `expireTime`
2155
+ # @return [String]
2156
+ attr_accessor :expire_time
2157
+
2158
+ # Fulfillment information, such as the store IDs for in-store pickup or region
2159
+ # IDs for different shipping methods. All the elements must have distinct
2160
+ # FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
2161
+ # Corresponds to the JSON property `fulfillmentInfo`
2162
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaFulfillmentInfo>]
2163
+ attr_accessor :fulfillment_info
2164
+
2165
+ # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8
2166
+ # encoded string with a length limit of 128 characters. Otherwise, an
2167
+ # INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise,
2168
+ # an INVALID_ARGUMENT error is returned. Google Merchant Center property [gtin](
2169
+ # https://support.google.com/merchants/answer/6324461). Schema.org property [
2170
+ # Product.isbn](https://schema.org/isbn) or [Product.gtin8](https://schema.org/
2171
+ # gtin8) or [Product.gtin12](https://schema.org/gtin12) or [Product.gtin13](
2172
+ # https://schema.org/gtin13) or [Product.gtin14](https://schema.org/gtin14). If
2173
+ # the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
2174
+ # Corresponds to the JSON property `gtin`
2175
+ # @return [String]
2176
+ attr_accessor :gtin
2177
+
1286
2178
  # Immutable. Product identifier, which is the final component of name. For
1287
2179
  # example, this field is "id_1", if name is `projects/*/locations/global/
1288
2180
  # catalogs/default_catalog/branches/default_branch/products/id_1`. This field
@@ -1302,13 +2194,42 @@ module Google
1302
2194
  # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaImage>]
1303
2195
  attr_accessor :images
1304
2196
 
2197
+ # Language of the title/description and other string attributes. Use language
2198
+ # tags defined by BCP 47. For product prediction, this field is ignored and the
2199
+ # model automatically detects the text language. The Product can include text in
2200
+ # different languages, but duplicating Products to provide text in multiple
2201
+ # languages can result in degraded model performance. For product search this
2202
+ # field is in use. It defaults to "en-US" if unset.
2203
+ # Corresponds to the JSON property `languageCode`
2204
+ # @return [String]
2205
+ attr_accessor :language_code
2206
+
2207
+ # The material of the product. For example, "leather", "wooden". A maximum of 20
2208
+ # values are allowed. Each value must be a UTF-8 encoded string with a length
2209
+ # limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
2210
+ # Google Merchant Center property [material](https://support.google.com/
2211
+ # merchants/answer/6324410). Schema.org property [Product.material](https://
2212
+ # schema.org/material).
2213
+ # Corresponds to the JSON property `materials`
2214
+ # @return [Array<String>]
2215
+ attr_accessor :materials
2216
+
1305
2217
  # Immutable. Full resource name of the product, such as `projects/*/locations/
1306
2218
  # global/catalogs/default_catalog/branches/default_branch/products/product_id`.
1307
- # The branch ID must be "default_branch".
1308
2219
  # Corresponds to the JSON property `name`
1309
2220
  # @return [String]
1310
2221
  attr_accessor :name
1311
2222
 
2223
+ # The pattern or graphic print of the product. For example, "striped", "polka
2224
+ # dot", "paisley". A maximum of 20 values are allowed per Product. Each value
2225
+ # must be a UTF-8 encoded string with a length limit of 128 characters.
2226
+ # Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center
2227
+ # property [pattern](https://support.google.com/merchants/answer/6324483).
2228
+ # Schema.org property [Product.pattern](https://schema.org/pattern).
2229
+ # Corresponds to the JSON property `patterns`
2230
+ # @return [Array<String>]
2231
+ attr_accessor :patterns
2232
+
1312
2233
  # The price information of a Product.
1313
2234
  # Corresponds to the JSON property `priceInfo`
1314
2235
  # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPriceInfo]
@@ -1327,6 +2248,58 @@ module Google
1327
2248
  # @return [String]
1328
2249
  attr_accessor :primary_product_id
1329
2250
 
2251
+ # The promotions applied to the product. A maximum of 10 values are allowed per
2252
+ # Product.
2253
+ # Corresponds to the JSON property `promotions`
2254
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaPromotion>]
2255
+ attr_accessor :promotions
2256
+
2257
+ # The timestamp when the product is published by the retailer for the first time,
2258
+ # which indicates the freshness of the products. Note that this field is
2259
+ # different from available_time, given it purely describes product freshness
2260
+ # regardless of when it is available on search and recommendation.
2261
+ # Corresponds to the JSON property `publishTime`
2262
+ # @return [String]
2263
+ attr_accessor :publish_time
2264
+
2265
+ # The rating of a Product.
2266
+ # Corresponds to the JSON property `rating`
2267
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaRating]
2268
+ attr_accessor :rating
2269
+
2270
+ # Indicates which fields in the Products are returned in SearchResponse.
2271
+ # Supported fields for all types: * audience * availability * brands *
2272
+ # color_info * conditions * gtin * materials * name * patterns * price_info *
2273
+ # rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.
2274
+ # COLLECTION: * categories * description * images Supported fields only for Type.
2275
+ # VARIANT: * Only the first image in images To mark attributes as retrievable,
2276
+ # include paths of the form "attributes.key" where "key" is the key of a custom
2277
+ # attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION,
2278
+ # the following fields are always returned in SearchResponse by default: * name
2279
+ # For Type.VARIANT, the following fields are always returned in by default: *
2280
+ # name * color_info Maximum number of paths is 30. Otherwise, an
2281
+ # INVALID_ARGUMENT error is returned. Note: Returning more fields in
2282
+ # SearchResponse may increase response payload size and serving latency.
2283
+ # Corresponds to the JSON property `retrievableFields`
2284
+ # @return [String]
2285
+ attr_accessor :retrievable_fields
2286
+
2287
+ # The size of the product. To represent different size systems or size types,
2288
+ # consider using this format: [[[size_system:]size_type:]size_value]. For
2289
+ # example, in "US:MENS:M", "US" represents size system; "MENS" represents size
2290
+ # type; "M" represents size value. In "GIRLS:27", size system is empty; "GIRLS"
2291
+ # represents size type; "27" represents size value. In "32 inches", both size
2292
+ # system and size type are empty, while size value is "32 inches". A maximum of
2293
+ # 20 values are allowed per Product. Each value must be a UTF-8 encoded string
2294
+ # with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is
2295
+ # returned. Google Merchant Center property [size](https://support.google.com/
2296
+ # merchants/answer/6324492), [size_type](https://support.google.com/merchants/
2297
+ # answer/6324497) and [size_system](https://support.google.com/merchants/answer/
2298
+ # 6324502). Schema.org property [Product.size](https://schema.org/size).
2299
+ # Corresponds to the JSON property `sizes`
2300
+ # @return [Array<String>]
2301
+ attr_accessor :sizes
2302
+
1330
2303
  # Custom tags associated with the product. At most 250 values are allowed per
1331
2304
  # Product. This value must be a UTF-8 encoded string with a length limit of 1,
1332
2305
  # 000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can
@@ -1346,6 +2319,16 @@ module Google
1346
2319
  # @return [String]
1347
2320
  attr_accessor :title
1348
2321
 
2322
+ # Input only. The TTL (time to live) of the product. If it is set, expire_time
2323
+ # is set as current timestamp plus ttl. The derived expire_time is returned in
2324
+ # the output and ttl is left blank when retrieving the Product. If it is set,
2325
+ # the product is not available for SearchService.Search after current timestamp
2326
+ # plus ttl. However, the product can still be retrieved by ProductService.
2327
+ # GetProduct and ProductService.ListProducts.
2328
+ # Corresponds to the JSON property `ttl`
2329
+ # @return [String]
2330
+ attr_accessor :ttl
2331
+
1349
2332
  # Immutable. The type of the product. Default to Catalog.product_level_config.
1350
2333
  # ingestion_product_type if unset.
1351
2334
  # Corresponds to the JSON property `type`
@@ -1363,6 +2346,15 @@ module Google
1363
2346
  # @return [String]
1364
2347
  attr_accessor :uri
1365
2348
 
2349
+ # Output only. Product variants grouped together on primary product which share
2350
+ # similar product attributes. It's automatically grouped by primary_product_id
2351
+ # for all the product variants. Only populated for Type.PRIMARY Products. Note:
2352
+ # This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field
2353
+ # in API requests.
2354
+ # Corresponds to the JSON property `variants`
2355
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct>]
2356
+ attr_accessor :variants
2357
+
1366
2358
  def initialize(**args)
1367
2359
  update!(**args)
1368
2360
  end
@@ -1370,20 +2362,38 @@ module Google
1370
2362
  # Update properties of this object
1371
2363
  def update!(**args)
1372
2364
  @attributes = args[:attributes] if args.key?(:attributes)
2365
+ @audience = args[:audience] if args.key?(:audience)
1373
2366
  @availability = args[:availability] if args.key?(:availability)
1374
2367
  @available_quantity = args[:available_quantity] if args.key?(:available_quantity)
1375
2368
  @available_time = args[:available_time] if args.key?(:available_time)
2369
+ @brands = args[:brands] if args.key?(:brands)
1376
2370
  @categories = args[:categories] if args.key?(:categories)
2371
+ @collection_member_ids = args[:collection_member_ids] if args.key?(:collection_member_ids)
2372
+ @color_info = args[:color_info] if args.key?(:color_info)
2373
+ @conditions = args[:conditions] if args.key?(:conditions)
1377
2374
  @description = args[:description] if args.key?(:description)
2375
+ @expire_time = args[:expire_time] if args.key?(:expire_time)
2376
+ @fulfillment_info = args[:fulfillment_info] if args.key?(:fulfillment_info)
2377
+ @gtin = args[:gtin] if args.key?(:gtin)
1378
2378
  @id = args[:id] if args.key?(:id)
1379
2379
  @images = args[:images] if args.key?(:images)
2380
+ @language_code = args[:language_code] if args.key?(:language_code)
2381
+ @materials = args[:materials] if args.key?(:materials)
1380
2382
  @name = args[:name] if args.key?(:name)
2383
+ @patterns = args[:patterns] if args.key?(:patterns)
1381
2384
  @price_info = args[:price_info] if args.key?(:price_info)
1382
2385
  @primary_product_id = args[:primary_product_id] if args.key?(:primary_product_id)
2386
+ @promotions = args[:promotions] if args.key?(:promotions)
2387
+ @publish_time = args[:publish_time] if args.key?(:publish_time)
2388
+ @rating = args[:rating] if args.key?(:rating)
2389
+ @retrievable_fields = args[:retrievable_fields] if args.key?(:retrievable_fields)
2390
+ @sizes = args[:sizes] if args.key?(:sizes)
1383
2391
  @tags = args[:tags] if args.key?(:tags)
1384
2392
  @title = args[:title] if args.key?(:title)
2393
+ @ttl = args[:ttl] if args.key?(:ttl)
1385
2394
  @type = args[:type] if args.key?(:type)
1386
2395
  @uri = args[:uri] if args.key?(:uri)
2396
+ @variants = args[:variants] if args.key?(:variants)
1387
2397
  end
1388
2398
  end
1389
2399
 
@@ -1421,7 +2431,7 @@ module Google
1421
2431
  include Google::Apis::Core::Hashable
1422
2432
 
1423
2433
  # Required. A list of products to update/create. Each product must have a valid
1424
- # Product.id. Recommended max of 10k items.
2434
+ # Product.id. Recommended max of 100 items.
1425
2435
  # Corresponds to the JSON property `products`
1426
2436
  # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct>]
1427
2437
  attr_accessor :products
@@ -1506,43 +2516,892 @@ module Google
1506
2516
 
1507
2517
  # Update properties of this object
1508
2518
  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)
2519
+ @ingestion_product_type = args[:ingestion_product_type] if args.key?(:ingestion_product_type)
2520
+ @merchant_center_product_id_field = args[:merchant_center_product_id_field] if args.key?(:merchant_center_product_id_field)
2521
+ end
2522
+ end
2523
+
2524
+ # Promotion information.
2525
+ class GoogleCloudRetailV2alphaPromotion
2526
+ include Google::Apis::Core::Hashable
2527
+
2528
+ # ID of the promotion. For example, "free gift". The value value must be a UTF-8
2529
+ # encoded string with a length limit of 128 characters, and match the pattern: a-
2530
+ # zA-Z*. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an
2531
+ # INVALID_ARGUMENT error is returned. Google Merchant Center property [promotion]
2532
+ # (https://support.google.com/merchants/answer/7050148).
2533
+ # Corresponds to the JSON property `promotionId`
2534
+ # @return [String]
2535
+ attr_accessor :promotion_id
2536
+
2537
+ def initialize(**args)
2538
+ update!(**args)
2539
+ end
2540
+
2541
+ # Update properties of this object
2542
+ def update!(**args)
2543
+ @promotion_id = args[:promotion_id] if args.key?(:promotion_id)
2544
+ end
2545
+ end
2546
+
2547
+ # A transaction represents the entire purchase transaction.
2548
+ class GoogleCloudRetailV2alphaPurchaseTransaction
2549
+ include Google::Apis::Core::Hashable
2550
+
2551
+ # All the costs associated with the products. These can be manufacturing costs,
2552
+ # shipping expenses not borne by the end user, or any other costs, such that: *
2553
+ # Profit = revenue - tax - cost
2554
+ # Corresponds to the JSON property `cost`
2555
+ # @return [Float]
2556
+ attr_accessor :cost
2557
+
2558
+ # Required. Currency code. Use three-character ISO-4217 code.
2559
+ # Corresponds to the JSON property `currencyCode`
2560
+ # @return [String]
2561
+ attr_accessor :currency_code
2562
+
2563
+ # The transaction ID with a length limit of 128 characters.
2564
+ # Corresponds to the JSON property `id`
2565
+ # @return [String]
2566
+ attr_accessor :id
2567
+
2568
+ # Required. Total non-zero revenue or grand total associated with the
2569
+ # transaction. This value include shipping, tax, or other adjustments to total
2570
+ # revenue that you want to include as part of your revenue calculations.
2571
+ # Corresponds to the JSON property `revenue`
2572
+ # @return [Float]
2573
+ attr_accessor :revenue
2574
+
2575
+ # All the taxes associated with the transaction.
2576
+ # Corresponds to the JSON property `tax`
2577
+ # @return [Float]
2578
+ attr_accessor :tax
2579
+
2580
+ def initialize(**args)
2581
+ update!(**args)
2582
+ end
2583
+
2584
+ # Update properties of this object
2585
+ def update!(**args)
2586
+ @cost = args[:cost] if args.key?(:cost)
2587
+ @currency_code = args[:currency_code] if args.key?(:currency_code)
2588
+ @id = args[:id] if args.key?(:id)
2589
+ @revenue = args[:revenue] if args.key?(:revenue)
2590
+ @tax = args[:tax] if args.key?(:tax)
2591
+ end
2592
+ end
2593
+
2594
+ # Metadata related to the progress of the Purge operation. This will be returned
2595
+ # by the google.longrunning.Operation.metadata field.
2596
+ class GoogleCloudRetailV2alphaPurgeMetadata
2597
+ include Google::Apis::Core::Hashable
2598
+
2599
+ def initialize(**args)
2600
+ update!(**args)
2601
+ end
2602
+
2603
+ # Update properties of this object
2604
+ def update!(**args)
2605
+ end
2606
+ end
2607
+
2608
+ # Request message for PurgeUserEvents method.
2609
+ class GoogleCloudRetailV2alphaPurgeUserEventsRequest
2610
+ include Google::Apis::Core::Hashable
2611
+
2612
+ # Required. The filter string to specify the events to be deleted with a length
2613
+ # limit of 5,000 characters. Empty string filter is not allowed. The eligible
2614
+ # fields for filtering are: * `eventType`: Double quoted UserEvent.event_type
2615
+ # string. * `eventTime`: in ISO 8601 "zulu" format. * `visitorId`: Double quoted
2616
+ # string. Specifying this will delete all events associated with a visitor. * `
2617
+ # userId`: Double quoted string. Specifying this will delete all events
2618
+ # associated with a user. Examples: * Deleting all events in a time range: `
2619
+ # eventTime > "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"`
2620
+ # * Deleting specific eventType in time range: `eventTime > "2012-04-23T18:25:43.
2621
+ # 511Z" eventType = "detail-page-view"` * Deleting all events for a specific
2622
+ # visitor: `visitorId = "visitor1024"` The filtering fields are assumed to have
2623
+ # an implicit AND.
2624
+ # Corresponds to the JSON property `filter`
2625
+ # @return [String]
2626
+ attr_accessor :filter
2627
+
2628
+ # Actually perform the purge. If `force` is set to false, the method will return
2629
+ # the expected purge count without deleting any user events.
2630
+ # Corresponds to the JSON property `force`
2631
+ # @return [Boolean]
2632
+ attr_accessor :force
2633
+ alias_method :force?, :force
2634
+
2635
+ def initialize(**args)
2636
+ update!(**args)
2637
+ end
2638
+
2639
+ # Update properties of this object
2640
+ def update!(**args)
2641
+ @filter = args[:filter] if args.key?(:filter)
2642
+ @force = args[:force] if args.key?(:force)
2643
+ end
2644
+ end
2645
+
2646
+ # Response of the PurgeUserEventsRequest. If the long running operation is
2647
+ # successfully done, then this message is returned by the google.longrunning.
2648
+ # Operations.response field.
2649
+ class GoogleCloudRetailV2alphaPurgeUserEventsResponse
2650
+ include Google::Apis::Core::Hashable
2651
+
2652
+ # The total count of events purged as a result of the operation.
2653
+ # Corresponds to the JSON property `purgedEventsCount`
2654
+ # @return [Fixnum]
2655
+ attr_accessor :purged_events_count
2656
+
2657
+ def initialize(**args)
2658
+ update!(**args)
2659
+ end
2660
+
2661
+ # Update properties of this object
2662
+ def update!(**args)
2663
+ @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count)
2664
+ end
2665
+ end
2666
+
2667
+ # The rating of a Product.
2668
+ class GoogleCloudRetailV2alphaRating
2669
+ include Google::Apis::Core::Hashable
2670
+
2671
+ # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an
2672
+ # INVALID_ARGUMENT error is returned.
2673
+ # Corresponds to the JSON property `averageRating`
2674
+ # @return [Float]
2675
+ attr_accessor :average_rating
2676
+
2677
+ # The total number of ratings. This value is independent of the value of
2678
+ # rating_histogram. This value must be nonnegative. Otherwise, an
2679
+ # INVALID_ARGUMENT error is returned.
2680
+ # Corresponds to the JSON property `ratingCount`
2681
+ # @return [Fixnum]
2682
+ attr_accessor :rating_count
2683
+
2684
+ # List of rating counts per rating value (index = rating - 1). The list is empty
2685
+ # if there is no rating. If the list is non-empty, its size is always 5.
2686
+ # Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47,
2687
+ # 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2
2688
+ # star, and so on.
2689
+ # Corresponds to the JSON property `ratingHistogram`
2690
+ # @return [Array<Fixnum>]
2691
+ attr_accessor :rating_histogram
2692
+
2693
+ def initialize(**args)
2694
+ update!(**args)
2695
+ end
2696
+
2697
+ # Update properties of this object
2698
+ def update!(**args)
2699
+ @average_rating = args[:average_rating] if args.key?(:average_rating)
2700
+ @rating_count = args[:rating_count] if args.key?(:rating_count)
2701
+ @rating_histogram = args[:rating_histogram] if args.key?(:rating_histogram)
2702
+ end
2703
+ end
2704
+
2705
+ # Metadata for RejoinUserEvents method.
2706
+ class GoogleCloudRetailV2alphaRejoinUserEventsMetadata
2707
+ include Google::Apis::Core::Hashable
2708
+
2709
+ def initialize(**args)
2710
+ update!(**args)
2711
+ end
2712
+
2713
+ # Update properties of this object
2714
+ def update!(**args)
2715
+ end
2716
+ end
2717
+
2718
+ # Request message for RejoinUserEvents method.
2719
+ class GoogleCloudRetailV2alphaRejoinUserEventsRequest
2720
+ include Google::Apis::Core::Hashable
2721
+
2722
+ # The type of the user event rejoin to define the scope and range of the user
2723
+ # events to be rejoined with the latest product catalog. Defaults to
2724
+ # USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
2725
+ # invalid integer value.
2726
+ # Corresponds to the JSON property `userEventRejoinScope`
2727
+ # @return [String]
2728
+ attr_accessor :user_event_rejoin_scope
2729
+
2730
+ def initialize(**args)
2731
+ update!(**args)
2732
+ end
2733
+
2734
+ # Update properties of this object
2735
+ def update!(**args)
2736
+ @user_event_rejoin_scope = args[:user_event_rejoin_scope] if args.key?(:user_event_rejoin_scope)
2737
+ end
2738
+ end
2739
+
2740
+ # Response message for RejoinUserEvents method.
2741
+ class GoogleCloudRetailV2alphaRejoinUserEventsResponse
2742
+ include Google::Apis::Core::Hashable
2743
+
2744
+ # Number of user events that were joined with latest product catalog.
2745
+ # Corresponds to the JSON property `rejoinedUserEventsCount`
2746
+ # @return [Fixnum]
2747
+ attr_accessor :rejoined_user_events_count
2748
+
2749
+ def initialize(**args)
2750
+ update!(**args)
2751
+ end
2752
+
2753
+ # Update properties of this object
2754
+ def update!(**args)
2755
+ @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count)
2756
+ end
2757
+ end
2758
+
2759
+ # Metadata related to the progress of the RemoveFulfillmentPlaces operation.
2760
+ # Currently empty because there is no meaningful metadata populated from the
2761
+ # RemoveFulfillmentPlaces method.
2762
+ class GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata
2763
+ include Google::Apis::Core::Hashable
2764
+
2765
+ def initialize(**args)
2766
+ update!(**args)
2767
+ end
2768
+
2769
+ # Update properties of this object
2770
+ def update!(**args)
2771
+ end
2772
+ end
2773
+
2774
+ # Request message for RemoveFulfillmentPlaces method.
2775
+ class GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest
2776
+ include Google::Apis::Core::Hashable
2777
+
2778
+ # If set to true, and the Product is not found, the fulfillment information will
2779
+ # still be processed and retained for at most 1 day and processed once the
2780
+ # Product is created. If set to false, an INVALID_ARGUMENT error is returned if
2781
+ # the Product is not found.
2782
+ # Corresponds to the JSON property `allowMissing`
2783
+ # @return [Boolean]
2784
+ attr_accessor :allow_missing
2785
+ alias_method :allow_missing?, :allow_missing
2786
+
2787
+ # Required. The IDs for this type, such as the store IDs for "pickup-in-store"
2788
+ # or the region IDs for "same-day-delivery", to be removed for this type. At
2789
+ # least 1 value is required, and a maximum of 2000 values are allowed. Each
2790
+ # value must be a string with a length limit of 10 characters, matching the
2791
+ # pattern [a-zA-Z0-9_-]+, such as "store1" or "REGION-2". Otherwise, an
2792
+ # INVALID_ARGUMENT error is returned.
2793
+ # Corresponds to the JSON property `placeIds`
2794
+ # @return [Array<String>]
2795
+ attr_accessor :place_ids
2796
+
2797
+ # The time when the fulfillment updates are issued, used to prevent out-of-order
2798
+ # updates on fulfillment information. If not provided, the internal system time
2799
+ # will be used.
2800
+ # Corresponds to the JSON property `removeTime`
2801
+ # @return [String]
2802
+ attr_accessor :remove_time
2803
+
2804
+ # Required. The fulfillment type, including commonly used types (such as pickup
2805
+ # in store and same day delivery), and custom types. Supported values: * "pickup-
2806
+ # in-store" * "ship-to-store" * "same-day-delivery" * "next-day-delivery" * "
2807
+ # custom-type-1" * "custom-type-2" * "custom-type-3" * "custom-type-4" * "custom-
2808
+ # type-5" If this field is set to an invalid value other than these, an
2809
+ # INVALID_ARGUMENT error is returned. This field directly corresponds to Product.
2810
+ # fulfillment_info.type.
2811
+ # Corresponds to the JSON property `type`
2812
+ # @return [String]
2813
+ attr_accessor :type
2814
+
2815
+ def initialize(**args)
2816
+ update!(**args)
2817
+ end
2818
+
2819
+ # Update properties of this object
2820
+ def update!(**args)
2821
+ @allow_missing = args[:allow_missing] if args.key?(:allow_missing)
2822
+ @place_ids = args[:place_ids] if args.key?(:place_ids)
2823
+ @remove_time = args[:remove_time] if args.key?(:remove_time)
2824
+ @type = args[:type] if args.key?(:type)
2825
+ end
2826
+ end
2827
+
2828
+ # Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
2829
+ # is no meaningful response populated from the RemoveFulfillmentPlaces method.
2830
+ class GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse
2831
+ include Google::Apis::Core::Hashable
2832
+
2833
+ def initialize(**args)
2834
+ update!(**args)
2835
+ end
2836
+
2837
+ # Update properties of this object
2838
+ def update!(**args)
2839
+ end
2840
+ end
2841
+
2842
+ # Request message for SearchService.Search method.
2843
+ class GoogleCloudRetailV2alphaSearchRequest
2844
+ include Google::Apis::Core::Hashable
2845
+
2846
+ # Boost specification to boost certain items.
2847
+ # Corresponds to the JSON property `boostSpec`
2848
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestBoostSpec]
2849
+ attr_accessor :boost_spec
2850
+
2851
+ # The branch resource name, such as `projects/*/locations/global/catalogs/
2852
+ # default_catalog/branches/0`. Use "default_branch" as the branch ID or leave
2853
+ # this field empty, to search products under the default branch.
2854
+ # Corresponds to the JSON property `branch`
2855
+ # @return [String]
2856
+ attr_accessor :branch
2857
+
2858
+ # The filter applied to every search request when quality improvement such as
2859
+ # query expansion is needed. For example, if a query does not have enough
2860
+ # results, an expanded query with SearchRequest.canonical_filter will be
2861
+ # returned as a supplement of the original query. This field is strongly
2862
+ # recommended to achieve high search quality. See SearchRequest.filter for more
2863
+ # details about filter syntax.
2864
+ # Corresponds to the JSON property `canonicalFilter`
2865
+ # @return [String]
2866
+ attr_accessor :canonical_filter
2867
+
2868
+ # The specifications of dynamically generated facets.
2869
+ # Corresponds to the JSON property `dynamicFacetSpec`
2870
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec]
2871
+ attr_accessor :dynamic_facet_spec
2872
+
2873
+ # Facet specifications for faceted search. If empty, no facets are returned. A
2874
+ # maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is
2875
+ # returned.
2876
+ # Corresponds to the JSON property `facetSpecs`
2877
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestFacetSpec>]
2878
+ attr_accessor :facet_specs
2879
+
2880
+ # The filter syntax consists of an expression language for constructing a
2881
+ # predicate from one or more fields of the products being filtered. Filter
2882
+ # expression is case-sensitive. See more details at this [user guide](https://
2883
+ # cloud.google.com/retail/docs/filter-and-order#filter). If this field is
2884
+ # unrecognizable, an INVALID_ARGUMENT is returned.
2885
+ # Corresponds to the JSON property `filter`
2886
+ # @return [String]
2887
+ attr_accessor :filter
2888
+
2889
+ # A 0-indexed integer that specifies the current offset (that is, starting
2890
+ # result location, amongst the Products deemed by the API as relevant) in search
2891
+ # results. This field is only considered if page_token is unset. If this field
2892
+ # is negative, an INVALID_ARGUMENT is returned.
2893
+ # Corresponds to the JSON property `offset`
2894
+ # @return [Fixnum]
2895
+ attr_accessor :offset
2896
+
2897
+ # The order in which products are returned. Products can be ordered by a field
2898
+ # in an Product object. Leave it unset if ordered by relevance. OrderBy
2899
+ # expression is case-sensitive. See more details at this [user guide](https://
2900
+ # cloud.google.com/retail/docs/filter-and-order#order). If this field is
2901
+ # unrecognizable, an INVALID_ARGUMENT is returned.
2902
+ # Corresponds to the JSON property `orderBy`
2903
+ # @return [String]
2904
+ attr_accessor :order_by
2905
+
2906
+ # The categories associated with a category page. Required for category
2907
+ # navigation queries to achieve good search quality. The format should be the
2908
+ # same as UserEvent.page_categories; To represent full path of category, use '>'
2909
+ # sign to separate different hierarchies. If '>' is part of the category name,
2910
+ # please replace it with other character(s). Category pages include special
2911
+ # pages such as sales or promotions. For instance, a special sale page may have
2912
+ # the category hierarchy: "pageCategories" : ["Sales > 2017 Black Friday Deals"].
2913
+ # Corresponds to the JSON property `pageCategories`
2914
+ # @return [Array<String>]
2915
+ attr_accessor :page_categories
2916
+
2917
+ # Maximum number of Products to return. If unspecified, defaults to a reasonable
2918
+ # value. The maximum allowed value is 120. Values above 120 will be coerced to
2919
+ # 120. If this field is negative, an INVALID_ARGUMENT is returned.
2920
+ # Corresponds to the JSON property `pageSize`
2921
+ # @return [Fixnum]
2922
+ attr_accessor :page_size
2923
+
2924
+ # A page token SearchResponse.next_page_token, received from a previous
2925
+ # SearchService.Search call. Provide this to retrieve the subsequent page. When
2926
+ # paginating, all other parameters provided to SearchService.Search must match
2927
+ # the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is
2928
+ # returned.
2929
+ # Corresponds to the JSON property `pageToken`
2930
+ # @return [String]
2931
+ attr_accessor :page_token
2932
+
2933
+ # Raw search query.
2934
+ # Corresponds to the JSON property `query`
2935
+ # @return [String]
2936
+ attr_accessor :query
2937
+
2938
+ # Specification to determine under which conditions query expansion should occur.
2939
+ # Corresponds to the JSON property `queryExpansionSpec`
2940
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestQueryExpansionSpec]
2941
+ attr_accessor :query_expansion_spec
2942
+
2943
+ # The relevance threshold of the search results. Defaults to RelevanceThreshold.
2944
+ # HIGH, which means only the most relevant results are shown, and the least
2945
+ # number of results are returned. See more details at this [user guide](https://
2946
+ # cloud.google.com/retail/docs/result-size#relevance_thresholding).
2947
+ # Corresponds to the JSON property `relevanceThreshold`
2948
+ # @return [String]
2949
+ attr_accessor :relevance_threshold
2950
+
2951
+ # Information of an end user.
2952
+ # Corresponds to the JSON property `userInfo`
2953
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaUserInfo]
2954
+ attr_accessor :user_info
2955
+
2956
+ # The keys to fetch and rollup the matching variant Products attributes. The
2957
+ # attributes from all the matching variant Products are merged and de-duplicated.
2958
+ # Notice that rollup variant Products attributes will lead to extra query
2959
+ # latency. Maximum number of keys is 10. For FulfillmentInfo, a fulfillment type
2960
+ # and a fulfillment ID must be provided in the format of "fulfillmentType.
2961
+ # fulfillmentId". E.g., in "pickupInStore.store123", "pickupInStore" is
2962
+ # fulfillment type and "store123" is the store ID. Supported keys are: *
2963
+ # colorFamilies * price * originalPrice * discount * attributes.key, where key
2964
+ # is any key in the Product.attributes map. * pickupInStore.id, where id is any
2965
+ # FulfillmentInfo.place_ids for FulfillmentInfo.type "pickup-in-store". *
2966
+ # shipToStore.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.
2967
+ # type "ship-to-store". * sameDayDelivery.id, where id is any FulfillmentInfo.
2968
+ # place_ids for FulfillmentInfo.type "same-day-delivery". * nextDayDelivery.id,
2969
+ # where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type "next-day-
2970
+ # delivery". * customFulfillment1.id, where id is any FulfillmentInfo.place_ids
2971
+ # for FulfillmentInfo.type "custom-type-1". * customFulfillment2.id, where id is
2972
+ # any FulfillmentInfo.place_ids for FulfillmentInfo.type "custom-type-2". *
2973
+ # customFulfillment3.id, where id is any FulfillmentInfo.place_ids for
2974
+ # FulfillmentInfo.type "custom-type-3". * customFulfillment4.id, where id is any
2975
+ # FulfillmentInfo.place_ids for FulfillmentInfo.type "custom-type-4". *
2976
+ # customFulfillment5.id, where id is any FulfillmentInfo.place_ids for
2977
+ # FulfillmentInfo.type "custom-type-5". If this field is set to an invalid value
2978
+ # other than these, an INVALID_ARGUMENT error is returned.
2979
+ # Corresponds to the JSON property `variantRollupKeys`
2980
+ # @return [Array<String>]
2981
+ attr_accessor :variant_rollup_keys
2982
+
2983
+ # Required. A unique identifier for tracking visitors. For example, this could
2984
+ # be implemented with an HTTP cookie, which should be able to uniquely identify
2985
+ # a visitor on a single device. This unique identifier should not change if the
2986
+ # visitor logs in or out of the website. The field must be a UTF-8 encoded
2987
+ # string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT
2988
+ # error is returned.
2989
+ # Corresponds to the JSON property `visitorId`
2990
+ # @return [String]
2991
+ attr_accessor :visitor_id
2992
+
2993
+ def initialize(**args)
2994
+ update!(**args)
2995
+ end
2996
+
2997
+ # Update properties of this object
2998
+ def update!(**args)
2999
+ @boost_spec = args[:boost_spec] if args.key?(:boost_spec)
3000
+ @branch = args[:branch] if args.key?(:branch)
3001
+ @canonical_filter = args[:canonical_filter] if args.key?(:canonical_filter)
3002
+ @dynamic_facet_spec = args[:dynamic_facet_spec] if args.key?(:dynamic_facet_spec)
3003
+ @facet_specs = args[:facet_specs] if args.key?(:facet_specs)
3004
+ @filter = args[:filter] if args.key?(:filter)
3005
+ @offset = args[:offset] if args.key?(:offset)
3006
+ @order_by = args[:order_by] if args.key?(:order_by)
3007
+ @page_categories = args[:page_categories] if args.key?(:page_categories)
3008
+ @page_size = args[:page_size] if args.key?(:page_size)
3009
+ @page_token = args[:page_token] if args.key?(:page_token)
3010
+ @query = args[:query] if args.key?(:query)
3011
+ @query_expansion_spec = args[:query_expansion_spec] if args.key?(:query_expansion_spec)
3012
+ @relevance_threshold = args[:relevance_threshold] if args.key?(:relevance_threshold)
3013
+ @user_info = args[:user_info] if args.key?(:user_info)
3014
+ @variant_rollup_keys = args[:variant_rollup_keys] if args.key?(:variant_rollup_keys)
3015
+ @visitor_id = args[:visitor_id] if args.key?(:visitor_id)
3016
+ end
3017
+ end
3018
+
3019
+ # Boost specification to boost certain items.
3020
+ class GoogleCloudRetailV2alphaSearchRequestBoostSpec
3021
+ include Google::Apis::Core::Hashable
3022
+
3023
+ # Condition boost specifications. If a product matches multiple conditions in
3024
+ # the specifictions, boost scores from these specifications are all applied and
3025
+ # combined in a non-linear way. Maximum number of specifications is 10.
3026
+ # Corresponds to the JSON property `conditionBoostSpecs`
3027
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestBoostSpecConditionBoostSpec>]
3028
+ attr_accessor :condition_boost_specs
3029
+
3030
+ def initialize(**args)
3031
+ update!(**args)
3032
+ end
3033
+
3034
+ # Update properties of this object
3035
+ def update!(**args)
3036
+ @condition_boost_specs = args[:condition_boost_specs] if args.key?(:condition_boost_specs)
3037
+ end
3038
+ end
3039
+
3040
+ # Boost applies to products which match a condition.
3041
+ class GoogleCloudRetailV2alphaSearchRequestBoostSpecConditionBoostSpec
3042
+ include Google::Apis::Core::Hashable
3043
+
3044
+ # Strength of the condition boost, which should be in [-1, 1]. Negative boost
3045
+ # means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion.
3046
+ # However, it does not necessarily mean that the boosted item will be the top
3047
+ # result at all times, nor that other items will be excluded. Results could
3048
+ # still be shown even when none of them matches the condition. And results that
3049
+ # are significantly more relevant to the search query can still trump your
3050
+ # heavily favored but irrelevant items. Setting to -1.0 gives the item a big
3051
+ # demotion. However, results that are deeply relevant might still be shown. The
3052
+ # item will have an upstream battle to get a fairly high ranking, but it is not
3053
+ # blocked out completely. Setting to 0.0 means no boost applied. The boosting
3054
+ # condition is ignored.
3055
+ # Corresponds to the JSON property `boost`
3056
+ # @return [Float]
3057
+ attr_accessor :boost
3058
+
3059
+ # An expression which specifies a boost condition. The syntax and supported
3060
+ # fields are the same as a filter expression. See SearchRequest.filter for
3061
+ # detail syntax and limitations. Examples: * To boost products with product ID "
3062
+ # product_1" or "product_2", and color "Red" or "Blue": * (id: ANY("product_1", "
3063
+ # product_2")) AND (colorFamilies: ANY("Red","Blue"))
3064
+ # Corresponds to the JSON property `condition`
3065
+ # @return [String]
3066
+ attr_accessor :condition
3067
+
3068
+ def initialize(**args)
3069
+ update!(**args)
3070
+ end
3071
+
3072
+ # Update properties of this object
3073
+ def update!(**args)
3074
+ @boost = args[:boost] if args.key?(:boost)
3075
+ @condition = args[:condition] if args.key?(:condition)
3076
+ end
3077
+ end
3078
+
3079
+ # The specifications of dynamically generated facets.
3080
+ class GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec
3081
+ include Google::Apis::Core::Hashable
3082
+
3083
+ # Mode of the DynamicFacet feature. Defaults to Mode.DISABLED if it's unset.
3084
+ # Corresponds to the JSON property `mode`
3085
+ # @return [String]
3086
+ attr_accessor :mode
3087
+
3088
+ def initialize(**args)
3089
+ update!(**args)
3090
+ end
3091
+
3092
+ # Update properties of this object
3093
+ def update!(**args)
3094
+ @mode = args[:mode] if args.key?(:mode)
3095
+ end
3096
+ end
3097
+
3098
+ # A facet specification to perform faceted search.
3099
+ class GoogleCloudRetailV2alphaSearchRequestFacetSpec
3100
+ include Google::Apis::Core::Hashable
3101
+
3102
+ # Enables dynamic position for this facet. If set to true, the position of this
3103
+ # facet among all facets in the response is determined by Google Retail Search.
3104
+ # It will be ordered together with dynamic facets if dynamic facets is enabled.
3105
+ # If set to false, the position of this facet in the response will be the same
3106
+ # as in the request, and it will be ranked before the facets with dynamic
3107
+ # position enable and all dynamic facets. For example, you may always want to
3108
+ # have rating facet returned in the response, but it's not necessarily to always
3109
+ # display the rating facet at the top. In that case, you can set
3110
+ # enable_dynamic_position to true so that the position of rating facet in
3111
+ # response will be determined by Google Retail Search. Another example, assuming
3112
+ # you have the following facets in the request: * "rating",
3113
+ # enable_dynamic_position = true * "price", enable_dynamic_position = false * "
3114
+ # brands", enable_dynamic_position = false And also you have a dynamic facets
3115
+ # enable, which will generate a facet 'gender'. Then the final order of the
3116
+ # facets in the response can be ("price", "brands", "rating", "gender") or ("
3117
+ # price", "brands", "gender", "rating") depends on how Google Retail Search
3118
+ # orders "gender" and "rating" facets. However, notice that "price" and "brands"
3119
+ # will always be ranked at 1st and 2nd position since their
3120
+ # enable_dynamic_position are false.
3121
+ # Corresponds to the JSON property `enableDynamicPosition`
3122
+ # @return [Boolean]
3123
+ attr_accessor :enable_dynamic_position
3124
+ alias_method :enable_dynamic_position?, :enable_dynamic_position
3125
+
3126
+ # List of keys to exclude when faceting. By default, FacetKey.key is not
3127
+ # excluded from the filter unless it is listed in this field. For example,
3128
+ # suppose there are 100 products with color facet "Red" and 200 products with
3129
+ # color facet "Blue". A query containing the filter "colorFamilies:ANY("Red")"
3130
+ # and have "colorFamilies" as FacetKey.key will by default return the "Red" with
3131
+ # count 100. If this field contains "colorFamilies", then the query returns both
3132
+ # the "Red" with count 100 and "Blue" with count 200, because the "colorFamilies"
3133
+ # key is now excluded from the filter. A maximum of 100 values are allowed.
3134
+ # Otherwise, an INVALID_ARGUMENT error is returned.
3135
+ # Corresponds to the JSON property `excludedFilterKeys`
3136
+ # @return [Array<String>]
3137
+ attr_accessor :excluded_filter_keys
3138
+
3139
+ # Specifies how a facet is computed.
3140
+ # Corresponds to the JSON property `facetKey`
3141
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKey]
3142
+ attr_accessor :facet_key
3143
+
3144
+ # Maximum of facet values that should be returned for this facet. If unspecified,
3145
+ # defaults to 20. The maximum allowed value is 300. Values above 300 will be
3146
+ # coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.
3147
+ # Corresponds to the JSON property `limit`
3148
+ # @return [Fixnum]
3149
+ attr_accessor :limit
3150
+
3151
+ def initialize(**args)
3152
+ update!(**args)
3153
+ end
3154
+
3155
+ # Update properties of this object
3156
+ def update!(**args)
3157
+ @enable_dynamic_position = args[:enable_dynamic_position] if args.key?(:enable_dynamic_position)
3158
+ @excluded_filter_keys = args[:excluded_filter_keys] if args.key?(:excluded_filter_keys)
3159
+ @facet_key = args[:facet_key] if args.key?(:facet_key)
3160
+ @limit = args[:limit] if args.key?(:limit)
3161
+ end
3162
+ end
3163
+
3164
+ # Specifies how a facet is computed.
3165
+ class GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKey
3166
+ include Google::Apis::Core::Hashable
3167
+
3168
+ # Only get facet values that contains the given strings. For example, suppose "
3169
+ # categories" has three values "Women > Shoe", "Women > Dress" and "Men > Shoe".
3170
+ # If set "contains" to "Shoe", the "categories" facet will give only "Women >
3171
+ # Shoe" and "Men > Shoe". Only supported on textual fields. Maximum is 10.
3172
+ # Corresponds to the JSON property `contains`
3173
+ # @return [Array<String>]
3174
+ attr_accessor :contains
3175
+
3176
+ # Set only if values should be bucketized into intervals. Must be set for facets
3177
+ # with numerical values. Must not be set for facet with text values. Maximum
3178
+ # number of intervals is 30.
3179
+ # Corresponds to the JSON property `intervals`
3180
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval>]
3181
+ attr_accessor :intervals
3182
+
3183
+ # Required. Supported textual and numerical facet keys in Product object, over
3184
+ # which the facet values are computed. Facet key is case-sensitive. Allowed
3185
+ # facet keys when FacetKey.query is not specified: * textual_field = * "brands" *
3186
+ # "categories" * "genders" * "ageGroups" * "availability" * "colorFamilies" * "
3187
+ # colors" * "sizes" * "materials" * "patterns" * "conditions" * "attributes.key"
3188
+ # * "pickupInStore" * "shipToStore" * "sameDayDelivery" * "nextDayDelivery" * "
3189
+ # customFulfillment1" * "customFulfillment2" * "customFulfillment3" * "
3190
+ # customFulfillment4" * "customFulfillment5" * numerical_field = * "price" * "
3191
+ # discount" * "rating" * "ratingCount" * "attributes.key"
3192
+ # Corresponds to the JSON property `key`
3193
+ # @return [String]
3194
+ attr_accessor :key
3195
+
3196
+ # The order in which Facet.values are returned. Allowed values are: * "count
3197
+ # desc", which means order by Facet.FacetValue.count descending. * "value desc",
3198
+ # which means order by Facet.FacetValue.value descending. Only applies to
3199
+ # textual facets. If not set, textual values are sorted in [natural order](https:
3200
+ # //en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in
3201
+ # the order given by FacetSpec.FacetKey.intervals; FulfillmentInfo.place_ids are
3202
+ # sorted in the order given by FacetSpec.FacetKey.restricted_values.
3203
+ # Corresponds to the JSON property `orderBy`
3204
+ # @return [String]
3205
+ attr_accessor :order_by
3206
+
3207
+ # Only get facet values that start with the given string prefix. For example,
3208
+ # suppose "categories" has three values "Women > Shoe", "Women > Dress" and "Men
3209
+ # > Shoe". If set "prefixes" to "Women", the "categories" facet will give only "
3210
+ # Women > Shoe" and "Women > Dress". Only supported on textual fields. Maximum
3211
+ # is 10.
3212
+ # Corresponds to the JSON property `prefixes`
3213
+ # @return [Array<String>]
3214
+ attr_accessor :prefixes
3215
+
3216
+ # The query that is used to compute facet for the given facet key. When provided,
3217
+ # it will override the default behavior of facet computation. The query syntax
3218
+ # is the same as a filter expression. See SearchRequest.filter for detail syntax
3219
+ # and limitations. Notice that there is no limitation on FacetKey.key when query
3220
+ # is specified. In the response, FacetValue.value will be always "1" and
3221
+ # FacetValue.count will be the number of results that matches the query. For
3222
+ # example, you can set a customized facet for "shipToStore", where FacetKey.key
3223
+ # is "customizedShipToStore", and FacetKey.query is "availability: ANY(\"
3224
+ # IN_STOCK\") AND shipToStore: ANY(\"123\")". Then the facet will count the
3225
+ # products that are both in stock and ship to store "123".
3226
+ # Corresponds to the JSON property `query`
3227
+ # @return [String]
3228
+ attr_accessor :query
3229
+
3230
+ # Only get facet for the given restricted values. For example, when using "
3231
+ # pickupInStore" as key and set restricted values to ["store123", "store456"],
3232
+ # only facets for "store123" and "store456" are returned. Only supported on
3233
+ # textual fields and fulfillments. Maximum is 20. Must be set for the
3234
+ # fulfillment facet keys: * pickupInStore * shipToStore * sameDayDelivery *
3235
+ # nextDayDelivery * customFulfillment1 * customFulfillment2 * customFulfillment3
3236
+ # * customFulfillment4 * customFulfillment5
3237
+ # Corresponds to the JSON property `restrictedValues`
3238
+ # @return [Array<String>]
3239
+ attr_accessor :restricted_values
3240
+
3241
+ def initialize(**args)
3242
+ update!(**args)
3243
+ end
3244
+
3245
+ # Update properties of this object
3246
+ def update!(**args)
3247
+ @contains = args[:contains] if args.key?(:contains)
3248
+ @intervals = args[:intervals] if args.key?(:intervals)
3249
+ @key = args[:key] if args.key?(:key)
3250
+ @order_by = args[:order_by] if args.key?(:order_by)
3251
+ @prefixes = args[:prefixes] if args.key?(:prefixes)
3252
+ @query = args[:query] if args.key?(:query)
3253
+ @restricted_values = args[:restricted_values] if args.key?(:restricted_values)
3254
+ end
3255
+ end
3256
+
3257
+ # Specification to determine under which conditions query expansion should occur.
3258
+ class GoogleCloudRetailV2alphaSearchRequestQueryExpansionSpec
3259
+ include Google::Apis::Core::Hashable
3260
+
3261
+ # The condition under which query expansion should occur. Default to Condition.
3262
+ # DISABLED.
3263
+ # Corresponds to the JSON property `condition`
3264
+ # @return [String]
3265
+ attr_accessor :condition
3266
+
3267
+ # Whether to pin unexpanded results. If this field is set to true, unexpanded
3268
+ # products are always at the top of the search results, followed by the expanded
3269
+ # results.
3270
+ # Corresponds to the JSON property `pinUnexpandedResults`
3271
+ # @return [Boolean]
3272
+ attr_accessor :pin_unexpanded_results
3273
+ alias_method :pin_unexpanded_results?, :pin_unexpanded_results
3274
+
3275
+ def initialize(**args)
3276
+ update!(**args)
3277
+ end
3278
+
3279
+ # Update properties of this object
3280
+ def update!(**args)
3281
+ @condition = args[:condition] if args.key?(:condition)
3282
+ @pin_unexpanded_results = args[:pin_unexpanded_results] if args.key?(:pin_unexpanded_results)
3283
+ end
3284
+ end
3285
+
3286
+ # Response message for SearchService.Search method.
3287
+ class GoogleCloudRetailV2alphaSearchResponse
3288
+ include Google::Apis::Core::Hashable
3289
+
3290
+ # A unique search token. This should be included in the UserEvent logs resulting
3291
+ # from this search, which enables accurate attribution of search model
3292
+ # performance.
3293
+ # Corresponds to the JSON property `attributionToken`
3294
+ # @return [String]
3295
+ attr_accessor :attribution_token
3296
+
3297
+ # If spell correction applies, the corrected query. Otherwise, empty.
3298
+ # Corresponds to the JSON property `correctedQuery`
3299
+ # @return [String]
3300
+ attr_accessor :corrected_query
3301
+
3302
+ # Results of facets requested by user.
3303
+ # Corresponds to the JSON property `facets`
3304
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseFacet>]
3305
+ attr_accessor :facets
3306
+
3307
+ # A token that can be sent as SearchRequest.page_token to retrieve the next page.
3308
+ # If this field is omitted, there are no subsequent pages.
3309
+ # Corresponds to the JSON property `nextPageToken`
3310
+ # @return [String]
3311
+ attr_accessor :next_page_token
3312
+
3313
+ # Information describing query expansion including whether expansion has
3314
+ # occurred.
3315
+ # Corresponds to the JSON property `queryExpansionInfo`
3316
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseQueryExpansionInfo]
3317
+ attr_accessor :query_expansion_info
3318
+
3319
+ # The URI of a customer-defined redirect page. If redirect action is triggered,
3320
+ # no search will be performed, and only redirect_uri and attribution_token will
3321
+ # be set in the response.
3322
+ # Corresponds to the JSON property `redirectUri`
3323
+ # @return [String]
3324
+ attr_accessor :redirect_uri
3325
+
3326
+ # A list of matched items. The order represents the ranking.
3327
+ # Corresponds to the JSON property `results`
3328
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseSearchResult>]
3329
+ attr_accessor :results
3330
+
3331
+ # The estimated total count of matched items irrespective of pagination. The
3332
+ # count of results returned by pagination may be less than the total_size that
3333
+ # matches.
3334
+ # Corresponds to the JSON property `totalSize`
3335
+ # @return [Fixnum]
3336
+ attr_accessor :total_size
3337
+
3338
+ def initialize(**args)
3339
+ update!(**args)
3340
+ end
3341
+
3342
+ # Update properties of this object
3343
+ def update!(**args)
3344
+ @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
3345
+ @corrected_query = args[:corrected_query] if args.key?(:corrected_query)
3346
+ @facets = args[:facets] if args.key?(:facets)
3347
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
3348
+ @query_expansion_info = args[:query_expansion_info] if args.key?(:query_expansion_info)
3349
+ @redirect_uri = args[:redirect_uri] if args.key?(:redirect_uri)
3350
+ @results = args[:results] if args.key?(:results)
3351
+ @total_size = args[:total_size] if args.key?(:total_size)
1511
3352
  end
1512
3353
  end
1513
3354
 
1514
- # A transaction represents the entire purchase transaction.
1515
- class GoogleCloudRetailV2alphaPurchaseTransaction
3355
+ # A facet result.
3356
+ class GoogleCloudRetailV2alphaSearchResponseFacet
1516
3357
  include Google::Apis::Core::Hashable
1517
3358
 
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
3359
+ # Whether the facet is dynamically generated.
3360
+ # Corresponds to the JSON property `dynamicFacet`
3361
+ # @return [Boolean]
3362
+ attr_accessor :dynamic_facet
3363
+ alias_method :dynamic_facet?, :dynamic_facet
1524
3364
 
1525
- # Required. Currency code. Use three-character ISO-4217 code.
1526
- # Corresponds to the JSON property `currencyCode`
3365
+ # The key for this facet. E.g., "colorFamilies" or "price" or "attributes.attr1".
3366
+ # Corresponds to the JSON property `key`
1527
3367
  # @return [String]
1528
- attr_accessor :currency_code
3368
+ attr_accessor :key
1529
3369
 
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
3370
+ # The facet values for this field.
3371
+ # Corresponds to the JSON property `values`
3372
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseFacetFacetValue>]
3373
+ attr_accessor :values
1534
3374
 
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
3375
+ def initialize(**args)
3376
+ update!(**args)
3377
+ end
1541
3378
 
1542
- # All the taxes associated with the transaction.
1543
- # Corresponds to the JSON property `tax`
1544
- # @return [Float]
1545
- attr_accessor :tax
3379
+ # Update properties of this object
3380
+ def update!(**args)
3381
+ @dynamic_facet = args[:dynamic_facet] if args.key?(:dynamic_facet)
3382
+ @key = args[:key] if args.key?(:key)
3383
+ @values = args[:values] if args.key?(:values)
3384
+ end
3385
+ end
3386
+
3387
+ # A facet value which contains value names and their count.
3388
+ class GoogleCloudRetailV2alphaSearchResponseFacetFacetValue
3389
+ include Google::Apis::Core::Hashable
3390
+
3391
+ # Number of items that have this facet value.
3392
+ # Corresponds to the JSON property `count`
3393
+ # @return [Fixnum]
3394
+ attr_accessor :count
3395
+
3396
+ # A floating point interval.
3397
+ # Corresponds to the JSON property `interval`
3398
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval]
3399
+ attr_accessor :interval
3400
+
3401
+ # Text value of a facet, such as "Black" for facet "colorFamilies".
3402
+ # Corresponds to the JSON property `value`
3403
+ # @return [String]
3404
+ attr_accessor :value
1546
3405
 
1547
3406
  def initialize(**args)
1548
3407
  update!(**args)
@@ -1550,54 +3409,85 @@ module Google
1550
3409
 
1551
3410
  # Update properties of this object
1552
3411
  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)
3412
+ @count = args[:count] if args.key?(:count)
3413
+ @interval = args[:interval] if args.key?(:interval)
3414
+ @value = args[:value] if args.key?(:value)
1558
3415
  end
1559
3416
  end
1560
3417
 
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
3418
+ # Information describing query expansion including whether expansion has
3419
+ # occurred.
3420
+ class GoogleCloudRetailV2alphaSearchResponseQueryExpansionInfo
1564
3421
  include Google::Apis::Core::Hashable
1565
3422
 
3423
+ # Bool describing whether query expansion has occurred.
3424
+ # Corresponds to the JSON property `expandedQuery`
3425
+ # @return [Boolean]
3426
+ attr_accessor :expanded_query
3427
+ alias_method :expanded_query?, :expanded_query
3428
+
3429
+ # Number of pinned results. This field will only be set when expansion happens
3430
+ # and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true.
3431
+ # Corresponds to the JSON property `pinnedResultCount`
3432
+ # @return [Fixnum]
3433
+ attr_accessor :pinned_result_count
3434
+
1566
3435
  def initialize(**args)
1567
3436
  update!(**args)
1568
3437
  end
1569
3438
 
1570
3439
  # Update properties of this object
1571
3440
  def update!(**args)
3441
+ @expanded_query = args[:expanded_query] if args.key?(:expanded_query)
3442
+ @pinned_result_count = args[:pinned_result_count] if args.key?(:pinned_result_count)
1572
3443
  end
1573
3444
  end
1574
3445
 
1575
- # Request message for PurgeUserEvents method.
1576
- class GoogleCloudRetailV2alphaPurgeUserEventsRequest
3446
+ # Represents the search results.
3447
+ class GoogleCloudRetailV2alphaSearchResponseSearchResult
1577
3448
  include Google::Apis::Core::Hashable
1578
3449
 
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`
3450
+ # Product.id of the searched Product.
3451
+ # Corresponds to the JSON property `id`
1592
3452
  # @return [String]
1593
- attr_accessor :filter
3453
+ attr_accessor :id
1594
3454
 
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
3455
+ # The count of matched variant Products.
3456
+ # Corresponds to the JSON property `matchingVariantCount`
3457
+ # @return [Fixnum]
3458
+ attr_accessor :matching_variant_count
3459
+
3460
+ # If a variant Product matches the search query, this map indicates which
3461
+ # Product fields are matched. The key is the Product.name, the value is a field
3462
+ # mask of the matched Product fields. If matched attributes cannot be determined,
3463
+ # this map will be empty. For example, a key "sku1" with field mask "products.
3464
+ # color_info" indicates there is a match between "sku1" ColorInfo and the query.
3465
+ # Corresponds to the JSON property `matchingVariantFields`
3466
+ # @return [Hash<String,String>]
3467
+ attr_accessor :matching_variant_fields
3468
+
3469
+ # Product captures all metadata information of items to be recommended or
3470
+ # searched.
3471
+ # Corresponds to the JSON property `product`
3472
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct]
3473
+ attr_accessor :product
3474
+
3475
+ # The rollup matching variant Product attributes. The key is one of the
3476
+ # SearchRequest.variant_rollup_keys. The values are the merged and de-duplicated
3477
+ # Product attributes. Notice that the rollup values are respect filter. For
3478
+ # example, when filtering by "colorFamilies:ANY(\"red\")" and rollup "
3479
+ # colorFamilies", only "red" is returned. For textual and numerical attributes,
3480
+ # the rollup values is a list of string or double values with type google.
3481
+ # protobuf.ListValue. For example, if there are two variants with colors "red"
3482
+ # and "blue", the rollup values are ` key: "colorFamilies" value ` list_value `
3483
+ # values ` string_value: "red" ` values ` string_value: "blue" ` ` ` ` For
3484
+ # FulfillmentInfo, the rollup values is a double value with type google.protobuf.
3485
+ # Value. For example, ``key: "pickupInStore.store1" value ` number_value: 10 ```
3486
+ # means a there are 10 variants in this product are available in the store "
3487
+ # store1".
3488
+ # Corresponds to the JSON property `variantRollupValues`
3489
+ # @return [Hash<String,Object>]
3490
+ attr_accessor :variant_rollup_values
1601
3491
 
1602
3492
  def initialize(**args)
1603
3493
  update!(**args)
@@ -1605,21 +3495,31 @@ module Google
1605
3495
 
1606
3496
  # Update properties of this object
1607
3497
  def update!(**args)
1608
- @filter = args[:filter] if args.key?(:filter)
1609
- @force = args[:force] if args.key?(:force)
3498
+ @id = args[:id] if args.key?(:id)
3499
+ @matching_variant_count = args[:matching_variant_count] if args.key?(:matching_variant_count)
3500
+ @matching_variant_fields = args[:matching_variant_fields] if args.key?(:matching_variant_fields)
3501
+ @product = args[:product] if args.key?(:product)
3502
+ @variant_rollup_values = args[:variant_rollup_values] if args.key?(:variant_rollup_values)
1610
3503
  end
1611
3504
  end
1612
3505
 
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
3506
+ # Request message to set a specified branch as new default_branch.
3507
+ class GoogleCloudRetailV2alphaSetDefaultBranchRequest
1617
3508
  include Google::Apis::Core::Hashable
1618
3509
 
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
3510
+ # The final component of the resource name of a branch. This field must be one
3511
+ # of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT error is returned.
3512
+ # Corresponds to the JSON property `branchId`
3513
+ # @return [String]
3514
+ attr_accessor :branch_id
3515
+
3516
+ # Some note on this request, this can be retrieved by CatalogService.
3517
+ # GetDefaultBranch before next valid default branch set occurs. This field must
3518
+ # be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise,
3519
+ # an INVALID_ARGUMENT error is returned.
3520
+ # Corresponds to the JSON property `note`
3521
+ # @return [String]
3522
+ attr_accessor :note
1623
3523
 
1624
3524
  def initialize(**args)
1625
3525
  update!(**args)
@@ -1627,12 +3527,15 @@ module Google
1627
3527
 
1628
3528
  # Update properties of this object
1629
3529
  def update!(**args)
1630
- @purged_events_count = args[:purged_events_count] if args.key?(:purged_events_count)
3530
+ @branch_id = args[:branch_id] if args.key?(:branch_id)
3531
+ @note = args[:note] if args.key?(:note)
1631
3532
  end
1632
3533
  end
1633
3534
 
1634
- # Metadata for RejoinUserEvents method.
1635
- class GoogleCloudRetailV2alphaRejoinUserEventsMetadata
3535
+ # Metadata related to the progress of the SetInventory operation. Currently
3536
+ # empty because there is no meaningful metadata populated from the SetInventory
3537
+ # method.
3538
+ class GoogleCloudRetailV2alphaSetInventoryMetadata
1636
3539
  include Google::Apis::Core::Hashable
1637
3540
 
1638
3541
  def initialize(**args)
@@ -1644,17 +3547,39 @@ module Google
1644
3547
  end
1645
3548
  end
1646
3549
 
1647
- # Request message for RejoinUserEvents method.
1648
- class GoogleCloudRetailV2alphaRejoinUserEventsRequest
3550
+ # Request message for SetInventory method.
3551
+ class GoogleCloudRetailV2alphaSetInventoryRequest
1649
3552
  include Google::Apis::Core::Hashable
1650
3553
 
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`
3554
+ # If set to true, and the Product with name Product.name is not found, the
3555
+ # inventory update will still be processed and retained for at most 1 day until
3556
+ # the Product is created. If set to false, an INVALID_ARGUMENT error is returned
3557
+ # if the Product is not found.
3558
+ # Corresponds to the JSON property `allowMissing`
3559
+ # @return [Boolean]
3560
+ attr_accessor :allow_missing
3561
+ alias_method :allow_missing?, :allow_missing
3562
+
3563
+ # Product captures all metadata information of items to be recommended or
3564
+ # searched.
3565
+ # Corresponds to the JSON property `inventory`
3566
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct]
3567
+ attr_accessor :inventory
3568
+
3569
+ # Indicates which inventory fields in the provided Product to update. If not set
3570
+ # or set with empty paths, all inventory fields will be updated. If an
3571
+ # unsupported or unknown field is provided, an INVALID_ARGUMENT error is
3572
+ # returned and the entire update will be ignored.
3573
+ # Corresponds to the JSON property `setMask`
1656
3574
  # @return [String]
1657
- attr_accessor :user_event_rejoin_scope
3575
+ attr_accessor :set_mask
3576
+
3577
+ # The time when the request is issued, used to prevent out-of-order updates on
3578
+ # inventory fields with the last update time recorded. If not provided, the
3579
+ # internal system time will be used.
3580
+ # Corresponds to the JSON property `setTime`
3581
+ # @return [String]
3582
+ attr_accessor :set_time
1658
3583
 
1659
3584
  def initialize(**args)
1660
3585
  update!(**args)
@@ -1662,26 +3587,24 @@ module Google
1662
3587
 
1663
3588
  # Update properties of this object
1664
3589
  def update!(**args)
1665
- @user_event_rejoin_scope = args[:user_event_rejoin_scope] if args.key?(:user_event_rejoin_scope)
3590
+ @allow_missing = args[:allow_missing] if args.key?(:allow_missing)
3591
+ @inventory = args[:inventory] if args.key?(:inventory)
3592
+ @set_mask = args[:set_mask] if args.key?(:set_mask)
3593
+ @set_time = args[:set_time] if args.key?(:set_time)
1666
3594
  end
1667
3595
  end
1668
3596
 
1669
- # Response message for RejoinUserEvents method.
1670
- class GoogleCloudRetailV2alphaRejoinUserEventsResponse
3597
+ # Response of the SetInventoryRequest. Currently empty because there is no
3598
+ # meaningful response populated from the SetInventory method.
3599
+ class GoogleCloudRetailV2alphaSetInventoryResponse
1671
3600
  include Google::Apis::Core::Hashable
1672
3601
 
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
3602
  def initialize(**args)
1679
3603
  update!(**args)
1680
3604
  end
1681
3605
 
1682
3606
  # Update properties of this object
1683
3607
  def update!(**args)
1684
- @rejoined_user_events_count = args[:rejoined_user_events_count] if args.key?(:rejoined_user_events_count)
1685
3608
  end
1686
3609
  end
1687
3610
 
@@ -1703,18 +3626,19 @@ module Google
1703
3626
  # Highly recommended for user events that are the result of PredictionService.
1704
3627
  # Predict. This field enables accurate attribution of recommendation model
1705
3628
  # 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.
3629
+ # user events that are the result of PredictionService.Predict. The value must
3630
+ # be a valid SearchResponse.attribution_token for user events that are the
3631
+ # result of SearchService.Search. This token enables us to accurately attribute
3632
+ # page view or purchase back to the event and the particular predict response
3633
+ # containing this clicked/purchased product. If user clicks on product K in the
3634
+ # recommendation results, pass PredictResponse.attribution_token as a URL
3635
+ # parameter to product K's page. When recording events on product K's page, log
3636
+ # the PredictResponse.attribution_token to this field.
1713
3637
  # Corresponds to the JSON property `attributionToken`
1714
3638
  # @return [String]
1715
3639
  attr_accessor :attribution_token
1716
3640
 
1717
- # The id or name of the associated shopping cart. This id is used to associate
3641
+ # The ID or name of the associated shopping cart. This ID is used to associate
1718
3642
  # multiple items added or present in the cart before purchase. This can only be
1719
3643
  # set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view`
1720
3644
  # events.
@@ -1722,6 +3646,12 @@ module Google
1722
3646
  # @return [String]
1723
3647
  attr_accessor :cart_id
1724
3648
 
3649
+ # Detailed completion information including completion attribution token and
3650
+ # clicked completion info.
3651
+ # Corresponds to the JSON property `completionDetail`
3652
+ # @return [Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompletionDetail]
3653
+ attr_accessor :completion_detail
3654
+
1725
3655
  # Only required for UserEventService.ImportUserEvents method. Timestamp of when
1726
3656
  # the user event happened.
1727
3657
  # Corresponds to the JSON property `eventTime`
@@ -1748,6 +3678,34 @@ module Google
1748
3678
  # @return [Array<String>]
1749
3679
  attr_accessor :experiment_ids
1750
3680
 
3681
+ # The filter syntax consists of an expression language for constructing a
3682
+ # predicate from one or more fields of the products being filtered. See
3683
+ # SearchRequest.filter for definition and syntax. The value must be a UTF-8
3684
+ # encoded string with a length limit of 1,000 characters. Otherwise, an
3685
+ # INVALID_ARGUMENT error is returned.
3686
+ # Corresponds to the JSON property `filter`
3687
+ # @return [String]
3688
+ attr_accessor :filter
3689
+
3690
+ # An integer that specifies the current offset for pagination (the 0-indexed
3691
+ # starting location, amongst the products deemed by the API as relevant). See
3692
+ # SearchRequest.offset for definition. If this field is negative, an
3693
+ # INVALID_ARGUMENT is returned. This can only be set for `search` events. Other
3694
+ # event types should not set this field. Otherwise, an INVALID_ARGUMENT error is
3695
+ # returned.
3696
+ # Corresponds to the JSON property `offset`
3697
+ # @return [Fixnum]
3698
+ attr_accessor :offset
3699
+
3700
+ # The order in which products are returned. See SearchRequest.order_by for
3701
+ # definition and syntax. The value must be a UTF-8 encoded string with a length
3702
+ # limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
3703
+ # This can only be set for `search` events. Other event types should not set
3704
+ # this field. Otherwise, an INVALID_ARGUMENT error is returned.
3705
+ # Corresponds to the JSON property `orderBy`
3706
+ # @return [String]
3707
+ attr_accessor :order_by
3708
+
1751
3709
  # The categories associated with a category page. To represent full path of
1752
3710
  # category, use '>' sign to separate different hierarchies. If '>' is part of
1753
3711
  # the category name, please replace it with other character(s). Category pages
@@ -1761,7 +3719,7 @@ module Google
1761
3719
  # @return [Array<String>]
1762
3720
  attr_accessor :page_categories
1763
3721
 
1764
- # A unique id of a web page view. This should be kept the same for all user
3722
+ # A unique ID of a web page view. This should be kept the same for all user
1765
3723
  # events triggered from the same pageview. For example, an item detail page view
1766
3724
  # could trigger multiple events as the user is browsing the page. The `
1767
3725
  # pageViewId` property should be kept the same for all these events so that they
@@ -1775,11 +3733,11 @@ module Google
1775
3733
  # The main product details related to the event. This field is required for the
1776
3734
  # following event types: * `add-to-cart` * `detail-page-view` * `purchase-
1777
3735
  # complete` In a `search` event, this field represents the products returned to
1778
- # the end user on the current page (the end user may have not finished broswing
3736
+ # the end user on the current page (the end user may have not finished browsing
1779
3737
  # the whole page yet). When a new page is returned to the end user, after
1780
3738
  # pagination/filtering/ordering even for the same query, a new `search` event
1781
3739
  # with different product_details is desired. The end user may have not finished
1782
- # broswing the whole page yet.
3740
+ # browsing the whole page yet.
1783
3741
  # Corresponds to the JSON property `productDetails`
1784
3742
  # @return [Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProductDetail>]
1785
3743
  attr_accessor :product_details
@@ -1796,15 +3754,24 @@ module Google
1796
3754
  # @return [String]
1797
3755
  attr_accessor :referrer_uri
1798
3756
 
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.
3757
+ # The user's search query. See SearchRequest.query for definition. The value
3758
+ # must be a UTF-8 encoded string with a length limit of 5,000 characters.
3759
+ # Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query
3760
+ # or page_categories is required for `search` events. Other event types should
3761
+ # not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
1804
3762
  # Corresponds to the JSON property `searchQuery`
1805
3763
  # @return [String]
1806
3764
  attr_accessor :search_query
1807
3765
 
3766
+ # A unique identifier for tracking a visitor session with a length limit of 128
3767
+ # bytes. A session is an aggregation of an end user behavior in a time span. A
3768
+ # general guideline to populate the sesion_id: 1. If user has no activity for 30
3769
+ # min, a new session_id should be assigned. 2. The session_id should be unique
3770
+ # across users, suggest use uuid or add visitor_id as prefix.
3771
+ # Corresponds to the JSON property `sessionId`
3772
+ # @return [String]
3773
+ attr_accessor :session_id
3774
+
1808
3775
  # Complete URL (window.location.href) of the user's current page. When using the
1809
3776
  # client side event reporting with JavaScript pixel and Google Tag Manager, this
1810
3777
  # value is filled in automatically. Maximum length 5,000 characters.
@@ -1838,15 +3805,20 @@ module Google
1838
3805
  @attributes = args[:attributes] if args.key?(:attributes)
1839
3806
  @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
1840
3807
  @cart_id = args[:cart_id] if args.key?(:cart_id)
3808
+ @completion_detail = args[:completion_detail] if args.key?(:completion_detail)
1841
3809
  @event_time = args[:event_time] if args.key?(:event_time)
1842
3810
  @event_type = args[:event_type] if args.key?(:event_type)
1843
3811
  @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids)
3812
+ @filter = args[:filter] if args.key?(:filter)
3813
+ @offset = args[:offset] if args.key?(:offset)
3814
+ @order_by = args[:order_by] if args.key?(:order_by)
1844
3815
  @page_categories = args[:page_categories] if args.key?(:page_categories)
1845
3816
  @page_view_id = args[:page_view_id] if args.key?(:page_view_id)
1846
3817
  @product_details = args[:product_details] if args.key?(:product_details)
1847
3818
  @purchase_transaction = args[:purchase_transaction] if args.key?(:purchase_transaction)
1848
3819
  @referrer_uri = args[:referrer_uri] if args.key?(:referrer_uri)
1849
3820
  @search_query = args[:search_query] if args.key?(:search_query)
3821
+ @session_id = args[:session_id] if args.key?(:session_id)
1850
3822
  @uri = args[:uri] if args.key?(:uri)
1851
3823
  @user_info = args[:user_info] if args.key?(:user_info)
1852
3824
  @visitor_id = args[:visitor_id] if args.key?(:visitor_id)
@@ -1945,9 +3917,10 @@ module Google
1945
3917
  attr_accessor :direct_user_request
1946
3918
  alias_method :direct_user_request?, :direct_user_request
1947
3919
 
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").
3920
+ # The end user's IP address. Required for getting SearchResponse.
3921
+ # sponsored_results. This field is used to extract location information for
3922
+ # personalization. This field must be either an IPv4 address (e.g. "104.133.9.80"
3923
+ # ) or an IPv6 address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334").
1951
3924
  # Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when
1952
3925
  # using the JavaScript tag in UserEventService.CollectUserEvent or if
1953
3926
  # direct_user_request is set.
@@ -1955,11 +3928,12 @@ module Google
1955
3928
  # @return [String]
1956
3929
  attr_accessor :ip_address
1957
3930
 
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.
3931
+ # User agent as included in the HTTP header. Required for getting SearchResponse.
3932
+ # sponsored_results. The field must be a UTF-8 encoded string with a length
3933
+ # limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
3934
+ # This should not be set when using the client side event reporting with GTM or
3935
+ # JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request
3936
+ # is set.
1963
3937
  # Corresponds to the JSON property `userAgent`
1964
3938
  # @return [String]
1965
3939
  attr_accessor :user_agent
@@ -1984,6 +3958,35 @@ module Google
1984
3958
  end
1985
3959
  end
1986
3960
 
3961
+ # Metadata related to the progress of the AddFulfillmentPlaces operation.
3962
+ # Currently empty because there is no meaningful metadata populated from the
3963
+ # AddFulfillmentPlaces method.
3964
+ class GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata
3965
+ include Google::Apis::Core::Hashable
3966
+
3967
+ def initialize(**args)
3968
+ update!(**args)
3969
+ end
3970
+
3971
+ # Update properties of this object
3972
+ def update!(**args)
3973
+ end
3974
+ end
3975
+
3976
+ # Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
3977
+ # is no meaningful response populated from the AddFulfillmentPlaces method.
3978
+ class GoogleCloudRetailV2betaAddFulfillmentPlacesResponse
3979
+ include Google::Apis::Core::Hashable
3980
+
3981
+ def initialize(**args)
3982
+ update!(**args)
3983
+ end
3984
+
3985
+ # Update properties of this object
3986
+ def update!(**args)
3987
+ end
3988
+ end
3989
+
1987
3990
  # Configuration of destination for Export related errors.
1988
3991
  class GoogleCloudRetailV2betaExportErrorsConfig
1989
3992
  include Google::Apis::Core::Hashable
@@ -2086,6 +4089,27 @@ module Google
2086
4089
  end
2087
4090
  end
2088
4091
 
4092
+ # Response of the ImportCompletionDataRequest. If the long running operation is
4093
+ # done, this message is returned by the google.longrunning.Operations.response
4094
+ # field if the operation is successful.
4095
+ class GoogleCloudRetailV2betaImportCompletionDataResponse
4096
+ include Google::Apis::Core::Hashable
4097
+
4098
+ # A sample of errors encountered while processing the request.
4099
+ # Corresponds to the JSON property `errorSamples`
4100
+ # @return [Array<Google::Apis::RetailV2alpha::GoogleRpcStatus>]
4101
+ attr_accessor :error_samples
4102
+
4103
+ def initialize(**args)
4104
+ update!(**args)
4105
+ end
4106
+
4107
+ # Update properties of this object
4108
+ def update!(**args)
4109
+ @error_samples = args[:error_samples] if args.key?(:error_samples)
4110
+ end
4111
+ end
4112
+
2089
4113
  # Configuration of destination for Import related errors.
2090
4114
  class GoogleCloudRetailV2betaImportErrorsConfig
2091
4115
  include Google::Apis::Core::Hashable
@@ -2122,6 +4146,20 @@ module Google
2122
4146
  # @return [Fixnum]
2123
4147
  attr_accessor :failure_count
2124
4148
 
4149
+ # Pub/Sub topic for receiving notification. If this field is set, when the
4150
+ # import is finished, a notification will be sent to specified Pub/Sub topic.
4151
+ # The message data will be JSON string of a Operation. Format of the Pub/Sub
4152
+ # topic is `projects/`project`/topics/`topic``.
4153
+ # Corresponds to the JSON property `notificationPubsubTopic`
4154
+ # @return [String]
4155
+ attr_accessor :notification_pubsub_topic
4156
+
4157
+ # Id of the request / operation. This is parroting back the requestId that was
4158
+ # passed in the request.
4159
+ # Corresponds to the JSON property `requestId`
4160
+ # @return [String]
4161
+ attr_accessor :request_id
4162
+
2125
4163
  # Count of entries that were processed successfully.
2126
4164
  # Corresponds to the JSON property `successCount`
2127
4165
  # @return [Fixnum]
@@ -2141,6 +4179,8 @@ module Google
2141
4179
  def update!(**args)
2142
4180
  @create_time = args[:create_time] if args.key?(:create_time)
2143
4181
  @failure_count = args[:failure_count] if args.key?(:failure_count)
4182
+ @notification_pubsub_topic = args[:notification_pubsub_topic] if args.key?(:notification_pubsub_topic)
4183
+ @request_id = args[:request_id] if args.key?(:request_id)
2144
4184
  @success_count = args[:success_count] if args.key?(:success_count)
2145
4185
  @update_time = args[:update_time] if args.key?(:update_time)
2146
4186
  end
@@ -2274,6 +4314,64 @@ module Google
2274
4314
  end
2275
4315
  end
2276
4316
 
4317
+ # Metadata related to the progress of the RemoveFulfillmentPlaces operation.
4318
+ # Currently empty because there is no meaningful metadata populated from the
4319
+ # RemoveFulfillmentPlaces method.
4320
+ class GoogleCloudRetailV2betaRemoveFulfillmentPlacesMetadata
4321
+ include Google::Apis::Core::Hashable
4322
+
4323
+ def initialize(**args)
4324
+ update!(**args)
4325
+ end
4326
+
4327
+ # Update properties of this object
4328
+ def update!(**args)
4329
+ end
4330
+ end
4331
+
4332
+ # Response of the RemoveFulfillmentPlacesRequest. Currently empty because there
4333
+ # is no meaningful response populated from the RemoveFulfillmentPlaces method.
4334
+ class GoogleCloudRetailV2betaRemoveFulfillmentPlacesResponse
4335
+ include Google::Apis::Core::Hashable
4336
+
4337
+ def initialize(**args)
4338
+ update!(**args)
4339
+ end
4340
+
4341
+ # Update properties of this object
4342
+ def update!(**args)
4343
+ end
4344
+ end
4345
+
4346
+ # Metadata related to the progress of the SetInventory operation. Currently
4347
+ # empty because there is no meaningful metadata populated from the SetInventory
4348
+ # method.
4349
+ class GoogleCloudRetailV2betaSetInventoryMetadata
4350
+ include Google::Apis::Core::Hashable
4351
+
4352
+ def initialize(**args)
4353
+ update!(**args)
4354
+ end
4355
+
4356
+ # Update properties of this object
4357
+ def update!(**args)
4358
+ end
4359
+ end
4360
+
4361
+ # Response of the SetInventoryRequest. Currently empty because there is no
4362
+ # meaningful response populated from the SetInventory method.
4363
+ class GoogleCloudRetailV2betaSetInventoryResponse
4364
+ include Google::Apis::Core::Hashable
4365
+
4366
+ def initialize(**args)
4367
+ update!(**args)
4368
+ end
4369
+
4370
+ # Update properties of this object
4371
+ def update!(**args)
4372
+ end
4373
+ end
4374
+
2277
4375
  # A summary of import result. The UserEventImportSummary summarizes the import
2278
4376
  # status for user events.
2279
4377
  class GoogleCloudRetailV2betaUserEventImportSummary
@@ -2443,6 +4541,47 @@ module Google
2443
4541
  @message = args[:message] if args.key?(:message)
2444
4542
  end
2445
4543
  end
4544
+
4545
+ # Represents a whole or partial calendar date, such as a birthday. The time of
4546
+ # day and time zone are either specified elsewhere or are insignificant. The
4547
+ # date is relative to the Gregorian Calendar. This can represent one of the
4548
+ # following: * A full date, with non-zero year, month, and day values * A month
4549
+ # and day value, with a zero year, such as an anniversary * A year on its own,
4550
+ # with zero month and day values * A year and month value, with a zero day, such
4551
+ # as a credit card expiration date Related types are google.type.TimeOfDay and `
4552
+ # google.protobuf.Timestamp`.
4553
+ class GoogleTypeDate
4554
+ include Google::Apis::Core::Hashable
4555
+
4556
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
4557
+ # specify a year by itself or a year and month where the day isn't significant.
4558
+ # Corresponds to the JSON property `day`
4559
+ # @return [Fixnum]
4560
+ attr_accessor :day
4561
+
4562
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
4563
+ # and day.
4564
+ # Corresponds to the JSON property `month`
4565
+ # @return [Fixnum]
4566
+ attr_accessor :month
4567
+
4568
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
4569
+ # year.
4570
+ # Corresponds to the JSON property `year`
4571
+ # @return [Fixnum]
4572
+ attr_accessor :year
4573
+
4574
+ def initialize(**args)
4575
+ update!(**args)
4576
+ end
4577
+
4578
+ # Update properties of this object
4579
+ def update!(**args)
4580
+ @day = args[:day] if args.key?(:day)
4581
+ @month = args[:month] if args.key?(:month)
4582
+ @year = args[:year] if args.key?(:year)
4583
+ end
4584
+ end
2446
4585
  end
2447
4586
  end
2448
4587
  end