google-cloud-retail-v2 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +1 -1
  4. data/lib/google/cloud/retail/v2/catalog_pb.rb +69 -0
  5. data/lib/google/cloud/retail/v2/catalog_service/client.rb +718 -0
  6. data/lib/google/cloud/retail/v2/catalog_service/paths.rb +38 -0
  7. data/lib/google/cloud/retail/v2/catalog_service.rb +1 -1
  8. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +34 -0
  9. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +38 -0
  10. data/lib/google/cloud/retail/v2/common_pb.rb +86 -0
  11. data/lib/google/cloud/retail/v2/completion_service/client.rb +11 -8
  12. data/lib/google/cloud/retail/v2/completion_service.rb +2 -2
  13. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +3 -3
  14. data/lib/google/cloud/retail/v2/control_pb.rb +33 -0
  15. data/lib/google/cloud/retail/v2/control_service/client.rb +807 -0
  16. data/lib/google/cloud/retail/v2/control_service/credentials.rb +51 -0
  17. data/lib/google/cloud/retail/v2/control_service/paths.rb +73 -0
  18. data/lib/google/cloud/retail/v2/control_service.rb +49 -0
  19. data/lib/google/cloud/retail/v2/control_service_pb.rb +57 -0
  20. data/lib/google/cloud/retail/v2/control_service_services_pb.rb +65 -0
  21. data/lib/google/cloud/retail/v2/prediction_service/client.rb +7 -8
  22. data/lib/google/cloud/retail/v2/prediction_service.rb +1 -1
  23. data/lib/google/cloud/retail/v2/product_pb.rb +1 -0
  24. data/lib/google/cloud/retail/v2/product_service/client.rb +65 -25
  25. data/lib/google/cloud/retail/v2/product_service.rb +1 -1
  26. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +58 -13
  27. data/lib/google/cloud/retail/v2/search_service/client.rb +16 -5
  28. data/lib/google/cloud/retail/v2/search_service.rb +2 -2
  29. data/lib/google/cloud/retail/v2/search_service_pb.rb +1 -0
  30. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -2
  31. data/lib/google/cloud/retail/v2/serving_config_pb.rb +51 -0
  32. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +998 -0
  33. data/lib/google/cloud/retail/v2/serving_config_service/credentials.rb +51 -0
  34. data/lib/google/cloud/retail/v2/serving_config_service/paths.rb +73 -0
  35. data/lib/google/cloud/retail/v2/serving_config_service.rb +49 -0
  36. data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +66 -0
  37. data/lib/google/cloud/retail/v2/serving_config_service_services_pb.rb +74 -0
  38. data/lib/google/cloud/retail/v2/user_event_service/client.rb +27 -14
  39. data/lib/google/cloud/retail/v2/user_event_service.rb +1 -1
  40. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +5 -0
  41. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +10 -10
  42. data/lib/google/cloud/retail/v2/version.rb +1 -1
  43. data/lib/google/cloud/retail/v2.rb +4 -2
  44. data/proto_docs/google/api/client.rb +318 -0
  45. data/proto_docs/google/api/launch_stage.rb +71 -0
  46. data/proto_docs/google/cloud/retail/v2/catalog.rb +271 -0
  47. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +133 -0
  48. data/proto_docs/google/cloud/retail/v2/common.rb +316 -4
  49. data/proto_docs/google/cloud/retail/v2/completion_service.rb +6 -3
  50. data/proto_docs/google/cloud/retail/v2/control.rb +75 -0
  51. data/proto_docs/google/cloud/retail/v2/control_service.rb +122 -0
  52. data/proto_docs/google/cloud/retail/v2/import_config.rb +20 -35
  53. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +7 -8
  54. data/proto_docs/google/cloud/retail/v2/product.rb +33 -5
  55. data/proto_docs/google/cloud/retail/v2/search_service.rb +44 -10
  56. data/proto_docs/google/cloud/retail/v2/serving_config.rb +255 -0
  57. data/proto_docs/google/cloud/retail/v2/serving_config_service.rb +143 -0
  58. data/proto_docs/google/cloud/retail/v2/user_event.rb +1 -1
  59. data/proto_docs/google/cloud/retail/v2/user_event_service.rb +24 -8
  60. data/proto_docs/google/rpc/status.rb +4 -2
  61. metadata +24 -4
@@ -58,9 +58,9 @@ module Google
58
58
  #
59
59
  # This process is asynchronous and does not require the
60
60
  # [Product][google.cloud.retail.v2.Product] to exist before updating
61
- # fulfillment information. If the request is valid, the update will be
62
- # enqueued and processed downstream. As a consequence, when a response is
63
- # returned, updates are not immediately manifested in the
61
+ # fulfillment information. If the request is valid, the update is enqueued
62
+ # and processed downstream. As a consequence, when a response is returned,
63
+ # updates are not immediately manifested in the
64
64
  # [Product][google.cloud.retail.v2.Product] queried by
65
65
  # [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]
66
66
  # or
@@ -70,10 +70,10 @@ module Google
70
70
  # [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
71
71
  # and
72
72
  # [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct],
73
- # the specified inventory field value(s) will overwrite any existing value(s)
73
+ # the specified inventory field value(s) overwrite any existing value(s)
74
74
  # while ignoring the last update time for this field. Furthermore, the last
75
- # update time for the specified inventory fields will be overwritten to the
76
- # time of the
75
+ # update times for the specified inventory fields are overwritten by the
76
+ # times of the
77
77
  # [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]
78
78
  # or
79
79
  # [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
@@ -81,11 +81,11 @@ module Google
81
81
  #
82
82
  # If no inventory fields are set in
83
83
  # [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product],
84
- # then any pre-existing inventory information for this product will be used.
84
+ # then any pre-existing inventory information for this product is used.
85
85
  #
86
86
  # If no inventory fields are set in
87
87
  # [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask],
88
- # then any existing inventory information will be preserved.
88
+ # then any existing inventory information is preserved.
89
89
  #
90
90
  # Pre-existing inventory information can only be updated with
91
91
  # [ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory],
@@ -93,8 +93,17 @@ module Google
93
93
  # and
94
94
  # [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].
95
95
  #
96
+ # The returned [Operation][google.longrunning.Operation]s is obsolete after
97
+ # one day, and the [GetOperation][google.longrunning.Operations.GetOperation]
98
+ # API returns `NOT_FOUND` afterwards.
99
+ #
100
+ # If conflicting updates are issued, the
101
+ # [Operation][google.longrunning.Operation]s associated with the stale
102
+ # updates are not marked as [done][google.longrunning.Operation.done] until
103
+ # they are obsolete.
104
+ #
96
105
  # This feature is only available for users who have Retail Search enabled.
97
- # Please enable Retail Search on Cloud Console before using this feature.
106
+ # Enable Retail Search on Cloud Console before using this feature.
98
107
  rpc :SetInventory, ::Google::Cloud::Retail::V2::SetInventoryRequest, ::Google::Longrunning::Operation
99
108
  # Incrementally adds place IDs to
100
109
  # [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].
@@ -109,8 +118,17 @@ module Google
109
118
  # or
110
119
  # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
111
120
  #
121
+ # The returned [Operation][google.longrunning.Operation]s will be obsolete
122
+ # after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
123
+ # API will return NOT_FOUND afterwards.
124
+ #
125
+ # If conflicting updates are issued, the
126
+ # [Operation][google.longrunning.Operation]s associated with the stale
127
+ # updates will not be marked as [done][google.longrunning.Operation.done]
128
+ # until being obsolete.
129
+ #
112
130
  # This feature is only available for users who have Retail Search enabled.
113
- # Please enable Retail Search on Cloud Console before using this feature.
131
+ # Enable Retail Search on Cloud Console before using this feature.
114
132
  rpc :AddFulfillmentPlaces, ::Google::Cloud::Retail::V2::AddFulfillmentPlacesRequest, ::Google::Longrunning::Operation
115
133
  # Incrementally removes place IDs from a
116
134
  # [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].
@@ -125,8 +143,17 @@ module Google
125
143
  # or
126
144
  # [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].
127
145
  #
146
+ # The returned [Operation][google.longrunning.Operation]s will be obsolete
147
+ # after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
148
+ # API will return NOT_FOUND afterwards.
149
+ #
150
+ # If conflicting updates are issued, the
151
+ # [Operation][google.longrunning.Operation]s associated with the stale
152
+ # updates will not be marked as [done][google.longrunning.Operation.done]
153
+ # until being obsolete.
154
+ #
128
155
  # This feature is only available for users who have Retail Search enabled.
129
- # Please enable Retail Search on Cloud Console before using this feature.
156
+ # Enable Retail Search on Cloud Console before using this feature.
130
157
  rpc :RemoveFulfillmentPlaces, ::Google::Cloud::Retail::V2::RemoveFulfillmentPlacesRequest, ::Google::Longrunning::Operation
131
158
  # Updates local inventory information for a
132
159
  # [Product][google.cloud.retail.v2.Product] at a list of places, while
@@ -148,8 +175,17 @@ module Google
148
175
  # [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
149
176
  # has no effect on local inventories.
150
177
  #
178
+ # The returned [Operation][google.longrunning.Operation]s will be obsolete
179
+ # after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
180
+ # API will return NOT_FOUND afterwards.
181
+ #
182
+ # If conflicting updates are issued, the
183
+ # [Operation][google.longrunning.Operation]s associated with the stale
184
+ # updates will not be marked as [done][google.longrunning.Operation.done]
185
+ # until being obsolete.
186
+ #
151
187
  # This feature is only available for users who have Retail Search enabled.
152
- # Please enable Retail Search on Cloud Console before using this feature.
188
+ # Enable Retail Search on Cloud Console before using this feature.
153
189
  rpc :AddLocalInventories, ::Google::Cloud::Retail::V2::AddLocalInventoriesRequest, ::Google::Longrunning::Operation
154
190
  # Remove local inventory information for a
155
191
  # [Product][google.cloud.retail.v2.Product] at a list of places at a removal
@@ -169,8 +205,17 @@ module Google
169
205
  # [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]
170
206
  # has no effect on local inventories.
171
207
  #
208
+ # The returned [Operation][google.longrunning.Operation]s will be obsolete
209
+ # after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
210
+ # API will return NOT_FOUND afterwards.
211
+ #
212
+ # If conflicting updates are issued, the
213
+ # [Operation][google.longrunning.Operation]s associated with the stale
214
+ # updates will not be marked as [done][google.longrunning.Operation.done]
215
+ # until being obsolete.
216
+ #
172
217
  # This feature is only available for users who have Retail Search enabled.
173
- # Please enable Retail Search on Cloud Console before using this feature.
218
+ # Enable Retail Search on Cloud Console before using this feature.
174
219
  rpc :RemoveLocalInventories, ::Google::Cloud::Retail::V2::RemoveLocalInventoriesRequest, ::Google::Longrunning::Operation
175
220
  end
176
221
 
@@ -30,7 +30,7 @@ module Google
30
30
  # Service for search.
31
31
  #
32
32
  # This feature is only available for users who have Retail Search enabled.
33
- # Please enable Retail Search on Cloud Console before using this feature.
33
+ # Enable Retail Search on Cloud Console before using this feature.
34
34
  #
35
35
  class Client
36
36
  include Paths
@@ -156,7 +156,7 @@ module Google
156
156
  # Performs a search.
157
157
  #
158
158
  # This feature is only available for users who have Retail Search enabled.
159
- # Please enable Retail Search on Cloud Console before using this feature.
159
+ # Enable Retail Search on Cloud Console before using this feature.
160
160
  #
161
161
  # @overload search(request, options = nil)
162
162
  # Pass arguments to `search` via a request object, either of type
@@ -178,7 +178,7 @@ module Google
178
178
  # `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config`
179
179
  # or the name of the legacy placement resource, such as
180
180
  # `projects/*/locations/global/catalogs/default_catalog/placements/default_search`.
181
- # This field is used to identify the serving configuration name and the set
181
+ # This field is used to identify the serving config name and the set
182
182
  # of models that will be used to make the search.
183
183
  # @param branch [::String]
184
184
  # The branch resource name, such as
@@ -274,7 +274,9 @@ module Google
274
274
  # Boost specification to boost certain products. See more details at this
275
275
  # [user guide](https://cloud.google.com/retail/docs/boosting).
276
276
  #
277
- # Notice that if both [ServingConfig.boost_control_ids][] and
277
+ # Notice that if both
278
+ # {::Google::Cloud::Retail::V2::ServingConfig#boost_control_ids ServingConfig.boost_control_ids}
279
+ # and
278
280
  # {::Google::Cloud::Retail::V2::SearchRequest#boost_spec SearchRequest.boost_spec}
279
281
  # are set, the boost conditions from both places are evaluated. If a search
280
282
  # request matches multiple boost conditions, the final boost score is equal
@@ -361,7 +363,7 @@ module Google
361
363
  # {::Google::Cloud::Retail::V2::UserEvent#page_categories UserEvent.page_categories};
362
364
  #
363
365
  # To represent full path of category, use '>' sign to separate different
364
- # hierarchies. If '>' is part of the category name, please replace it with
366
+ # hierarchies. If '>' is part of the category name, replace it with
365
367
  # other character(s).
366
368
  #
367
369
  # Category pages include special pages such as sales or promotions. For
@@ -372,6 +374,15 @@ module Google
372
374
  # request triggers both product search and faceted search.
373
375
  # @param personalization_spec [::Google::Cloud::Retail::V2::SearchRequest::PersonalizationSpec, ::Hash]
374
376
  # The specification for personalization.
377
+ #
378
+ # Notice that if both
379
+ # {::Google::Cloud::Retail::V2::ServingConfig#personalization_spec ServingConfig.personalization_spec}
380
+ # and
381
+ # {::Google::Cloud::Retail::V2::SearchRequest#personalization_spec SearchRequest.personalization_spec}
382
+ # are set.
383
+ # {::Google::Cloud::Retail::V2::SearchRequest#personalization_spec SearchRequest.personalization_spec}
384
+ # will override
385
+ # {::Google::Cloud::Retail::V2::ServingConfig#personalization_spec ServingConfig.personalization_spec}.
375
386
  # @param labels [::Hash{::String => ::String}]
376
387
  # The labels applied to a resource must meet the following requirements:
377
388
  #
@@ -34,9 +34,9 @@ module Google
34
34
  # Service for search.
35
35
  #
36
36
  # This feature is only available for users who have Retail Search enabled.
37
- # Please enable Retail Search on Cloud Console before using this feature.
37
+ # Enable Retail Search on Cloud Console before using this feature.
38
38
  #
39
- # To load this service and instantiate a client:
39
+ # @example Load this service and instantiate a gRPC client
40
40
  #
41
41
  # require "google/cloud/retail/v2/search_service"
42
42
  # client = ::Google::Cloud::Retail::V2::SearchService::Client.new
@@ -118,6 +118,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
118
118
  optional :matching_variant_count, :int32, 3
119
119
  map :matching_variant_fields, :string, :message, 4, "google.protobuf.FieldMask"
120
120
  map :variant_rollup_values, :string, :message, 5, "google.protobuf.Value"
121
+ repeated :personal_labels, :string, 7
121
122
  end
122
123
  add_message "google.cloud.retail.v2.SearchResponse.Facet" do
123
124
  optional :key, :string, 1
@@ -27,7 +27,7 @@ module Google
27
27
  # Service for search.
28
28
  #
29
29
  # This feature is only available for users who have Retail Search enabled.
30
- # Please enable Retail Search on Cloud Console before using this feature.
30
+ # Enable Retail Search on Cloud Console before using this feature.
31
31
  class Service
32
32
 
33
33
  include ::GRPC::GenericService
@@ -39,7 +39,7 @@ module Google
39
39
  # Performs a search.
40
40
  #
41
41
  # This feature is only available for users who have Retail Search enabled.
42
- # Please enable Retail Search on Cloud Console before using this feature.
42
+ # Enable Retail Search on Cloud Console before using this feature.
43
43
  rpc :Search, ::Google::Cloud::Retail::V2::SearchRequest, ::Google::Cloud::Retail::V2::SearchResponse
44
44
  end
45
45
 
@@ -0,0 +1,51 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/retail/v2/serving_config.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
+ require 'google/cloud/retail/v2/common_pb'
9
+ require 'google/cloud/retail/v2/search_service_pb'
10
+
11
+ Google::Protobuf::DescriptorPool.generated_pool.build do
12
+ add_file("google/cloud/retail/v2/serving_config.proto", :syntax => :proto3) do
13
+ add_message "google.cloud.retail.v2.ServingConfig" do
14
+ optional :name, :string, 1
15
+ optional :display_name, :string, 2
16
+ optional :model_id, :string, 3
17
+ optional :price_reranking_level, :string, 4
18
+ repeated :facet_control_ids, :string, 5
19
+ optional :dynamic_facet_spec, :message, 6, "google.cloud.retail.v2.SearchRequest.DynamicFacetSpec"
20
+ repeated :boost_control_ids, :string, 7
21
+ repeated :filter_control_ids, :string, 9
22
+ repeated :redirect_control_ids, :string, 10
23
+ repeated :twoway_synonyms_control_ids, :string, 18
24
+ repeated :oneway_synonyms_control_ids, :string, 12
25
+ repeated :do_not_associate_control_ids, :string, 13
26
+ repeated :replacement_control_ids, :string, 14
27
+ repeated :ignore_control_ids, :string, 15
28
+ optional :diversity_level, :string, 8
29
+ optional :diversity_type, :enum, 20, "google.cloud.retail.v2.ServingConfig.DiversityType"
30
+ optional :enable_category_filter_level, :string, 16
31
+ optional :personalization_spec, :message, 21, "google.cloud.retail.v2.SearchRequest.PersonalizationSpec"
32
+ repeated :solution_types, :enum, 19, "google.cloud.retail.v2.SolutionType"
33
+ end
34
+ add_enum "google.cloud.retail.v2.ServingConfig.DiversityType" do
35
+ value :DIVERSITY_TYPE_UNSPECIFIED, 0
36
+ value :RULE_BASED_DIVERSITY, 2
37
+ value :DATA_DRIVEN_DIVERSITY, 3
38
+ end
39
+ end
40
+ end
41
+
42
+ module Google
43
+ module Cloud
44
+ module Retail
45
+ module V2
46
+ ServingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ServingConfig").msgclass
47
+ ServingConfig::DiversityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ServingConfig.DiversityType").enummodule
48
+ end
49
+ end
50
+ end
51
+ end