google-cloud-retail-v2 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/README.md +1 -1
  5. data/lib/google/cloud/retail/v2/catalog_pb.rb +0 -3
  6. data/lib/google/cloud/retail/v2/catalog_service/client.rb +9 -9
  7. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +1 -0
  8. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +0 -8
  9. data/lib/google/cloud/retail/v2/common_pb.rb +6 -4
  10. data/lib/google/cloud/retail/v2/completion_service/client.rb +18 -18
  11. data/lib/google/cloud/retail/v2/completion_service.rb +1 -2
  12. data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +7 -7
  13. data/lib/google/cloud/retail/v2/import_config_pb.rb +0 -1
  14. data/lib/google/cloud/retail/v2/prediction_service/client.rb +6 -3
  15. data/lib/google/cloud/retail/v2/product_pb.rb +1 -1
  16. data/lib/google/cloud/retail/v2/product_service/client.rb +320 -18
  17. data/lib/google/cloud/retail/v2/product_service_pb.rb +27 -1
  18. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +45 -7
  19. data/lib/google/cloud/retail/v2/promotion_pb.rb +22 -0
  20. data/lib/google/cloud/retail/v2/purge_config_pb.rb +1 -1
  21. data/lib/google/cloud/retail/v2/search_service/client.rb +28 -15
  22. data/lib/google/cloud/retail/v2/search_service.rb +1 -2
  23. data/lib/google/cloud/retail/v2/search_service_pb.rb +14 -2
  24. data/lib/google/cloud/retail/v2/search_service_services_pb.rb +2 -4
  25. data/lib/google/cloud/retail/v2/user_event_pb.rb +0 -1
  26. data/lib/google/cloud/retail/v2/user_event_service/client.rb +6 -4
  27. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +1 -0
  28. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +4 -3
  29. data/lib/google/cloud/retail/v2/version.rb +1 -1
  30. data/lib/google/cloud/retail/v2.rb +2 -0
  31. data/proto_docs/google/api/resource.rb +10 -71
  32. data/proto_docs/google/cloud/retail/v2/catalog.rb +6 -6
  33. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +9 -0
  34. data/proto_docs/google/cloud/retail/v2/common.rb +88 -25
  35. data/proto_docs/google/cloud/retail/v2/completion_service.rb +18 -15
  36. data/proto_docs/google/cloud/retail/v2/import_config.rb +29 -21
  37. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +6 -3
  38. data/proto_docs/google/cloud/retail/v2/product.rb +48 -39
  39. data/proto_docs/google/cloud/retail/v2/product_service.rb +134 -2
  40. data/proto_docs/google/cloud/retail/v2/promotion.rb +43 -0
  41. data/proto_docs/google/cloud/retail/v2/search_service.rb +69 -10
  42. data/proto_docs/google/cloud/retail/v2/user_event.rb +25 -12
  43. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35215e1d3d5140386a8e08763025e0a07c99c687e1bf1542c6bb4339a7e2655c
4
- data.tar.gz: b5fb941505e7c27c0caea1a80efe0742a4a3faae2719401e9feae4e2541abc47
3
+ metadata.gz: 89163592b295d93348803898a24239837bdb48bbf061a099a2112d914cc53e47
4
+ data.tar.gz: 12193ad19dff4ed242f1329e90a1c40adb99d837eafc5adc7b2a478006e9fb57
5
5
  SHA512:
6
- metadata.gz: fda3f7dcb3d866875e857ca6cf01407a67e470a6f37667f78f658da607b3f1ffd774a34adaee1b18ef16f3384a5ce49625ec410b487cc473aa2e1df2771f7be0
7
- data.tar.gz: 843c7d75995780b23316185e421aec2f11b782eed90300db75f32a68e1198e02df254602014e7cea773bdc110730b0248d7b00d7b5fd8ecc89f9737ec236388c
6
+ metadata.gz: bd235626e52464707b3c9a3631960409b73adc577ca457cacb18af1f07bf1484edc97493525fc062134a2a791d7e70d0833bea9a9584df9844ae58cbe968ca04
7
+ data.tar.gz: 2be8ed1a45db9dd9aa5cb14def5fcf6cb7de39162cef3c9328c7a716585bd211ffc15d1cc1c59861d13ae51888815700d17d074592fdf86f9f153b57b9d037bc
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Retail V2 API
2
+ --title="Retail V2 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Retail::V2::ListCatalogsRequest.new # (request fields
37
37
  response = client.list_catalogs request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-retail-v2/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-retail-v2/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/retail/docs/apis)
@@ -1,11 +1,8 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/retail/v2/catalog.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/api/field_behavior_pb'
6
5
  require 'google/api/resource_pb'
7
- require 'google/cloud/retail/v2/common_pb'
8
- require 'google/cloud/retail/v2/import_config_pb'
9
6
  require 'google/protobuf'
10
7
 
11
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -397,10 +397,6 @@ module Google
397
397
  # * UserEventService will only join events with products from branch
398
398
  # \\{newBranch}.
399
399
  #
400
- # This feature is only available for users who have Retail Search enabled.
401
- # Please submit a form [here](https://cloud.google.com/contact) to contact
402
- # cloud sales if you are interested in using Retail Search.
403
- #
404
400
  # @overload set_default_branch(request, options = nil)
405
401
  # Pass arguments to `set_default_branch` via a request object, either of type
406
402
  # {::Google::Cloud::Retail::V2::SetDefaultBranchRequest} or an equivalent Hash.
@@ -411,7 +407,7 @@ module Google
411
407
  # @param options [::Gapic::CallOptions, ::Hash]
412
408
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
413
409
  #
414
- # @overload set_default_branch(catalog: nil, branch_id: nil, note: nil)
410
+ # @overload set_default_branch(catalog: nil, branch_id: nil, note: nil, force: nil)
415
411
  # Pass arguments to `set_default_branch` via keyword arguments. Note that at
416
412
  # least one keyword argument is required. To specify no parameters, or to keep all
417
413
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -424,6 +420,10 @@ module Google
424
420
  #
425
421
  # This field must be one of "0", "1" or "2". Otherwise, an INVALID_ARGUMENT
426
422
  # error is returned.
423
+ #
424
+ # If there are no sufficient active products in the targeted branch and
425
+ # {::Google::Cloud::Retail::V2::SetDefaultBranchRequest#force force} is not set, a
426
+ # FAILED_PRECONDITION error is returned.
427
427
  # @param note [::String]
428
428
  # Some note on this request, this can be retrieved by
429
429
  # {::Google::Cloud::Retail::V2::CatalogService::Client#get_default_branch CatalogService.GetDefaultBranch}
@@ -431,6 +431,10 @@ module Google
431
431
  #
432
432
  # This field must be a UTF-8 encoded string with a length limit of 1,000
433
433
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
434
+ # @param force [::Boolean]
435
+ # If set to true, it permits switching to a branch with
436
+ # {::Google::Cloud::Retail::V2::SetDefaultBranchRequest#branch_id branch_id} even
437
+ # if it has no sufficient active products.
434
438
  #
435
439
  # @yield [response, operation] Access the result along with the RPC operation
436
440
  # @yieldparam response [::Google::Protobuf::Empty]
@@ -501,10 +505,6 @@ module Google
501
505
  # {::Google::Cloud::Retail::V2::CatalogService::Client#set_default_branch CatalogService.SetDefaultBranch}
502
506
  # method under a specified parent catalog.
503
507
  #
504
- # This feature is only available for users who have Retail Search enabled.
505
- # Please submit a form [here](https://cloud.google.com/contact) to contact
506
- # cloud sales if you are interested in using Retail Search.
507
- #
508
508
  # @overload get_default_branch(request, options = nil)
509
509
  # Pass arguments to `get_default_branch` via a request object, either of type
510
510
  # {::Google::Cloud::Retail::V2::GetDefaultBranchRequest} or an equivalent Hash.
@@ -30,6 +30,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
30
30
  optional :catalog, :string, 1
31
31
  optional :branch_id, :string, 2
32
32
  optional :note, :string, 3
33
+ optional :force, :bool, 4
33
34
  end
34
35
  add_message "google.cloud.retail.v2.GetDefaultBranchRequest" do
35
36
  optional :catalog, :string, 1
@@ -71,18 +71,10 @@ module Google
71
71
  # (if branch is not explicitly set).
72
72
  # * UserEventService will only join events with products from branch
73
73
  # {newBranch}.
74
- #
75
- # This feature is only available for users who have Retail Search enabled.
76
- # Please submit a form [here](https://cloud.google.com/contact) to contact
77
- # cloud sales if you are interested in using Retail Search.
78
74
  rpc :SetDefaultBranch, ::Google::Cloud::Retail::V2::SetDefaultBranchRequest, ::Google::Protobuf::Empty
79
75
  # Get which branch is currently default branch set by
80
76
  # [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch]
81
77
  # method under a specified parent catalog.
82
- #
83
- # This feature is only available for users who have Retail Search enabled.
84
- # Please submit a form [here](https://cloud.google.com/contact) to contact
85
- # cloud sales if you are interested in using Retail Search.
86
78
  rpc :GetDefaultBranch, ::Google::Cloud::Retail::V2::GetDefaultBranchRequest, ::Google::Cloud::Retail::V2::GetDefaultBranchResponse
87
79
  end
88
80
 
@@ -1,7 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/retail/v2/common.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/api/field_behavior_pb'
6
5
  require 'google/protobuf/timestamp_pb'
7
6
  require 'google/protobuf'
@@ -65,8 +64,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
65
64
  optional :user_agent, :string, 3
66
65
  optional :direct_user_request, :bool, 4
67
66
  end
68
- add_message "google.cloud.retail.v2.Promotion" do
69
- optional :promotion_id, :string, 1
67
+ add_message "google.cloud.retail.v2.LocalInventory" do
68
+ optional :place_id, :string, 1
69
+ optional :price_info, :message, 2, "google.cloud.retail.v2.PriceInfo"
70
+ map :attributes, :string, :message, 3, "google.cloud.retail.v2.CustomAttribute"
71
+ repeated :fulfillment_types, :string, 4
70
72
  end
71
73
  end
72
74
  end
@@ -85,7 +87,7 @@ module Google
85
87
  PriceInfo::PriceRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PriceInfo.PriceRange").msgclass
86
88
  Rating = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.Rating").msgclass
87
89
  UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.UserInfo").msgclass
88
- Promotion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.Promotion").msgclass
90
+ LocalInventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.LocalInventory").msgclass
89
91
  end
90
92
  end
91
93
  end
@@ -30,8 +30,7 @@ module Google
30
30
  # Auto-completion service for retail.
31
31
  #
32
32
  # This feature is only available for users who have Retail Search enabled.
33
- # Please submit a form [here](https://cloud.google.com/contact) to contact
34
- # cloud sales if you are interested in using Retail Search.
33
+ # Please enable Retail Search on Cloud Console before using this feature.
35
34
  #
36
35
  class Client
37
36
  include Paths
@@ -144,6 +143,7 @@ module Google
144
143
 
145
144
  @operations_client = Operations.new do |config|
146
145
  config.credentials = credentials
146
+ config.quota_project = @quota_project_id
147
147
  config.endpoint = @config.endpoint
148
148
  end
149
149
 
@@ -169,8 +169,7 @@ module Google
169
169
  # Completes the specified prefix with keyword suggestions.
170
170
  #
171
171
  # This feature is only available for users who have Retail Search enabled.
172
- # Please submit a form [here](https://cloud.google.com/contact) to contact
173
- # cloud sales if you are interested in using Retail Search.
172
+ # Please enable Retail Search on Cloud Console before using this feature.
174
173
  #
175
174
  # @overload complete_query(request, options = nil)
176
175
  # Pass arguments to `complete_query` via a request object, either of type
@@ -197,21 +196,20 @@ module Google
197
196
  #
198
197
  # The maximum number of allowed characters is 255.
199
198
  # @param visitor_id [::String]
200
- # A unique identifier for tracking visitors. For example, this could be
201
- # implemented with an HTTP cookie, which should be able to uniquely identify
202
- # a visitor on a single device. This unique identifier should not change if
203
- # the visitor logs in or out of the website.
199
+ # Required field. A unique identifier for tracking visitors. For example,
200
+ # this could be implemented with an HTTP cookie, which should be able to
201
+ # uniquely identify a visitor on a single device. This unique identifier
202
+ # should not change if the visitor logs in or out of the website.
204
203
  #
205
204
  # The field must be a UTF-8 encoded string with a length limit of 128
206
205
  # characters. Otherwise, an INVALID_ARGUMENT error is returned.
207
206
  # @param language_codes [::Array<::String>]
208
- # The list of languages of the query. This is
209
- # the BCP-47 language code, such as "en-US" or "sr-Latn".
210
- # For more information, see
211
- # [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47).
212
- #
213
- # The maximum number of allowed characters is 255.
214
- # Only "en-US" is currently supported.
207
+ # The language filters applied to the output suggestions. If set, it should
208
+ # contain the language of the query. If not set, suggestions are returned
209
+ # without considering language restrictions. This is the BCP-47 language
210
+ # code, such as "en-US" or "sr-Latn". For more information, see [Tags for
211
+ # Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum
212
+ # number of language codes is 3.
215
213
  # @param device_type [::String]
216
214
  # The device type context for completion suggestions.
217
215
  # It is useful to apply different suggestions on different device types, e.g.
@@ -315,11 +313,13 @@ module Google
315
313
  ##
316
314
  # Bulk import of processed completion dataset.
317
315
  #
318
- # Request processing may be synchronous. Partial updating is not supported.
316
+ # Request processing is asynchronous. Partial updating is not supported.
317
+ #
318
+ # The operation is successfully finished only after the imported suggestions
319
+ # are indexed successfully and ready for serving. The process takes hours.
319
320
  #
320
321
  # This feature is only available for users who have Retail Search enabled.
321
- # Please submit a form [here](https://cloud.google.com/contact) to contact
322
- # cloud sales if you are interested in using Retail Search.
322
+ # Please enable Retail Search on Cloud Console before using this feature.
323
323
  #
324
324
  # @overload import_completion_data(request, options = nil)
325
325
  # Pass arguments to `import_completion_data` via a request object, either of type
@@ -35,8 +35,7 @@ module Google
35
35
  # Auto-completion service for retail.
36
36
  #
37
37
  # This feature is only available for users who have Retail Search enabled.
38
- # Please submit a form [here](https://cloud.google.com/contact) to contact
39
- # cloud sales if you are interested in using Retail Search.
38
+ # Please enable Retail Search on Cloud Console before using this feature.
40
39
  #
41
40
  # To load this service and instantiate a client:
42
41
  #
@@ -27,8 +27,7 @@ module Google
27
27
  # Auto-completion service for retail.
28
28
  #
29
29
  # This feature is only available for users who have Retail Search enabled.
30
- # Please submit a form [here](https://cloud.google.com/contact) to contact
31
- # cloud sales if you are interested in using Retail Search.
30
+ # Please enable Retail Search on Cloud Console before using this feature.
32
31
  class Service
33
32
 
34
33
  include ::GRPC::GenericService
@@ -40,16 +39,17 @@ module Google
40
39
  # Completes the specified prefix with keyword suggestions.
41
40
  #
42
41
  # This feature is only available for users who have Retail Search enabled.
43
- # Please submit a form [here](https://cloud.google.com/contact) to contact
44
- # cloud sales if you are interested in using Retail Search.
42
+ # Please enable Retail Search on Cloud Console before using this feature.
45
43
  rpc :CompleteQuery, ::Google::Cloud::Retail::V2::CompleteQueryRequest, ::Google::Cloud::Retail::V2::CompleteQueryResponse
46
44
  # Bulk import of processed completion dataset.
47
45
  #
48
- # Request processing may be synchronous. Partial updating is not supported.
46
+ # Request processing is asynchronous. Partial updating is not supported.
47
+ #
48
+ # The operation is successfully finished only after the imported suggestions
49
+ # are indexed successfully and ready for serving. The process takes hours.
49
50
  #
50
51
  # This feature is only available for users who have Retail Search enabled.
51
- # Please submit a form [here](https://cloud.google.com/contact) to contact
52
- # cloud sales if you are interested in using Retail Search.
52
+ # Please enable Retail Search on Cloud Console before using this feature.
53
53
  rpc :ImportCompletionData, ::Google::Cloud::Retail::V2::ImportCompletionDataRequest, ::Google::Longrunning::Operation
54
54
  end
55
55
 
@@ -1,7 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/retail/v2/import_config.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/api/field_behavior_pb'
6
5
  require 'google/api/resource_pb'
7
6
  require 'google/cloud/retail/v2/product_pb'
@@ -213,9 +213,12 @@ module Google
213
213
  # * filterOutOfStockItems tag=(-"promotional")
214
214
  # * filterOutOfStockItems
215
215
  #
216
- # If your filter blocks all prediction results, nothing will be returned. If
217
- # you want generic (unfiltered) popular products to be returned instead, set
218
- # `strictFiltering` to false in `PredictRequest.params`.
216
+ # If your filter blocks all prediction results, the API will return generic
217
+ # (unfiltered) popular products. If you only want results strictly matching
218
+ # the filters, set `strictFiltering` to True in `PredictRequest.params` to
219
+ # receive empty results instead.
220
+ # Note that the API will never return items with storageStatus of "EXPIRED"
221
+ # or "DELETED" regardless of filter choices.
219
222
  # @param validate_only [::Boolean]
220
223
  # Use validate only mode for this prediction query. If set to true, a
221
224
  # dummy model will be used that returns arbitrary products.
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/retail/v2/product.proto
3
3
 
4
- require 'google/api/annotations_pb'
5
4
  require 'google/api/field_behavior_pb'
6
5
  require 'google/api/resource_pb'
7
6
  require 'google/cloud/retail/v2/common_pb'
7
+ require 'google/cloud/retail/v2/promotion_pb'
8
8
  require 'google/protobuf/duration_pb'
9
9
  require 'google/protobuf/field_mask_pb'
10
10
  require 'google/protobuf/timestamp_pb'