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
@@ -34,6 +34,9 @@ module Google
|
|
34
34
|
# of the customer's website.
|
35
35
|
#
|
36
36
|
class Client
|
37
|
+
# @private
|
38
|
+
API_VERSION = ""
|
39
|
+
|
37
40
|
# @private
|
38
41
|
DEFAULT_ENDPOINT_TEMPLATE = "retail.$UNIVERSE_DOMAIN$"
|
39
42
|
|
@@ -266,12 +269,13 @@ module Google
|
|
266
269
|
# Customize the options with defaults
|
267
270
|
call_metadata = @config.rpcs.create_product.metadata.to_h
|
268
271
|
|
269
|
-
# Set x-goog-api-client
|
272
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
270
273
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
271
274
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
272
275
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
273
276
|
transports_version_send: [:rest]
|
274
277
|
|
278
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
275
279
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
276
280
|
|
277
281
|
options.apply_defaults timeout: @config.rpcs.create_product.timeout,
|
@@ -353,12 +357,13 @@ module Google
|
|
353
357
|
# Customize the options with defaults
|
354
358
|
call_metadata = @config.rpcs.get_product.metadata.to_h
|
355
359
|
|
356
|
-
# Set x-goog-api-client
|
360
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
357
361
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
358
362
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
359
363
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
360
364
|
transports_version_send: [:rest]
|
361
365
|
|
366
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
362
367
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
363
368
|
|
364
369
|
options.apply_defaults timeout: @config.rpcs.get_product.timeout,
|
@@ -506,12 +511,13 @@ module Google
|
|
506
511
|
# Customize the options with defaults
|
507
512
|
call_metadata = @config.rpcs.list_products.metadata.to_h
|
508
513
|
|
509
|
-
# Set x-goog-api-client
|
514
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
510
515
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
511
516
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
512
517
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
513
518
|
transports_version_send: [:rest]
|
514
519
|
|
520
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
515
521
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
516
522
|
|
517
523
|
options.apply_defaults timeout: @config.rpcs.list_products.timeout,
|
@@ -611,12 +617,13 @@ module Google
|
|
611
617
|
# Customize the options with defaults
|
612
618
|
call_metadata = @config.rpcs.update_product.metadata.to_h
|
613
619
|
|
614
|
-
# Set x-goog-api-client
|
620
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
615
621
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
616
622
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
617
623
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
618
624
|
transports_version_send: [:rest]
|
619
625
|
|
626
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
620
627
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
621
628
|
|
622
629
|
options.apply_defaults timeout: @config.rpcs.update_product.timeout,
|
@@ -709,12 +716,13 @@ module Google
|
|
709
716
|
# Customize the options with defaults
|
710
717
|
call_metadata = @config.rpcs.delete_product.metadata.to_h
|
711
718
|
|
712
|
-
# Set x-goog-api-client
|
719
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
713
720
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
714
721
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
715
722
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
716
723
|
transports_version_send: [:rest]
|
717
724
|
|
725
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
718
726
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
719
727
|
|
720
728
|
options.apply_defaults timeout: @config.rpcs.delete_product.timeout,
|
@@ -733,6 +741,155 @@ module Google
|
|
733
741
|
raise ::Google::Cloud::Error.from_error(e)
|
734
742
|
end
|
735
743
|
|
744
|
+
##
|
745
|
+
# Permanently deletes all selected {::Google::Cloud::Retail::V2::Product Product}s
|
746
|
+
# under a branch.
|
747
|
+
#
|
748
|
+
# This process is asynchronous. If the request is valid, the removal will be
|
749
|
+
# enqueued and processed offline. Depending on the number of
|
750
|
+
# {::Google::Cloud::Retail::V2::Product Product}s, this operation could take hours
|
751
|
+
# to complete. Before the operation completes, some
|
752
|
+
# {::Google::Cloud::Retail::V2::Product Product}s may still be returned by
|
753
|
+
# {::Google::Cloud::Retail::V2::ProductService::Rest::Client#get_product ProductService.GetProduct}
|
754
|
+
# or
|
755
|
+
# {::Google::Cloud::Retail::V2::ProductService::Rest::Client#list_products ProductService.ListProducts}.
|
756
|
+
#
|
757
|
+
# Depending on the number of {::Google::Cloud::Retail::V2::Product Product}s, this
|
758
|
+
# operation could take hours to complete. To get a sample of
|
759
|
+
# {::Google::Cloud::Retail::V2::Product Product}s that would be deleted, set
|
760
|
+
# {::Google::Cloud::Retail::V2::PurgeProductsRequest#force PurgeProductsRequest.force}
|
761
|
+
# to false.
|
762
|
+
#
|
763
|
+
# @overload purge_products(request, options = nil)
|
764
|
+
# Pass arguments to `purge_products` via a request object, either of type
|
765
|
+
# {::Google::Cloud::Retail::V2::PurgeProductsRequest} or an equivalent Hash.
|
766
|
+
#
|
767
|
+
# @param request [::Google::Cloud::Retail::V2::PurgeProductsRequest, ::Hash]
|
768
|
+
# A request object representing the call parameters. Required. To specify no
|
769
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
770
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
771
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
772
|
+
#
|
773
|
+
# @overload purge_products(parent: nil, filter: nil, force: nil)
|
774
|
+
# Pass arguments to `purge_products` via keyword arguments. Note that at
|
775
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
776
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
777
|
+
#
|
778
|
+
# @param parent [::String]
|
779
|
+
# Required. The resource name of the branch under which the products are
|
780
|
+
# created. The format is
|
781
|
+
# `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`
|
782
|
+
# @param filter [::String]
|
783
|
+
# Required. The filter string to specify the products to be deleted with a
|
784
|
+
# length limit of 5,000 characters.
|
785
|
+
#
|
786
|
+
# Empty string filter is not allowed. "*" implies delete all items in a
|
787
|
+
# branch.
|
788
|
+
#
|
789
|
+
# The eligible fields for filtering are:
|
790
|
+
#
|
791
|
+
# * `availability`: Double quoted
|
792
|
+
# {::Google::Cloud::Retail::V2::Product#availability Product.availability} string.
|
793
|
+
# * `create_time` : in ISO 8601 "zulu" format.
|
794
|
+
#
|
795
|
+
# Supported syntax:
|
796
|
+
#
|
797
|
+
# * Comparators (">", "<", ">=", "<=", "=").
|
798
|
+
# Examples:
|
799
|
+
# * create_time <= "2015-02-13T17:05:46Z"
|
800
|
+
# * availability = "IN_STOCK"
|
801
|
+
#
|
802
|
+
# * Conjunctions ("AND")
|
803
|
+
# Examples:
|
804
|
+
# * create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER"
|
805
|
+
#
|
806
|
+
# * Disjunctions ("OR")
|
807
|
+
# Examples:
|
808
|
+
# * create_time <= "2015-02-13T17:05:46Z" OR availability = "IN_STOCK"
|
809
|
+
#
|
810
|
+
# * Can support nested queries.
|
811
|
+
# Examples:
|
812
|
+
# * (create_time <= "2015-02-13T17:05:46Z" AND availability = "PREORDER")
|
813
|
+
# OR (create_time >= "2015-02-14T13:03:32Z" AND availability = "IN_STOCK")
|
814
|
+
#
|
815
|
+
# * Filter Limits:
|
816
|
+
# * Filter should not contain more than 6 conditions.
|
817
|
+
# * Max nesting depth should not exceed 2 levels.
|
818
|
+
#
|
819
|
+
# Examples queries:
|
820
|
+
# * Delete back order products created before a timestamp.
|
821
|
+
# create_time <= "2015-02-13T17:05:46Z" OR availability = "BACKORDER"
|
822
|
+
# @param force [::Boolean]
|
823
|
+
# Actually perform the purge.
|
824
|
+
# If `force` is set to false, the method will return the expected purge count
|
825
|
+
# without deleting any products.
|
826
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
827
|
+
# @yieldparam result [::Gapic::Operation]
|
828
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
829
|
+
#
|
830
|
+
# @return [::Gapic::Operation]
|
831
|
+
#
|
832
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
833
|
+
#
|
834
|
+
# @example Basic example
|
835
|
+
# require "google/cloud/retail/v2"
|
836
|
+
#
|
837
|
+
# # Create a client object. The client can be reused for multiple calls.
|
838
|
+
# client = Google::Cloud::Retail::V2::ProductService::Rest::Client.new
|
839
|
+
#
|
840
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
841
|
+
# request = Google::Cloud::Retail::V2::PurgeProductsRequest.new
|
842
|
+
#
|
843
|
+
# # Call the purge_products method.
|
844
|
+
# result = client.purge_products request
|
845
|
+
#
|
846
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
847
|
+
# # check the status of an operation, cancel it, or wait for results.
|
848
|
+
# # Here is how to wait for a response.
|
849
|
+
# result.wait_until_done! timeout: 60
|
850
|
+
# if result.response?
|
851
|
+
# p result.response
|
852
|
+
# else
|
853
|
+
# puts "No response received."
|
854
|
+
# end
|
855
|
+
#
|
856
|
+
def purge_products request, options = nil
|
857
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
858
|
+
|
859
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Retail::V2::PurgeProductsRequest
|
860
|
+
|
861
|
+
# Converts hash and nil to an options object
|
862
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
863
|
+
|
864
|
+
# Customize the options with defaults
|
865
|
+
call_metadata = @config.rpcs.purge_products.metadata.to_h
|
866
|
+
|
867
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
868
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
869
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
870
|
+
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
871
|
+
transports_version_send: [:rest]
|
872
|
+
|
873
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
874
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
875
|
+
|
876
|
+
options.apply_defaults timeout: @config.rpcs.purge_products.timeout,
|
877
|
+
metadata: call_metadata,
|
878
|
+
retry_policy: @config.rpcs.purge_products.retry_policy
|
879
|
+
|
880
|
+
options.apply_defaults timeout: @config.timeout,
|
881
|
+
metadata: @config.metadata,
|
882
|
+
retry_policy: @config.retry_policy
|
883
|
+
|
884
|
+
@product_service_stub.purge_products request, options do |result, operation|
|
885
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
886
|
+
yield result, operation if block_given?
|
887
|
+
return result
|
888
|
+
end
|
889
|
+
rescue ::Gapic::Rest::Error => e
|
890
|
+
raise ::Google::Cloud::Error.from_error(e)
|
891
|
+
end
|
892
|
+
|
736
893
|
##
|
737
894
|
# Bulk import of multiple {::Google::Cloud::Retail::V2::Product Product}s.
|
738
895
|
#
|
@@ -771,7 +928,8 @@ module Google
|
|
771
928
|
# The desired location of errors incurred during the Import.
|
772
929
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
773
930
|
# Indicates which fields in the provided imported `products` to update. If
|
774
|
-
# not set, all fields are updated.
|
931
|
+
# not set, all fields are updated. If provided, only the existing product
|
932
|
+
# fields are updated. Missing products will not be created.
|
775
933
|
# @param reconciliation_mode [::Google::Cloud::Retail::V2::ImportProductsRequest::ReconciliationMode]
|
776
934
|
# The mode of reconciliation between existing products and the products to be
|
777
935
|
# imported. Defaults to
|
@@ -785,9 +943,14 @@ module Google
|
|
785
943
|
# Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
|
786
944
|
# to be within the same project as
|
787
945
|
# {::Google::Cloud::Retail::V2::ImportProductsRequest#parent ImportProductsRequest.parent}.
|
788
|
-
# Make sure that
|
789
|
-
#
|
790
|
-
# `
|
946
|
+
# Make sure that both
|
947
|
+
# `cloud-retail-customer-data-access@system.gserviceaccount.com` and
|
948
|
+
# `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
|
949
|
+
# have the `pubsub.topics.publish` IAM permission on the topic.
|
950
|
+
#
|
951
|
+
# Only supported when
|
952
|
+
# {::Google::Cloud::Retail::V2::ImportProductsRequest#reconciliation_mode ImportProductsRequest.reconciliation_mode}
|
953
|
+
# is set to `FULL`.
|
791
954
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
792
955
|
# @yieldparam result [::Gapic::Operation]
|
793
956
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -829,12 +992,13 @@ module Google
|
|
829
992
|
# Customize the options with defaults
|
830
993
|
call_metadata = @config.rpcs.import_products.metadata.to_h
|
831
994
|
|
832
|
-
# Set x-goog-api-client
|
995
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
833
996
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
834
997
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
835
998
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
836
999
|
transports_version_send: [:rest]
|
837
1000
|
|
1001
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
838
1002
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
839
1003
|
|
840
1004
|
options.apply_defaults timeout: @config.rpcs.import_products.timeout,
|
@@ -1039,12 +1203,13 @@ module Google
|
|
1039
1203
|
# Customize the options with defaults
|
1040
1204
|
call_metadata = @config.rpcs.set_inventory.metadata.to_h
|
1041
1205
|
|
1042
|
-
# Set x-goog-api-client
|
1206
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1043
1207
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1044
1208
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1045
1209
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
1046
1210
|
transports_version_send: [:rest]
|
1047
1211
|
|
1212
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1048
1213
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1049
1214
|
|
1050
1215
|
options.apply_defaults timeout: @config.rpcs.set_inventory.timeout,
|
@@ -1065,10 +1230,11 @@ module Google
|
|
1065
1230
|
end
|
1066
1231
|
|
1067
1232
|
##
|
1068
|
-
#
|
1233
|
+
# We recommend that you use the
|
1069
1234
|
# {::Google::Cloud::Retail::V2::ProductService::Rest::Client#add_local_inventories ProductService.AddLocalInventories}
|
1070
|
-
# method instead of
|
1071
|
-
# {::Google::Cloud::Retail::V2::ProductService::Rest::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
|
1235
|
+
# method instead of the
|
1236
|
+
# {::Google::Cloud::Retail::V2::ProductService::Rest::Client#add_fulfillment_places ProductService.AddFulfillmentPlaces}
|
1237
|
+
# method.
|
1072
1238
|
# {::Google::Cloud::Retail::V2::ProductService::Rest::Client#add_local_inventories ProductService.AddLocalInventories}
|
1073
1239
|
# achieves the same results but provides more fine-grained control over
|
1074
1240
|
# ingesting local inventory data.
|
@@ -1207,12 +1373,13 @@ module Google
|
|
1207
1373
|
# Customize the options with defaults
|
1208
1374
|
call_metadata = @config.rpcs.add_fulfillment_places.metadata.to_h
|
1209
1375
|
|
1210
|
-
# Set x-goog-api-client
|
1376
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1211
1377
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1212
1378
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1213
1379
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
1214
1380
|
transports_version_send: [:rest]
|
1215
1381
|
|
1382
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1216
1383
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1217
1384
|
|
1218
1385
|
options.apply_defaults timeout: @config.rpcs.add_fulfillment_places.timeout,
|
@@ -1233,10 +1400,11 @@ module Google
|
|
1233
1400
|
end
|
1234
1401
|
|
1235
1402
|
##
|
1236
|
-
#
|
1403
|
+
# We recommend that you use the
|
1237
1404
|
# {::Google::Cloud::Retail::V2::ProductService::Rest::Client#remove_local_inventories ProductService.RemoveLocalInventories}
|
1238
|
-
# method instead of
|
1239
|
-
# {::Google::Cloud::Retail::V2::ProductService::Rest::Client#remove_fulfillment_places ProductService.RemoveFulfillmentPlaces}
|
1405
|
+
# method instead of the
|
1406
|
+
# {::Google::Cloud::Retail::V2::ProductService::Rest::Client#remove_fulfillment_places ProductService.RemoveFulfillmentPlaces}
|
1407
|
+
# method.
|
1240
1408
|
# {::Google::Cloud::Retail::V2::ProductService::Rest::Client#remove_local_inventories ProductService.RemoveLocalInventories}
|
1241
1409
|
# achieves the same results but provides more fine-grained control over
|
1242
1410
|
# ingesting local inventory data.
|
@@ -1370,12 +1538,13 @@ module Google
|
|
1370
1538
|
# Customize the options with defaults
|
1371
1539
|
call_metadata = @config.rpcs.remove_fulfillment_places.metadata.to_h
|
1372
1540
|
|
1373
|
-
# Set x-goog-api-client
|
1541
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1374
1542
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1375
1543
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1376
1544
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
1377
1545
|
transports_version_send: [:rest]
|
1378
1546
|
|
1547
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1379
1548
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1380
1549
|
|
1381
1550
|
options.apply_defaults timeout: @config.rpcs.remove_fulfillment_places.timeout,
|
@@ -1519,12 +1688,13 @@ module Google
|
|
1519
1688
|
# Customize the options with defaults
|
1520
1689
|
call_metadata = @config.rpcs.add_local_inventories.metadata.to_h
|
1521
1690
|
|
1522
|
-
# Set x-goog-api-client
|
1691
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1523
1692
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1524
1693
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1525
1694
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
1526
1695
|
transports_version_send: [:rest]
|
1527
1696
|
|
1697
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1528
1698
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1529
1699
|
|
1530
1700
|
options.apply_defaults timeout: @config.rpcs.add_local_inventories.timeout,
|
@@ -1650,12 +1820,13 @@ module Google
|
|
1650
1820
|
# Customize the options with defaults
|
1651
1821
|
call_metadata = @config.rpcs.remove_local_inventories.metadata.to_h
|
1652
1822
|
|
1653
|
-
# Set x-goog-api-client
|
1823
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1654
1824
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1655
1825
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1656
1826
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
1657
1827
|
transports_version_send: [:rest]
|
1658
1828
|
|
1829
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1659
1830
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1660
1831
|
|
1661
1832
|
options.apply_defaults timeout: @config.rpcs.remove_local_inventories.timeout,
|
@@ -1834,6 +2005,11 @@ module Google
|
|
1834
2005
|
#
|
1835
2006
|
attr_reader :delete_product
|
1836
2007
|
##
|
2008
|
+
# RPC-specific configuration for `purge_products`
|
2009
|
+
# @return [::Gapic::Config::Method]
|
2010
|
+
#
|
2011
|
+
attr_reader :purge_products
|
2012
|
+
##
|
1837
2013
|
# RPC-specific configuration for `import_products`
|
1838
2014
|
# @return [::Gapic::Config::Method]
|
1839
2015
|
#
|
@@ -1876,6 +2052,8 @@ module Google
|
|
1876
2052
|
@update_product = ::Gapic::Config::Method.new update_product_config
|
1877
2053
|
delete_product_config = parent_rpcs.delete_product if parent_rpcs.respond_to? :delete_product
|
1878
2054
|
@delete_product = ::Gapic::Config::Method.new delete_product_config
|
2055
|
+
purge_products_config = parent_rpcs.purge_products if parent_rpcs.respond_to? :purge_products
|
2056
|
+
@purge_products = ::Gapic::Config::Method.new purge_products_config
|
1879
2057
|
import_products_config = parent_rpcs.import_products if parent_rpcs.respond_to? :import_products
|
1880
2058
|
@import_products = ::Gapic::Config::Method.new import_products_config
|
1881
2059
|
set_inventory_config = parent_rpcs.set_inventory if parent_rpcs.respond_to? :set_inventory
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module Rest
|
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
|
|
@@ -181,12 +184,13 @@ module Google
|
|
181
184
|
# Customize the options with defaults
|
182
185
|
call_metadata = @config.rpcs.list_operations.metadata.to_h
|
183
186
|
|
184
|
-
# Set x-goog-api-client
|
187
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
185
188
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
186
189
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
187
190
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
188
191
|
transports_version_send: [:rest]
|
189
192
|
|
193
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
190
194
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
191
195
|
|
192
196
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
@@ -269,12 +273,13 @@ module Google
|
|
269
273
|
# Customize the options with defaults
|
270
274
|
call_metadata = @config.rpcs.get_operation.metadata.to_h
|
271
275
|
|
272
|
-
# Set x-goog-api-client
|
276
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
273
277
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
274
278
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
275
279
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
276
280
|
transports_version_send: [:rest]
|
277
281
|
|
282
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
278
283
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
279
284
|
|
280
285
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
@@ -351,12 +356,13 @@ module Google
|
|
351
356
|
# Customize the options with defaults
|
352
357
|
call_metadata = @config.rpcs.delete_operation.metadata.to_h
|
353
358
|
|
354
|
-
# Set x-goog-api-client
|
359
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
355
360
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
356
361
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
357
362
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
358
363
|
transports_version_send: [:rest]
|
359
364
|
|
365
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
360
366
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
361
367
|
|
362
368
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
@@ -438,12 +444,13 @@ module Google
|
|
438
444
|
# Customize the options with defaults
|
439
445
|
call_metadata = @config.rpcs.cancel_operation.metadata.to_h
|
440
446
|
|
441
|
-
# Set x-goog-api-client
|
447
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
442
448
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
443
449
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
444
450
|
gapic_version: ::Google::Cloud::Retail::V2::VERSION,
|
445
451
|
transports_version_send: [:rest]
|
446
452
|
|
453
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
447
454
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
448
455
|
|
449
456
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
@@ -251,6 +251,44 @@ module Google
|
|
251
251
|
result
|
252
252
|
end
|
253
253
|
|
254
|
+
##
|
255
|
+
# Baseline implementation for the purge_products REST call
|
256
|
+
#
|
257
|
+
# @param request_pb [::Google::Cloud::Retail::V2::PurgeProductsRequest]
|
258
|
+
# A request object representing the call parameters. Required.
|
259
|
+
# @param options [::Gapic::CallOptions]
|
260
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
261
|
+
#
|
262
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
263
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
264
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
265
|
+
#
|
266
|
+
# @return [::Google::Longrunning::Operation]
|
267
|
+
# A result object deserialized from the server's reply
|
268
|
+
def purge_products request_pb, options = nil
|
269
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
270
|
+
|
271
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_purge_products_request request_pb
|
272
|
+
query_string_params = if query_string_params.any?
|
273
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
274
|
+
else
|
275
|
+
{}
|
276
|
+
end
|
277
|
+
|
278
|
+
response = @client_stub.make_http_request(
|
279
|
+
verb,
|
280
|
+
uri: uri,
|
281
|
+
body: body || "",
|
282
|
+
params: query_string_params,
|
283
|
+
options: options
|
284
|
+
)
|
285
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
286
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
287
|
+
|
288
|
+
yield result, operation if block_given?
|
289
|
+
result
|
290
|
+
end
|
291
|
+
|
254
292
|
##
|
255
293
|
# Baseline implementation for the import_products REST call
|
256
294
|
#
|
@@ -586,6 +624,28 @@ module Google
|
|
586
624
|
transcoder.transcode request_pb
|
587
625
|
end
|
588
626
|
|
627
|
+
##
|
628
|
+
# @private
|
629
|
+
#
|
630
|
+
# GRPC transcoding helper method for the purge_products REST call
|
631
|
+
#
|
632
|
+
# @param request_pb [::Google::Cloud::Retail::V2::PurgeProductsRequest]
|
633
|
+
# A request object representing the call parameters. Required.
|
634
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
635
|
+
# Uri, Body, Query string parameters
|
636
|
+
def self.transcode_purge_products_request request_pb
|
637
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
638
|
+
.with_bindings(
|
639
|
+
uri_method: :post,
|
640
|
+
uri_template: "/v2/{parent}/products:purge",
|
641
|
+
body: "*",
|
642
|
+
matches: [
|
643
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/?$}, false]
|
644
|
+
]
|
645
|
+
)
|
646
|
+
transcoder.transcode request_pb
|
647
|
+
end
|
648
|
+
|
589
649
|
##
|
590
650
|
# @private
|
591
651
|
#
|
@@ -11,13 +11,14 @@ require 'google/api/resource_pb'
|
|
11
11
|
require 'google/cloud/retail/v2/common_pb'
|
12
12
|
require 'google/cloud/retail/v2/import_config_pb'
|
13
13
|
require 'google/cloud/retail/v2/product_pb'
|
14
|
+
require 'google/cloud/retail/v2/purge_config_pb'
|
14
15
|
require 'google/longrunning/operations_pb'
|
15
16
|
require 'google/protobuf/empty_pb'
|
16
17
|
require 'google/protobuf/field_mask_pb'
|
17
18
|
require 'google/protobuf/timestamp_pb'
|
18
19
|
|
19
20
|
|
20
|
-
descriptor_data = "\n,google/cloud/retail/v2/product_service.proto\x12\x16google.cloud.retail.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/retail/v2/common.proto\x1a*google/cloud/retail/v2/import_config.proto\x1a$google/cloud/retail/v2/product.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x01\n\x14\x43reateProductRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\x35\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ProductB\x03\xe0\x41\x02\x12\x17\n\nproduct_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"H\n\x11GetProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\"\x95\x01\n\x14UpdateProductRequest\x12\x35\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ProductB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"K\n\x14\x44\x65leteProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\"\xb1\x01\n\x13ListProductsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12-\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"b\n\x14ListProductsResponse\x12\x31\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.retail.v2.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc1\x01\n\x13SetInventoryRequest\x12\x37\n\tinventory\x18\x01 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ProductB\x03\xe0\x41\x02\x12,\n\x08set_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12,\n\x08set_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rallow_missing\x18\x04 \x01(\x08\"\x16\n\x14SetInventoryMetadata\"\x16\n\x14SetInventoryResponse\"\xc5\x01\n\x1b\x41\x64\x64\x46ulfillmentPlacesRequest\x12\x36\n\x07product\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tplace_ids\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12,\n\x08\x61\x64\x64_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rallow_missing\x18\x05 \x01(\x08\"\x1e\n\x1c\x41\x64\x64\x46ulfillmentPlacesMetadata\"\x1e\n\x1c\x41\x64\x64\x46ulfillmentPlacesResponse\"\x8f\x02\n\x1a\x41\x64\x64LocalInventoriesRequest\x12\x36\n\x07product\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\x12\x46\n\x11local_inventories\x18\x02 \x03(\x0b\x32&.google.cloud.retail.v2.LocalInventoryB\x03\xe0\x41\x02\x12,\n\x08\x61\x64\x64_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12,\n\x08\x61\x64\x64_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rallow_missing\x18\x06 \x01(\x08\"\x1d\n\x1b\x41\x64\x64LocalInventoriesMetadata\"\x1d\n\x1b\x41\x64\x64LocalInventoriesResponse\"\xb7\x01\n\x1dRemoveLocalInventoriesRequest\x12\x36\n\x07product\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\x12\x16\n\tplace_ids\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12/\n\x0bremove_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\" \n\x1eRemoveLocalInventoriesMetadata\" \n\x1eRemoveLocalInventoriesResponse\"\xcb\x01\n\x1eRemoveFulfillmentPlacesRequest\x12\x36\n\x07product\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tplace_ids\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12/\n\x0bremove_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rallow_missing\x18\x05 \x01(\x08\"!\n\x1fRemoveFulfillmentPlacesMetadata\"!\n\x1fRemoveFulfillmentPlacesResponse2\
|
21
|
+
descriptor_data = "\n,google/cloud/retail/v2/product_service.proto\x12\x16google.cloud.retail.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/retail/v2/common.proto\x1a*google/cloud/retail/v2/import_config.proto\x1a$google/cloud/retail/v2/product.proto\x1a)google/cloud/retail/v2/purge_config.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9c\x01\n\x14\x43reateProductRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\x35\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ProductB\x03\xe0\x41\x02\x12\x17\n\nproduct_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"H\n\x11GetProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\"\x95\x01\n\x14UpdateProductRequest\x12\x35\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ProductB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\"K\n\x14\x44\x65leteProductRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\"\xb1\x01\n\x13ListProductsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12-\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"b\n\x14ListProductsResponse\x12\x31\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.retail.v2.Product\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc1\x01\n\x13SetInventoryRequest\x12\x37\n\tinventory\x18\x01 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ProductB\x03\xe0\x41\x02\x12,\n\x08set_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12,\n\x08set_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rallow_missing\x18\x04 \x01(\x08\"\x16\n\x14SetInventoryMetadata\"\x16\n\x14SetInventoryResponse\"\xc5\x01\n\x1b\x41\x64\x64\x46ulfillmentPlacesRequest\x12\x36\n\x07product\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tplace_ids\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12,\n\x08\x61\x64\x64_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rallow_missing\x18\x05 \x01(\x08\"\x1e\n\x1c\x41\x64\x64\x46ulfillmentPlacesMetadata\"\x1e\n\x1c\x41\x64\x64\x46ulfillmentPlacesResponse\"\x8f\x02\n\x1a\x41\x64\x64LocalInventoriesRequest\x12\x36\n\x07product\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\x12\x46\n\x11local_inventories\x18\x02 \x03(\x0b\x32&.google.cloud.retail.v2.LocalInventoryB\x03\xe0\x41\x02\x12,\n\x08\x61\x64\x64_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12,\n\x08\x61\x64\x64_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rallow_missing\x18\x06 \x01(\x08\"\x1d\n\x1b\x41\x64\x64LocalInventoriesMetadata\"\x1d\n\x1b\x41\x64\x64LocalInventoriesResponse\"\xb7\x01\n\x1dRemoveLocalInventoriesRequest\x12\x36\n\x07product\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\x12\x16\n\tplace_ids\x18\x02 \x03(\tB\x03\xe0\x41\x02\x12/\n\x0bremove_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\" \n\x1eRemoveLocalInventoriesMetadata\" \n\x1eRemoveLocalInventoriesResponse\"\xcb\x01\n\x1eRemoveFulfillmentPlacesRequest\x12\x36\n\x07product\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Product\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tplace_ids\x18\x03 \x03(\tB\x03\xe0\x41\x02\x12/\n\x0bremove_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rallow_missing\x18\x05 \x01(\x08\"!\n\x1fRemoveFulfillmentPlacesMetadata\"!\n\x1fRemoveFulfillmentPlacesResponse2\xc2\x19\n\x0eProductService\x12\xcf\x01\n\rCreateProduct\x12,.google.cloud.retail.v2.CreateProductRequest\x1a\x1f.google.cloud.retail.v2.Product\"o\xda\x41\x19parent,product,product_id\x82\xd3\xe4\x93\x02M\"B/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:\x07product\x12\xac\x01\n\nGetProduct\x12).google.cloud.retail.v2.GetProductRequest\x1a\x1f.google.cloud.retail.v2.Product\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/v2/{name=projects/*/locations/*/catalogs/*/branches/*/products/**}\x12\xbe\x01\n\x0cListProducts\x12+.google.cloud.retail.v2.ListProductsRequest\x1a,.google.cloud.retail.v2.ListProductsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products\x12\xd2\x01\n\rUpdateProduct\x12,.google.cloud.retail.v2.UpdateProductRequest\x1a\x1f.google.cloud.retail.v2.Product\"r\xda\x41\x13product,update_mask\x82\xd3\xe4\x93\x02V2K/v2/{product.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:\x07product\x12\xa9\x01\n\rDeleteProduct\x12,.google.cloud.retail.v2.DeleteProductRequest\x1a\x16.google.protobuf.Empty\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45*C/v2/{name=projects/*/locations/*/catalogs/*/branches/*/products/**}\x12\x91\x02\n\rPurgeProducts\x12,.google.cloud.retail.v2.PurgeProductsRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41\\\n,google.cloud.retail.v2.PurgeProductsResponse\x12,google.cloud.retail.v2.PurgeProductsMetadata\x82\xd3\xe4\x93\x02M\"H/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:purge:\x01*\x12\x8e\x02\n\x0eImportProducts\x12-.google.cloud.retail.v2.ImportProductsRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41V\n-google.cloud.retail.v2.ImportProductsResponse\x12%google.cloud.retail.v2.ImportMetadata\x82\xd3\xe4\x93\x02N\"I/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:import:\x01*\x12\xb4\x02\n\x0cSetInventory\x12+.google.cloud.retail.v2.SetInventoryRequest\x1a\x1d.google.longrunning.Operation\"\xd7\x01\xca\x41Z\n+google.cloud.retail.v2.SetInventoryResponse\x12+google.cloud.retail.v2.SetInventoryMetadata\xda\x41\x12inventory,set_mask\x82\xd3\xe4\x93\x02_\"Z/v2/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory:\x01*\x12\xca\x02\n\x14\x41\x64\x64\x46ulfillmentPlaces\x12\x33.google.cloud.retail.v2.AddFulfillmentPlacesRequest\x1a\x1d.google.longrunning.Operation\"\xdd\x01\xca\x41j\n3google.cloud.retail.v2.AddFulfillmentPlacesResponse\x12\x33google.cloud.retail.v2.AddFulfillmentPlacesMetadata\xda\x41\x07product\x82\xd3\xe4\x93\x02`\"[/v2/{product=projects/*/locations/*/catalogs/*/branches/*/products/**}:addFulfillmentPlaces:\x01*\x12\xd9\x02\n\x17RemoveFulfillmentPlaces\x12\x36.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest\x1a\x1d.google.longrunning.Operation\"\xe6\x01\xca\x41p\n6google.cloud.retail.v2.RemoveFulfillmentPlacesResponse\x12\x36google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata\xda\x41\x07product\x82\xd3\xe4\x93\x02\x63\"^/v2/{product=projects/*/locations/*/catalogs/*/branches/*/products/**}:removeFulfillmentPlaces:\x01*\x12\xc5\x02\n\x13\x41\x64\x64LocalInventories\x12\x32.google.cloud.retail.v2.AddLocalInventoriesRequest\x1a\x1d.google.longrunning.Operation\"\xda\x01\xca\x41h\n2google.cloud.retail.v2.AddLocalInventoriesResponse\x12\x32google.cloud.retail.v2.AddLocalInventoriesMetadata\xda\x41\x07product\x82\xd3\xe4\x93\x02_\"Z/v2/{product=projects/*/locations/*/catalogs/*/branches/*/products/**}:addLocalInventories:\x01*\x12\xd4\x02\n\x16RemoveLocalInventories\x12\x35.google.cloud.retail.v2.RemoveLocalInventoriesRequest\x1a\x1d.google.longrunning.Operation\"\xe3\x01\xca\x41n\n5google.cloud.retail.v2.RemoveLocalInventoriesResponse\x12\x35google.cloud.retail.v2.RemoveLocalInventoriesMetadata\xda\x41\x07product\x82\xd3\xe4\x93\x02\x62\"]/v2/{product=projects/*/locations/*/catalogs/*/branches/*/products/**}:removeLocalInventories:\x01*\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbe\x01\n\x1a\x63om.google.cloud.retail.v2B\x13ProductServiceProtoP\x01Z2cloud.google.com/go/retail/apiv2/retailpb;retailpb\xa2\x02\x06RETAIL\xaa\x02\x16Google.Cloud.Retail.V2\xca\x02\x16Google\\Cloud\\Retail\\V2\xea\x02\x19Google::Cloud::Retail::V2b\x06proto3"
|
21
22
|
|
22
23
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
23
24
|
|