google-cloud-retail-v2 0.3.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- 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 +205 -9
- 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 +36 -38
- data/lib/google/cloud/retail/v2/product_pb.rb +21 -0
- data/lib/google/cloud/retail/v2/product_service/client.rb +634 -9
- data/lib/google/cloud/retail/v2/product_service/operations.rb +4 -4
- 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 +536 -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 +3 -6
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +4 -4
- 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 +681 -0
- data/proto_docs/google/cloud/retail/v2/user_event.rb +95 -3
- data/proto_docs/google/type/date.rb +53 -0
- metadata +29 -7
@@ -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
|
@@ -67,10 +67,7 @@ module Google
|
|
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
|
@@ -141,7 +138,7 @@ module Google
|
|
141
138
|
!@config.endpoint.split(".").first.include?("-")
|
142
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
|
@@ -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`.
|
@@ -24,6 +24,25 @@ module Google
|
|
24
24
|
module UserEventService
|
25
25
|
# Path helper methods for the UserEventService API.
|
26
26
|
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Catalog resource string.
|
29
|
+
#
|
30
|
+
# The resource will be in the following format:
|
31
|
+
#
|
32
|
+
# `projects/{project}/locations/{location}/catalogs/{catalog}`
|
33
|
+
#
|
34
|
+
# @param project [String]
|
35
|
+
# @param location [String]
|
36
|
+
# @param catalog [String]
|
37
|
+
#
|
38
|
+
# @return [::String]
|
39
|
+
def catalog_path project:, location:, catalog:
|
40
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
41
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
42
|
+
|
43
|
+
"projects/#{project}/locations/#{location}/catalogs/#{catalog}"
|
44
|
+
end
|
45
|
+
|
27
46
|
##
|
28
47
|
# Create a fully-qualified Product resource string.
|
29
48
|
#
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -43,7 +43,8 @@ module Google
|
|
43
43
|
#
|
44
44
|
# service ResourceService {
|
45
45
|
# rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
|
46
|
-
# rpc UpdateResource(google.api.HttpBody) returns
|
46
|
+
# rpc UpdateResource(google.api.HttpBody) returns
|
47
|
+
# (google.protobuf.Empty);
|
47
48
|
# }
|
48
49
|
#
|
49
50
|
# Example with streaming methods:
|
@@ -59,10 +60,10 @@ module Google
|
|
59
60
|
# handled, all other features will continue to work unchanged.
|
60
61
|
# @!attribute [rw] content_type
|
61
62
|
# @return [::String]
|
62
|
-
# The HTTP Content-Type
|
63
|
+
# The HTTP Content-Type header value specifying the content type of the body.
|
63
64
|
# @!attribute [rw] data
|
64
65
|
# @return [::String]
|
65
|
-
# HTTP body binary
|
66
|
+
# The HTTP request/response body as raw binary.
|
66
67
|
# @!attribute [rw] extensions
|
67
68
|
# @return [::Array<::Google::Protobuf::Any>]
|
68
69
|
# Application specific response metadata. Must be set in the first response
|