google-cloud-retail-v2 0.19.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/google/cloud/retail/v2/analytics_service/client.rb +5 -1
- data/lib/google/cloud/retail/v2/analytics_service/operations.rb +13 -5
- data/lib/google/cloud/retail/v2/analytics_service/rest/client.rb +5 -1
- data/lib/google/cloud/retail/v2/analytics_service/rest/operations.rb +11 -4
- data/lib/google/cloud/retail/v2/catalog_pb.rb +9 -1
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +25 -11
- data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +25 -11
- data/lib/google/cloud/retail/v2/common_pb.rb +4 -1
- data/lib/google/cloud/retail/v2/completion_service/client.rb +15 -6
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +13 -5
- data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +15 -6
- data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +11 -4
- data/lib/google/cloud/retail/v2/completion_service_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/control_service/client.rb +13 -5
- data/lib/google/cloud/retail/v2/control_service/rest/client.rb +13 -5
- data/lib/google/cloud/retail/v2/model_pb.rb +4 -1
- data/lib/google/cloud/retail/v2/model_service/client.rb +19 -8
- data/lib/google/cloud/retail/v2/model_service/operations.rb +13 -5
- data/lib/google/cloud/retail/v2/model_service/rest/client.rb +19 -8
- data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +11 -4
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +5 -1
- data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +5 -1
- data/lib/google/cloud/retail/v2/product_service/client.rb +206 -21
- data/lib/google/cloud/retail/v2/product_service/operations.rb +13 -5
- data/lib/google/cloud/retail/v2/product_service/rest/client.rb +199 -21
- data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +11 -4
- data/lib/google/cloud/retail/v2/product_service/rest/service_stub.rb +60 -0
- data/lib/google/cloud/retail/v2/product_service_pb.rb +2 -1
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +26 -6
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +6 -1
- data/lib/google/cloud/retail/v2/search_service/client.rb +27 -23
- data/lib/google/cloud/retail/v2/search_service/rest/client.rb +27 -23
- data/lib/google/cloud/retail/v2/serving_config_pb.rb +1 -1
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +17 -7
- data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +17 -7
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +14 -6
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +13 -5
- data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +14 -6
- data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +11 -4
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/proto_docs/google/api/client.rb +4 -0
- data/proto_docs/google/cloud/retail/v2/catalog.rb +143 -4
- data/proto_docs/google/cloud/retail/v2/common.rb +104 -10
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +14 -7
- data/proto_docs/google/cloud/retail/v2/import_config.rb +10 -4
- data/proto_docs/google/cloud/retail/v2/model.rb +40 -0
- data/proto_docs/google/cloud/retail/v2/product.rb +23 -22
- data/proto_docs/google/cloud/retail/v2/promotion.rb +2 -2
- data/proto_docs/google/cloud/retail/v2/purge_config.rb +93 -0
- data/proto_docs/google/cloud/retail/v2/search_service.rb +42 -42
- data/proto_docs/google/cloud/retail/v2/serving_config.rb +4 -0
- data/proto_docs/google/cloud/retail/v2/user_event.rb +3 -2
- metadata +8 -119
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# of the customer's website.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
API_VERSION = ""
|
37
|
+
|
35
38
|
# @private
|
36
39
|
DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
|
37
40
|
|
@@ -274,10 +277,11 @@ module Google
|
|
274
277
|
# Customize the options with defaults
|
275
278
|
metadata = @config.rpcs.create_product.metadata.to_h
|
276
279
|
|
277
|
-
# Set x-goog-api-client
|
280
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
278
281
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
279
282
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
280
283
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
284
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
281
285
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
282
286
|
|
283
287
|
header_params = {}
|
@@ -368,10 +372,11 @@ module Google
|
|
368
372
|
# Customize the options with defaults
|
369
373
|
metadata = @config.rpcs.get_product.metadata.to_h
|
370
374
|
|
371
|
-
# Set x-goog-api-client
|
375
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
372
376
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
373
377
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
374
378
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
379
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
375
380
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
376
381
|
|
377
382
|
header_params = {}
|
@@ -528,10 +533,11 @@ module Google
|
|
528
533
|
# Customize the options with defaults
|
529
534
|
metadata = @config.rpcs.list_products.metadata.to_h
|
530
535
|
|
531
|
-
# Set x-goog-api-client
|
536
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
532
537
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
533
538
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
534
539
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
540
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
535
541
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
536
542
|
|
537
543
|
header_params = {}
|
@@ -640,10 +646,11 @@ module Google
|
|
640
646
|
# Customize the options with defaults
|
641
647
|
metadata = @config.rpcs.update_product.metadata.to_h
|
642
648
|
|
643
|
-
# Set x-goog-api-client
|
649
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
644
650
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
645
651
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
646
652
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
653
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
647
654
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
648
655
|
|
649
656
|
header_params = {}
|
@@ -745,10 +752,11 @@ module Google
|
|
745
752
|
# Customize the options with defaults
|
746
753
|
metadata = @config.rpcs.delete_product.metadata.to_h
|
747
754
|
|
748
|
-
# Set x-goog-api-client
|
755
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
749
756
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
750
757
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
751
758
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
759
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
752
760
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
753
761
|
|
754
762
|
header_params = {}
|
@@ -775,6 +783,162 @@ module Google
|
|
775
783
|
raise ::Google::Cloud::Error.from_error(e)
|
776
784
|
end
|
777
785
|
|
786
|
+
##
|
787
|
+
# Permanently deletes all selected {::Google::Cloud::Retail::V2::Product Product}s
|
788
|
+
# under a branch.
|
789
|
+
#
|
790
|
+
# This process is asynchronous. If the request is valid, the removal will be
|
791
|
+
# enqueued and processed offline. Depending on the number of
|
792
|
+
# {::Google::Cloud::Retail::V2::Product Product}s, this operation could take hours
|
793
|
+
# to complete. Before the operation completes, some
|
794
|
+
# {::Google::Cloud::Retail::V2::Product Product}s may still be returned by
|
795
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#get_product ProductService.GetProduct}
|
796
|
+
# or
|
797
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#list_products ProductService.ListProducts}.
|
798
|
+
#
|
799
|
+
# Depending on the number of {::Google::Cloud::Retail::V2::Product Product}s, this
|
800
|
+
# operation could take hours to complete. To get a sample of
|
801
|
+
# {::Google::Cloud::Retail::V2::Product Product}s that would be deleted, set
|
802
|
+
# {::Google::Cloud::Retail::V2::PurgeProductsRequest#force PurgeProductsRequest.force}
|
803
|
+
# to false.
|
804
|
+
#
|
805
|
+
# @overload purge_products(request, options = nil)
|
806
|
+
# Pass arguments to `purge_products` via a request object, either of type
|
807
|
+
# {::Google::Cloud::Retail::V2::PurgeProductsRequest} or an equivalent Hash.
|
808
|
+
#
|
809
|
+
# @param request [::Google::Cloud::Retail::V2::PurgeProductsRequest, ::Hash]
|
810
|
+
# A request object representing the call parameters. Required. To specify no
|
811
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
812
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
813
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
814
|
+
#
|
815
|
+
# @overload purge_products(parent: nil, filter: nil, force: nil)
|
816
|
+
# Pass arguments to `purge_products` via keyword arguments. Note that at
|
817
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
818
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
819
|
+
#
|
820
|
+
# @param parent [::String]
|
821
|
+
# Required. The resource name of the branch under which the products are
|
822
|
+
# created. The format is
|
823
|
+
# `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
|
824
|
+
# @param filter [::String]
|
825
|
+
# Required. The filter string to specify the products to be deleted with a
|
826
|
+
# length limit of 5,000 characters.
|
827
|
+
#
|
828
|
+
# Empty string filter is not allowed. "*" implies delete all items in a
|
829
|
+
# branch.
|
830
|
+
#
|
831
|
+
# The eligible fields for filtering are:
|
832
|
+
#
|
833
|
+
# * `availability`: Double quoted
|
834
|
+
# {::Google::Cloud::Retail::V2::Product#availability Product.availability} string.
|
835
|
+
# * `create_time` : in ISO 8601 "zulu" format.
|
836
|
+
#
|
837
|
+
# Supported syntax:
|
838
|
+
#
|
839
|
+
# * Comparators (">", "<", ">=", "<=", "=").
|
840
|
+
# Examples:
|
841
|
+
# * create_time <= "2015-02-13T17:05:46Z"
|
842
|
+
# * availability = "IN_STOCK"
|
843
|
+
#
|
844
|
+
# * Conjunctions ("AND")
|
845
|
+
# Examples:
|
846
|
+
# * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
|
847
|
+
#
|
848
|
+
# * Disjunctions ("OR")
|
849
|
+
# Examples:
|
850
|
+
# * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
|
851
|
+
#
|
852
|
+
# * Can support nested queries.
|
853
|
+
# Examples:
|
854
|
+
# * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
|
855
|
+
# OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
|
856
|
+
#
|
857
|
+
# * Filter Limits:
|
858
|
+
# * Filter should not contain more than 6 conditions.
|
859
|
+
# * Max nesting depth should not exceed 2 levels.
|
860
|
+
#
|
861
|
+
# Examples queries:
|
862
|
+
# * Delete back order products created before a timestamp.
|
863
|
+
# create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
|
864
|
+
# @param force [::Boolean]
|
865
|
+
# Actually perform the purge.
|
866
|
+
# If `force` is set to false, the method will return the expected purge count
|
867
|
+
# without deleting any products.
|
868
|
+
#
|
869
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
870
|
+
# @yieldparam response [::Gapic::Operation]
|
871
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
872
|
+
#
|
873
|
+
# @return [::Gapic::Operation]
|
874
|
+
#
|
875
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
876
|
+
#
|
877
|
+
# @example Basic example
|
878
|
+
# require "google/cloud/retail/v2"
|
879
|
+
#
|
880
|
+
# # Create a client object. The client can be reused for multiple calls.
|
881
|
+
# client = Google::Cloud::Retail::V2::ProductService::Client.new
|
882
|
+
#
|
883
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
884
|
+
# request = Google::Cloud::Retail::V2::PurgeProductsRequest.new
|
885
|
+
#
|
886
|
+
# # Call the purge_products method.
|
887
|
+
# result = client.purge_products request
|
888
|
+
#
|
889
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
890
|
+
# # check the status of an operation, cancel it, or wait for results.
|
891
|
+
# # Here is how to wait for a response.
|
892
|
+
# result.wait_until_done! timeout: 60
|
893
|
+
# if result.response?
|
894
|
+
# p result.response
|
895
|
+
# else
|
896
|
+
# puts "No response received."
|
897
|
+
# end
|
898
|
+
#
|
899
|
+
def purge_products request, options = nil
|
900
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
901
|
+
|
902
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::PurgeProductsRequest
|
903
|
+
|
904
|
+
# Converts hash and nil to an options object
|
905
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
906
|
+
|
907
|
+
# Customize the options with defaults
|
908
|
+
metadata = @config.rpcs.purge_products.metadata.to_h
|
909
|
+
|
910
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
911
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
912
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
913
|
+
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
914
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
915
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
916
|
+
|
917
|
+
header_params = {}
|
918
|
+
if request.parent
|
919
|
+
header_params["parent"] = request.parent
|
920
|
+
end
|
921
|
+
|
922
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
923
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
924
|
+
|
925
|
+
options.apply_defaults timeout: @config.rpcs.purge_products.timeout,
|
926
|
+
metadata: metadata,
|
927
|
+
retry_policy: @config.rpcs.purge_products.retry_policy
|
928
|
+
|
929
|
+
options.apply_defaults timeout: @config.timeout,
|
930
|
+
metadata: @config.metadata,
|
931
|
+
retry_policy: @config.retry_policy
|
932
|
+
|
933
|
+
@product_service_stub.call_rpc :purge_products, request, options: options do |response, operation|
|
934
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
935
|
+
yield response, operation if block_given?
|
936
|
+
return response
|
937
|
+
end
|
938
|
+
rescue ::GRPC::BadStatus => e
|
939
|
+
raise ::Google::Cloud::Error.from_error(e)
|
940
|
+
end
|
941
|
+
|
778
942
|
##
|
779
943
|
# Bulk import of multiple {::Google::Cloud::Retail::V2::Product Product}s.
|
780
944
|
#
|
@@ -813,7 +977,8 @@ module Google
|
|
813
977
|
# The desired location of errors incurred during the Import.
|
814
978
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
815
979
|
# Indicates which fields in the provided imported `products` to update. If
|
816
|
-
# not set, all fields are updated.
|
980
|
+
# not set, all fields are updated. If provided, only the existing product
|
981
|
+
# fields are updated. Missing products will not be created.
|
817
982
|
# @param reconciliation_mode [::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode]
|
818
983
|
# The mode of reconciliation between existing products and the products to be
|
819
984
|
# imported. Defaults to
|
@@ -827,9 +992,14 @@ module Google
|
|
827
992
|
# Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
|
828
993
|
# to be within the same project as
|
829
994
|
# {::Google::Cloud::Retail::V2::ImportProductsRequest#parent ImportProductsRequest.parent}.
|
830
|
-
# Make sure that
|
831
|
-
#
|
832
|
-
# `
|
995
|
+
# Make sure that both
|
996
|
+
# `cloud-retail-customer-data-access@system.gserviceaccount.com` and
|
997
|
+
# `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
|
998
|
+
# have the `pubsub.topics.publish` IAM permission on the topic.
|
999
|
+
#
|
1000
|
+
# Only supported when
|
1001
|
+
# {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
|
1002
|
+
# is set to `FULL`.
|
833
1003
|
#
|
834
1004
|
# @yield [response, operation] Access the result along with the RPC operation
|
835
1005
|
# @yieldparam response [::Gapic::Operation]
|
@@ -872,10 +1042,11 @@ module Google
|
|
872
1042
|
# Customize the options with defaults
|
873
1043
|
metadata = @config.rpcs.import_products.metadata.to_h
|
874
1044
|
|
875
|
-
# Set x-goog-api-client
|
1045
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
876
1046
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
877
1047
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
878
1048
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
1049
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
879
1050
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
880
1051
|
|
881
1052
|
header_params = {}
|
@@ -1089,10 +1260,11 @@ module Google
|
|
1089
1260
|
# Customize the options with defaults
|
1090
1261
|
metadata = @config.rpcs.set_inventory.metadata.to_h
|
1091
1262
|
|
1092
|
-
# Set x-goog-api-client
|
1263
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1093
1264
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1094
1265
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1095
1266
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
1267
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1096
1268
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1097
1269
|
|
1098
1270
|
header_params = {}
|
@@ -1121,10 +1293,11 @@ module Google
|
|
1121
1293
|
end
|
1122
1294
|
|
1123
1295
|
##
|
1124
|
-
#
|
1296
|
+
# We recommend that you use the
|
1125
1297
|
# {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
|
1126
|
-
# method instead of
|
1127
|
-
# {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
|
1298
|
+
# method instead of the
|
1299
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
|
1300
|
+
# method.
|
1128
1301
|
# {::Google::Cloud::Retail::V2::ProductService::Client#add_local_inventories ProductService.AddLocalInventories}
|
1129
1302
|
# achieves the same results but provides more fine-grained control over
|
1130
1303
|
# ingesting local inventory data.
|
@@ -1264,10 +1437,11 @@ module Google
|
|
1264
1437
|
# Customize the options with defaults
|
1265
1438
|
metadata = @config.rpcs.add_fulfillment_places.metadata.to_h
|
1266
1439
|
|
1267
|
-
# Set x-goog-api-client
|
1440
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1268
1441
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1269
1442
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1270
1443
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
1444
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1271
1445
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1272
1446
|
|
1273
1447
|
header_params = {}
|
@@ -1296,10 +1470,11 @@ module Google
|
|
1296
1470
|
end
|
1297
1471
|
|
1298
1472
|
##
|
1299
|
-
#
|
1473
|
+
# We recommend that you use the
|
1300
1474
|
# {::Google::Cloud::Retail::V2::ProductService::Client#remove_local_inventories ProductService.RemoveLocalInventories}
|
1301
|
-
# method instead of
|
1302
|
-
# {::Google::Cloud::Retail::V2::ProductService::Client#remove_fulfillment_places ProductService.RemoveFulfillmentPlaces}
|
1475
|
+
# method instead of the
|
1476
|
+
# {::Google::Cloud::Retail::V2::ProductService::Client#remove_fulfillment_places ProductService.RemoveFulfillmentPlaces}
|
1477
|
+
# method.
|
1303
1478
|
# {::Google::Cloud::Retail::V2::ProductService::Client#remove_local_inventories ProductService.RemoveLocalInventories}
|
1304
1479
|
# achieves the same results but provides more fine-grained control over
|
1305
1480
|
# ingesting local inventory data.
|
@@ -1434,10 +1609,11 @@ module Google
|
|
1434
1609
|
# Customize the options with defaults
|
1435
1610
|
metadata = @config.rpcs.remove_fulfillment_places.metadata.to_h
|
1436
1611
|
|
1437
|
-
# Set x-goog-api-client
|
1612
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1438
1613
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1439
1614
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1440
1615
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
1616
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1441
1617
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1442
1618
|
|
1443
1619
|
header_params = {}
|
@@ -1590,10 +1766,11 @@ module Google
|
|
1590
1766
|
# Customize the options with defaults
|
1591
1767
|
metadata = @config.rpcs.add_local_inventories.metadata.to_h
|
1592
1768
|
|
1593
|
-
# Set x-goog-api-client
|
1769
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1594
1770
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1595
1771
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1596
1772
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
1773
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1597
1774
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1598
1775
|
|
1599
1776
|
header_params = {}
|
@@ -1728,10 +1905,11 @@ module Google
|
|
1728
1905
|
# Customize the options with defaults
|
1729
1906
|
metadata = @config.rpcs.remove_local_inventories.metadata.to_h
|
1730
1907
|
|
1731
|
-
# Set x-goog-api-client
|
1908
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1732
1909
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1733
1910
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1734
1911
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
1912
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1735
1913
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1736
1914
|
|
1737
1915
|
header_params = {}
|
@@ -1938,6 +2116,11 @@ module Google
|
|
1938
2116
|
#
|
1939
2117
|
attr_reader :delete_product
|
1940
2118
|
##
|
2119
|
+
# RPC-specific configuration for `purge_products`
|
2120
|
+
# @return [::Gapic::Config::Method]
|
2121
|
+
#
|
2122
|
+
attr_reader :purge_products
|
2123
|
+
##
|
1941
2124
|
# RPC-specific configuration for `import_products`
|
1942
2125
|
# @return [::Gapic::Config::Method]
|
1943
2126
|
#
|
@@ -1980,6 +2163,8 @@ module Google
|
|
1980
2163
|
@update_product = ::Gapic::Config::Method.new update_product_config
|
1981
2164
|
delete_product_config = parent_rpcs.delete_product if parent_rpcs.respond_to? :delete_product
|
1982
2165
|
@delete_product = ::Gapic::Config::Method.new delete_product_config
|
2166
|
+
purge_products_config = parent_rpcs.purge_products if parent_rpcs.respond_to? :purge_products
|
2167
|
+
@purge_products = ::Gapic::Config::Method.new purge_products_config
|
1983
2168
|
import_products_config = parent_rpcs.import_products if parent_rpcs.respond_to? :import_products
|
1984
2169
|
@import_products = ::Gapic::Config::Method.new import_products_config
|
1985
2170
|
set_inventory_config = parent_rpcs.set_inventory if parent_rpcs.respond_to? :set_inventory
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module ProductService
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
API_VERSION = ""
|
31
|
+
|
29
32
|
# @private
|
30
33
|
DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
|
31
34
|
|
@@ -191,10 +194,11 @@ module Google
|
|
191
194
|
# Customize the options with defaults
|
192
195
|
metadata = @config.rpcs.list_operations.metadata.to_h
|
193
196
|
|
194
|
-
# Set x-goog-api-client
|
197
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
195
198
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
196
199
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
197
200
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
201
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
198
202
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
199
203
|
|
200
204
|
header_params = {}
|
@@ -287,10 +291,11 @@ module Google
|
|
287
291
|
# Customize the options with defaults
|
288
292
|
metadata = @config.rpcs.get_operation.metadata.to_h
|
289
293
|
|
290
|
-
# Set x-goog-api-client
|
294
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
291
295
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
292
296
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
293
297
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
298
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
294
299
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
295
300
|
|
296
301
|
header_params = {}
|
@@ -376,10 +381,11 @@ module Google
|
|
376
381
|
# Customize the options with defaults
|
377
382
|
metadata = @config.rpcs.delete_operation.metadata.to_h
|
378
383
|
|
379
|
-
# Set x-goog-api-client
|
384
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
380
385
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
381
386
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
382
387
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
388
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
383
389
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
384
390
|
|
385
391
|
header_params = {}
|
@@ -470,10 +476,11 @@ module Google
|
|
470
476
|
# Customize the options with defaults
|
471
477
|
metadata = @config.rpcs.cancel_operation.metadata.to_h
|
472
478
|
|
473
|
-
# Set x-goog-api-client
|
479
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
474
480
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
475
481
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
476
482
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
483
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
477
484
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
478
485
|
|
479
486
|
header_params = {}
|
@@ -574,10 +581,11 @@ module Google
|
|
574
581
|
# Customize the options with defaults
|
575
582
|
metadata = @config.rpcs.wait_operation.metadata.to_h
|
576
583
|
|
577
|
-
# Set x-goog-api-client
|
584
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
578
585
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
579
586
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
580
587
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION
|
588
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
581
589
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
582
590
|
|
583
591
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|