File: retail_v2alpha.projects.locations.catalogs.placements.html

package info (click to toggle)
python-googleapi 2.186.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 553,432 kB
  • sloc: python: 11,087; javascript: 249; sh: 114; makefile: 59
file content (1129 lines) | stat: -rw-r--r-- 207,743 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="retail_v2alpha.html">Vertex AI Search for commerce API</a> . <a href="retail_v2alpha.projects.html">projects</a> . <a href="retail_v2alpha.projects.locations.html">locations</a> . <a href="retail_v2alpha.projects.locations.catalogs.html">catalogs</a> . <a href="retail_v2alpha.projects.locations.catalogs.placements.html">placements</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#conversationalSearch">conversationalSearch(placement, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Performs a conversational search. This feature is only available for users who have Conversational Search enabled.</p>
<p class="toc_element">
  <code><a href="#predict">predict(placement, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Makes a recommendation prediction.</p>
<p class="toc_element">
  <code><a href="#search">search(placement, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.</p>
<p class="toc_element">
  <code><a href="#search_next">search_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="conversationalSearch">conversationalSearch(placement, body=None, x__xgafv=None)</code>
  <pre>Performs a conversational search. This feature is only available for users who have Conversational Search enabled.

Args:
  placement: string, Required. The resource name of the search engine placement, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search` or `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` This field is used to identify the serving config name and the set of models that will be used to make the search. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for ConversationalSearchService.ConversationalSearch method.
  &quot;branch&quot;: &quot;A String&quot;, # Required. The branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use &quot;default_branch&quot; as the branch ID or leave this field empty, to search products under the default branch.
  &quot;conversationId&quot;: &quot;A String&quot;, # Optional. This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResponse.conversation_id. For the initial request, this should be empty.
  &quot;conversationalFilteringSpec&quot;: { # This field specifies all conversational filtering related parameters addition to conversational retail search. # Optional. This field specifies all conversational filtering related parameters.
    &quot;conversationalFilteringMode&quot;: &quot;A String&quot;, # Optional. Mode to control Conversational Filtering. Defaults to Mode.DISABLED if it&#x27;s unset.
    &quot;enableConversationalFiltering&quot;: True or False, # Optional. This field is deprecated. Please use ConversationalFilteringSpec.conversational_filtering_mode instead.
    &quot;userAnswer&quot;: { # This field specifies the current user answer during the conversational filtering search. This can be either user selected from suggested answers or user input plain text. # Optional. This field specifies the current user answer during the conversational filtering search. It can be either user selected from suggested answers or user input plain text.
      &quot;selectedAnswer&quot;: { # This field specifies the selected answers during the conversational search. # Optional. This field specifies the selected answer during the conversational search. This should be a subset of ConversationalSearchResponse.followup_question.suggested_answers.
        &quot;productAttributeValue&quot;: { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`. # Optional. This field specifies the selected answer which is a attribute key-value.
          &quot;name&quot;: &quot;A String&quot;, # The attribute name.
          &quot;value&quot;: &quot;A String&quot;, # The attribute value.
        },
      },
      &quot;textAnswer&quot;: &quot;A String&quot;, # This field specifies the incremental input text from the user during the conversational search.
    },
  },
  &quot;pageCategories&quot;: [ # Optional. The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories; To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: &quot;pageCategories&quot; : [&quot;Sales &gt; 2017 Black Friday Deals&quot;].
    &quot;A String&quot;,
  ],
  &quot;query&quot;: &quot;A String&quot;, # Optional. Raw search query to be searched for. If this field is empty, the request is considered a category browsing request.
  &quot;safetySettings&quot;: [ # Optional. The safety settings to be applied to the generated content.
    { # Safety settings.
      &quot;category&quot;: &quot;A String&quot;, # Harm category.
      &quot;method&quot;: &quot;A String&quot;, # Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.
      &quot;threshold&quot;: &quot;A String&quot;, # The harm block threshold.
    },
  ],
  &quot;searchParams&quot;: { # Search parameters. # Optional. Search parameters.
    &quot;boostSpec&quot;: { # Boost specification to boost certain items. # Optional. The boost spec to specify the boosting of search results. The syntax of the boost spec is the same as SearchRequest.boost_spec.
      &quot;conditionBoostSpecs&quot;: [ # Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
        { # Boost applies to products which match a condition.
          &quot;boost&quot;: 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.
          &quot;condition&quot;: &quot;A String&quot;, # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost products with product ID &quot;product_1&quot; or &quot;product_2&quot;, and color &quot;Red&quot; or &quot;Blue&quot;: * (id: ANY(&quot;product_1&quot;, &quot;product_2&quot;)) AND (colorFamilies: ANY(&quot;Red&quot;,&quot;Blue&quot;))
        },
      ],
      &quot;skipBoostSpecValidation&quot;: True or False, # Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.
    },
    &quot;canonicalFilter&quot;: &quot;A String&quot;, # Optional. The canonical filter string to restrict search results. The syntax of the canonical filter string is the same as SearchRequest.canonical_filter.
    &quot;filter&quot;: &quot;A String&quot;, # Optional. The filter string to restrict search results. The syntax of the filter string is the same as SearchRequest.filter.
    &quot;sortBy&quot;: &quot;A String&quot;, # Optional. The sort string to specify the sorting of search results. The syntax of the sort string is the same as SearchRequest.sort.
  },
  &quot;userInfo&quot;: { # Information of an end user. # Optional. User information.
    &quot;directUserRequest&quot;: True or False, # True if the request is made directly from the end user, in which case the ip_address and user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.
    &quot;ipAddress&quot;: &quot;A String&quot;, # The end user&#x27;s IP address. This field is used to extract location information for personalization. This field must be either an IPv4 address (e.g. &quot;104.133.9.80&quot;) or an IPv6 address (e.g. &quot;2001:0db8:85a3:0000:0000:8a2e:0370:7334&quot;). Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when: * setting SearchRequest.user_info. * using the JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.
    &quot;userAgent&quot;: &quot;A String&quot;, # User agent as included in the HTTP header. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.
    &quot;userId&quot;: &quot;A String&quot;, # Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don&#x27;t set for anonymous users. Always use a hashed value for this ID. Don&#x27;t set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
  },
  &quot;userLabels&quot;: { # Optional. The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
    &quot;a_key&quot;: &quot;A String&quot;,
  },
  &quot;visitorId&quot;: &quot;A String&quot;, # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This should be the same identifier as UserEvent.visitor_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for ConversationalSearchService.ConversationalSearch method.
  &quot;conversationId&quot;: &quot;A String&quot;, # Conversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request&#x27;s ConversationalSearchRequest.conversation_id to restore conversation state in server.
  &quot;conversationalFilteringResult&quot;: { # This field specifies all related information that is needed on client side for UI rendering of conversational filtering search. # This field specifies all related information that is needed on client side for UI rendering of conversational filtering search.
    &quot;additionalFilter&quot;: { # Additional filter that client side need to apply. # This is the incremental additional filters implied from the current user answer. User should add the suggested addition filters to the previous ConversationalSearchRequest.search_params.filter and SearchRequest.filter, and use the merged filter in the follow up requests.
      &quot;productAttributeValue&quot;: { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`. # Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future.
        &quot;name&quot;: &quot;A String&quot;, # The attribute name.
        &quot;value&quot;: &quot;A String&quot;, # The attribute value.
      },
    },
    &quot;followupQuestion&quot;: { # The conversational followup question generated for Intent refinement. # The conversational filtering question.
      &quot;followupQuestion&quot;: &quot;A String&quot;, # The conversational followup question generated for Intent refinement.
      &quot;suggestedAnswers&quot;: [ # The answer options provided to client for the follow-up question.
        { # Suggested answers to the follow-up question. If it&#x27;s numerical attribute, only ProductAttributeInterval will be set. If it&#x27;s textual attribute, only productAttributeValue will be set.
          &quot;productAttributeValue&quot;: { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`. # Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future.
            &quot;name&quot;: &quot;A String&quot;, # The attribute name.
            &quot;value&quot;: &quot;A String&quot;, # The attribute value.
          },
        },
      ],
    },
  },
  &quot;conversationalTextResponse&quot;: &quot;A String&quot;, # The conversational answer-based text response generated by the Server.
  &quot;followupQuestion&quot;: { # The conversational followup question generated for Intent refinement. # The conversational followup question generated for Intent refinement.
    &quot;followupQuestion&quot;: &quot;A String&quot;, # The conversational followup question generated for Intent refinement.
    &quot;suggestedAnswers&quot;: [ # The answer options provided to client for the follow-up question.
      { # Suggested answers to the follow-up question. If it&#x27;s numerical attribute, only ProductAttributeInterval will be set. If it&#x27;s textual attribute, only productAttributeValue will be set.
        &quot;productAttributeValue&quot;: { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`. # Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future.
          &quot;name&quot;: &quot;A String&quot;, # The attribute name.
          &quot;value&quot;: &quot;A String&quot;, # The attribute value.
        },
      },
    ],
  },
  &quot;refinedSearch&quot;: [ # The proposed refined search queries. They can be used to fetch the relevant search results. When using CONVERSATIONAL_FILTER_ONLY mode, the refined_query from search response will be populated here.
    { # The proposed refined search for intent-refinement/bundled shopping conversation. When using CONVERSATIONAL_FILTER_ONLY mode, the refined_query from search response will be populated here.
      &quot;query&quot;: &quot;A String&quot;, # The query to be used for search.
    },
  ],
  &quot;state&quot;: &quot;A String&quot;, # Output only. The state of the response generation.
  &quot;userQueryTypes&quot;: [ # The types Retail classifies the search query as. Supported values are: - &quot;ORDER_SUPPORT&quot; - &quot;SIMPLE_PRODUCT_SEARCH&quot; - &quot;INTENT_REFINEMENT&quot; - &quot;PRODUCT_DETAILS&quot; - &quot;PRODUCT_COMPARISON&quot; - &quot;DEALS_AND_COUPONS&quot; - &quot;STORE_RELEVANT&quot; - &quot;BLOCKLISTED&quot; - &quot;BEST_PRODUCT&quot; - &quot;RETAIL_SUPPORT&quot; - &quot;DISABLED&quot;
    &quot;A String&quot;,
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="predict">predict(placement, body=None, x__xgafv=None)</code>
  <pre>Makes a recommendation prediction.

Args:
  placement: string, Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for Predict method.
  &quot;filter&quot;: &quot;A String&quot;, # Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-&quot;tagA&quot;` is also supported and is equivalent to `NOT &quot;tagA&quot;`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: &quot;Recently viewed&quot; models don&#x27;t support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(&quot;Red&quot; OR &quot;Blue&quot;) tag=&quot;New-Arrival&quot; tag=(NOT &quot;promotional&quot;) * filterOutOfStockItems tag=(-&quot;promotional&quot;) * filterOutOfStockItems If your filter blocks all prediction results, the API will return *no* results. If instead you want empty result sets to return generic (unfiltered) popular products, set `strictFiltering` to False in `PredictRequest.params`. Note that the API will never return items with storageStatus of &quot;EXPIRED&quot; or &quot;DELETED&quot; regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(&quot;Red&quot;, &quot;Blue&quot;)) AND NOT (categories: ANY(&quot;Phones&quot;)) * (availability: ANY(&quot;IN_STOCK&quot;)) AND (colors: ANY(&quot;Red&quot;) OR categories: ANY(&quot;Phones&quot;)) For more information, see [Filter recommendations](https://cloud.google.com/retail/docs/filter-recs).
  &quot;labels&quot;: { # The labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.
    &quot;a_key&quot;: &quot;A String&quot;,
  },
  &quot;pageSize&quot;: 42, # Maximum number of results to return. Set this property to the number of prediction results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100.
  &quot;pageToken&quot;: &quot;A String&quot;, # This field is not used; leave it unset.
  &quot;params&quot;: { # Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction &#x27;score&#x27; corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given &#x27;score&#x27; indicates the probability of a product being clicked/purchased given the user&#x27;s context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {&#x27;no-price-reranking&#x27;, &#x27;low-price-reranking&#x27;, &#x27;medium-price-reranking&#x27;, &#x27;high-price-reranking&#x27;}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {&#x27;no-diversity&#x27;, &#x27;low-diversity&#x27;, &#x27;medium-diversity&#x27;, &#x27;high-diversity&#x27;, &#x27;auto-diversity&#x27;}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.
    &quot;a_key&quot;: &quot;&quot;,
  },
  &quot;userEvent&quot;: { # UserEvent captures all metadata information Retail API needs to know about how end users interact with customers&#x27; website. # Required. Context about the user, what they are looking at and what action they took to trigger the predict request. Note that this user event detail won&#x27;t be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don&#x27;t set UserEvent.visitor_id or UserInfo.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.visitor_id to a random unique ID and leave UserInfo.user_id unset.
    &quot;attributes&quot;: { # Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.
      &quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
        &quot;indexable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
        &quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
          3.14,
        ],
        &quot;searchable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
        &quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
          &quot;A String&quot;,
        ],
      },
    },
    &quot;attributionToken&quot;: &quot;A String&quot;, # Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be a valid PredictResponse.attribution_token for user events that are the result of PredictionService.Predict. The value must be a valid SearchResponse.attribution_token for user events that are the result of SearchService.Search. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K&#x27;s page. When recording events on product K&#x27;s page, log the PredictResponse.attribution_token to this field.
    &quot;cartId&quot;: &quot;A String&quot;, # The ID or name of the associated shopping cart. This ID is used to associate multiple items added or present in the cart before purchase. This can only be set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view` events.
    &quot;completionDetail&quot;: { # Detailed completion information including completion attribution token and clicked completion info. # The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search.
      &quot;completionAttributionToken&quot;: &quot;A String&quot;, # Completion attribution token in CompleteQueryResponse.attribution_token.
      &quot;selectedPosition&quot;: 42, # End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.
      &quot;selectedSuggestion&quot;: &quot;A String&quot;, # End user selected CompleteQueryResponse.CompletionResult.suggestion.
    },
    &quot;entity&quot;: &quot;A String&quot;, # The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that you set this field to get better per-entity search, completion, and prediction results.
    &quot;eventTime&quot;: &quot;A String&quot;, # Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.
    &quot;eventType&quot;: &quot;A String&quot;, # Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `remove-from-cart`: Products being removed from cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.
    &quot;experimentIds&quot;: [ # A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).
      &quot;A String&quot;,
    ],
    &quot;filter&quot;: &quot;A String&quot;, # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. See SearchRequest.filter for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.
    &quot;offset&quot;: 42, # An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
    &quot;orderBy&quot;: &quot;A String&quot;, # The order in which products are returned. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
    &quot;pageCategories&quot;: [ # The categories associated with a category page. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: &quot;pageCategories&quot; : [&quot;Sales &gt; 2017 Black Friday Deals&quot;]. Required for `category-page-view` events. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
      &quot;A String&quot;,
    ],
    &quot;pageViewId&quot;: &quot;A String&quot;, # A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
    &quot;panels&quot;: [ # Optional. List of panels associated with this event. Used for panel-level impression data.
      { # Detailed panel information associated with a user event.
        &quot;attributionToken&quot;: &quot;A String&quot;, # Optional. The attribution token of the panel.
        &quot;displayName&quot;: &quot;A String&quot;, # Optional. The display name of the panel.
        &quot;panelId&quot;: &quot;A String&quot;, # Required. The panel ID.
        &quot;panelPosition&quot;: 42, # Optional. The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set.
        &quot;productDetails&quot;: [ # Optional. The product details associated with the panel.
          { # Detailed product information associated with a user event.
            &quot;product&quot;: { # Product captures all metadata information of items to be recommended or searched. # Required. Product information. Required field(s): * Product.id Optional override field(s): * Product.price_info If any supported optional fields are provided, we will treat them as a full override when looking up product information from the catalog. Thus, it is important to ensure that the overriding fields are accurate and complete. All other product fields are ignored and instead populated via catalog lookup after event ingestion.
              &quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
                &quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
                  &quot;indexable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
                  &quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
                    3.14,
                  ],
                  &quot;searchable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
                  &quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
                    &quot;A String&quot;,
                  ],
                },
              },
              &quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
                &quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
                  &quot;A String&quot;,
                ],
                &quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
                  &quot;A String&quot;,
                ],
              },
              &quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered &quot;in stock&quot; as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
              &quot;availableQuantity&quot;: 42, # The available quantity of the item.
              &quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.
              &quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed unless overridden through the Google Cloud console. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
                &quot;A String&quot;,
              ],
              &quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product unless overridden through the Google Cloud console. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
                &quot;A String&quot;,
              ],
              &quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
                &quot;A String&quot;,
              ],
              &quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
                &quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). The colorFamilies field as a system attribute is not a required field but strongly recommended to be specified. Google Search models treat this field as more important than a custom product attribute when specified.
                  &quot;A String&quot;,
                ],
                &quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
                  &quot;A String&quot;,
                ],
              },
              &quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 1 value is allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
                &quot;A String&quot;,
              ],
              &quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
              &quot;expireTime&quot;: &quot;A String&quot;, # Note that this field is applied in the following ways: * If the Product is already expired when it is uploaded, this product is not indexed for search. * If the Product is not expired when it is uploaded, only the Type.PRIMARY&#x27;s and Type.COLLECTION&#x27;s expireTime is respected, and Type.VARIANT&#x27;s expireTime is not used. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
              &quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
                { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
                  &quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
                    &quot;A String&quot;,
                  ],
                  &quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
                },
              ],
              &quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
              &quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
              &quot;images&quot;: [ # Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
                { # Product image. Recommendations AI and Retail Search use product images to improve prediction and search results. Product images can be returned in results, and are shown in prediction or search previews in the console. Please try to provide correct product images and avoid using images with size too small.
                  &quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
                  &quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
                  &quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
                },
              ],
              &quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
              &quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
                { # The inventory information at a place (e.g. a store) identified by a place ID.
                  &quot;attributes&quot;: { # Optional. Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.
                    &quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
                      &quot;indexable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
                      &quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
                        3.14,
                      ],
                      &quot;searchable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
                      &quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
                        &quot;A String&quot;,
                      ],
                    },
                  },
                  &quot;availability&quot;: &quot;A String&quot;, # Optional. The availability of the Product at this place_id. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered &quot;in stock&quot; as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability). This field is currently only used by the Recommendations API. For Search, please make use of fulfillment_types or custom attributes for similar behaviour. See [here]( https://cloud.google.com/retail/docs/local-inventory-updates#local-inventory-update-methods) for more details.
                  &quot;fulfillmentTypes&quot;: [ # Optional. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.
                    &quot;A String&quot;,
                  ],
                  &quot;placeId&quot;: &quot;A String&quot;, # Optional. The place ID for the current set of inventory information.
                  &quot;priceInfo&quot;: { # The price information of a Product. # Optional. Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
                    &quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
                    &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
                    &quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.
                    &quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
                    &quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
                    &quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
                    &quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
                      &quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
                        &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
                        &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
                        &quot;maximum&quot;: 3.14, # Inclusive upper bound.
                        &quot;minimum&quot;: 3.14, # Inclusive lower bound.
                      },
                      &quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
                        &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
                        &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
                        &quot;maximum&quot;: 3.14, # Inclusive upper bound.
                        &quot;minimum&quot;: 3.14, # Inclusive lower bound.
                      },
                    },
                  },
                },
              ],
              &quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
                &quot;A String&quot;,
              ],
              &quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
              &quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
                &quot;A String&quot;,
              ],
              &quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
                &quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
                &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
                &quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.
                &quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
                &quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
                &quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
                &quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
                  &quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
                    &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
                    &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
                    &quot;maximum&quot;: 3.14, # Inclusive upper bound.
                    &quot;minimum&quot;: 3.14, # Inclusive lower bound.
                  },
                  &quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
                    &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
                    &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
                    &quot;maximum&quot;: 3.14, # Inclusive upper bound.
                    &quot;minimum&quot;: 3.14, # Inclusive lower bound.
                  },
                },
              },
              &quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
              &quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.
                { # Promotion specification.
                  &quot;promotionId&quot;: &quot;A String&quot;, # Promotion identifier, which is the final component of name. For example, this field is &quot;free_gift&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/promotions/free_gift`. The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to Google Merchant Center property [promotion_id](https://support.google.com/merchants/answer/7050148).
                },
              ],
              &quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
              &quot;rating&quot;: { # The rating of a Product. # The rating of this product.
                &quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
                &quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
                &quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
                  42,
                ],
              },
              &quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Note: Returning more fields in SearchResponse can increase response payload size and serving latency. This field is deprecated. Use the retrievable site-wide control instead.
              &quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
                &quot;A String&quot;,
              ],
              &quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
                &quot;A String&quot;,
              ],
              &quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
              &quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
              &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
              &quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
              &quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
                # Object with schema name: GoogleCloudRetailV2alphaProduct
              ],
            },
            &quot;quantity&quot;: 42, # Quantity of the product associated with the user event. For example, this field will be 2 if two products are added to the shopping cart for `purchase-complete` event. Required for `add-to-cart` and `purchase-complete` event types.
          },
        ],
        &quot;totalPanels&quot;: 42, # Optional. The total number of panels, including this one, shown to the user. Must be set if panel_position is set.
      },
    ],
    &quot;productDetails&quot;: [ # The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different product_details is desired. The end user may have not finished browsing the whole page yet.
      { # Detailed product information associated with a user event.
        &quot;product&quot;: { # Product captures all metadata information of items to be recommended or searched. # Required. Product information. Required field(s): * Product.id Optional override field(s): * Product.price_info If any supported optional fields are provided, we will treat them as a full override when looking up product information from the catalog. Thus, it is important to ensure that the overriding fields are accurate and complete. All other product fields are ignored and instead populated via catalog lookup after event ingestion.
          &quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
            &quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
              &quot;indexable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
              &quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
                3.14,
              ],
              &quot;searchable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
              &quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
                &quot;A String&quot;,
              ],
            },
          },
          &quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
            &quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
              &quot;A String&quot;,
            ],
            &quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
              &quot;A String&quot;,
            ],
          },
          &quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered &quot;in stock&quot; as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
          &quot;availableQuantity&quot;: 42, # The available quantity of the item.
          &quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.
          &quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed unless overridden through the Google Cloud console. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
            &quot;A String&quot;,
          ],
          &quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product unless overridden through the Google Cloud console. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
            &quot;A String&quot;,
          ],
          &quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
            &quot;A String&quot;,
          ],
          &quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
            &quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). The colorFamilies field as a system attribute is not a required field but strongly recommended to be specified. Google Search models treat this field as more important than a custom product attribute when specified.
              &quot;A String&quot;,
            ],
            &quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
              &quot;A String&quot;,
            ],
          },
          &quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 1 value is allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
            &quot;A String&quot;,
          ],
          &quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
          &quot;expireTime&quot;: &quot;A String&quot;, # Note that this field is applied in the following ways: * If the Product is already expired when it is uploaded, this product is not indexed for search. * If the Product is not expired when it is uploaded, only the Type.PRIMARY&#x27;s and Type.COLLECTION&#x27;s expireTime is respected, and Type.VARIANT&#x27;s expireTime is not used. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
          &quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
            { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
              &quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
                &quot;A String&quot;,
              ],
              &quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
            },
          ],
          &quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
          &quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
          &quot;images&quot;: [ # Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
            { # Product image. Recommendations AI and Retail Search use product images to improve prediction and search results. Product images can be returned in results, and are shown in prediction or search previews in the console. Please try to provide correct product images and avoid using images with size too small.
              &quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
              &quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
              &quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
            },
          ],
          &quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
          &quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
            { # The inventory information at a place (e.g. a store) identified by a place ID.
              &quot;attributes&quot;: { # Optional. Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.
                &quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
                  &quot;indexable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
                  &quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
                    3.14,
                  ],
                  &quot;searchable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
                  &quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
                    &quot;A String&quot;,
                  ],
                },
              },
              &quot;availability&quot;: &quot;A String&quot;, # Optional. The availability of the Product at this place_id. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered &quot;in stock&quot; as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability). This field is currently only used by the Recommendations API. For Search, please make use of fulfillment_types or custom attributes for similar behaviour. See [here]( https://cloud.google.com/retail/docs/local-inventory-updates#local-inventory-update-methods) for more details.
              &quot;fulfillmentTypes&quot;: [ # Optional. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.
                &quot;A String&quot;,
              ],
              &quot;placeId&quot;: &quot;A String&quot;, # Optional. The place ID for the current set of inventory information.
              &quot;priceInfo&quot;: { # The price information of a Product. # Optional. Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
                &quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
                &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
                &quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.
                &quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
                &quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
                &quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
                &quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
                  &quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
                    &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
                    &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
                    &quot;maximum&quot;: 3.14, # Inclusive upper bound.
                    &quot;minimum&quot;: 3.14, # Inclusive lower bound.
                  },
                  &quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
                    &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
                    &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
                    &quot;maximum&quot;: 3.14, # Inclusive upper bound.
                    &quot;minimum&quot;: 3.14, # Inclusive lower bound.
                  },
                },
              },
            },
          ],
          &quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
            &quot;A String&quot;,
          ],
          &quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
          &quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
            &quot;A String&quot;,
          ],
          &quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
            &quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
            &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
            &quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.
            &quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
            &quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
            &quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
            &quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
              &quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
                &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
                &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
                &quot;maximum&quot;: 3.14, # Inclusive upper bound.
                &quot;minimum&quot;: 3.14, # Inclusive lower bound.
              },
              &quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
                &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
                &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
                &quot;maximum&quot;: 3.14, # Inclusive upper bound.
                &quot;minimum&quot;: 3.14, # Inclusive lower bound.
              },
            },
          },
          &quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
          &quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.
            { # Promotion specification.
              &quot;promotionId&quot;: &quot;A String&quot;, # Promotion identifier, which is the final component of name. For example, this field is &quot;free_gift&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/promotions/free_gift`. The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to Google Merchant Center property [promotion_id](https://support.google.com/merchants/answer/7050148).
            },
          ],
          &quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
          &quot;rating&quot;: { # The rating of a Product. # The rating of this product.
            &quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
            &quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
            &quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
              42,
            ],
          },
          &quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Note: Returning more fields in SearchResponse can increase response payload size and serving latency. This field is deprecated. Use the retrievable site-wide control instead.
          &quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
            &quot;A String&quot;,
          ],
          &quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
            &quot;A String&quot;,
          ],
          &quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
          &quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
          &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
          &quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
          &quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
            # Object with schema name: GoogleCloudRetailV2alphaProduct
          ],
        },
        &quot;quantity&quot;: 42, # Quantity of the product associated with the user event. For example, this field will be 2 if two products are added to the shopping cart for `purchase-complete` event. Required for `add-to-cart` and `purchase-complete` event types.
      },
    ],
    &quot;purchaseTransaction&quot;: { # A transaction represents the entire purchase transaction. # A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
      &quot;cost&quot;: 3.14, # All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = revenue - tax - cost
      &quot;currencyCode&quot;: &quot;A String&quot;, # Required. Currency code. Use three-character ISO-4217 code.
      &quot;id&quot;: &quot;A String&quot;, # The transaction ID with a length limit of 128 characters.
      &quot;revenue&quot;: 3.14, # Required. Total non-zero revenue or grand total associated with the transaction. This value include shipping, tax, or other adjustments to total revenue that you want to include as part of your revenue calculations.
      &quot;tax&quot;: 3.14, # All the taxes associated with the transaction.
    },
    &quot;referrerUri&quot;: &quot;A String&quot;, # The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.
    &quot;searchQuery&quot;: &quot;A String&quot;, # The user&#x27;s search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.
    &quot;sessionId&quot;: &quot;A String&quot;, # A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the session_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add visitor_id as prefix.
    &quot;uri&quot;: &quot;A String&quot;, # Complete URL (window.location.href) of the user&#x27;s current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.
    &quot;userInfo&quot;: { # Information of an end user. # User information.
      &quot;directUserRequest&quot;: True or False, # True if the request is made directly from the end user, in which case the ip_address and user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.
      &quot;ipAddress&quot;: &quot;A String&quot;, # The end user&#x27;s IP address. This field is used to extract location information for personalization. This field must be either an IPv4 address (e.g. &quot;104.133.9.80&quot;) or an IPv6 address (e.g. &quot;2001:0db8:85a3:0000:0000:8a2e:0370:7334&quot;). Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when: * setting SearchRequest.user_info. * using the JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.
      &quot;userAgent&quot;: &quot;A String&quot;, # User agent as included in the HTTP header. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.
      &quot;userId&quot;: &quot;A String&quot;, # Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don&#x27;t set for anonymous users. Always use a hashed value for this ID. Don&#x27;t set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
    },
    &quot;visitorId&quot;: &quot;A String&quot;, # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Don&#x27;t set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.
  },
  &quot;validateOnly&quot;: True or False, # Use validate only mode for this prediction query. If set to true, a dummy model will be used that returns arbitrary products. Note that the validate only mode should only be used for testing the API, or if the model is not ready.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for predict method.
  &quot;attributionToken&quot;: &quot;A String&quot;, # A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
  &quot;missingIds&quot;: [ # IDs of products in the request that were missing from the inventory.
    &quot;A String&quot;,
  ],
  &quot;results&quot;: [ # A list of recommended products. The order represents the ranking (from the most relevant product to the least).
    { # PredictionResult represents the recommendation prediction results.
      &quot;id&quot;: &quot;A String&quot;, # ID of the recommended product
      &quot;metadata&quot;: { # Additional product metadata / annotations. Possible values: * `product`: JSON representation of the product. Is set if `returnProduct` is set to true in `PredictRequest.params`. * `score`: Prediction score in double value. Is set if `returnScore` is set to true in `PredictRequest.params`.
        &quot;a_key&quot;: &quot;&quot;,
      },
    },
  ],
  &quot;validateOnly&quot;: True or False, # True if the validateOnly property was set in the request.
}</pre>
</div>

<div class="method">
    <code class="details" id="search">search(placement, body=None, x__xgafv=None)</code>
  <pre>Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Args:
  placement: string, Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that are used to make the search. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for SearchService.Search method.
  &quot;boostSpec&quot;: { # Boost specification to boost certain items. # Boost specification to boost certain products. For more information, see [Boost results](https://cloud.google.com/retail/docs/boosting). Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions.
    &quot;conditionBoostSpecs&quot;: [ # Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
      { # Boost applies to products which match a condition.
        &quot;boost&quot;: 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.
        &quot;condition&quot;: &quot;A String&quot;, # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost products with product ID &quot;product_1&quot; or &quot;product_2&quot;, and color &quot;Red&quot; or &quot;Blue&quot;: * (id: ANY(&quot;product_1&quot;, &quot;product_2&quot;)) AND (colorFamilies: ANY(&quot;Red&quot;,&quot;Blue&quot;))
      },
    ],
    &quot;skipBoostSpecValidation&quot;: True or False, # Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.
  },
  &quot;branch&quot;: &quot;A String&quot;, # The branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use &quot;default_branch&quot; as the branch ID or leave this field empty, to search products under the default branch.
  &quot;canonicalFilter&quot;: &quot;A String&quot;, # The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.
  &quot;conversationalSearchSpec&quot;: { # This field specifies all conversational related parameters addition to traditional retail search. # Optional. This field specifies all conversational related parameters addition to traditional retail search.
    &quot;conversationId&quot;: &quot;A String&quot;, # This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResult.conversation_id. For the initial request, this should be empty.
    &quot;followupConversationRequested&quot;: True or False, # This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc.
    &quot;userAnswer&quot;: { # This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text. # This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.
      &quot;selectedAnswer&quot;: { # This field specifies the selected answers during the conversational search. # This field specifies the selected attributes during the conversational search. This should be a subset of ConversationalSearchResult.suggested_answers.
        &quot;productAttributeValue&quot;: { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`. # This field specifies the selected answer which is a attribute key-value.
          &quot;name&quot;: &quot;A String&quot;, # The attribute name.
          &quot;value&quot;: &quot;A String&quot;, # The attribute value.
        },
        &quot;productAttributeValues&quot;: [ # This field is deprecated and should not be set.
          { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`.
            &quot;name&quot;: &quot;A String&quot;, # The attribute name.
            &quot;value&quot;: &quot;A String&quot;, # The attribute value.
          },
        ],
      },
      &quot;textAnswer&quot;: &quot;A String&quot;, # This field specifies the incremental input text from the user during the conversational search.
    },
  },
  &quot;dynamicFacetSpec&quot;: { # The specifications of dynamically generated facets. # Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic facets. Do not set this field. The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated.
    &quot;mode&quot;: &quot;A String&quot;, # Mode of the DynamicFacet feature. Defaults to Mode.DISABLED if it&#x27;s unset.
  },
  &quot;entity&quot;: &quot;A String&quot;, # The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it should be exactly matched with UserEvent.entity to get search results boosted by entity.
  &quot;experimentId&quot;: &quot;A String&quot;, # Optional. An ID for the experiment group this search belongs to.
  &quot;facetSpecs&quot;: [ # Facet specifications for faceted search. If empty, no facets are returned. A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.
    { # A facet specification to perform faceted search.
      &quot;enableDynamicPosition&quot;: True or False, # Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined by Google Retail Search. It is ordered together with dynamic facets if dynamic facets is enabled. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it&#x27;s not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined by Google Retail Search. Another example, assuming you have the following facets in the request: * &quot;rating&quot;, enable_dynamic_position = true * &quot;price&quot;, enable_dynamic_position = false * &quot;brands&quot;, enable_dynamic_position = false And also you have a dynamic facets enable, which generates a facet &quot;gender&quot;. Then, the final order of the facets in the response can be (&quot;price&quot;, &quot;brands&quot;, &quot;rating&quot;, &quot;gender&quot;) or (&quot;price&quot;, &quot;brands&quot;, &quot;gender&quot;, &quot;rating&quot;) depends on how Google Retail Search orders &quot;gender&quot; and &quot;rating&quot; facets. However, notice that &quot;price&quot; and &quot;brands&quot; are always ranked at first and second position because their enable_dynamic_position values are false.
      &quot;excludedFilterKeys&quot;: [ # List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 products with the color facet &quot;Red&quot; and 200 products with the color facet &quot;Blue&quot;. A query containing the filter &quot;colorFamilies:ANY(&quot;Red&quot;)&quot; and having &quot;colorFamilies&quot; as FacetKey.key would by default return only &quot;Red&quot; products in the search results, and also return &quot;Red&quot; with count 100 as the only color facet. Although there are also blue products available, &quot;Blue&quot; would not be shown as an available facet value. If &quot;colorFamilies&quot; is listed in &quot;excludedFilterKeys&quot;, then the query returns the facet values &quot;Red&quot; with count 100 and &quot;Blue&quot; with count 200, because the &quot;colorFamilies&quot; key is now excluded from the filter. Because this field doesn&#x27;t affect search results, the search results are still correctly filtered to return only &quot;Red&quot; products. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.
        &quot;A String&quot;,
      ],
      &quot;facetKey&quot;: { # Specifies how a facet is computed. # Required. The facet key specification.
        &quot;caseInsensitive&quot;: True or False, # True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.
        &quot;contains&quot;: [ # Only get facet values that contains the given strings. For example, suppose &quot;categories&quot; has three values &quot;Women &gt; Shoe&quot;, &quot;Women &gt; Dress&quot; and &quot;Men &gt; Shoe&quot;. If set &quot;contains&quot; to &quot;Shoe&quot;, the &quot;categories&quot; facet gives only &quot;Women &gt; Shoe&quot; and &quot;Men &gt; Shoe&quot;. Only supported on textual fields. Maximum is 10.
          &quot;A String&quot;,
        ],
        &quot;intervals&quot;: [ # Set only if values should be bucketized into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 40. For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles become the bounds for its intervals and are returned in the response. If the facet key intervals are specified in the request, then the specified intervals are returned instead.
          { # A floating point interval.
            &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
            &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
            &quot;maximum&quot;: 3.14, # Inclusive upper bound.
            &quot;minimum&quot;: 3.14, # Inclusive lower bound.
          },
        ],
        &quot;key&quot;: &quot;A String&quot;, # Required. Supported textual and numerical facet keys in Product object, over which the facet values are computed. Facet key is case-sensitive. Allowed facet keys when FacetKey.query is not specified: * textual_field = * &quot;brands&quot; * &quot;categories&quot; * &quot;genders&quot; * &quot;ageGroups&quot; * &quot;availability&quot; * &quot;colorFamilies&quot; * &quot;colors&quot; * &quot;sizes&quot; * &quot;materials&quot; * &quot;patterns&quot; * &quot;conditions&quot; * &quot;attributes.key&quot; * &quot;pickupInStore&quot; * &quot;shipToStore&quot; * &quot;sameDayDelivery&quot; * &quot;nextDayDelivery&quot; * &quot;customFulfillment1&quot; * &quot;customFulfillment2&quot; * &quot;customFulfillment3&quot; * &quot;customFulfillment4&quot; * &quot;customFulfillment5&quot; * &quot;inventory(place_id,attributes.key)&quot; * numerical_field = * &quot;price&quot; * &quot;discount&quot; * &quot;rating&quot; * &quot;ratingCount&quot; * &quot;attributes.key&quot; * &quot;inventory(place_id,price)&quot; * &quot;inventory(place_id,original_price)&quot; * &quot;inventory(place_id,attributes.key)&quot;
        &quot;orderBy&quot;: &quot;A String&quot;, # The order in which SearchResponse.Facet.values are returned. Allowed values are: * &quot;count desc&quot;, which means order by SearchResponse.Facet.values.count descending. * &quot;value desc&quot;, which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals; FulfillmentInfo.place_ids are sorted in the order given by FacetSpec.FacetKey.restricted_values.
        &quot;prefixes&quot;: [ # Only get facet values that start with the given string prefix. For example, suppose &quot;categories&quot; has three values &quot;Women &gt; Shoe&quot;, &quot;Women &gt; Dress&quot; and &quot;Men &gt; Shoe&quot;. If set &quot;prefixes&quot; to &quot;Women&quot;, the &quot;categories&quot; facet gives only &quot;Women &gt; Shoe&quot; and &quot;Women &gt; Dress&quot;. Only supported on textual fields. Maximum is 10.
          &quot;A String&quot;,
        ],
        &quot;query&quot;: &quot;A String&quot;, # The query that is used to compute facet for the given facet key. When provided, it overrides the default behavior of facet computation. The query syntax is the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Notice that there is no limitation on FacetKey.key when query is specified. In the response, SearchResponse.Facet.values.value is always &quot;1&quot; and SearchResponse.Facet.values.count is the number of results that match the query. For example, you can set a customized facet for &quot;shipToStore&quot;, where FacetKey.key is &quot;customizedShipToStore&quot;, and FacetKey.query is &quot;availability: ANY(\&quot;IN_STOCK\&quot;) AND shipToStore: ANY(\&quot;123\&quot;)&quot;. Then the facet counts the products that are both in stock and ship to store &quot;123&quot;.
        &quot;restrictedValues&quot;: [ # Only get facet for the given restricted values. For example, when using &quot;pickupInStore&quot; as key and set restricted values to [&quot;store123&quot;, &quot;store456&quot;], only facets for &quot;store123&quot; and &quot;store456&quot; are returned. Only supported on predefined textual fields, custom textual attributes and fulfillments. Maximum is 20. Must be set for the fulfillment facet keys: * pickupInStore * shipToStore * sameDayDelivery * nextDayDelivery * customFulfillment1 * customFulfillment2 * customFulfillment3 * customFulfillment4 * customFulfillment5
          &quot;A String&quot;,
        ],
        &quot;returnMinMax&quot;: True or False, # Returns the min and max value for each numerical facet intervals. Ignored for textual facets.
      },
      &quot;limit&quot;: 42, # Maximum of facet values that should be returned for this facet. If unspecified, defaults to 50. The maximum allowed value is 300. Values above 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.
    },
  ],
  &quot;filter&quot;: &quot;A String&quot;, # The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. Filter expression is case-sensitive. For more information, see [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter). If this field is unrecognizable, an INVALID_ARGUMENT is returned.
  &quot;labels&quot;: { # The labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. For more information, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) in the Resource Manager documentation.
    &quot;a_key&quot;: &quot;A String&quot;,
  },
  &quot;languageCode&quot;: &quot;A String&quot;, # Optional. The BCP-47 language code, such as &quot;en-US&quot; or &quot;sr-Latn&quot; [list](https://www.unicode.org/cldr/charts/46/summary/root.html). For more information, see [Standardized codes](https://google.aip.dev/143). This field helps to better interpret the query. If a value isn&#x27;t specified, the query language code is automatically detected, which may not be accurate.
  &quot;offset&quot;: 42, # A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Products deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an INVALID_ARGUMENT is returned.
  &quot;orderBy&quot;: &quot;A String&quot;, # The order in which products are returned. Products can be ordered by a field in an Product object. Leave it unset if ordered by relevance. OrderBy expression is case-sensitive. For more information, see [Order](https://cloud.google.com/retail/docs/filter-and-order#order). If this field is unrecognizable, an INVALID_ARGUMENT is returned.
  &quot;pageCategories&quot;: [ # The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories; To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: &quot;pageCategories&quot; : [&quot;Sales &gt; 2017 Black Friday Deals&quot;].
    &quot;A String&quot;,
  ],
  &quot;pageSize&quot;: 42, # Maximum number of Products to return. If unspecified, defaults to a reasonable value. The maximum allowed value is 120. Values above 120 will be coerced to 120. If this field is negative, an INVALID_ARGUMENT is returned.
  &quot;pageToken&quot;: &quot;A String&quot;, # A page token SearchResponse.next_page_token, received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.
  &quot;personalizationSpec&quot;: { # The specification for personalization. # The specification for personalization. Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set. SearchRequest.personalization_spec will override ServingConfig.personalization_spec.
    &quot;mode&quot;: &quot;A String&quot;, # Defaults to Mode.AUTO.
  },
  &quot;placeId&quot;: &quot;A String&quot;, # Optional. An id corresponding to a place, such as a store id or region id. When specified, we use the price from the local inventory with the matching product&#x27;s LocalInventory.place_id for revenue optimization.
  &quot;query&quot;: &quot;A String&quot;, # Raw search query. If this field is empty, the request is considered a category browsing request and returned results are based on filter and page_categories.
  &quot;queryExpansionSpec&quot;: { # Specification to determine under which conditions query expansion should occur. # The query expansion specification that specifies the conditions under which query expansion occurs. For more information, see [Query expansion](https://cloud.google.com/retail/docs/result-size#query_expansion).
    &quot;condition&quot;: &quot;A String&quot;, # The condition under which query expansion should occur. Default to Condition.DISABLED.
    &quot;pinUnexpandedResults&quot;: True or False, # Whether to pin unexpanded results. The default value is false. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.
  },
  &quot;regionCode&quot;: &quot;A String&quot;, # Optional. The Unicode country/region code (CLDR) of a location, such as &quot;US&quot; and &quot;419&quot; [list](https://www.unicode.org/cldr/charts/46/supplemental/territory_information.html). For more information, see [Standardized codes](https://google.aip.dev/143). If set, then results will be boosted based on the region_code provided.
  &quot;relevanceThreshold&quot;: &quot;A String&quot;, # The relevance threshold of the search results. Defaults to RelevanceThreshold.HIGH, which means only the most relevant results are shown, and the least number of results are returned. For more information, see [Adjust result size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding).
  &quot;searchMode&quot;: &quot;A String&quot;, # The search mode of the search request. If not specified, a single search request triggers both product search and faceted search.
  &quot;spellCorrectionSpec&quot;: { # The specification for query spell correction. # The spell correction specification that specifies the mode under which spell correction will take effect.
    &quot;mode&quot;: &quot;A String&quot;, # The mode under which spell correction should take effect to replace the original search query. Default to Mode.AUTO.
  },
  &quot;tileNavigationSpec&quot;: { # This field specifies tile navigation related parameters. # Optional. This field specifies tile navigation related parameters.
    &quot;appliedTiles&quot;: [ # This optional field specifies the tiles which are already clicked in client side. While the feature works without this field set, particularly for an initial query, it is highly recommended to set this field because it can improve the quality of the search response and removes possible duplicate tiles. NOTE: This field is not being used for filtering search products. Client side should also put all the applied tiles in SearchRequest.filter.
      { # This field specifies the tile information including an attribute key, attribute value. More fields will be added in the future, eg: product id or product counts, etc.
        &quot;productAttributeInterval&quot;: { # Product attribute name and numeric interval. # The product attribute key-numeric interval.
          &quot;interval&quot;: { # A floating point interval. # The numeric interval (e.g. [10, 20))
            &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
            &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
            &quot;maximum&quot;: 3.14, # Inclusive upper bound.
            &quot;minimum&quot;: 3.14, # Inclusive lower bound.
          },
          &quot;name&quot;: &quot;A String&quot;, # The attribute name (e.g. &quot;length&quot;)
        },
        &quot;productAttributeValue&quot;: { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`. # The product attribute key-value.
          &quot;name&quot;: &quot;A String&quot;, # The attribute name.
          &quot;value&quot;: &quot;A String&quot;, # The attribute value.
        },
        &quot;representativeProductId&quot;: &quot;A String&quot;, # The representative product id for this tile.
      },
    ],
    &quot;tileNavigationRequested&quot;: True or False, # This field specifies whether the customer would like to request tile navigation.
  },
  &quot;userAttributes&quot;: { # Optional. The user attributes that could be used for personalization of search results. * Populate at most 100 key-value pairs per query. * Only supports string keys and repeated string values. * Duplicate keys are not allowed within a single query. Example: user_attributes: [ { key: &quot;pets&quot; value { values: &quot;dog&quot; values: &quot;cat&quot; } }, { key: &quot;state&quot; value { values: &quot;CA&quot; } } ]
    &quot;a_key&quot;: { # A list of string values.
      &quot;values&quot;: [ # String values.
        &quot;A String&quot;,
      ],
    },
  },
  &quot;userInfo&quot;: { # Information of an end user. # User information.
    &quot;directUserRequest&quot;: True or False, # True if the request is made directly from the end user, in which case the ip_address and user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.
    &quot;ipAddress&quot;: &quot;A String&quot;, # The end user&#x27;s IP address. This field is used to extract location information for personalization. This field must be either an IPv4 address (e.g. &quot;104.133.9.80&quot;) or an IPv6 address (e.g. &quot;2001:0db8:85a3:0000:0000:8a2e:0370:7334&quot;). Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when: * setting SearchRequest.user_info. * using the JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.
    &quot;userAgent&quot;: &quot;A String&quot;, # User agent as included in the HTTP header. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.
    &quot;userId&quot;: &quot;A String&quot;, # Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don&#x27;t set for anonymous users. Always use a hashed value for this ID. Don&#x27;t set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
  },
  &quot;variantRollupKeys&quot;: [ # The keys to fetch and rollup the matching variant Products attributes, FulfillmentInfo or LocalInventorys attributes. The attributes from all the matching variant Products or LocalInventorys are merged and de-duplicated. Notice that rollup attributes will lead to extra query latency. Maximum number of keys is 30. For FulfillmentInfo, a fulfillment type and a fulfillment ID must be provided in the format of &quot;fulfillmentType.fulfillmentId&quot;. E.g., in &quot;pickupInStore.store123&quot;, &quot;pickupInStore&quot; is fulfillment type and &quot;store123&quot; is the store ID. Supported keys are: * colorFamilies * price * originalPrice * discount * variantId * inventory(place_id,price) * inventory(place_id,original_price) * inventory(place_id,attributes.key), where key is any key in the Product.local_inventories.attributes map. * attributes.key, where key is any key in the Product.attributes map. * pickupInStore.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type &quot;pickup-in-store&quot;. * shipToStore.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type &quot;ship-to-store&quot;. * sameDayDelivery.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type &quot;same-day-delivery&quot;. * nextDayDelivery.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type &quot;next-day-delivery&quot;. * customFulfillment1.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type &quot;custom-type-1&quot;. * customFulfillment2.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type &quot;custom-type-2&quot;. * customFulfillment3.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type &quot;custom-type-3&quot;. * customFulfillment4.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type &quot;custom-type-4&quot;. * customFulfillment5.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type &quot;custom-type-5&quot;. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
    &quot;A String&quot;,
  ],
  &quot;visitorId&quot;: &quot;A String&quot;, # Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This should be the same identifier as UserEvent.visitor_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for SearchService.Search method.
  &quot;appliedControls&quot;: [ # The fully qualified resource name of applied [controls](https://cloud.google.com/retail/docs/serving-control-rules).
    &quot;A String&quot;,
  ],
  &quot;attributionToken&quot;: &quot;A String&quot;, # A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.
  &quot;conversationalSearchResult&quot;: { # This field specifies all related information that is needed on client side for UI rendering of conversational retail search. # This field specifies all related information that is needed on client side for UI rendering of conversational retail search.
    &quot;additionalFilter&quot;: { # Additional filter that client side need to apply. # This is the incremental additional filters implied from the current user answer. User should add the suggested addition filters to the previous SearchRequest.filter, and use the merged filter in the follow up search request.
      &quot;productAttributeValue&quot;: { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`. # Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future.
        &quot;name&quot;: &quot;A String&quot;, # The attribute name.
        &quot;value&quot;: &quot;A String&quot;, # The attribute value.
      },
    },
    &quot;additionalFilters&quot;: [ # This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field `additional_filter`.
      { # Additional filter that client side need to apply.
        &quot;productAttributeValue&quot;: { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`. # Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future.
          &quot;name&quot;: &quot;A String&quot;, # The attribute name.
          &quot;value&quot;: &quot;A String&quot;, # The attribute value.
        },
      },
    ],
    &quot;conversationId&quot;: &quot;A String&quot;, # Conversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request&#x27;s SearchRequest.ConversationalSearchSpec.conversation_id to restore conversation state in server.
    &quot;followupQuestion&quot;: &quot;A String&quot;, # The follow-up question. e.g., `What is the color?`
    &quot;refinedQuery&quot;: &quot;A String&quot;, # The current refined query for the conversational search. This field will be used in customer UI that the query in the search bar should be replaced with the refined query. For example, if SearchRequest.query is `dress` and next SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer is `red color`, which does not match any product attribute value filters, the refined query will be `dress, red color`.
    &quot;suggestedAnswers&quot;: [ # The answer options provided to client for the follow-up question.
      { # Suggested answers to the follow-up question.
        &quot;productAttributeValue&quot;: { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`. # Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future.
          &quot;name&quot;: &quot;A String&quot;, # The attribute name.
          &quot;value&quot;: &quot;A String&quot;, # The attribute value.
        },
      },
    ],
  },
  &quot;correctedQuery&quot;: &quot;A String&quot;, # Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.
  &quot;experimentInfo&quot;: [ # Metadata related to A/B testing experiment associated with this response. Only exists when an experiment is triggered.
    { # Metadata for active A/B testing experiment.
      &quot;experiment&quot;: &quot;A String&quot;, # The fully qualified resource name of the experiment that provides the serving config under test, should an active experiment exist. For example: `projects/*/locations/global/catalogs/default_catalog/experiments/experiment_id`
      &quot;servingConfigExperiment&quot;: { # Metadata for active serving config A/B tests. # A/B test between existing Cloud Retail Search ServingConfigs.
        &quot;experimentServingConfig&quot;: &quot;A String&quot;, # The fully qualified resource name of the serving config `Experiment.VariantArm.serving_config_id` responsible for generating the search response. For example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.
        &quot;originalServingConfig&quot;: &quot;A String&quot;, # The fully qualified resource name of the original SearchRequest.placement in the search request prior to reassignment by experiment API. For example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.
      },
    },
  ],
  &quot;facets&quot;: [ # Results of facets requested by user.
    { # A facet result.
      &quot;dynamicFacet&quot;: True or False, # Whether the facet is dynamically generated.
      &quot;key&quot;: &quot;A String&quot;, # The key for this facet. E.g., &quot;colorFamilies&quot; or &quot;price&quot; or &quot;attributes.attr1&quot;.
      &quot;values&quot;: [ # The facet values for this field.
        { # A facet value which contains value names and their count.
          &quot;count&quot;: &quot;A String&quot;, # Number of items that have this facet value.
          &quot;interval&quot;: { # A floating point interval. # Interval value for a facet, such as [10, 20) for facet &quot;price&quot;.
            &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
            &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
            &quot;maximum&quot;: 3.14, # Inclusive upper bound.
            &quot;minimum&quot;: 3.14, # Inclusive lower bound.
          },
          &quot;maxValue&quot;: 3.14, # The maximum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.
          &quot;minValue&quot;: 3.14, # The minimum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.
          &quot;value&quot;: &quot;A String&quot;, # Text value of a facet, such as &quot;Black&quot; for facet &quot;colorFamilies&quot;.
        },
      ],
    },
  ],
  &quot;invalidConditionBoostSpecs&quot;: [ # The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.
    { # Boost applies to products which match a condition.
      &quot;boost&quot;: 3.14, # Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.
      &quot;condition&quot;: &quot;A String&quot;, # An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost products with product ID &quot;product_1&quot; or &quot;product_2&quot;, and color &quot;Red&quot; or &quot;Blue&quot;: * (id: ANY(&quot;product_1&quot;, &quot;product_2&quot;)) AND (colorFamilies: ANY(&quot;Red&quot;,&quot;Blue&quot;))
    },
  ],
  &quot;nextPageToken&quot;: &quot;A String&quot;, # A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.
  &quot;pinControlMetadata&quot;: { # Metadata for pinning to be returned in the response. This is used for distinguishing between applied vs dropped pins. # Metadata for pin controls which were applicable to the request. This contains two map fields, one for all matched pins and one for pins which were matched but not applied. The two maps are keyed by pin position, and the values are the product ids which were matched to that pin.
    &quot;allMatchedPins&quot;: { # Map of all matched pins, keyed by pin position.
      &quot;a_key&quot;: { # List of product ids which have associated pins.
        &quot;productId&quot;: [ # List of product ids which have associated pins.
          &quot;A String&quot;,
        ],
      },
    },
    &quot;droppedPins&quot;: { # Map of pins that were dropped due to overlap with other matching pins, keyed by pin position.
      &quot;a_key&quot;: { # List of product ids which have associated pins.
        &quot;productId&quot;: [ # List of product ids which have associated pins.
          &quot;A String&quot;,
        ],
      },
    },
  },
  &quot;queryExpansionInfo&quot;: { # Information describing query expansion including whether expansion has occurred. # Query expansion information for the returned results.
    &quot;expandedQuery&quot;: True or False, # Bool describing whether query expansion has occurred.
    &quot;pinnedResultCount&quot;: &quot;A String&quot;, # Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true.
  },
  &quot;redirectUri&quot;: &quot;A String&quot;, # The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.
  &quot;results&quot;: [ # A list of matched items. The order represents the ranking.
    { # Represents the search results.
      &quot;id&quot;: &quot;A String&quot;, # Product.id of the searched Product.
      &quot;matchingVariantCount&quot;: 42, # The count of matched variant Products.
      &quot;matchingVariantFields&quot;: { # If a variant Product matches the search query, this map indicates which Product fields are matched. The key is the Product.name, the value is a field mask of the matched Product fields. If matched attributes cannot be determined, this map will be empty. For example, a key &quot;sku1&quot; with field mask &quot;products.color_info&quot; indicates there is a match between &quot;sku1&quot; ColorInfo and the query.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;modelScores&quot;: { # Google provided available scores.
        &quot;a_key&quot;: { # A message with a list of double values.
          &quot;values&quot;: [ # The list of double values.
            3.14,
          ],
        },
      },
      &quot;personalLabels&quot;: [ # Specifies previous events related to this product for this user based on UserEvent with same SearchRequest.visitor_id or UserInfo.user_id. This is set only when SearchRequest.PersonalizationSpec.mode is SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * `purchased`: Indicates that this product has been purchased before.
        &quot;A String&quot;,
      ],
      &quot;product&quot;: { # Product captures all metadata information of items to be recommended or searched. # The product data snippet in the search response. Only Product.name is guaranteed to be populated. Product.variants contains the product variants that match the search query. If there are multiple product variants matching the query, top 5 most relevant product variants are returned and ordered by relevancy. If relevancy can be deternmined, use matching_variant_fields to look up matched product variants fields. If relevancy cannot be determined, e.g. when searching &quot;shoe&quot; all products in a shoe product can be a match, 5 product variants are returned but order is meaningless.
        &quot;attributes&quot;: { # Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ &quot;vendor&quot;: {&quot;text&quot;: [&quot;vendor123&quot;, &quot;vendor456&quot;]}, &quot;lengths_cm&quot;: {&quot;numbers&quot;:[2.3, 15.4]}, &quot;heights_cm&quot;: {&quot;numbers&quot;:[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.
          &quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
            &quot;indexable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
            &quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
              3.14,
            ],
            &quot;searchable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
            &quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
              &quot;A String&quot;,
            ],
          },
        },
        &quot;audience&quot;: { # An intended audience of the Product for whom it&#x27;s sold. # The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product.
          &quot;ageGroups&quot;: [ # The age groups of the audience. Strongly encouraged to use the standard values: &quot;newborn&quot; (up to 3 months old), &quot;infant&quot; (3–12 months old), &quot;toddler&quot; (1–5 years old), &quot;kids&quot; (5–13 years old), &quot;adult&quot; (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
            &quot;A String&quot;,
          ],
          &quot;genders&quot;: [ # The genders of the audience. Strongly encouraged to use the standard values: &quot;male&quot;, &quot;female&quot;, &quot;unisex&quot;. At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).
            &quot;A String&quot;,
          ],
        },
        &quot;availability&quot;: &quot;A String&quot;, # The online availability of the Product. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered &quot;in stock&quot; as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).
        &quot;availableQuantity&quot;: 42, # The available quantity of the item.
        &quot;availableTime&quot;: &quot;A String&quot;, # The timestamp when this Product becomes available for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.
        &quot;brands&quot;: [ # The brands of the product. A maximum of 30 brands are allowed unless overridden through the Google Cloud console. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).
          &quot;A String&quot;,
        ],
        &quot;categories&quot;: [ # Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use &#x27;&gt;&#x27; sign to separate different hierarchies. If &#x27;&gt;&#x27; is part of the category name, replace it with other character(s). For example, if a shoes product belongs to both [&quot;Shoes &amp; Accessories&quot; -&gt; &quot;Shoes&quot;] and [&quot;Sports &amp; Fitness&quot; -&gt; &quot;Athletic Clothing&quot; -&gt; &quot;Shoes&quot;], it could be represented as: &quot;categories&quot;: [ &quot;Shoes &amp; Accessories &gt; Shoes&quot;, &quot;Sports &amp; Fitness &gt; Athletic Clothing &gt; Shoes&quot; ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product unless overridden through the Google Cloud console. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436
          &quot;A String&quot;,
        ],
        &quot;collectionMemberIds&quot;: [ # The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.
          &quot;A String&quot;,
        ],
        &quot;colorInfo&quot;: { # The color information of a Product. # The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
          &quot;colorFamilies&quot;: [ # The standard color families. Strongly recommended to use the following standard color groups: &quot;Red&quot;, &quot;Pink&quot;, &quot;Orange&quot;, &quot;Yellow&quot;, &quot;Purple&quot;, &quot;Green&quot;, &quot;Cyan&quot;, &quot;Blue&quot;, &quot;Brown&quot;, &quot;White&quot;, &quot;Gray&quot;, &quot;Black&quot; and &quot;Mixed&quot;. Normally it is expected to have only 1 color family. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color). The colorFamilies field as a system attribute is not a required field but strongly recommended to be specified. Google Search models treat this field as more important than a custom product attribute when specified.
            &quot;A String&quot;,
          ],
          &quot;colors&quot;: [ # The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single &quot;Mixed&quot; instead of multiple values. A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).
            &quot;A String&quot;,
          ],
        },
        &quot;conditions&quot;: [ # The condition of the product. Strongly encouraged to use the standard values: &quot;new&quot;, &quot;refurbished&quot;, &quot;used&quot;. A maximum of 1 value is allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).
          &quot;A String&quot;,
        ],
        &quot;description&quot;: &quot;A String&quot;, # Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).
        &quot;expireTime&quot;: &quot;A String&quot;, # Note that this field is applied in the following ways: * If the Product is already expired when it is uploaded, this product is not indexed for search. * If the Product is not expired when it is uploaded, only the Type.PRIMARY&#x27;s and Type.COLLECTION&#x27;s expireTime is respected, and Type.VARIANT&#x27;s expireTime is not used. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).
        &quot;fulfillmentInfo&quot;: [ # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.
          { # Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.
            &quot;placeIds&quot;: [ # The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as &quot;store1&quot; or &quot;REGION-2&quot;. Otherwise, an INVALID_ARGUMENT error is returned.
              &quot;A String&quot;,
            ],
            &quot;type&quot;: &quot;A String&quot;, # The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.
          },
        ],
        &quot;gtin&quot;: &quot;A String&quot;, # The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.
        &quot;id&quot;: &quot;A String&quot;, # Immutable. Product identifier, which is the final component of name. For example, this field is &quot;id_1&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).
        &quot;images&quot;: [ # Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
          { # Product image. Recommendations AI and Retail Search use product images to improve prediction and search results. Product images can be returned in results, and are shown in prediction or search previews in the console. Please try to provide correct product images and avoid using images with size too small.
            &quot;height&quot;: 42, # Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
            &quot;uri&quot;: &quot;A String&quot;, # Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).
            &quot;width&quot;: 42, # Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
          },
        ],
        &quot;languageCode&quot;: &quot;A String&quot;, # Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to &quot;en-US&quot; if unset.
        &quot;localInventories&quot;: [ # Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.
          { # The inventory information at a place (e.g. a store) identified by a place ID.
            &quot;attributes&quot;: { # Optional. Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.
              &quot;a_key&quot;: { # A custom attribute that is not explicitly modeled in Product.
                &quot;indexable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.
                &quot;numbers&quot;: [ # The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is &quot;lengths_cm&quot;. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
                  3.14,
                ],
                &quot;searchable&quot;: True or False, # This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated &#x27;PRODUCT_LEVEL_ATTRIBUTE_CONFIG&#x27; mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
                &quot;text&quot;: [ # The textual values of this custom attribute. For example, `[&quot;yellow&quot;, &quot;green&quot;]` when the key is &quot;color&quot;. Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.
                  &quot;A String&quot;,
                ],
              },
            },
            &quot;availability&quot;: &quot;A String&quot;, # Optional. The availability of the Product at this place_id. Default to Availability.IN_STOCK. For primary products with variants set the availability of the primary as Availability.OUT_OF_STOCK and set the true availability at the variant level. This way the primary product will be considered &quot;in stock&quot; as long as it has at least one variant in stock. For primary products with no variants set the true availability at the primary level. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability). This field is currently only used by the Recommendations API. For Search, please make use of fulfillment_types or custom attributes for similar behaviour. See [here]( https://cloud.google.com/retail/docs/local-inventory-updates#local-inventory-update-methods) for more details.
            &quot;fulfillmentTypes&quot;: [ # Optional. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * &quot;pickup-in-store&quot; * &quot;ship-to-store&quot; * &quot;same-day-delivery&quot; * &quot;next-day-delivery&quot; * &quot;custom-type-1&quot; * &quot;custom-type-2&quot; * &quot;custom-type-3&quot; * &quot;custom-type-4&quot; * &quot;custom-type-5&quot; If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.
              &quot;A String&quot;,
            ],
            &quot;placeId&quot;: &quot;A String&quot;, # Optional. The place ID for the current set of inventory information.
            &quot;priceInfo&quot;: { # The price information of a Product. # Optional. Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
              &quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
              &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
              &quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.
              &quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
              &quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
              &quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
              &quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
                &quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
                  &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
                  &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
                  &quot;maximum&quot;: 3.14, # Inclusive upper bound.
                  &quot;minimum&quot;: 3.14, # Inclusive lower bound.
                },
                &quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
                  &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
                  &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
                  &quot;maximum&quot;: 3.14, # Inclusive upper bound.
                  &quot;minimum&quot;: 3.14, # Inclusive lower bound.
                },
              },
            },
          },
        ],
        &quot;materials&quot;: [ # The material of the product. For example, &quot;leather&quot;, &quot;wooden&quot;. A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).
          &quot;A String&quot;,
        ],
        &quot;name&quot;: &quot;A String&quot;, # Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.
        &quot;patterns&quot;: [ # The pattern or graphic print of the product. For example, &quot;striped&quot;, &quot;polka dot&quot;, &quot;paisley&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).
          &quot;A String&quot;,
        ],
        &quot;priceInfo&quot;: { # The price information of a Product. # Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371).
          &quot;cost&quot;: 3.14, # The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
          &quot;currencyCode&quot;: &quot;A String&quot;, # The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.
          &quot;originalPrice&quot;: 3.14, # Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.
          &quot;price&quot;: 3.14, # Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).
          &quot;priceEffectiveTime&quot;: &quot;A String&quot;, # The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.
          &quot;priceExpireTime&quot;: &quot;A String&quot;, # The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.
          &quot;priceRange&quot;: { # The price range of all variant Product having the same Product.primary_product_id. # Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
            &quot;originalPrice&quot;: { # A floating point interval. # The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id.
              &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
              &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
              &quot;maximum&quot;: 3.14, # Inclusive upper bound.
              &quot;minimum&quot;: 3.14, # Inclusive lower bound.
            },
            &quot;price&quot;: { # A floating point interval. # The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id.
              &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
              &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
              &quot;maximum&quot;: 3.14, # Inclusive upper bound.
              &quot;minimum&quot;: 3.14, # Inclusive lower bound.
            },
          },
        },
        &quot;primaryProductId&quot;: &quot;A String&quot;, # Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).
        &quot;promotions&quot;: [ # The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.
          { # Promotion specification.
            &quot;promotionId&quot;: &quot;A String&quot;, # Promotion identifier, which is the final component of name. For example, this field is &quot;free_gift&quot;, if name is `projects/*/locations/global/catalogs/default_catalog/promotions/free_gift`. The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to Google Merchant Center property [promotion_id](https://support.google.com/merchants/answer/7050148).
          },
        ],
        &quot;publishTime&quot;: &quot;A String&quot;, # The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.
        &quot;rating&quot;: { # The rating of a Product. # The rating of this product.
          &quot;averageRating&quot;: 3.14, # The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.
          &quot;ratingCount&quot;: 42, # The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.
          &quot;ratingHistogram&quot;: [ # List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.
            42,
          ],
        },
        &quot;retrievableFields&quot;: &quot;A String&quot;, # Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form &quot;attributes.key&quot; where &quot;key&quot; is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info Note: Returning more fields in SearchResponse can increase response payload size and serving latency. This field is deprecated. Use the retrievable site-wide control instead.
        &quot;sizes&quot;: [ # The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in &quot;US:MENS:M&quot;, &quot;US&quot; represents size system; &quot;MENS&quot; represents size type; &quot;M&quot; represents size value. In &quot;GIRLS:27&quot;, size system is empty; &quot;GIRLS&quot; represents size type; &quot;27&quot; represents size value. In &quot;32 inches&quot;, both size system and size type are empty, while size value is &quot;32 inches&quot;. A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).
          &quot;A String&quot;,
        ],
        &quot;tags&quot;: [ # Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0–4](https://support.google.com/merchants/answer/6324473).
          &quot;A String&quot;,
        ],
        &quot;title&quot;: &quot;A String&quot;, # Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).
        &quot;ttl&quot;: &quot;A String&quot;, # Input only. The TTL (time to live) of the product. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.
        &quot;type&quot;: &quot;A String&quot;, # Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.
        &quot;uri&quot;: &quot;A String&quot;, # Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).
        &quot;variants&quot;: [ # Output only. Product variants grouped together on primary product which share similar product attributes. It&#x27;s automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.
          # Object with schema name: GoogleCloudRetailV2alphaProduct
        ],
      },
      &quot;variantRollupValues&quot;: { # The rollup matching variant Product attributes. The key is one of the SearchRequest.variant_rollup_keys. The values are the merged and de-duplicated Product attributes. Notice that the rollup values are respect filter. For example, when filtering by &quot;colorFamilies:ANY(\&quot;red\&quot;)&quot; and rollup &quot;colorFamilies&quot;, only &quot;red&quot; is returned. For textual and numerical attributes, the rollup values is a list of string or double values with type google.protobuf.ListValue. For example, if there are two variants with colors &quot;red&quot; and &quot;blue&quot;, the rollup values are { key: &quot;colorFamilies&quot; value { list_value { values { string_value: &quot;red&quot; } values { string_value: &quot;blue&quot; } } } } For FulfillmentInfo, the rollup values is a double value with type google.protobuf.Value. For example, `{key: &quot;pickupInStore.store1&quot; value { number_value: 10 }}` means a there are 10 variants in this product are available in the store &quot;store1&quot;.
        &quot;a_key&quot;: &quot;&quot;,
      },
    },
  ],
  &quot;tileNavigationResult&quot;: { # This field specifies all related information for tile navigation that will be used in client side. # This field specifies all related information for tile navigation that will be used in client side.
    &quot;tiles&quot;: [ # The current tiles that are used for tile navigation, sorted by engagement.
      { # This field specifies the tile information including an attribute key, attribute value. More fields will be added in the future, eg: product id or product counts, etc.
        &quot;productAttributeInterval&quot;: { # Product attribute name and numeric interval. # The product attribute key-numeric interval.
          &quot;interval&quot;: { # A floating point interval. # The numeric interval (e.g. [10, 20))
            &quot;exclusiveMaximum&quot;: 3.14, # Exclusive upper bound.
            &quot;exclusiveMinimum&quot;: 3.14, # Exclusive lower bound.
            &quot;maximum&quot;: 3.14, # Inclusive upper bound.
            &quot;minimum&quot;: 3.14, # Inclusive lower bound.
          },
          &quot;name&quot;: &quot;A String&quot;, # The attribute name (e.g. &quot;length&quot;)
        },
        &quot;productAttributeValue&quot;: { # Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`. # The product attribute key-value.
          &quot;name&quot;: &quot;A String&quot;, # The attribute name.
          &quot;value&quot;: &quot;A String&quot;, # The attribute value.
        },
        &quot;representativeProductId&quot;: &quot;A String&quot;, # The representative product id for this tile.
      },
    ],
  },
  &quot;totalSize&quot;: 42, # The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.
}</pre>
</div>

<div class="method">
    <code class="details" id="search_next">search_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

</body></html>