google-cloud-retail-v2 0.15.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/retail/v2/catalog_pb.rb +25 -68
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/catalog_service/rest/service_stub.rb +11 -11
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +27 -55
- data/lib/google/cloud/retail/v2/common_pb.rb +25 -140
- data/lib/google/cloud/retail/v2/completion_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +3 -1
- data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +7 -5
- data/lib/google/cloud/retail/v2/completion_service/rest/service_stub.rb +2 -2
- data/lib/google/cloud/retail/v2/completion_service_pb.rb +25 -23
- data/lib/google/cloud/retail/v2/control_pb.rb +25 -11
- data/lib/google/cloud/retail/v2/control_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/control_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/control_service/rest/service_stub.rb +5 -5
- data/lib/google/cloud/retail/v2/control_service_pb.rb +26 -26
- data/lib/google/cloud/retail/v2/import_config_pb.rb +30 -93
- data/lib/google/cloud/retail/v2/model_pb.rb +25 -42
- data/lib/google/cloud/retail/v2/model_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/model_service/operations.rb +3 -1
- data/lib/google/cloud/retail/v2/model_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +7 -5
- data/lib/google/cloud/retail/v2/model_service/rest/service_stub.rb +8 -8
- data/lib/google/cloud/retail/v2/model_service_pb.rb +26 -42
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/prediction_service/rest/service_stub.rb +1 -1
- data/lib/google/cloud/retail/v2/prediction_service_pb.rb +26 -21
- data/lib/google/cloud/retail/v2/product_pb.rb +30 -52
- data/lib/google/cloud/retail/v2/product_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/product_service/operations.rb +3 -1
- data/lib/google/cloud/retail/v2/product_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +7 -5
- data/lib/google/cloud/retail/v2/product_service/rest/service_stub.rb +11 -11
- data/lib/google/cloud/retail/v2/product_service_pb.rb +28 -81
- data/lib/google/cloud/retail/v2/promotion_pb.rb +24 -4
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +24 -11
- data/lib/google/cloud/retail/v2/search_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/search_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/search_service/rest/service_stub.rb +1 -1
- data/lib/google/cloud/retail/v2/search_service_pb.rb +28 -137
- data/lib/google/cloud/retail/v2/serving_config_pb.rb +25 -27
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/serving_config_service/rest/service_stub.rb +7 -7
- data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +26 -33
- data/lib/google/cloud/retail/v2/user_event_pb.rb +28 -40
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +3 -1
- data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +7 -5
- data/lib/google/cloud/retail/v2/user_event_service/rest/service_stub.rb +5 -5
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +25 -30
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/proto_docs/google/api/client.rb +10 -1
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/struct.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +4 -4
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_serving_config_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_serving_config_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
|
136
136
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_serving_config_request request_pb
|
137
137
|
query_string_params = if query_string_params.any?
|
138
|
-
query_string_params.to_h { |p| p.split
|
138
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
139
139
|
else
|
140
140
|
{}
|
141
141
|
end
|
@@ -173,7 +173,7 @@ module Google
|
|
173
173
|
|
174
174
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_serving_config_request request_pb
|
175
175
|
query_string_params = if query_string_params.any?
|
176
|
-
query_string_params.to_h { |p| p.split
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
177
|
else
|
178
178
|
{}
|
179
179
|
end
|
@@ -211,7 +211,7 @@ module Google
|
|
211
211
|
|
212
212
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_serving_configs_request request_pb
|
213
213
|
query_string_params = if query_string_params.any?
|
214
|
-
query_string_params.to_h { |p| p.split
|
214
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
215
215
|
else
|
216
216
|
{}
|
217
217
|
end
|
@@ -249,7 +249,7 @@ module Google
|
|
249
249
|
|
250
250
|
verb, uri, query_string_params, body = ServiceStub.transcode_add_control_request request_pb
|
251
251
|
query_string_params = if query_string_params.any?
|
252
|
-
query_string_params.to_h { |p| p.split
|
252
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
253
253
|
else
|
254
254
|
{}
|
255
255
|
end
|
@@ -287,7 +287,7 @@ module Google
|
|
287
287
|
|
288
288
|
verb, uri, query_string_params, body = ServiceStub.transcode_remove_control_request request_pb
|
289
289
|
query_string_params = if query_string_params.any?
|
290
|
-
query_string_params.to_h { |p| p.split
|
290
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
291
291
|
else
|
292
292
|
{}
|
293
293
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/retail/v2/serving_config_service.proto
|
3
4
|
|
@@ -11,41 +12,33 @@ require 'google/cloud/retail/v2/serving_config_pb'
|
|
11
12
|
require 'google/protobuf/empty_pb'
|
12
13
|
require 'google/protobuf/field_mask_pb'
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
repeated :serving_configs, :message, 1, "google.cloud.retail.v2.ServingConfig"
|
38
|
-
optional :next_page_token, :string, 2
|
39
|
-
end
|
40
|
-
add_message "google.cloud.retail.v2.AddControlRequest" do
|
41
|
-
optional :serving_config, :string, 1
|
42
|
-
optional :control_id, :string, 2
|
43
|
-
end
|
44
|
-
add_message "google.cloud.retail.v2.RemoveControlRequest" do
|
45
|
-
optional :serving_config, :string, 1
|
46
|
-
optional :control_id, :string, 2
|
15
|
+
|
16
|
+
descriptor_data = "\n3google/cloud/retail/v2/serving_config_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/serving_config.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb7\x01\n\x1a\x43reateServingConfigRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12\x42\n\x0eserving_config\x18\x02 \x01(\x0b\x32%.google.cloud.retail.v2.ServingConfigB\x03\xe0\x41\x02\x12\x1e\n\x11serving_config_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x91\x01\n\x1aUpdateServingConfigRequest\x12\x42\n\x0eserving_config\x18\x01 \x01(\x0b\x32%.google.cloud.retail.v2.ServingConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"W\n\x1a\x44\x65leteServingConfigRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#retail.googleapis.com/ServingConfig\"T\n\x17GetServingConfigRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#retail.googleapis.com/ServingConfig\"\x83\x01\n\x19ListServingConfigsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"u\n\x1aListServingConfigsResponse\x12>\n\x0fserving_configs\x18\x01 \x03(\x0b\x32%.google.cloud.retail.v2.ServingConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"q\n\x11\x41\x64\x64\x43ontrolRequest\x12\x43\n\x0eserving_config\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#retail.googleapis.com/ServingConfig\x12\x17\n\ncontrol_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"t\n\x14RemoveControlRequest\x12\x43\n\x0eserving_config\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#retail.googleapis.com/ServingConfig\x12\x17\n\ncontrol_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x32\xb2\x0c\n\x14ServingConfigService\x12\xf1\x01\n\x13\x43reateServingConfig\x12\x32.google.cloud.retail.v2.CreateServingConfigRequest\x1a%.google.cloud.retail.v2.ServingConfig\"\x7f\x82\xd3\xe4\x93\x02O\"=/v2/{parent=projects/*/locations/*/catalogs/*}/servingConfigs:\x0eserving_config\xda\x41\'parent,serving_config,serving_config_id\x12\xaf\x01\n\x13\x44\x65leteServingConfig\x12\x32.google.cloud.retail.v2.DeleteServingConfigRequest\x1a\x16.google.protobuf.Empty\"L\x82\xd3\xe4\x93\x02?*=/v2/{name=projects/*/locations/*/catalogs/*/servingConfigs/*}\xda\x41\x04name\x12\xf4\x01\n\x13UpdateServingConfig\x12\x32.google.cloud.retail.v2.UpdateServingConfigRequest\x1a%.google.cloud.retail.v2.ServingConfig\"\x81\x01\x82\xd3\xe4\x93\x02^2L/v2/{serving_config.name=projects/*/locations/*/catalogs/*/servingConfigs/*}:\x0eserving_config\xda\x41\x1aserving_config,update_mask\x12\xb8\x01\n\x10GetServingConfig\x12/.google.cloud.retail.v2.GetServingConfigRequest\x1a%.google.cloud.retail.v2.ServingConfig\"L\x82\xd3\xe4\x93\x02?\x12=/v2/{name=projects/*/locations/*/catalogs/*/servingConfigs/*}\xda\x41\x04name\x12\xcb\x01\n\x12ListServingConfigs\x12\x31.google.cloud.retail.v2.ListServingConfigsRequest\x1a\x32.google.cloud.retail.v2.ListServingConfigsResponse\"N\x82\xd3\xe4\x93\x02?\x12=/v2/{parent=projects/*/locations/*/catalogs/*}/servingConfigs\xda\x41\x06parent\x12\xce\x01\n\nAddControl\x12).google.cloud.retail.v2.AddControlRequest\x1a%.google.cloud.retail.v2.ServingConfig\"n\x82\xd3\xe4\x93\x02W\"R/v2/{serving_config=projects/*/locations/*/catalogs/*/servingConfigs/*}:addControl:\x01*\xda\x41\x0eserving_config\x12\xd7\x01\n\rRemoveControl\x12,.google.cloud.retail.v2.RemoveControlRequest\x1a%.google.cloud.retail.v2.ServingConfig\"q\x82\xd3\xe4\x93\x02Z\"U/v2/{serving_config=projects/*/locations/*/catalogs/*/servingConfigs/*}:removeControl:\x01*\xda\x41\x0eserving_config\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc4\x01\n\x1a\x63om.google.cloud.retail.v2B\x19ServingConfigServiceProtoP\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"
|
17
|
+
|
18
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
|
+
|
20
|
+
begin
|
21
|
+
pool.add_serialized_file(descriptor_data)
|
22
|
+
rescue TypeError => e
|
23
|
+
# Compatibility code: will be removed in the next major version.
|
24
|
+
require 'google/protobuf/descriptor_pb'
|
25
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
26
|
+
parsed.clear_dependency
|
27
|
+
serialized = parsed.class.encode(parsed)
|
28
|
+
file = pool.add_serialized_file(serialized)
|
29
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
30
|
+
imports = [
|
31
|
+
["google.cloud.retail.v2.ServingConfig", "google/cloud/retail/v2/serving_config.proto"],
|
32
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
33
|
+
]
|
34
|
+
imports.each do |type_name, expected_filename|
|
35
|
+
import_file = pool.lookup(type_name).file_descriptor
|
36
|
+
if import_file.name != expected_filename
|
37
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
47
38
|
end
|
48
39
|
end
|
40
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
41
|
+
warn "This will become an error in the next major version."
|
49
42
|
end
|
50
43
|
|
51
44
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/retail/v2/user_event.proto
|
3
4
|
|
@@ -9,48 +10,35 @@ require 'google/cloud/retail/v2/product_pb'
|
|
9
10
|
require 'google/protobuf/timestamp_pb'
|
10
11
|
require 'google/protobuf/wrappers_pb'
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
add_message "google.cloud.retail.v2.ProductDetail" do
|
38
|
-
optional :product, :message, 1, "google.cloud.retail.v2.Product"
|
39
|
-
optional :quantity, :message, 2, "google.protobuf.Int32Value"
|
40
|
-
end
|
41
|
-
add_message "google.cloud.retail.v2.CompletionDetail" do
|
42
|
-
optional :completion_attribution_token, :string, 1
|
43
|
-
optional :selected_suggestion, :string, 2
|
44
|
-
optional :selected_position, :int32, 3
|
45
|
-
end
|
46
|
-
add_message "google.cloud.retail.v2.PurchaseTransaction" do
|
47
|
-
optional :id, :string, 1
|
48
|
-
optional :revenue, :float, 2
|
49
|
-
optional :tax, :float, 3
|
50
|
-
optional :cost, :float, 4
|
51
|
-
optional :currency_code, :string, 5
|
13
|
+
|
14
|
+
descriptor_data = "\n\'google/cloud/retail/v2/user_event.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a#google/cloud/retail/v2/common.proto\x1a$google/cloud/retail/v2/product.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x97\x06\n\tUserEvent\x12\x17\n\nevent_type\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nvisitor_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nsession_id\x18\x15 \x01(\t\x12.\n\nevent_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\x0e\x65xperiment_ids\x18\x04 \x03(\t\x12\x19\n\x11\x61ttribution_token\x18\x05 \x01(\t\x12>\n\x0fproduct_details\x18\x06 \x03(\x0b\x32%.google.cloud.retail.v2.ProductDetail\x12\x43\n\x11\x63ompletion_detail\x18\x16 \x01(\x0b\x32(.google.cloud.retail.v2.CompletionDetail\x12\x45\n\nattributes\x18\x07 \x03(\x0b\x32\x31.google.cloud.retail.v2.UserEvent.AttributesEntry\x12\x0f\n\x07\x63\x61rt_id\x18\x08 \x01(\t\x12I\n\x14purchase_transaction\x18\t \x01(\x0b\x32+.google.cloud.retail.v2.PurchaseTransaction\x12\x14\n\x0csearch_query\x18\n \x01(\t\x12\x0e\n\x06\x66ilter\x18\x10 \x01(\t\x12\x10\n\x08order_by\x18\x11 \x01(\t\x12\x0e\n\x06offset\x18\x12 \x01(\x05\x12\x17\n\x0fpage_categories\x18\x0b \x03(\t\x12\x33\n\tuser_info\x18\x0c \x01(\x0b\x32 .google.cloud.retail.v2.UserInfo\x12\x0b\n\x03uri\x18\r \x01(\t\x12\x14\n\x0creferrer_uri\x18\x0e \x01(\t\x12\x14\n\x0cpage_view_id\x18\x0f \x01(\t\x12\x0e\n\x06\x65ntity\x18\x17 \x01(\t\x1aZ\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.cloud.retail.v2.CustomAttribute:\x02\x38\x01\"u\n\rProductDetail\x12\x35\n\x07product\x18\x01 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ProductB\x03\xe0\x41\x02\x12-\n\x08quantity\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\"p\n\x10\x43ompletionDetail\x12$\n\x1c\x63ompletion_attribution_token\x18\x01 \x01(\t\x12\x1b\n\x13selected_suggestion\x18\x02 \x01(\t\x12\x19\n\x11selected_position\x18\x03 \x01(\x05\"n\n\x13PurchaseTransaction\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x07revenue\x18\x02 \x01(\x02\x42\x03\xe0\x41\x02\x12\x0b\n\x03tax\x18\x03 \x01(\x02\x12\x0c\n\x04\x63ost\x18\x04 \x01(\x02\x12\x1a\n\rcurrency_code\x18\x05 \x01(\tB\x03\xe0\x41\x02\x42\xb9\x01\n\x1a\x63om.google.cloud.retail.v2B\x0eUserEventProtoP\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"
|
15
|
+
|
16
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
17
|
+
|
18
|
+
begin
|
19
|
+
pool.add_serialized_file(descriptor_data)
|
20
|
+
rescue TypeError => e
|
21
|
+
# Compatibility code: will be removed in the next major version.
|
22
|
+
require 'google/protobuf/descriptor_pb'
|
23
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
24
|
+
parsed.clear_dependency
|
25
|
+
serialized = parsed.class.encode(parsed)
|
26
|
+
file = pool.add_serialized_file(serialized)
|
27
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
28
|
+
imports = [
|
29
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
30
|
+
["google.cloud.retail.v2.UserInfo", "google/cloud/retail/v2/common.proto"],
|
31
|
+
["google.cloud.retail.v2.Product", "google/cloud/retail/v2/product.proto"],
|
32
|
+
["google.protobuf.Int32Value", "google/protobuf/wrappers.proto"],
|
33
|
+
]
|
34
|
+
imports.each do |type_name, expected_filename|
|
35
|
+
import_file = pool.lookup(type_name).file_descriptor
|
36
|
+
if import_file.name != expected_filename
|
37
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
52
38
|
end
|
53
39
|
end
|
40
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
41
|
+
warn "This will become an error in the next major version."
|
54
42
|
end
|
55
43
|
|
56
44
|
module Google
|
@@ -139,7 +139,7 @@ module Google
|
|
139
139
|
credentials = @config.credentials
|
140
140
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
141
141
|
# but only if the default endpoint does not have a region prefix.
|
142
|
-
enable_self_signed_jwt = @config.endpoint ==
|
142
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
143
143
|
!@config.endpoint.split(".").first.include?("-")
|
144
144
|
credentials ||= Credentials.default scope: @config.scope,
|
145
145
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -807,7 +807,9 @@ module Google
|
|
807
807
|
class Configuration
|
808
808
|
extend ::Gapic::Config
|
809
809
|
|
810
|
-
|
810
|
+
DEFAULT_ENDPOINT = "retail.googleapis.com"
|
811
|
+
|
812
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
811
813
|
config_attr :credentials, nil do |value|
|
812
814
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
813
815
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -664,7 +664,9 @@ module Google
|
|
664
664
|
class Configuration
|
665
665
|
extend ::Gapic::Config
|
666
666
|
|
667
|
-
|
667
|
+
DEFAULT_ENDPOINT = "retail.googleapis.com"
|
668
|
+
|
669
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
668
670
|
config_attr :credentials, nil do |value|
|
669
671
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
670
672
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
credentials = @config.credentials
|
136
136
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
137
137
|
# but only if the default endpoint does not have a region prefix.
|
138
|
-
enable_self_signed_jwt = @config.endpoint ==
|
138
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
139
139
|
!@config.endpoint.split(".").first.include?("-")
|
140
140
|
credentials ||= Credentials.default scope: @config.scope,
|
141
141
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -653,7 +653,9 @@ module Google
|
|
653
653
|
class Configuration
|
654
654
|
extend ::Gapic::Config
|
655
655
|
|
656
|
-
|
656
|
+
DEFAULT_ENDPOINT = "retail.googleapis.com"
|
657
|
+
|
658
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
657
659
|
config_attr :credentials, nil do |value|
|
658
660
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
659
661
|
allowed.any? { |klass| klass === value }
|
@@ -446,7 +446,9 @@ module Google
|
|
446
446
|
class Configuration
|
447
447
|
extend ::Gapic::Config
|
448
448
|
|
449
|
-
|
449
|
+
DEFAULT_ENDPOINT = "retail.googleapis.com"
|
450
|
+
|
451
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
450
452
|
config_attr :credentials, nil do |value|
|
451
453
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
452
454
|
allowed.any? { |klass| klass === value }
|
@@ -567,7 +569,7 @@ module Google
|
|
567
569
|
|
568
570
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
|
569
571
|
query_string_params = if query_string_params.any?
|
570
|
-
query_string_params.to_h { |p| p.split
|
572
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
571
573
|
else
|
572
574
|
{}
|
573
575
|
end
|
@@ -605,7 +607,7 @@ module Google
|
|
605
607
|
|
606
608
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
|
607
609
|
query_string_params = if query_string_params.any?
|
608
|
-
query_string_params.to_h { |p| p.split
|
610
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
609
611
|
else
|
610
612
|
{}
|
611
613
|
end
|
@@ -643,7 +645,7 @@ module Google
|
|
643
645
|
|
644
646
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
|
645
647
|
query_string_params = if query_string_params.any?
|
646
|
-
query_string_params.to_h { |p| p.split
|
648
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
647
649
|
else
|
648
650
|
{}
|
649
651
|
end
|
@@ -681,7 +683,7 @@ module Google
|
|
681
683
|
|
682
684
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
|
683
685
|
query_string_params = if query_string_params.any?
|
684
|
-
query_string_params.to_h { |p| p.split
|
686
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
685
687
|
else
|
686
688
|
{}
|
687
689
|
end
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_write_user_event_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_collect_user_event_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
|
136
136
|
verb, uri, query_string_params, body = ServiceStub.transcode_purge_user_events_request request_pb
|
137
137
|
query_string_params = if query_string_params.any?
|
138
|
-
query_string_params.to_h { |p| p.split
|
138
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
139
139
|
else
|
140
140
|
{}
|
141
141
|
end
|
@@ -173,7 +173,7 @@ module Google
|
|
173
173
|
|
174
174
|
verb, uri, query_string_params, body = ServiceStub.transcode_import_user_events_request request_pb
|
175
175
|
query_string_params = if query_string_params.any?
|
176
|
-
query_string_params.to_h { |p| p.split
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
177
|
else
|
178
178
|
{}
|
179
179
|
end
|
@@ -211,7 +211,7 @@ module Google
|
|
211
211
|
|
212
212
|
verb, uri, query_string_params, body = ServiceStub.transcode_rejoin_user_events_request request_pb
|
213
213
|
query_string_params = if query_string_params.any?
|
214
|
-
query_string_params.to_h { |p| p.split
|
214
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
215
215
|
else
|
216
216
|
{}
|
217
217
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/retail/v2/user_event_service.proto
|
3
4
|
|
@@ -13,38 +14,32 @@ require 'google/cloud/retail/v2/purge_config_pb'
|
|
13
14
|
require 'google/cloud/retail/v2/user_event_pb'
|
14
15
|
require 'google/longrunning/operations_pb'
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
value :USER_EVENT_REJOIN_SCOPE_UNSPECIFIED, 0
|
39
|
-
value :JOINED_EVENTS, 1
|
40
|
-
value :UNJOINED_EVENTS, 2
|
41
|
-
end
|
42
|
-
add_message "google.cloud.retail.v2.RejoinUserEventsResponse" do
|
43
|
-
optional :rejoined_user_events_count, :int64, 1
|
44
|
-
end
|
45
|
-
add_message "google.cloud.retail.v2.RejoinUserEventsMetadata" do
|
17
|
+
|
18
|
+
descriptor_data = "\n/google/cloud/retail/v2/user_event_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/httpbody.proto\x1a\x19google/api/resource.proto\x1a*google/cloud/retail/v2/import_config.proto\x1a)google/cloud/retail/v2/purge_config.proto\x1a\'google/cloud/retail/v2/user_event.proto\x1a#google/longrunning/operations.proto\"}\n\x15WriteUserEventRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12:\n\nuser_event\x18\x02 \x01(\x0b\x32!.google.cloud.retail.v2.UserEventB\x03\xe0\x41\x02\x12\x13\n\x0bwrite_async\x18\x03 \x01(\x08\"\x9f\x01\n\x17\x43ollectUserEventRequest\x12\x17\n\rprebuilt_rule\x18\x06 \x01(\tH\x00\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nuser_event\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0b\n\x03uri\x18\x03 \x01(\t\x12\x0b\n\x03\x65ts\x18\x04 \x01(\x03\x12\x10\n\x08raw_json\x18\x05 \x01(\tB\x11\n\x0f\x63onversion_rule\"\xfe\x01\n\x17RejoinUserEventsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x65\n\x17user_event_rejoin_scope\x18\x02 \x01(\x0e\x32\x44.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope\"g\n\x14UserEventRejoinScope\x12\'\n#USER_EVENT_REJOIN_SCOPE_UNSPECIFIED\x10\x00\x12\x11\n\rJOINED_EVENTS\x10\x01\x12\x13\n\x0fUNJOINED_EVENTS\x10\x02\">\n\x18RejoinUserEventsResponse\x12\"\n\x1arejoined_user_events_count\x18\x01 \x01(\x03\"\x1a\n\x18RejoinUserEventsMetadata2\xbf\t\n\x10UserEventService\x12\xb7\x01\n\x0eWriteUserEvent\x12-.google.cloud.retail.v2.WriteUserEventRequest\x1a!.google.cloud.retail.v2.UserEvent\"S\x82\xd3\xe4\x93\x02M\"?/v2/{parent=projects/*/locations/*/catalogs/*}/userEvents:write:\nuser_event\x12\xa4\x01\n\x10\x43ollectUserEvent\x12/.google.cloud.retail.v2.CollectUserEventRequest\x1a\x14.google.api.HttpBody\"I\x82\xd3\xe4\x93\x02\x43\x12\x41/v2/{parent=projects/*/locations/*/catalogs/*}/userEvents:collect\x12\x86\x02\n\x0fPurgeUserEvents\x12..google.cloud.retail.v2.PurgeUserEventsRequest\x1a\x1d.google.longrunning.Operation\"\xa3\x01\x82\xd3\xe4\x93\x02\x44\"?/v2/{parent=projects/*/locations/*/catalogs/*}/userEvents:purge:\x01*\xca\x41V\n.google.cloud.retail.v2.PurgeUserEventsResponse\x12$google.cloud.retail.v2.PurgeMetadata\x12\x8b\x02\n\x10ImportUserEvents\x12/.google.cloud.retail.v2.ImportUserEventsRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\x82\xd3\xe4\x93\x02\x45\"@/v2/{parent=projects/*/locations/*/catalogs/*}/userEvents:import:\x01*\xca\x41X\n/google.cloud.retail.v2.ImportUserEventsResponse\x12%google.cloud.retail.v2.ImportMetadata\x12\xe7\x01\n\x10RejoinUserEvents\x12/.google.cloud.retail.v2.RejoinUserEventsRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\x82\xd3\xe4\x93\x02\x45\"@/v2/{parent=projects/*/locations/*/catalogs/*}/userEvents:rejoin:\x01*\xca\x41\x34\n\x18RejoinUserEventsResponse\x12\x18RejoinUserEventsMetadata\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc0\x01\n\x1a\x63om.google.cloud.retail.v2B\x15UserEventServiceProtoP\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"
|
19
|
+
|
20
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
21
|
+
|
22
|
+
begin
|
23
|
+
pool.add_serialized_file(descriptor_data)
|
24
|
+
rescue TypeError => e
|
25
|
+
# Compatibility code: will be removed in the next major version.
|
26
|
+
require 'google/protobuf/descriptor_pb'
|
27
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
28
|
+
parsed.clear_dependency
|
29
|
+
serialized = parsed.class.encode(parsed)
|
30
|
+
file = pool.add_serialized_file(serialized)
|
31
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
32
|
+
imports = [
|
33
|
+
["google.cloud.retail.v2.UserEvent", "google/cloud/retail/v2/user_event.proto"],
|
34
|
+
]
|
35
|
+
imports.each do |type_name, expected_filename|
|
36
|
+
import_file = pool.lookup(type_name).file_descriptor
|
37
|
+
if import_file.name != expected_filename
|
38
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
46
39
|
end
|
47
40
|
end
|
41
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
42
|
+
warn "This will become an error in the next major version."
|
48
43
|
end
|
49
44
|
|
50
45
|
module Google
|
@@ -83,7 +83,7 @@ module Google
|
|
83
83
|
# long-running operation pattern.
|
84
84
|
# @!attribute [rw] new_issue_uri
|
85
85
|
# @return [::String]
|
86
|
-
# Link to a
|
86
|
+
# Link to a *public* URI where users can report issues. Example:
|
87
87
|
# https://issuetracker.google.com/issues/new?component=190865&template=1161103
|
88
88
|
# @!attribute [rw] documentation_uri
|
89
89
|
# @return [::String]
|
@@ -353,6 +353,15 @@ module Google
|
|
353
353
|
|
354
354
|
# Street View Org.
|
355
355
|
STREET_VIEW = 4
|
356
|
+
|
357
|
+
# Shopping Org.
|
358
|
+
SHOPPING = 5
|
359
|
+
|
360
|
+
# Geo Org.
|
361
|
+
GEO = 6
|
362
|
+
|
363
|
+
# Generative AI - https://developers.generativeai.google
|
364
|
+
GENERATIVE_AI = 7
|
356
365
|
end
|
357
366
|
|
358
367
|
# To where should client libraries be published?
|
@@ -43,8 +43,12 @@ module Google
|
|
43
43
|
# if (any.is(Foo.class)) {
|
44
44
|
# foo = any.unpack(Foo.class);
|
45
45
|
# }
|
46
|
+
# // or ...
|
47
|
+
# if (any.isSameTypeAs(Foo.getDefaultInstance())) {
|
48
|
+
# foo = any.unpack(Foo.getDefaultInstance());
|
49
|
+
# }
|
46
50
|
#
|
47
|
-
#
|
51
|
+
# Example 3: Pack and unpack a message in Python.
|
48
52
|
#
|
49
53
|
# foo = Foo(...)
|
50
54
|
# any = Any()
|
@@ -54,7 +58,7 @@ module Google
|
|
54
58
|
# any.Unpack(foo)
|
55
59
|
# ...
|
56
60
|
#
|
57
|
-
#
|
61
|
+
# Example 4: Pack and unpack a message in Go
|
58
62
|
#
|
59
63
|
# foo := &pb.Foo{...}
|
60
64
|
# any, err := anypb.New(foo)
|
@@ -73,9 +77,8 @@ module Google
|
|
73
77
|
# in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
74
78
|
# name "y.z".
|
75
79
|
#
|
76
|
-
#
|
77
80
|
# JSON
|
78
|
-
#
|
81
|
+
# ====
|
79
82
|
# The JSON representation of an `Any` value uses the regular
|
80
83
|
# representation of the deserialized, embedded message, with an
|
81
84
|
# additional field `@type` which contains the type URL. Example:
|
@@ -87,7 +87,7 @@ module Google
|
|
87
87
|
# `NullValue` is a singleton enumeration to represent the null value for the
|
88
88
|
# `Value` type union.
|
89
89
|
#
|
90
|
-
#
|
90
|
+
# The JSON representation for `NullValue` is JSON `null`.
|
91
91
|
module NullValue
|
92
92
|
# Null value.
|
93
93
|
NULL_VALUE = 0
|
@@ -69,7 +69,6 @@ module Google
|
|
69
69
|
# Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
70
70
|
# .setNanos((int) ((millis % 1000) * 1000000)).build();
|
71
71
|
#
|
72
|
-
#
|
73
72
|
# Example 5: Compute Timestamp from Java `Instant.now()`.
|
74
73
|
#
|
75
74
|
# Instant now = Instant.now();
|
@@ -78,7 +77,6 @@ module Google
|
|
78
77
|
# Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
79
78
|
# .setNanos(now.getNano()).build();
|
80
79
|
#
|
81
|
-
#
|
82
80
|
# Example 6: Compute Timestamp from current time in Python.
|
83
81
|
#
|
84
82
|
# timestamp = Timestamp()
|
@@ -108,7 +106,7 @@ module Google
|
|
108
106
|
# [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
109
107
|
# the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
110
108
|
# the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
111
|
-
# http://
|
109
|
+
# http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
112
110
|
# ) to obtain a formatter capable of generating timestamps in this format.
|
113
111
|
# @!attribute [rw] seconds
|
114
112
|
# @return [::Integer]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-retail-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.19.1
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.19.1
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|