google-cloud-retail-v2 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +8 -8
  3. data/LICENSE.md +188 -190
  4. data/README.md +3 -3
  5. data/lib/google/cloud/retail/v2.rb +2 -0
  6. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -0
  7. data/lib/google/cloud/retail/v2/catalog_service/client.rb +211 -15
  8. data/lib/google/cloud/retail/v2/catalog_service/paths.rb +21 -0
  9. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +16 -0
  10. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +46 -0
  11. data/lib/google/cloud/retail/v2/common_pb.rb +46 -0
  12. data/lib/google/cloud/retail/v2/completion_service.rb +54 -0
  13. data/lib/google/cloud/retail/v2/completion_service/client.rb +546 -0
  14. data/lib/google/cloud/retail/v2/completion_service/credentials.rb +51 -0
  15. data/lib/google/cloud/retail/v2/completion_service/operations.rb +655 -0
  16. data/lib/google/cloud/retail/v2/completion_service/paths.rb +52 -0
  17. data/lib/google/cloud/retail/v2/completion_service_pb.rb +50 -0
  18. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +61 -0
  19. data/lib/google/cloud/retail/v2/import_config_pb.rb +32 -0
  20. data/lib/google/cloud/retail/v2/prediction_service/client.rb +41 -43
  21. data/lib/google/cloud/retail/v2/product_pb.rb +21 -0
  22. data/lib/google/cloud/retail/v2/product_service/client.rb +643 -18
  23. data/lib/google/cloud/retail/v2/product_service/operations.rb +11 -11
  24. data/lib/google/cloud/retail/v2/product_service_pb.rb +56 -0
  25. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +75 -0
  26. data/lib/google/cloud/retail/v2/search_service.rb +53 -0
  27. data/lib/google/cloud/retail/v2/search_service/client.rb +541 -0
  28. data/lib/google/cloud/retail/v2/search_service/credentials.rb +51 -0
  29. data/lib/google/cloud/retail/v2/search_service/paths.rb +54 -0
  30. data/lib/google/cloud/retail/v2/search_service_pb.rb +131 -0
  31. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +53 -0
  32. data/lib/google/cloud/retail/v2/user_event_pb.rb +11 -0
  33. data/lib/google/cloud/retail/v2/user_event_service/client.rb +12 -15
  34. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +11 -11
  35. data/lib/google/cloud/retail/v2/user_event_service/paths.rb +19 -0
  36. data/lib/google/cloud/retail/v2/version.rb +1 -1
  37. data/proto_docs/google/api/field_behavior.rb +7 -1
  38. data/proto_docs/google/api/httpbody.rb +4 -3
  39. data/proto_docs/google/cloud/retail/v2/catalog.rb +6 -6
  40. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +53 -4
  41. data/proto_docs/google/cloud/retail/v2/common.rb +272 -4
  42. data/proto_docs/google/cloud/retail/v2/completion_service.rb +162 -0
  43. data/proto_docs/google/cloud/retail/v2/import_config.rb +122 -6
  44. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +32 -31
  45. data/proto_docs/google/cloud/retail/v2/product.rb +266 -10
  46. data/proto_docs/google/cloud/retail/v2/product_service.rb +362 -2
  47. data/proto_docs/google/cloud/retail/v2/purge_config.rb +1 -1
  48. data/proto_docs/google/cloud/retail/v2/search_service.rb +820 -0
  49. data/proto_docs/google/cloud/retail/v2/user_event.rb +95 -3
  50. data/proto_docs/google/type/date.rb +53 -0
  51. metadata +32 -10
@@ -24,6 +24,25 @@ module Google
24
24
  module UserEventService
25
25
  # Path helper methods for the UserEventService API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified Catalog resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}/catalogs/{catalog}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ # @param catalog [String]
37
+ #
38
+ # @return [::String]
39
+ def catalog_path project:, location:, catalog:
40
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
41
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
42
+
43
+ "projects/#{project}/locations/#{location}/catalogs/#{catalog}"
44
+ end
45
+
27
46
  ##
28
47
  # Create a fully-qualified Product resource string.
29
48
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
- VERSION = "0.2.0"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -43,7 +43,8 @@ module Google
43
43
  #
44
44
  # service ResourceService {
45
45
  # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
46
- # rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty);
46
+ # rpc UpdateResource(google.api.HttpBody) returns
47
+ # (google.protobuf.Empty);
47
48
  # }
48
49
  #
49
50
  # Example with streaming methods:
@@ -59,10 +60,10 @@ module Google
59
60
  # handled, all other features will continue to work unchanged.
60
61
  # @!attribute [rw] content_type
61
62
  # @return [::String]
62
- # The HTTP Content-Type string representing the content type of the body.
63
+ # The HTTP Content-Type header value specifying the content type of the body.
63
64
  # @!attribute [rw] data
64
65
  # @return [::String]
65
- # HTTP body binary data.
66
+ # The HTTP request/response body as raw binary.
66
67
  # @!attribute [rw] extensions
67
68
  # @return [::Array<::Google::Protobuf::Any>]
68
69
  # Application specific response metadata. Must be set in the first response
@@ -48,9 +48,9 @@ module Google
48
48
  # {::Google::Cloud::Retail::V2::ProductLevelConfig#merchant_center_product_id_field merchant_center_product_id_field}
49
49
  # is `itemGroupId`, an INVALID_ARGUMENT error is returned.
50
50
  #
51
- # See [Using catalog
52
- # levels](/retail/recommendations-ai/docs/catalog#catalog-levels) for more
53
- # details.
51
+ # See [Using product
52
+ # levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels)
53
+ # for more details.
54
54
  # @!attribute [rw] merchant_center_product_id_field
55
55
  # @return [::String]
56
56
  # Which field of [Merchant Center
@@ -70,9 +70,9 @@ module Google
70
70
  # {::Google::Cloud::Retail::V2::ProductLevelConfig#ingestion_product_type ingestion_product_type}
71
71
  # is `variant`, an INVALID_ARGUMENT error is returned.
72
72
  #
73
- # See [Using catalog
74
- # levels](/retail/recommendations-ai/docs/catalog#catalog-levels) for more
75
- # details.
73
+ # See [Using product
74
+ # levels](https://cloud.google.com/retail/recommendations-ai/docs/catalog#product-levels)
75
+ # for more details.
76
76
  class ProductLevelConfig
77
77
  include ::Google::Protobuf::MessageExts
78
78
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -89,10 +89,7 @@ module Google
89
89
  # @!attribute [rw] update_mask
90
90
  # @return [::Google::Protobuf::FieldMask]
91
91
  # Indicates which fields in the provided
92
- # {::Google::Cloud::Retail::V2::Catalog Catalog} to update. If not set, will only
93
- # update the
94
- # {::Google::Cloud::Retail::V2::Catalog#product_level_config Catalog.product_level_config}
95
- # field, which is also the only currently supported field to update.
92
+ # {::Google::Cloud::Retail::V2::Catalog Catalog} to update.
96
93
  #
97
94
  # If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
98
95
  # is returned.
@@ -100,6 +97,58 @@ module Google
100
97
  include ::Google::Protobuf::MessageExts
101
98
  extend ::Google::Protobuf::MessageExts::ClassMethods
102
99
  end
100
+
101
+ # Request message to set a specified branch as new default_branch.
102
+ # @!attribute [rw] catalog
103
+ # @return [::String]
104
+ # Full resource name of the catalog, such as
105
+ # `projects/*/locations/global/catalogs/default_catalog`.
106
+ # @!attribute [rw] branch_id
107
+ # @return [::String]
108
+ # The final component of the resource name of a branch.
109
+ #
110
+ # This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT
111
+ # error is returned.
112
+ # @!attribute [rw] note
113
+ # @return [::String]
114
+ # Some note on this request, this can be retrieved by
115
+ # {::Google::Cloud::Retail::V2::CatalogService::Client#get_default_branch CatalogService.GetDefaultBranch}
116
+ # before next valid default branch set occurs.
117
+ #
118
+ # This field must be a UTF-8 encoded string with a length limit of 1,000
119
+ # characters. Otherwise, an INVALID_ARGUMENT error is returned.
120
+ class SetDefaultBranchRequest
121
+ include ::Google::Protobuf::MessageExts
122
+ extend ::Google::Protobuf::MessageExts::ClassMethods
123
+ end
124
+
125
+ # Request message to show which branch is currently the default branch.
126
+ # @!attribute [rw] catalog
127
+ # @return [::String]
128
+ # The parent catalog resource name, such as
129
+ # `projects/*/locations/global/catalogs/default_catalog`.
130
+ class GetDefaultBranchRequest
131
+ include ::Google::Protobuf::MessageExts
132
+ extend ::Google::Protobuf::MessageExts::ClassMethods
133
+ end
134
+
135
+ # Response message of
136
+ # {::Google::Cloud::Retail::V2::CatalogService::Client#get_default_branch CatalogService.GetDefaultBranch}.
137
+ # @!attribute [rw] branch
138
+ # @return [::String]
139
+ # Full resource name of the branch id currently set as default branch.
140
+ # @!attribute [rw] set_time
141
+ # @return [::Google::Protobuf::Timestamp]
142
+ # The time when this branch is set to default.
143
+ # @!attribute [rw] note
144
+ # @return [::String]
145
+ # This corresponds to
146
+ # {::Google::Cloud::Retail::V2::SetDefaultBranchRequest#note SetDefaultBranchRequest.note}
147
+ # field, when this branch was set as default.
148
+ class GetDefaultBranchResponse
149
+ include ::Google::Protobuf::MessageExts
150
+ extend ::Google::Protobuf::MessageExts::ClassMethods
151
+ end
103
152
  end
104
153
  end
105
154
  end
@@ -21,8 +21,79 @@ module Google
21
21
  module Cloud
22
22
  module Retail
23
23
  module V2
24
+ # An intended audience of the {::Google::Cloud::Retail::V2::Product Product} for
25
+ # whom it's sold.
26
+ # @!attribute [rw] genders
27
+ # @return [::Array<::String>]
28
+ # The genders of the audience. Strongly encouraged to use the standard
29
+ # values: "male", "female", "unisex".
30
+ #
31
+ # At most 5 values are allowed. Each value must be a UTF-8 encoded string
32
+ # with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error
33
+ # is returned.
34
+ #
35
+ # Google Merchant Center property
36
+ # [gender](https://support.google.com/merchants/answer/6324479). Schema.org
37
+ # property
38
+ # [Product.audience.suggestedGender](https://schema.org/suggestedGender).
39
+ # @!attribute [rw] age_groups
40
+ # @return [::Array<::String>]
41
+ # The age groups of the audience. Strongly encouraged to use the standard
42
+ # values: "newborn" (up to 3 months old), "infant" (3–12 months old),
43
+ # "toddler" (1–5 years old), "kids" (5–13 years old), "adult" (typically
44
+ # teens or older).
45
+ #
46
+ # At most 5 values are allowed. Each value must be a UTF-8 encoded string
47
+ # with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error
48
+ # is returned.
49
+ #
50
+ # Google Merchant Center property
51
+ # [age_group](https://support.google.com/merchants/answer/6324463).
52
+ # Schema.org property
53
+ # [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and
54
+ # [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).
55
+ class Audience
56
+ include ::Google::Protobuf::MessageExts
57
+ extend ::Google::Protobuf::MessageExts::ClassMethods
58
+ end
59
+
60
+ # The color information of a {::Google::Cloud::Retail::V2::Product Product}.
61
+ # @!attribute [rw] color_families
62
+ # @return [::Array<::String>]
63
+ # The standard color families. Strongly recommended to use the following
64
+ # standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple",
65
+ # "Green", "Cyan", "Blue", "Brown", "White", "Gray", "Black" and
66
+ # "Mixed". Normally it is expected to have only 1 color family. May consider
67
+ # using single "Mixed" instead of multiple values.
68
+ #
69
+ # A maximum of 5 values are allowed. Each value must be a UTF-8 encoded
70
+ # string with a length limit of 128 characters. Otherwise, an
71
+ # INVALID_ARGUMENT error is returned.
72
+ #
73
+ # Google Merchant Center property
74
+ # [color](https://support.google.com/merchants/answer/6324487). Schema.org
75
+ # property [Product.color](https://schema.org/color).
76
+ # @!attribute [rw] colors
77
+ # @return [::Array<::String>]
78
+ # The color display names, which may be different from standard color family
79
+ # names, such as the color aliases used in the website frontend. Normally
80
+ # it is expected to have only 1 color. May consider using single "Mixed"
81
+ # instead of multiple values.
82
+ #
83
+ # A maximum of 5 colors are allowed. Each value must be a UTF-8 encoded
84
+ # string with a length limit of 128 characters. Otherwise, an
85
+ # INVALID_ARGUMENT error is returned.
86
+ #
87
+ # Google Merchant Center property
88
+ # [color](https://support.google.com/merchants/answer/6324487). Schema.org
89
+ # property [Product.color](https://schema.org/color).
90
+ class ColorInfo
91
+ include ::Google::Protobuf::MessageExts
92
+ extend ::Google::Protobuf::MessageExts::ClassMethods
93
+ end
94
+
24
95
  # A custom attribute that is not explicitly modeled in
25
- # {::Google::Cloud::Retail::V2::Product Product}].
96
+ # {::Google::Cloud::Retail::V2::Product Product}.
26
97
  # @!attribute [rw] text
27
98
  # @return [::Array<::String>]
28
99
  # The textual values of this custom attribute. For example, `["yellow",
@@ -46,11 +117,71 @@ module Google
46
117
  # Exactly one of {::Google::Cloud::Retail::V2::CustomAttribute#text text} or
47
118
  # {::Google::Cloud::Retail::V2::CustomAttribute#numbers numbers} should be set.
48
119
  # Otherwise, an INVALID_ARGUMENT error is returned.
120
+ # @!attribute [rw] searchable
121
+ # @return [::Boolean]
122
+ # If true, custom attribute values are searchable by text queries in
123
+ # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
124
+ #
125
+ # This field is ignored in a {::Google::Cloud::Retail::V2::UserEvent UserEvent}.
126
+ #
127
+ # Only set if type {::Google::Cloud::Retail::V2::CustomAttribute#text text} is
128
+ # set. Otherwise, a INVALID_ARGUMENT error is returned.
129
+ # @!attribute [rw] indexable
130
+ # @return [::Boolean]
131
+ # If true, custom attribute values are indexed, so that it can be filtered,
132
+ # faceted or boosted in
133
+ # {::Google::Cloud::Retail::V2::SearchService::Client#search SearchService.Search}.
134
+ #
135
+ # This field is ignored in a {::Google::Cloud::Retail::V2::UserEvent UserEvent}.
136
+ #
137
+ # See {::Google::Cloud::Retail::V2::SearchRequest#filter SearchRequest.filter},
138
+ # {::Google::Cloud::Retail::V2::SearchRequest#facet_specs SearchRequest.facet_specs}
139
+ # and
140
+ # {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
141
+ # for more details.
49
142
  class CustomAttribute
50
143
  include ::Google::Protobuf::MessageExts
51
144
  extend ::Google::Protobuf::MessageExts::ClassMethods
52
145
  end
53
146
 
147
+ # Fulfillment information, such as the store IDs for in-store pickup or region
148
+ # IDs for different shipping methods.
149
+ # @!attribute [rw] type
150
+ # @return [::String]
151
+ # The fulfillment type, including commonly used types (such as pickup in
152
+ # store and same day delivery), and custom types. Customers have to map
153
+ # custom types to their display names before rendering UI.
154
+ #
155
+ # Supported values:
156
+ #
157
+ # * "pickup-in-store"
158
+ # * "ship-to-store"
159
+ # * "same-day-delivery"
160
+ # * "next-day-delivery"
161
+ # * "custom-type-1"
162
+ # * "custom-type-2"
163
+ # * "custom-type-3"
164
+ # * "custom-type-4"
165
+ # * "custom-type-5"
166
+ #
167
+ # If this field is set to an invalid value other than these, an
168
+ # INVALID_ARGUMENT error is returned.
169
+ # @!attribute [rw] place_ids
170
+ # @return [::Array<::String>]
171
+ # The IDs for this {::Google::Cloud::Retail::V2::FulfillmentInfo#type type}, such
172
+ # as the store IDs for
173
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type.pickup-in-store}
174
+ # or the region IDs for
175
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#type FulfillmentInfo.type.same-day-delivery}.
176
+ #
177
+ # A maximum of 2000 values are allowed. Each value must be a string with a
178
+ # length limit of 10 characters, matching the pattern [a-zA-Z0-9_-]+, such as
179
+ # "store1" or "REGION-2". Otherwise, an INVALID_ARGUMENT error is returned.
180
+ class FulfillmentInfo
181
+ include ::Google::Protobuf::MessageExts
182
+ extend ::Google::Protobuf::MessageExts::ClassMethods
183
+ end
184
+
54
185
  # {::Google::Cloud::Retail::V2::Product Product} thumbnail/detail image.
55
186
  # @!attribute [rw] uri
56
187
  # @return [::String]
@@ -79,6 +210,24 @@ module Google
79
210
  extend ::Google::Protobuf::MessageExts::ClassMethods
80
211
  end
81
212
 
213
+ # A floating point interval.
214
+ # @!attribute [rw] minimum
215
+ # @return [::Float]
216
+ # Inclusive lower bound.
217
+ # @!attribute [rw] exclusive_minimum
218
+ # @return [::Float]
219
+ # Exclusive lower bound.
220
+ # @!attribute [rw] maximum
221
+ # @return [::Float]
222
+ # Inclusive upper bound.
223
+ # @!attribute [rw] exclusive_maximum
224
+ # @return [::Float]
225
+ # Exclusive upper bound.
226
+ class Interval
227
+ include ::Google::Protobuf::MessageExts
228
+ extend ::Google::Protobuf::MessageExts::ClassMethods
229
+ end
230
+
82
231
  # The price information of a {::Google::Cloud::Retail::V2::Product Product}.
83
232
  # @!attribute [rw] currency_code
84
233
  # @return [::String]
@@ -87,6 +236,13 @@ module Google
87
236
  #
88
237
  # If this field is an unrecognizable currency code, an INVALID_ARGUMENT
89
238
  # error is returned.
239
+ #
240
+ # The {::Google::Cloud::Retail::V2::Product::Type::VARIANT Product.Type.VARIANT}
241
+ # {::Google::Cloud::Retail::V2::Product Product}s with the same
242
+ # {::Google::Cloud::Retail::V2::Product#primary_product_id Product.primary_product_id}
243
+ # must share the same
244
+ # {::Google::Cloud::Retail::V2::PriceInfo#currency_code currency_code}. Otherwise,
245
+ # a FAILED_PRECONDITION error is returned.
90
246
  # @!attribute [rw] price
91
247
  # @return [::Float]
92
248
  # Price of the product.
@@ -108,9 +264,102 @@ module Google
108
264
  #
109
265
  # Google Merchant Center property
110
266
  # [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).
267
+ # @!attribute [rw] price_effective_time
268
+ # @return [::Google::Protobuf::Timestamp]
269
+ # The timestamp when the {::Google::Cloud::Retail::V2::PriceInfo#price price}
270
+ # starts to be effective. This can be set as a future timestamp, and the
271
+ # {::Google::Cloud::Retail::V2::PriceInfo#price price} is only used for search
272
+ # after
273
+ # {::Google::Cloud::Retail::V2::PriceInfo#price_effective_time price_effective_time}.
274
+ # If so, the
275
+ # {::Google::Cloud::Retail::V2::PriceInfo#original_price original_price} must be
276
+ # set and {::Google::Cloud::Retail::V2::PriceInfo#original_price original_price}
277
+ # is used before
278
+ # {::Google::Cloud::Retail::V2::PriceInfo#price_effective_time price_effective_time}.
279
+ #
280
+ # Do not set if {::Google::Cloud::Retail::V2::PriceInfo#price price} is always
281
+ # effective because it will cause additional latency during search.
282
+ # @!attribute [rw] price_expire_time
283
+ # @return [::Google::Protobuf::Timestamp]
284
+ # The timestamp when the {::Google::Cloud::Retail::V2::PriceInfo#price price}
285
+ # stops to be effective. The {::Google::Cloud::Retail::V2::PriceInfo#price price}
286
+ # is used for search before
287
+ # {::Google::Cloud::Retail::V2::PriceInfo#price_expire_time price_expire_time}. If
288
+ # this field is set, the
289
+ # {::Google::Cloud::Retail::V2::PriceInfo#original_price original_price} must be
290
+ # set and {::Google::Cloud::Retail::V2::PriceInfo#original_price original_price}
291
+ # is used after
292
+ # {::Google::Cloud::Retail::V2::PriceInfo#price_expire_time price_expire_time}.
293
+ #
294
+ # Do not set if {::Google::Cloud::Retail::V2::PriceInfo#price price} is always
295
+ # effective because it will cause additional latency during search.
296
+ # @!attribute [r] price_range
297
+ # @return [::Google::Cloud::Retail::V2::PriceInfo::PriceRange]
298
+ # Output only. The price range of all the child
299
+ # {::Google::Cloud::Retail::V2::Product::Type::VARIANT Product.Type.VARIANT}
300
+ # {::Google::Cloud::Retail::V2::Product Product}s grouped together on the
301
+ # {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Product.Type.PRIMARY}
302
+ # {::Google::Cloud::Retail::V2::Product Product}. Only populated for
303
+ # {::Google::Cloud::Retail::V2::Product::Type::PRIMARY Product.Type.PRIMARY}
304
+ # {::Google::Cloud::Retail::V2::Product Product}s.
305
+ #
306
+ # Note: This field is OUTPUT_ONLY for
307
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}.
308
+ # Do not set this field in API requests.
111
309
  class PriceInfo
112
310
  include ::Google::Protobuf::MessageExts
113
311
  extend ::Google::Protobuf::MessageExts::ClassMethods
312
+
313
+ # The price range of all
314
+ # {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
315
+ # {::Google::Cloud::Retail::V2::Product Product} having the same
316
+ # {::Google::Cloud::Retail::V2::Product#primary_product_id Product.primary_product_id}.
317
+ # @!attribute [rw] price
318
+ # @return [::Google::Cloud::Retail::V2::Interval]
319
+ # The inclusive
320
+ # {::Google::Cloud::Retail::V2::PriceInfo#price Product.pricing_info.price}
321
+ # interval of all {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
322
+ # {::Google::Cloud::Retail::V2::Product Product} having the same
323
+ # {::Google::Cloud::Retail::V2::Product#primary_product_id Product.primary_product_id}.
324
+ # @!attribute [rw] original_price
325
+ # @return [::Google::Cloud::Retail::V2::Interval]
326
+ # The inclusive
327
+ # {::Google::Cloud::Retail::V2::PriceInfo#original_price Product.pricing_info.original_price}
328
+ # internal of all {::Google::Cloud::Retail::V2::Product::Type::VARIANT variant}
329
+ # {::Google::Cloud::Retail::V2::Product Product} having the same
330
+ # {::Google::Cloud::Retail::V2::Product#primary_product_id Product.primary_product_id}.
331
+ class PriceRange
332
+ include ::Google::Protobuf::MessageExts
333
+ extend ::Google::Protobuf::MessageExts::ClassMethods
334
+ end
335
+ end
336
+
337
+ # The rating of a {::Google::Cloud::Retail::V2::Product Product}.
338
+ # @!attribute [rw] rating_count
339
+ # @return [::Integer]
340
+ # The total number of ratings. This value is independent of the value of
341
+ # {::Google::Cloud::Retail::V2::Rating#rating_histogram rating_histogram}.
342
+ #
343
+ # This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is
344
+ # returned.
345
+ # @!attribute [rw] average_rating
346
+ # @return [::Float]
347
+ # The average rating of the {::Google::Cloud::Retail::V2::Product Product}.
348
+ #
349
+ # The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is
350
+ # returned.
351
+ # @!attribute [rw] rating_histogram
352
+ # @return [::Array<::Integer>]
353
+ # List of rating counts per rating value (index = rating - 1). The list is
354
+ # empty if there is no rating. If the list is non-empty, its size is
355
+ # always 5. Otherwise, an INVALID_ARGUMENT error is returned.
356
+ #
357
+ # For example, [41, 14, 13, 47, 303]. It means that the
358
+ # {::Google::Cloud::Retail::V2::Product Product} got 41 ratings with 1 star, 14
359
+ # ratings with 2 star, and so on.
360
+ class Rating
361
+ include ::Google::Protobuf::MessageExts
362
+ extend ::Google::Protobuf::MessageExts::ClassMethods
114
363
  end
115
364
 
116
365
  # Information of an end user.
@@ -123,8 +372,9 @@ module Google
123
372
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
124
373
  # @!attribute [rw] ip_address
125
374
  # @return [::String]
126
- # The end user's IP address. This field is used to extract location
127
- # information for personalization.
375
+ # The end user's IP address. Required for getting
376
+ # [SearchResponse.sponsored_results][google.cloud.retail.v2.SearchResponse.sponsored_results].
377
+ # This field is used to extract location information for personalization.
128
378
  #
129
379
  # This field must be either an IPv4 address (e.g. "104.133.9.80") or an IPv6
130
380
  # address (e.g. "2001:0db8:85a3:0000:0000:8a2e:0370:7334"). Otherwise, an
@@ -137,7 +387,8 @@ module Google
137
387
  # is set.
138
388
  # @!attribute [rw] user_agent
139
389
  # @return [::String]
140
- # User agent as included in the HTTP header.
390
+ # User agent as included in the HTTP header. Required for getting
391
+ # [SearchResponse.sponsored_results][google.cloud.retail.v2.SearchResponse.sponsored_results].
141
392
  #
142
393
  # The field must be a UTF-8 encoded string with a length limit of 1,000
143
394
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
@@ -163,6 +414,23 @@ module Google
163
414
  include ::Google::Protobuf::MessageExts
164
415
  extend ::Google::Protobuf::MessageExts::ClassMethods
165
416
  end
417
+
418
+ # Promotion information.
419
+ # @!attribute [rw] promotion_id
420
+ # @return [::String]
421
+ # ID of the promotion. For example, "free gift".
422
+ #
423
+ # The value value must be a UTF-8 encoded string with a length limit of 128
424
+ # characters, and match the pattern: [a-zA-Z][a-zA-Z0-9_]*. For example,
425
+ # id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is
426
+ # returned.
427
+ #
428
+ # Google Merchant Center property
429
+ # [promotion](https://support.google.com/merchants/answer/7050148).
430
+ class Promotion
431
+ include ::Google::Protobuf::MessageExts
432
+ extend ::Google::Protobuf::MessageExts::ClassMethods
433
+ end
166
434
  end
167
435
  end
168
436
  end