google-cloud-retail-v2 0.3.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -0
  3. data/lib/google/cloud/retail/v2/catalog_service/client.rb +240 -40
  4. data/lib/google/cloud/retail/v2/catalog_service/paths.rb +21 -0
  5. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +16 -0
  6. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +46 -0
  7. data/lib/google/cloud/retail/v2/common_pb.rb +46 -0
  8. data/lib/google/cloud/retail/v2/completion_service/client.rb +545 -0
  9. data/lib/google/cloud/retail/v2/completion_service/credentials.rb +51 -0
  10. data/lib/google/cloud/retail/v2/completion_service/operations.rb +664 -0
  11. data/lib/google/cloud/retail/v2/completion_service/paths.rb +52 -0
  12. data/lib/google/cloud/retail/v2/completion_service.rb +54 -0
  13. data/lib/google/cloud/retail/v2/completion_service_pb.rb +50 -0
  14. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +61 -0
  15. data/lib/google/cloud/retail/v2/import_config_pb.rb +32 -0
  16. data/lib/google/cloud/retail/v2/prediction_service/client.rb +66 -70
  17. data/lib/google/cloud/retail/v2/product_pb.rb +21 -0
  18. data/lib/google/cloud/retail/v2/product_service/client.rb +682 -43
  19. data/lib/google/cloud/retail/v2/product_service/operations.rb +30 -21
  20. data/lib/google/cloud/retail/v2/product_service_pb.rb +56 -0
  21. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +75 -0
  22. data/lib/google/cloud/retail/v2/search_service/client.rb +552 -0
  23. data/lib/google/cloud/retail/v2/search_service/credentials.rb +51 -0
  24. data/lib/google/cloud/retail/v2/search_service/paths.rb +54 -0
  25. data/lib/google/cloud/retail/v2/search_service.rb +53 -0
  26. data/lib/google/cloud/retail/v2/search_service_pb.rb +133 -0
  27. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +53 -0
  28. data/lib/google/cloud/retail/v2/user_event_pb.rb +11 -0
  29. data/lib/google/cloud/retail/v2/user_event_service/client.rb +45 -42
  30. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +30 -21
  31. data/lib/google/cloud/retail/v2/user_event_service/paths.rb +19 -0
  32. data/lib/google/cloud/retail/v2/version.rb +1 -1
  33. data/lib/google/cloud/retail/v2.rb +2 -0
  34. data/proto_docs/google/cloud/retail/v2/catalog.rb +6 -6
  35. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +53 -4
  36. data/proto_docs/google/cloud/retail/v2/common.rb +272 -4
  37. data/proto_docs/google/cloud/retail/v2/completion_service.rb +164 -0
  38. data/proto_docs/google/cloud/retail/v2/import_config.rb +122 -6
  39. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +32 -31
  40. data/proto_docs/google/cloud/retail/v2/product.rb +265 -9
  41. data/proto_docs/google/cloud/retail/v2/product_service.rb +362 -2
  42. data/proto_docs/google/cloud/retail/v2/purge_config.rb +1 -1
  43. data/proto_docs/google/cloud/retail/v2/search_service.rb +711 -0
  44. data/proto_docs/google/cloud/retail/v2/user_event.rb +110 -6
  45. data/proto_docs/google/type/date.rb +53 -0
  46. metadata +20 -4
@@ -169,7 +169,9 @@ module Google
169
169
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
170
  metadata: metadata,
171
171
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
172
+
173
+ options.apply_defaults timeout: @config.timeout,
174
+ metadata: @config.metadata,
173
175
  retry_policy: @config.retry_policy
174
176
 
175
177
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -239,7 +241,9 @@ module Google
239
241
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
242
  metadata: metadata,
241
243
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
244
+
245
+ options.apply_defaults timeout: @config.timeout,
246
+ metadata: @config.metadata,
243
247
  retry_policy: @config.retry_policy
244
248
 
245
249
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -309,7 +313,9 @@ module Google
309
313
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
314
  metadata: metadata,
311
315
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
313
319
  retry_policy: @config.retry_policy
314
320
 
315
321
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -384,7 +390,9 @@ module Google
384
390
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
391
  metadata: metadata,
386
392
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
393
+
394
+ options.apply_defaults timeout: @config.timeout,
395
+ metadata: @config.metadata,
388
396
  retry_policy: @config.retry_policy
389
397
 
390
398
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -456,7 +464,9 @@ module Google
456
464
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
465
  metadata: metadata,
458
466
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
460
470
  retry_policy: @config.retry_policy
461
471
 
462
472
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +491,21 @@ module Google
481
491
  # Configuration can be applied globally to all clients, or to a single client
482
492
  # on construction.
483
493
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
494
+ # @example
495
+ #
496
+ # # Modify the global config, setting the timeout for
497
+ # # list_operations to 20 seconds,
498
+ # # and all remaining timeouts to 10 seconds.
499
+ # ::Google::Longrunning::Operations::Client.configure do |config|
500
+ # config.timeout = 10.0
501
+ # config.rpcs.list_operations.timeout = 20.0
502
+ # end
503
+ #
504
+ # # Apply the above configuration only to a new client.
505
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
506
+ # config.timeout = 10.0
507
+ # config.rpcs.list_operations.timeout = 20.0
508
+ # end
500
509
  #
501
510
  # @!attribute [rw] endpoint
502
511
  # The hostname or hostname:port of the service endpoint.
@@ -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.3.2"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -17,8 +17,10 @@
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
19
  require "google/cloud/retail/v2/catalog_service"
20
+ require "google/cloud/retail/v2/completion_service"
20
21
  require "google/cloud/retail/v2/prediction_service"
21
22
  require "google/cloud/retail/v2/product_service"
23
+ require "google/cloud/retail/v2/search_service"
22
24
  require "google/cloud/retail/v2/user_event_service"
23
25
  require "google/cloud/retail/v2/version"
24
26
 
@@ -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