google-cloud-retail-v2 0.8.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -5
  3. data/lib/google/cloud/retail/v2/catalog_pb.rb +55 -0
  4. data/lib/google/cloud/retail/v2/catalog_service/client.rb +718 -0
  5. data/lib/google/cloud/retail/v2/catalog_service/paths.rb +38 -0
  6. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +34 -0
  7. data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +38 -0
  8. data/lib/google/cloud/retail/v2/common_pb.rb +86 -0
  9. data/lib/google/cloud/retail/v2/completion_service/client.rb +7 -3
  10. data/lib/google/cloud/retail/v2/completion_service/operations.rb +3 -0
  11. data/lib/google/cloud/retail/v2/control_pb.rb +33 -0
  12. data/lib/google/cloud/retail/v2/control_service/client.rb +807 -0
  13. data/lib/google/cloud/retail/v2/control_service/credentials.rb +51 -0
  14. data/lib/google/cloud/retail/v2/control_service/paths.rb +73 -0
  15. data/lib/google/cloud/retail/v2/control_service.rb +49 -0
  16. data/lib/google/cloud/retail/v2/control_service_pb.rb +57 -0
  17. data/lib/google/cloud/retail/v2/control_service_services_pb.rb +65 -0
  18. data/lib/google/cloud/retail/v2/prediction_service/client.rb +28 -13
  19. data/lib/google/cloud/retail/v2/product_pb.rb +1 -0
  20. data/lib/google/cloud/retail/v2/product_service/client.rb +87 -42
  21. data/lib/google/cloud/retail/v2/product_service/operations.rb +3 -0
  22. data/lib/google/cloud/retail/v2/product_service_services_pb.rb +67 -23
  23. data/lib/google/cloud/retail/v2/search_service/client.rb +15 -2
  24. data/lib/google/cloud/retail/v2/search_service_pb.rb +5 -0
  25. data/lib/google/cloud/retail/v2/serving_config_pb.rb +44 -0
  26. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +998 -0
  27. data/lib/google/cloud/retail/v2/serving_config_service/credentials.rb +51 -0
  28. data/lib/google/cloud/retail/v2/serving_config_service/paths.rb +73 -0
  29. data/lib/google/cloud/retail/v2/serving_config_service.rb +49 -0
  30. data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +66 -0
  31. data/lib/google/cloud/retail/v2/serving_config_service_services_pb.rb +74 -0
  32. data/lib/google/cloud/retail/v2/user_event_service/client.rb +2 -2
  33. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +3 -0
  34. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +0 -1
  35. data/lib/google/cloud/retail/v2/user_event_service_services_pb.rb +2 -2
  36. data/lib/google/cloud/retail/v2/version.rb +1 -1
  37. data/lib/google/cloud/retail/v2.rb +2 -0
  38. data/proto_docs/google/cloud/retail/v2/catalog.rb +233 -0
  39. data/proto_docs/google/cloud/retail/v2/catalog_service.rb +133 -0
  40. data/proto_docs/google/cloud/retail/v2/common.rb +314 -4
  41. data/proto_docs/google/cloud/retail/v2/completion_service.rb +9 -4
  42. data/proto_docs/google/cloud/retail/v2/control.rb +76 -0
  43. data/proto_docs/google/cloud/retail/v2/control_service.rb +122 -0
  44. data/proto_docs/google/cloud/retail/v2/import_config.rb +20 -35
  45. data/proto_docs/google/cloud/retail/v2/prediction_service.rb +27 -12
  46. data/proto_docs/google/cloud/retail/v2/product.rb +7 -1
  47. data/proto_docs/google/cloud/retail/v2/product_service.rb +49 -21
  48. data/proto_docs/google/cloud/retail/v2/search_service.rb +72 -13
  49. data/proto_docs/google/cloud/retail/v2/serving_config.rb +238 -0
  50. data/proto_docs/google/cloud/retail/v2/serving_config_service.rb +143 -0
  51. data/proto_docs/google/protobuf/empty.rb +0 -2
  52. metadata +29 -11
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Retail
24
+ module V2
25
+ module ControlService
26
+ # Credentials for the ControlService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/cloud-platform"
30
+ ]
31
+ self.env_vars = [
32
+ "RETAIL_CREDENTIALS",
33
+ "RETAIL_KEYFILE",
34
+ "GOOGLE_CLOUD_CREDENTIALS",
35
+ "GOOGLE_CLOUD_KEYFILE",
36
+ "GCLOUD_KEYFILE",
37
+ "RETAIL_CREDENTIALS_JSON",
38
+ "RETAIL_KEYFILE_JSON",
39
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
40
+ "GOOGLE_CLOUD_KEYFILE_JSON",
41
+ "GCLOUD_KEYFILE_JSON"
42
+ ]
43
+ self.paths = [
44
+ "~/.config/google_cloud/application_default_credentials.json"
45
+ ]
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Retail
23
+ module V2
24
+ module ControlService
25
+ # Path helper methods for the ControlService API.
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
+
46
+ ##
47
+ # Create a fully-qualified Control resource string.
48
+ #
49
+ # The resource will be in the following format:
50
+ #
51
+ # `projects/{project}/locations/{location}/catalogs/{catalog}/controls/{control}`
52
+ #
53
+ # @param project [String]
54
+ # @param location [String]
55
+ # @param catalog [String]
56
+ # @param control [String]
57
+ #
58
+ # @return [::String]
59
+ def control_path project:, location:, catalog:, control:
60
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
61
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
62
+ raise ::ArgumentError, "catalog cannot contain /" if catalog.to_s.include? "/"
63
+
64
+ "projects/#{project}/locations/#{location}/catalogs/#{catalog}/controls/#{control}"
65
+ end
66
+
67
+ extend self
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/common"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/retail/v2/version"
24
+
25
+ require "google/cloud/retail/v2/control_service/credentials"
26
+ require "google/cloud/retail/v2/control_service/paths"
27
+ require "google/cloud/retail/v2/control_service/client"
28
+
29
+ module Google
30
+ module Cloud
31
+ module Retail
32
+ module V2
33
+ ##
34
+ # Service for modifying Control.
35
+ #
36
+ # To load this service and instantiate a client:
37
+ #
38
+ # require "google/cloud/retail/v2/control_service"
39
+ # client = ::Google::Cloud::Retail::V2::ControlService::Client.new
40
+ #
41
+ module ControlService
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
47
+
48
+ helper_path = ::File.join __dir__, "control_service", "helpers.rb"
49
+ require "google/cloud/retail/v2/control_service/helpers" if ::File.file? helper_path
@@ -0,0 +1,57 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/retail/v2/control_service.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/cloud/retail/v2/control_pb'
11
+ require 'google/protobuf/empty_pb'
12
+ require 'google/protobuf/field_mask_pb'
13
+
14
+ Google::Protobuf::DescriptorPool.generated_pool.build do
15
+ add_file("google/cloud/retail/v2/control_service.proto", :syntax => :proto3) do
16
+ add_message "google.cloud.retail.v2.CreateControlRequest" do
17
+ optional :parent, :string, 1
18
+ optional :control, :message, 2, "google.cloud.retail.v2.Control"
19
+ optional :control_id, :string, 3
20
+ end
21
+ add_message "google.cloud.retail.v2.UpdateControlRequest" do
22
+ optional :control, :message, 1, "google.cloud.retail.v2.Control"
23
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
24
+ end
25
+ add_message "google.cloud.retail.v2.DeleteControlRequest" do
26
+ optional :name, :string, 1
27
+ end
28
+ add_message "google.cloud.retail.v2.GetControlRequest" do
29
+ optional :name, :string, 1
30
+ end
31
+ add_message "google.cloud.retail.v2.ListControlsRequest" do
32
+ optional :parent, :string, 1
33
+ optional :page_size, :int32, 2
34
+ optional :page_token, :string, 3
35
+ optional :filter, :string, 4
36
+ end
37
+ add_message "google.cloud.retail.v2.ListControlsResponse" do
38
+ repeated :controls, :message, 1, "google.cloud.retail.v2.Control"
39
+ optional :next_page_token, :string, 2
40
+ end
41
+ end
42
+ end
43
+
44
+ module Google
45
+ module Cloud
46
+ module Retail
47
+ module V2
48
+ CreateControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.CreateControlRequest").msgclass
49
+ UpdateControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.UpdateControlRequest").msgclass
50
+ DeleteControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.DeleteControlRequest").msgclass
51
+ GetControlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.GetControlRequest").msgclass
52
+ ListControlsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ListControlsRequest").msgclass
53
+ ListControlsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ListControlsResponse").msgclass
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,65 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/retail/v2/control_service.proto for package 'Google.Cloud.Retail.V2'
3
+ # Original file comments:
4
+ # Copyright 2021 Google LLC
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/retail/v2/control_service_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Retail
25
+ module V2
26
+ module ControlService
27
+ # Service for modifying Control.
28
+ class Service
29
+
30
+ include ::GRPC::GenericService
31
+
32
+ self.marshal_class_method = :encode
33
+ self.unmarshal_class_method = :decode
34
+ self.service_name = 'google.cloud.retail.v2.ControlService'
35
+
36
+ # Creates a Control.
37
+ #
38
+ # If the [Control][google.cloud.retail.v2.Control] to create already exists,
39
+ # an ALREADY_EXISTS error is returned.
40
+ rpc :CreateControl, ::Google::Cloud::Retail::V2::CreateControlRequest, ::Google::Cloud::Retail::V2::Control
41
+ # Deletes a Control.
42
+ #
43
+ # If the [Control][google.cloud.retail.v2.Control] to delete does not exist,
44
+ # a NOT_FOUND error is returned.
45
+ rpc :DeleteControl, ::Google::Cloud::Retail::V2::DeleteControlRequest, ::Google::Protobuf::Empty
46
+ # Updates a Control.
47
+ #
48
+ # [Control][google.cloud.retail.v2.Control] cannot be set to a different
49
+ # oneof field, if so an INVALID_ARGUMENT is returned. If the
50
+ # [Control][google.cloud.retail.v2.Control] to update does not exist, a
51
+ # NOT_FOUND error is returned.
52
+ rpc :UpdateControl, ::Google::Cloud::Retail::V2::UpdateControlRequest, ::Google::Cloud::Retail::V2::Control
53
+ # Gets a Control.
54
+ rpc :GetControl, ::Google::Cloud::Retail::V2::GetControlRequest, ::Google::Cloud::Retail::V2::Control
55
+ # Lists all Controls by their parent
56
+ # [Catalog][google.cloud.retail.v2.Catalog].
57
+ rpc :ListControls, ::Google::Cloud::Retail::V2::ListControlsRequest, ::Google::Cloud::Retail::V2::ListControlsResponse
58
+ end
59
+
60
+ Stub = Service.rpc_stub_class
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -169,14 +169,19 @@ module Google
169
169
  #
170
170
  # @param placement [::String]
171
171
  # Required. Full resource name of the format:
172
- # \\{name=projects/*/locations/global/catalogs/default_catalog/placements/*}
173
- # The ID of the Recommendations AI placement. Before you can request
174
- # predictions from your model, you must create at least one placement for it.
175
- # For more information, see [Managing
176
- # placements](https://cloud.google.com/retail/recommendations-ai/docs/manage-placements).
177
- #
178
- # The full list of available placements can be seen at
179
- # https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements
172
+ # `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}`
173
+ # or
174
+ # `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`.
175
+ # We recommend using the `servingConfigs` resource. `placements` is a legacy
176
+ # resource.
177
+ # The ID of the Recommendations AI serving config or placement.
178
+ # Before you can request predictions from your model, you must create at
179
+ # least one serving config or placement for it. For more information, see
180
+ # [Managing serving configurations]
181
+ # (https://cloud.google.com/retail/docs/manage-configs).
182
+ #
183
+ # The full list of available serving configs can be seen at
184
+ # https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs
180
185
  # @param user_event [::Google::Cloud::Retail::V2::UserEvent, ::Hash]
181
186
  # Required. Context about the user, what they are looking at and what action
182
187
  # they took to trigger the predict request. Note that this user event detail
@@ -193,12 +198,12 @@ module Google
193
198
  # random unique ID and leave
194
199
  # {::Google::Cloud::Retail::V2::UserInfo#user_id UserInfo.user_id} unset.
195
200
  # @param page_size [::Integer]
196
- # Maximum number of results to return per page. Set this property
197
- # to the number of prediction results needed. If zero, the service will
198
- # choose a reasonable default. The maximum allowed value is 100. Values
199
- # above 100 will be coerced to 100.
201
+ # Maximum number of results to return. Set this property to the number of
202
+ # prediction results needed. If zero, the service will choose a reasonable
203
+ # default. The maximum allowed value is 100. Values above 100 will be coerced
204
+ # to 100.
200
205
  # @param page_token [::String]
201
- # The previous PredictResponse.next_page_token.
206
+ # This field is not used; leave it unset.
202
207
  # @param filter [::String]
203
208
  # Filter for restricting prediction results with a length limit of 5,000
204
209
  # characters. Accepts values for tags and the `filterOutOfStockItems` flag.
@@ -229,6 +234,14 @@ module Google
229
234
  # receive empty results instead.
230
235
  # Note that the API will never return items with storageStatus of "EXPIRED"
231
236
  # or "DELETED" regardless of filter choices.
237
+ #
238
+ # If `filterSyntaxV2` is set to true under the `params` field, then
239
+ # attribute-based expressions are expected instead of the above described
240
+ # tag-based syntax. Examples:
241
+ #
242
+ # * (colors: ANY("Red", "Blue")) AND NOT (categories: ANY("Phones"))
243
+ # * (availability: ANY("IN_STOCK")) AND
244
+ # (colors: ANY("Red") OR categories: ANY("Phones"))
232
245
  # @param validate_only [::Boolean]
233
246
  # Use validate only mode for this prediction query. If set to true, a
234
247
  # dummy model will be used that returns arbitrary products.
@@ -260,6 +273,8 @@ module Google
260
273
  # 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives
261
274
  # request-level control and adjusts prediction results based on product
262
275
  # category.
276
+ # * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter`
277
+ # field is interpreteted according to the new, attribute-based syntax.
263
278
  # @param labels [::Hash{::String => ::String}]
264
279
  # The labels applied to a resource must meet the following requirements:
265
280
  #
@@ -46,6 +46,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
46
46
  optional :publish_time, :message, 33, "google.protobuf.Timestamp"
47
47
  optional :retrievable_fields, :message, 30, "google.protobuf.FieldMask"
48
48
  repeated :variants, :message, 31, "google.cloud.retail.v2.Product"
49
+ repeated :local_inventories, :message, 35, "google.cloud.retail.v2.LocalInventory"
49
50
  oneof :expiration do
50
51
  optional :expire_time, :message, 16, "google.protobuf.Timestamp"
51
52
  optional :ttl, :message, 17, "google.protobuf.Duration"
@@ -782,29 +782,24 @@ module Google
782
782
  # @param errors_config [::Google::Cloud::Retail::V2::ImportErrorsConfig, ::Hash]
783
783
  # The desired location of errors incurred during the Import.
784
784
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
785
- # Indicates which fields in the provided imported 'products' to update. If
786
- # not set, will by default update all fields.
785
+ # Indicates which fields in the provided imported `products` to update. If
786
+ # not set, all fields are updated.
787
787
  # @param reconciliation_mode [::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode]
788
788
  # The mode of reconciliation between existing products and the products to be
789
789
  # imported. Defaults to
790
790
  # {::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode::INCREMENTAL ReconciliationMode.INCREMENTAL}.
791
791
  # @param notification_pubsub_topic [::String]
792
792
  # Full Pub/Sub topic name for receiving notification. If this field is set,
793
- # when the import is finished, a notification will be sent to
794
- # specified Pub/Sub topic. The message data will be JSON string of a
793
+ # when the import is finished, a notification is sent to
794
+ # specified Pub/Sub topic. The message data is JSON string of a
795
795
  # {::Google::Longrunning::Operation Operation}.
796
796
  #
797
797
  # Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
798
798
  # to be within the same project as
799
799
  # {::Google::Cloud::Retail::V2::ImportProductsRequest#parent ImportProductsRequest.parent}.
800
- # Make sure that both
801
- # `cloud-retail-customer-data-access@system.gserviceaccount.com` and
802
- # `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
803
- # have the `pubsub.topics.publish` IAM permission on the topic.
804
- #
805
- # Only supported when
806
- # {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
807
- # is set to `FULL`.
800
+ # Make sure that `service-<project
801
+ # number>@gcp-sa-retail.iam.gserviceaccount.com` has the
802
+ # `pubsub.topics.publish` IAM permission on the topic.
808
803
  #
809
804
  # @yield [response, operation] Access the result along with the RPC operation
810
805
  # @yieldparam response [::Gapic::Operation]
@@ -889,18 +884,21 @@ module Google
889
884
  # enqueued and processed downstream. As a consequence, when a response is
890
885
  # returned, updates are not immediately manifested in the
891
886
  # {::Google::Cloud::Retail::V2::Product Product} queried by
892
- # {::Google::Cloud::Retail::V2::ProductService::Client#get_product GetProduct} or
893
- # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ListProducts}.
887
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}
888
+ # or
889
+ # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}.
894
890
  #
895
891
  # When inventory is updated with
896
- # {::Google::Cloud::Retail::V2::ProductService::Client#create_product CreateProduct} and
897
- # {::Google::Cloud::Retail::V2::ProductService::Client#update_product UpdateProduct}, the
898
- # specified inventory field value(s) will overwrite any existing value(s)
892
+ # {::Google::Cloud::Retail::V2::ProductService::Client#create_product ProductService.CreateProduct}
893
+ # and
894
+ # {::Google::Cloud::Retail::V2::ProductService::Client#update_product ProductService.UpdateProduct},
895
+ # the specified inventory field value(s) will overwrite any existing value(s)
899
896
  # while ignoring the last update time for this field. Furthermore, the last
900
897
  # update time for the specified inventory fields will be overwritten to the
901
898
  # time of the
902
- # {::Google::Cloud::Retail::V2::ProductService::Client#create_product CreateProduct} or
903
- # {::Google::Cloud::Retail::V2::ProductService::Client#update_product UpdateProduct}
899
+ # {::Google::Cloud::Retail::V2::ProductService::Client#create_product ProductService.CreateProduct}
900
+ # or
901
+ # {::Google::Cloud::Retail::V2::ProductService::Client#update_product ProductService.UpdateProduct}
904
902
  # request.
905
903
  #
906
904
  # If no inventory fields are set in
@@ -912,10 +910,17 @@ module Google
912
910
  # then any existing inventory information will be preserved.
913
911
  #
914
912
  # Pre-existing inventory information can only be updated with
915
- # {::Google::Cloud::Retail::V2::ProductService::Client#set_inventory SetInventory},
913
+ # {::Google::Cloud::Retail::V2::ProductService::Client#set_inventory ProductService.SetInventory},
916
914
  # {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces},
917
915
  # and
918
- # {::Google::Cloud::Retail::V2::ProductService::Client#remove_fulfillment_places RemoveFulfillmentPlaces}.
916
+ # {::Google::Cloud::Retail::V2::ProductService::Client#remove_fulfillment_places ProductService.RemoveFulfillmentPlaces}.
917
+ #
918
+ # The returned [Operation][]s will be obsolete after 1 day, and
919
+ # [GetOperation][] API will return NOT_FOUND afterwards.
920
+ #
921
+ # If conflicting updates are issued, the [Operation][]s associated with the
922
+ # stale updates will not be marked as [done][Operation.done] until being
923
+ # obsolete.
919
924
  #
920
925
  # This feature is only available for users who have Retail Search enabled.
921
926
  # Please enable Retail Search on Cloud Console before using this feature.
@@ -938,6 +943,7 @@ module Google
938
943
  # @param inventory [::Google::Cloud::Retail::V2::Product, ::Hash]
939
944
  # Required. The inventory information to update. The allowable fields to
940
945
  # update are:
946
+ #
941
947
  # * {::Google::Cloud::Retail::V2::Product#price_info Product.price_info}
942
948
  # * {::Google::Cloud::Retail::V2::Product#availability Product.availability}
943
949
  # * {::Google::Cloud::Retail::V2::Product#available_quantity Product.available_quantity}
@@ -945,8 +951,9 @@ module Google
945
951
  # The updated inventory fields must be specified in
946
952
  # {::Google::Cloud::Retail::V2::SetInventoryRequest#set_mask SetInventoryRequest.set_mask}.
947
953
  #
948
- # If [SetInventoryRequest.inventory.name][] is empty or invalid, an
949
- # INVALID_ARGUMENT error is returned.
954
+ # If
955
+ # {::Google::Cloud::Retail::V2::Product#name SetInventoryRequest.inventory.name}
956
+ # is empty or invalid, an INVALID_ARGUMENT error is returned.
950
957
  #
951
958
  # If the caller does not have permission to update the
952
959
  # {::Google::Cloud::Retail::V2::Product Product} named in
@@ -969,7 +976,8 @@ module Google
969
976
  # * Adds "fulfillment_info" in
970
977
  # {::Google::Cloud::Retail::V2::SetInventoryRequest#set_mask SetInventoryRequest.set_mask}
971
978
  # * Specifies only the desired fulfillment types and corresponding place IDs
972
- # to update in [SetInventoryRequest.inventory.fulfillment_info][]
979
+ # to update in
980
+ # {::Google::Cloud::Retail::V2::Product#fulfillment_info SetInventoryRequest.inventory.fulfillment_info}
973
981
  #
974
982
  # The caller can clear all place IDs from a subset of fulfillment types in
975
983
  # the following ways:
@@ -977,9 +985,9 @@ module Google
977
985
  # * Adds "fulfillment_info" in
978
986
  # {::Google::Cloud::Retail::V2::SetInventoryRequest#set_mask SetInventoryRequest.set_mask}
979
987
  # * Specifies only the desired fulfillment types to clear in
980
- # [SetInventoryRequest.inventory.fulfillment_info][]
988
+ # {::Google::Cloud::Retail::V2::Product#fulfillment_info SetInventoryRequest.inventory.fulfillment_info}
981
989
  # * Checks that only the desired fulfillment info types have empty
982
- # [SetInventoryRequest.inventory.fulfillment_info.place_ids][]
990
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#place_ids SetInventoryRequest.inventory.fulfillment_info.place_ids}
983
991
  #
984
992
  # The last update time is recorded for the following inventory fields:
985
993
  # * {::Google::Cloud::Retail::V2::Product#price_info Product.price_info}
@@ -988,7 +996,9 @@ module Google
988
996
  # * {::Google::Cloud::Retail::V2::Product#fulfillment_info Product.fulfillment_info}
989
997
  #
990
998
  # If a full overwrite of inventory information while ignoring timestamps is
991
- # needed, [UpdateProduct][] should be invoked instead.
999
+ # needed,
1000
+ # {::Google::Cloud::Retail::V2::ProductService::Client#update_product ProductService.UpdateProduct}
1001
+ # should be invoked instead.
992
1002
  # @param set_mask [::Google::Protobuf::FieldMask, ::Hash]
993
1003
  # Indicates which inventory fields in the provided
994
1004
  # {::Google::Cloud::Retail::V2::Product Product} to update.
@@ -1091,8 +1101,16 @@ module Google
1091
1101
  # enqueued and processed downstream. As a consequence, when a response is
1092
1102
  # returned, the added place IDs are not immediately manifested in the
1093
1103
  # {::Google::Cloud::Retail::V2::Product Product} queried by
1094
- # {::Google::Cloud::Retail::V2::ProductService::Client#get_product GetProduct} or
1095
- # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ListProducts}.
1104
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}
1105
+ # or
1106
+ # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}.
1107
+ #
1108
+ # The returned [Operation][]s will be obsolete after 1 day, and
1109
+ # [GetOperation][] API will return NOT_FOUND afterwards.
1110
+ #
1111
+ # If conflicting updates are issued, the [Operation][]s associated with the
1112
+ # stale updates will not be marked as [done][Operation.done] until being
1113
+ # obsolete.
1096
1114
  #
1097
1115
  # This feature is only available for users who have Retail Search enabled.
1098
1116
  # Please enable Retail Search on Cloud Console before using this feature.
@@ -1139,7 +1157,8 @@ module Google
1139
1157
  # If this field is set to an invalid value other than these, an
1140
1158
  # INVALID_ARGUMENT error is returned.
1141
1159
  #
1142
- # This field directly corresponds to [Product.fulfillment_info.type][].
1160
+ # This field directly corresponds to
1161
+ # {::Google::Cloud::Retail::V2::FulfillmentInfo#type Product.fulfillment_info.type}.
1143
1162
  # @param place_ids [::Array<::String>]
1144
1163
  # Required. The IDs for this
1145
1164
  # {::Google::Cloud::Retail::V2::AddFulfillmentPlacesRequest#type type}, such as
@@ -1250,8 +1269,16 @@ module Google
1250
1269
  # enqueued and processed downstream. As a consequence, when a response is
1251
1270
  # returned, the removed place IDs are not immediately manifested in the
1252
1271
  # {::Google::Cloud::Retail::V2::Product Product} queried by
1253
- # {::Google::Cloud::Retail::V2::ProductService::Client#get_product GetProduct} or
1254
- # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ListProducts}.
1272
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}
1273
+ # or
1274
+ # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}.
1275
+ #
1276
+ # The returned [Operation][]s will be obsolete after 1 day, and
1277
+ # [GetOperation][] API will return NOT_FOUND afterwards.
1278
+ #
1279
+ # If conflicting updates are issued, the [Operation][]s associated with the
1280
+ # stale updates will not be marked as [done][Operation.done] until being
1281
+ # obsolete.
1255
1282
  #
1256
1283
  # This feature is only available for users who have Retail Search enabled.
1257
1284
  # Please enable Retail Search on Cloud Console before using this feature.
@@ -1406,13 +1433,22 @@ module Google
1406
1433
  # and processed downstream. As a consequence, when a response is returned,
1407
1434
  # updates are not immediately manifested in the
1408
1435
  # {::Google::Cloud::Retail::V2::Product Product} queried by
1409
- # {::Google::Cloud::Retail::V2::ProductService::Client#get_product GetProduct} or
1410
- # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ListProducts}.
1436
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}
1437
+ # or
1438
+ # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}.
1411
1439
  #
1412
1440
  # Local inventory information can only be modified using this method.
1413
- # {::Google::Cloud::Retail::V2::ProductService::Client#create_product CreateProduct} and
1414
- # {::Google::Cloud::Retail::V2::ProductService::Client#update_product UpdateProduct} has no
1415
- # effect on local inventories.
1441
+ # {::Google::Cloud::Retail::V2::ProductService::Client#create_product ProductService.CreateProduct}
1442
+ # and
1443
+ # {::Google::Cloud::Retail::V2::ProductService::Client#update_product ProductService.UpdateProduct}
1444
+ # has no effect on local inventories.
1445
+ #
1446
+ # The returned [Operation][]s will be obsolete after 1 day, and
1447
+ # [GetOperation][] API will return NOT_FOUND afterwards.
1448
+ #
1449
+ # If conflicting updates are issued, the [Operation][]s associated with the
1450
+ # stale updates will not be marked as [done][Operation.done] until being
1451
+ # obsolete.
1416
1452
  #
1417
1453
  # This feature is only available for users who have Retail Search enabled.
1418
1454
  # Please enable Retail Search on Cloud Console before using this feature.
@@ -1552,13 +1588,22 @@ module Google
1552
1588
  # enqueued and processed downstream. As a consequence, when a response is
1553
1589
  # returned, removals are not immediately manifested in the
1554
1590
  # {::Google::Cloud::Retail::V2::Product Product} queried by
1555
- # {::Google::Cloud::Retail::V2::ProductService::Client#get_product GetProduct} or
1556
- # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ListProducts}.
1591
+ # {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}
1592
+ # or
1593
+ # {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}.
1557
1594
  #
1558
1595
  # Local inventory information can only be removed using this method.
1559
- # {::Google::Cloud::Retail::V2::ProductService::Client#create_product CreateProduct} and
1560
- # {::Google::Cloud::Retail::V2::ProductService::Client#update_product UpdateProduct} has no
1561
- # effect on local inventories.
1596
+ # {::Google::Cloud::Retail::V2::ProductService::Client#create_product ProductService.CreateProduct}
1597
+ # and
1598
+ # {::Google::Cloud::Retail::V2::ProductService::Client#update_product ProductService.UpdateProduct}
1599
+ # has no effect on local inventories.
1600
+ #
1601
+ # The returned [Operation][]s will be obsolete after 1 day, and
1602
+ # [GetOperation][] API will return NOT_FOUND afterwards.
1603
+ #
1604
+ # If conflicting updates are issued, the [Operation][]s associated with the
1605
+ # stale updates will not be marked as [done][Operation.done] until being
1606
+ # obsolete.
1562
1607
  #
1563
1608
  # This feature is only available for users who have Retail Search enabled.
1564
1609
  # Please enable Retail Search on Cloud Console before using this feature.
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls