google-cloud-retail-v2 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/LICENSE.md +188 -190
- data/README.md +3 -3
- data/lib/google/cloud/retail/v2.rb +2 -0
- data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -0
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +211 -15
- data/lib/google/cloud/retail/v2/catalog_service/paths.rb +21 -0
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +16 -0
- data/lib/google/cloud/retail/v2/catalog_service_services_pb.rb +46 -0
- data/lib/google/cloud/retail/v2/common_pb.rb +46 -0
- data/lib/google/cloud/retail/v2/completion_service.rb +54 -0
- data/lib/google/cloud/retail/v2/completion_service/client.rb +546 -0
- data/lib/google/cloud/retail/v2/completion_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +655 -0
- data/lib/google/cloud/retail/v2/completion_service/paths.rb +52 -0
- data/lib/google/cloud/retail/v2/completion_service_pb.rb +50 -0
- data/lib/google/cloud/retail/v2/completion_service_services_pb.rb +61 -0
- data/lib/google/cloud/retail/v2/import_config_pb.rb +32 -0
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +41 -43
- data/lib/google/cloud/retail/v2/product_pb.rb +21 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +643 -18
- data/lib/google/cloud/retail/v2/product_service/operations.rb +11 -11
- data/lib/google/cloud/retail/v2/product_service_pb.rb +56 -0
- data/lib/google/cloud/retail/v2/product_service_services_pb.rb +75 -0
- data/lib/google/cloud/retail/v2/search_service.rb +53 -0
- data/lib/google/cloud/retail/v2/search_service/client.rb +541 -0
- data/lib/google/cloud/retail/v2/search_service/credentials.rb +51 -0
- data/lib/google/cloud/retail/v2/search_service/paths.rb +54 -0
- data/lib/google/cloud/retail/v2/search_service_pb.rb +131 -0
- data/lib/google/cloud/retail/v2/search_service_services_pb.rb +53 -0
- data/lib/google/cloud/retail/v2/user_event_pb.rb +11 -0
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +12 -15
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +11 -11
- data/lib/google/cloud/retail/v2/user_event_service/paths.rb +19 -0
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/api/httpbody.rb +4 -3
- data/proto_docs/google/cloud/retail/v2/catalog.rb +6 -6
- data/proto_docs/google/cloud/retail/v2/catalog_service.rb +53 -4
- data/proto_docs/google/cloud/retail/v2/common.rb +272 -4
- data/proto_docs/google/cloud/retail/v2/completion_service.rb +162 -0
- data/proto_docs/google/cloud/retail/v2/import_config.rb +122 -6
- data/proto_docs/google/cloud/retail/v2/prediction_service.rb +32 -31
- data/proto_docs/google/cloud/retail/v2/product.rb +266 -10
- data/proto_docs/google/cloud/retail/v2/product_service.rb +362 -2
- data/proto_docs/google/cloud/retail/v2/purge_config.rb +1 -1
- data/proto_docs/google/cloud/retail/v2/search_service.rb +820 -0
- data/proto_docs/google/cloud/retail/v2/user_event.rb +95 -3
- data/proto_docs/google/type/date.rb +53 -0
- metadata +32 -10
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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 SearchService
|
26
|
+
# Credentials for the SearchService 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,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 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 SearchService
|
25
|
+
# Path helper methods for the SearchService API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Branch resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/catalogs/{catalog}/branches/{branch}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param catalog [String]
|
37
|
+
# @param branch [String]
|
38
|
+
#
|
39
|
+
# @return [::String]
|
40
|
+
def branch_path project:, location:, catalog:, branch:
|
41
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
42
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
43
|
+
raise ::ArgumentError, "catalog cannot contain /" if catalog.to_s.include? "/"
|
44
|
+
|
45
|
+
"projects/#{project}/locations/#{location}/catalogs/#{catalog}/branches/#{branch}"
|
46
|
+
end
|
47
|
+
|
48
|
+
extend self
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/retail/v2/search_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/common_pb'
|
11
|
+
require 'google/cloud/retail/v2/product_pb'
|
12
|
+
require 'google/protobuf/field_mask_pb'
|
13
|
+
require 'google/protobuf/struct_pb'
|
14
|
+
require 'google/protobuf/timestamp_pb'
|
15
|
+
require 'google/protobuf/wrappers_pb'
|
16
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
|
+
add_file("google/cloud/retail/v2/search_service.proto", :syntax => :proto3) do
|
18
|
+
add_message "google.cloud.retail.v2.SearchRequest" do
|
19
|
+
optional :placement, :string, 1
|
20
|
+
optional :branch, :string, 2
|
21
|
+
optional :query, :string, 3
|
22
|
+
optional :visitor_id, :string, 4
|
23
|
+
optional :user_info, :message, 5, "google.cloud.retail.v2.UserInfo"
|
24
|
+
optional :page_size, :int32, 7
|
25
|
+
optional :page_token, :string, 8
|
26
|
+
optional :offset, :int32, 9
|
27
|
+
optional :filter, :string, 10
|
28
|
+
optional :canonical_filter, :string, 28
|
29
|
+
optional :order_by, :string, 11
|
30
|
+
repeated :facet_specs, :message, 12, "google.cloud.retail.v2.SearchRequest.FacetSpec"
|
31
|
+
optional :dynamic_facet_spec, :message, 21, "google.cloud.retail.v2.SearchRequest.DynamicFacetSpec"
|
32
|
+
optional :boost_spec, :message, 13, "google.cloud.retail.v2.SearchRequest.BoostSpec"
|
33
|
+
optional :query_expansion_spec, :message, 14, "google.cloud.retail.v2.SearchRequest.QueryExpansionSpec"
|
34
|
+
repeated :variant_rollup_keys, :string, 17
|
35
|
+
repeated :page_categories, :string, 23
|
36
|
+
end
|
37
|
+
add_message "google.cloud.retail.v2.SearchRequest.FacetSpec" do
|
38
|
+
optional :facet_key, :message, 1, "google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey"
|
39
|
+
optional :limit, :int32, 2
|
40
|
+
repeated :excluded_filter_keys, :string, 3
|
41
|
+
optional :enable_dynamic_position, :bool, 4
|
42
|
+
end
|
43
|
+
add_message "google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey" do
|
44
|
+
optional :key, :string, 1
|
45
|
+
repeated :intervals, :message, 2, "google.cloud.retail.v2.Interval"
|
46
|
+
repeated :restricted_values, :string, 3
|
47
|
+
repeated :prefixes, :string, 8
|
48
|
+
repeated :contains, :string, 9
|
49
|
+
optional :order_by, :string, 4
|
50
|
+
optional :query, :string, 5
|
51
|
+
end
|
52
|
+
add_message "google.cloud.retail.v2.SearchRequest.DynamicFacetSpec" do
|
53
|
+
optional :mode, :enum, 1, "google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode"
|
54
|
+
end
|
55
|
+
add_enum "google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode" do
|
56
|
+
value :MODE_UNSPECIFIED, 0
|
57
|
+
value :DISABLED, 1
|
58
|
+
value :ENABLED, 2
|
59
|
+
end
|
60
|
+
add_message "google.cloud.retail.v2.SearchRequest.BoostSpec" do
|
61
|
+
repeated :condition_boost_specs, :message, 1, "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec"
|
62
|
+
end
|
63
|
+
add_message "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec" do
|
64
|
+
optional :condition, :string, 1
|
65
|
+
optional :boost, :float, 2
|
66
|
+
end
|
67
|
+
add_message "google.cloud.retail.v2.SearchRequest.QueryExpansionSpec" do
|
68
|
+
optional :condition, :enum, 1, "google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition"
|
69
|
+
end
|
70
|
+
add_enum "google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition" do
|
71
|
+
value :CONDITION_UNSPECIFIED, 0
|
72
|
+
value :DISABLED, 1
|
73
|
+
value :AUTO, 3
|
74
|
+
end
|
75
|
+
add_message "google.cloud.retail.v2.SearchResponse" do
|
76
|
+
repeated :results, :message, 1, "google.cloud.retail.v2.SearchResponse.SearchResult"
|
77
|
+
repeated :facets, :message, 2, "google.cloud.retail.v2.SearchResponse.Facet"
|
78
|
+
optional :total_size, :int32, 3
|
79
|
+
optional :corrected_query, :string, 4
|
80
|
+
optional :attribution_token, :string, 5
|
81
|
+
optional :next_page_token, :string, 6
|
82
|
+
optional :query_expansion_info, :message, 7, "google.cloud.retail.v2.SearchResponse.QueryExpansionInfo"
|
83
|
+
optional :redirect_uri, :string, 10
|
84
|
+
end
|
85
|
+
add_message "google.cloud.retail.v2.SearchResponse.SearchResult" do
|
86
|
+
optional :id, :string, 1
|
87
|
+
optional :product, :message, 2, "google.cloud.retail.v2.Product"
|
88
|
+
optional :matching_variant_count, :int32, 3
|
89
|
+
map :matching_variant_fields, :string, :message, 4, "google.protobuf.FieldMask"
|
90
|
+
map :variant_rollup_values, :string, :message, 5, "google.protobuf.Value"
|
91
|
+
end
|
92
|
+
add_message "google.cloud.retail.v2.SearchResponse.Facet" do
|
93
|
+
optional :key, :string, 1
|
94
|
+
repeated :values, :message, 2, "google.cloud.retail.v2.SearchResponse.Facet.FacetValue"
|
95
|
+
optional :dynamic_facet, :bool, 3
|
96
|
+
end
|
97
|
+
add_message "google.cloud.retail.v2.SearchResponse.Facet.FacetValue" do
|
98
|
+
optional :count, :int64, 3
|
99
|
+
oneof :facet_value do
|
100
|
+
optional :value, :string, 1
|
101
|
+
optional :interval, :message, 2, "google.cloud.retail.v2.Interval"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
add_message "google.cloud.retail.v2.SearchResponse.QueryExpansionInfo" do
|
105
|
+
optional :expanded_query, :bool, 1
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
module Google
|
111
|
+
module Cloud
|
112
|
+
module Retail
|
113
|
+
module V2
|
114
|
+
SearchRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest").msgclass
|
115
|
+
SearchRequest::FacetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.FacetSpec").msgclass
|
116
|
+
SearchRequest::FacetSpec::FacetKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey").msgclass
|
117
|
+
SearchRequest::DynamicFacetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.DynamicFacetSpec").msgclass
|
118
|
+
SearchRequest::DynamicFacetSpec::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode").enummodule
|
119
|
+
SearchRequest::BoostSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.BoostSpec").msgclass
|
120
|
+
SearchRequest::BoostSpec::ConditionBoostSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec").msgclass
|
121
|
+
SearchRequest::QueryExpansionSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.QueryExpansionSpec").msgclass
|
122
|
+
SearchRequest::QueryExpansionSpec::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition").enummodule
|
123
|
+
SearchResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse").msgclass
|
124
|
+
SearchResponse::SearchResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse.SearchResult").msgclass
|
125
|
+
SearchResponse::Facet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse.Facet").msgclass
|
126
|
+
SearchResponse::Facet::FacetValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse.Facet.FacetValue").msgclass
|
127
|
+
SearchResponse::QueryExpansionInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.SearchResponse.QueryExpansionInfo").msgclass
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/retail/v2/search_service.proto for package 'Google.Cloud.Retail.V2'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2020 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/search_service_pb'
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module Retail
|
25
|
+
module V2
|
26
|
+
module SearchService
|
27
|
+
# Service for search.
|
28
|
+
#
|
29
|
+
# This feature is only available for users who have Retail Search enabled.
|
30
|
+
# Contact Retail Support (retail-search-support@google.com) if you are
|
31
|
+
# interested in using Retail Search.
|
32
|
+
class Service
|
33
|
+
|
34
|
+
include GRPC::GenericService
|
35
|
+
|
36
|
+
self.marshal_class_method = :encode
|
37
|
+
self.unmarshal_class_method = :decode
|
38
|
+
self.service_name = 'google.cloud.retail.v2.SearchService'
|
39
|
+
|
40
|
+
# Performs a search.
|
41
|
+
#
|
42
|
+
# This feature is only available for users who have Retail Search enabled.
|
43
|
+
# Contact Retail Support (retail-search-support@google.com) if you are
|
44
|
+
# interested in using Retail Search.
|
45
|
+
rpc :Search, ::Google::Cloud::Retail::V2::SearchRequest, ::Google::Cloud::Retail::V2::SearchResponse
|
46
|
+
end
|
47
|
+
|
48
|
+
Stub = Service.rpc_stub_class
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -14,14 +14,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
14
14
|
add_message "google.cloud.retail.v2.UserEvent" do
|
15
15
|
optional :event_type, :string, 1
|
16
16
|
optional :visitor_id, :string, 2
|
17
|
+
optional :session_id, :string, 21
|
17
18
|
optional :event_time, :message, 3, "google.protobuf.Timestamp"
|
18
19
|
repeated :experiment_ids, :string, 4
|
19
20
|
optional :attribution_token, :string, 5
|
20
21
|
repeated :product_details, :message, 6, "google.cloud.retail.v2.ProductDetail"
|
22
|
+
optional :completion_detail, :message, 22, "google.cloud.retail.v2.CompletionDetail"
|
21
23
|
map :attributes, :string, :message, 7, "google.cloud.retail.v2.CustomAttribute"
|
22
24
|
optional :cart_id, :string, 8
|
23
25
|
optional :purchase_transaction, :message, 9, "google.cloud.retail.v2.PurchaseTransaction"
|
24
26
|
optional :search_query, :string, 10
|
27
|
+
optional :filter, :string, 16
|
28
|
+
optional :order_by, :string, 17
|
29
|
+
optional :offset, :int32, 18
|
25
30
|
repeated :page_categories, :string, 11
|
26
31
|
optional :user_info, :message, 12, "google.cloud.retail.v2.UserInfo"
|
27
32
|
optional :uri, :string, 13
|
@@ -32,6 +37,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
32
37
|
optional :product, :message, 1, "google.cloud.retail.v2.Product"
|
33
38
|
optional :quantity, :message, 2, "google.protobuf.Int32Value"
|
34
39
|
end
|
40
|
+
add_message "google.cloud.retail.v2.CompletionDetail" do
|
41
|
+
optional :completion_attribution_token, :string, 1
|
42
|
+
optional :selected_suggestion, :string, 2
|
43
|
+
optional :selected_position, :int32, 3
|
44
|
+
end
|
35
45
|
add_message "google.cloud.retail.v2.PurchaseTransaction" do
|
36
46
|
optional :id, :string, 1
|
37
47
|
optional :revenue, :float, 2
|
@@ -48,6 +58,7 @@ module Google
|
|
48
58
|
module V2
|
49
59
|
UserEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.UserEvent").msgclass
|
50
60
|
ProductDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.ProductDetail").msgclass
|
61
|
+
CompletionDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.CompletionDetail").msgclass
|
51
62
|
PurchaseTransaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.retail.v2.PurchaseTransaction").msgclass
|
52
63
|
end
|
53
64
|
end
|
@@ -60,17 +60,14 @@ module Google
|
|
60
60
|
parent_config = while namespace.any?
|
61
61
|
parent_name = namespace.join "::"
|
62
62
|
parent_const = const_get parent_name
|
63
|
-
break parent_const.configure if parent_const
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
64
|
namespace.pop
|
65
65
|
end
|
66
66
|
default_config = Client::Configuration.new parent_config
|
67
67
|
|
68
68
|
default_config.timeout = 60.0
|
69
69
|
default_config.retry_policy = {
|
70
|
-
initial_delay: 0.1,
|
71
|
-
max_delay: 60.0,
|
72
|
-
multiplier: 1.3,
|
73
|
-
retry_codes: [14, 4]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
74
71
|
}
|
75
72
|
|
76
73
|
default_config
|
@@ -139,9 +136,9 @@ module Google
|
|
139
136
|
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
140
137
|
@config.endpoint == Client.configure.endpoint &&
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
|
-
credentials ||= Credentials.default scope:
|
139
|
+
credentials ||= Credentials.default scope: @config.scope,
|
143
140
|
enable_self_signed_jwt: enable_self_signed_jwt
|
144
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
141
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
145
142
|
credentials = Credentials.new credentials, scope: @config.scope
|
146
143
|
end
|
147
144
|
@quota_project_id = @config.quota_project
|
@@ -346,7 +343,7 @@ module Google
|
|
346
343
|
# @param parent [::String]
|
347
344
|
# Required. The resource name of the catalog under which the events are
|
348
345
|
# created. The format is
|
349
|
-
#
|
346
|
+
# `projects/${projectId}/locations/global/catalogs/${catalogId}`
|
350
347
|
# @param filter [::String]
|
351
348
|
# Required. The filter string to specify the events to be deleted with a
|
352
349
|
# length limit of 5,000 characters. Empty string filter is not allowed. The
|
@@ -671,7 +668,7 @@ module Google
|
|
671
668
|
config_attr :scope, nil, ::String, ::Array, nil
|
672
669
|
config_attr :lib_name, nil, ::String, nil
|
673
670
|
config_attr :lib_version, nil, ::String, nil
|
674
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
671
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
675
672
|
config_attr :interceptors, nil, ::Array, nil
|
676
673
|
config_attr :timeout, nil, ::Numeric, nil
|
677
674
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -692,7 +689,7 @@ module Google
|
|
692
689
|
def rpcs
|
693
690
|
@rpcs ||= begin
|
694
691
|
parent_rpcs = nil
|
695
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
692
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
696
693
|
Rpcs.new parent_rpcs
|
697
694
|
end
|
698
695
|
end
|
@@ -743,15 +740,15 @@ module Google
|
|
743
740
|
|
744
741
|
# @private
|
745
742
|
def initialize parent_rpcs = nil
|
746
|
-
write_user_event_config = parent_rpcs
|
743
|
+
write_user_event_config = parent_rpcs.write_user_event if parent_rpcs.respond_to? :write_user_event
|
747
744
|
@write_user_event = ::Gapic::Config::Method.new write_user_event_config
|
748
|
-
collect_user_event_config = parent_rpcs
|
745
|
+
collect_user_event_config = parent_rpcs.collect_user_event if parent_rpcs.respond_to? :collect_user_event
|
749
746
|
@collect_user_event = ::Gapic::Config::Method.new collect_user_event_config
|
750
|
-
purge_user_events_config = parent_rpcs
|
747
|
+
purge_user_events_config = parent_rpcs.purge_user_events if parent_rpcs.respond_to? :purge_user_events
|
751
748
|
@purge_user_events = ::Gapic::Config::Method.new purge_user_events_config
|
752
|
-
import_user_events_config = parent_rpcs
|
749
|
+
import_user_events_config = parent_rpcs.import_user_events if parent_rpcs.respond_to? :import_user_events
|
753
750
|
@import_user_events = ::Gapic::Config::Method.new import_user_events_config
|
754
|
-
rejoin_user_events_config = parent_rpcs
|
751
|
+
rejoin_user_events_config = parent_rpcs.rejoin_user_events if parent_rpcs.respond_to? :rejoin_user_events
|
755
752
|
@rejoin_user_events = ::Gapic::Config::Method.new rejoin_user_events_config
|
756
753
|
|
757
754
|
yield self if block_given?
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -396,9 +396,9 @@ module Google
|
|
396
396
|
end
|
397
397
|
|
398
398
|
##
|
399
|
-
# Waits
|
400
|
-
#
|
401
|
-
#
|
399
|
+
# Waits until the specified long-running operation is done or reaches at most
|
400
|
+
# a specified timeout, returning the latest state. If the operation is
|
401
|
+
# already done, the latest state is immediately returned. If the timeout
|
402
402
|
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
403
403
|
# timeout is used. If the server does not support this method, it returns
|
404
404
|
# `google.rpc.Code.UNIMPLEMENTED`.
|
@@ -560,7 +560,7 @@ module Google
|
|
560
560
|
config_attr :scope, nil, ::String, ::Array, nil
|
561
561
|
config_attr :lib_name, nil, ::String, nil
|
562
562
|
config_attr :lib_version, nil, ::String, nil
|
563
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
563
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
564
564
|
config_attr :interceptors, nil, ::Array, nil
|
565
565
|
config_attr :timeout, nil, ::Numeric, nil
|
566
566
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -581,7 +581,7 @@ module Google
|
|
581
581
|
def rpcs
|
582
582
|
@rpcs ||= begin
|
583
583
|
parent_rpcs = nil
|
584
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
584
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
585
585
|
Rpcs.new parent_rpcs
|
586
586
|
end
|
587
587
|
end
|
@@ -632,15 +632,15 @@ module Google
|
|
632
632
|
|
633
633
|
# @private
|
634
634
|
def initialize parent_rpcs = nil
|
635
|
-
list_operations_config = parent_rpcs
|
635
|
+
list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations
|
636
636
|
@list_operations = ::Gapic::Config::Method.new list_operations_config
|
637
|
-
get_operation_config = parent_rpcs
|
637
|
+
get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation
|
638
638
|
@get_operation = ::Gapic::Config::Method.new get_operation_config
|
639
|
-
delete_operation_config = parent_rpcs
|
639
|
+
delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation
|
640
640
|
@delete_operation = ::Gapic::Config::Method.new delete_operation_config
|
641
|
-
cancel_operation_config = parent_rpcs
|
641
|
+
cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation
|
642
642
|
@cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
|
643
|
-
wait_operation_config = parent_rpcs
|
643
|
+
wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation
|
644
644
|
@wait_operation = ::Gapic::Config::Method.new wait_operation_config
|
645
645
|
|
646
646
|
yield self if block_given?
|