google-cloud-retail-v2 0.15.0 → 0.16.0
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_pb.rb +27 -55
- data/lib/google/cloud/retail/v2/common_pb.rb +25 -140
- 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_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_pb.rb +26 -42
- 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_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_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_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_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
@@ -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/product_service.proto
|
3
4
|
|
@@ -15,89 +16,35 @@ require 'google/protobuf/empty_pb'
|
|
15
16
|
require 'google/protobuf/field_mask_pb'
|
16
17
|
require 'google/protobuf/timestamp_pb'
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
add_message "google.cloud.retail.v2.ListProductsResponse" do
|
44
|
-
repeated :products, :message, 1, "google.cloud.retail.v2.Product"
|
45
|
-
optional :next_page_token, :string, 2
|
46
|
-
end
|
47
|
-
add_message "google.cloud.retail.v2.SetInventoryRequest" do
|
48
|
-
optional :inventory, :message, 1, "google.cloud.retail.v2.Product"
|
49
|
-
optional :set_mask, :message, 2, "google.protobuf.FieldMask"
|
50
|
-
optional :set_time, :message, 3, "google.protobuf.Timestamp"
|
51
|
-
optional :allow_missing, :bool, 4
|
52
|
-
end
|
53
|
-
add_message "google.cloud.retail.v2.SetInventoryMetadata" do
|
54
|
-
end
|
55
|
-
add_message "google.cloud.retail.v2.SetInventoryResponse" do
|
56
|
-
end
|
57
|
-
add_message "google.cloud.retail.v2.AddFulfillmentPlacesRequest" do
|
58
|
-
optional :product, :string, 1
|
59
|
-
optional :type, :string, 2
|
60
|
-
repeated :place_ids, :string, 3
|
61
|
-
optional :add_time, :message, 4, "google.protobuf.Timestamp"
|
62
|
-
optional :allow_missing, :bool, 5
|
63
|
-
end
|
64
|
-
add_message "google.cloud.retail.v2.AddFulfillmentPlacesMetadata" do
|
65
|
-
end
|
66
|
-
add_message "google.cloud.retail.v2.AddFulfillmentPlacesResponse" do
|
67
|
-
end
|
68
|
-
add_message "google.cloud.retail.v2.AddLocalInventoriesRequest" do
|
69
|
-
optional :product, :string, 1
|
70
|
-
repeated :local_inventories, :message, 2, "google.cloud.retail.v2.LocalInventory"
|
71
|
-
optional :add_mask, :message, 4, "google.protobuf.FieldMask"
|
72
|
-
optional :add_time, :message, 5, "google.protobuf.Timestamp"
|
73
|
-
optional :allow_missing, :bool, 6
|
74
|
-
end
|
75
|
-
add_message "google.cloud.retail.v2.AddLocalInventoriesMetadata" do
|
76
|
-
end
|
77
|
-
add_message "google.cloud.retail.v2.AddLocalInventoriesResponse" do
|
78
|
-
end
|
79
|
-
add_message "google.cloud.retail.v2.RemoveLocalInventoriesRequest" do
|
80
|
-
optional :product, :string, 1
|
81
|
-
repeated :place_ids, :string, 2
|
82
|
-
optional :remove_time, :message, 5, "google.protobuf.Timestamp"
|
83
|
-
optional :allow_missing, :bool, 3
|
84
|
-
end
|
85
|
-
add_message "google.cloud.retail.v2.RemoveLocalInventoriesMetadata" do
|
86
|
-
end
|
87
|
-
add_message "google.cloud.retail.v2.RemoveLocalInventoriesResponse" do
|
88
|
-
end
|
89
|
-
add_message "google.cloud.retail.v2.RemoveFulfillmentPlacesRequest" do
|
90
|
-
optional :product, :string, 1
|
91
|
-
optional :type, :string, 2
|
92
|
-
repeated :place_ids, :string, 3
|
93
|
-
optional :remove_time, :message, 4, "google.protobuf.Timestamp"
|
94
|
-
optional :allow_missing, :bool, 5
|
95
|
-
end
|
96
|
-
add_message "google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata" do
|
97
|
-
end
|
98
|
-
add_message "google.cloud.retail.v2.RemoveFulfillmentPlacesResponse" do
|
19
|
+
|
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\xae\x17\n\x0eProductService\x12\xcf\x01\n\rCreateProduct\x12,.google.cloud.retail.v2.CreateProductRequest\x1a\x1f.google.cloud.retail.v2.Product\"o\x82\xd3\xe4\x93\x02M\"B/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:\x07product\xda\x41\x19parent,product,product_id\x12\xac\x01\n\nGetProduct\x12).google.cloud.retail.v2.GetProductRequest\x1a\x1f.google.cloud.retail.v2.Product\"R\x82\xd3\xe4\x93\x02\x45\x12\x43/v2/{name=projects/*/locations/*/catalogs/*/branches/*/products/**}\xda\x41\x04name\x12\xbe\x01\n\x0cListProducts\x12+.google.cloud.retail.v2.ListProductsRequest\x1a,.google.cloud.retail.v2.ListProductsResponse\"S\x82\xd3\xe4\x93\x02\x44\x12\x42/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products\xda\x41\x06parent\x12\xd2\x01\n\rUpdateProduct\x12,.google.cloud.retail.v2.UpdateProductRequest\x1a\x1f.google.cloud.retail.v2.Product\"r\x82\xd3\xe4\x93\x02V2K/v2/{product.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:\x07product\xda\x41\x13product,update_mask\x12\xa9\x01\n\rDeleteProduct\x12,.google.cloud.retail.v2.DeleteProductRequest\x1a\x16.google.protobuf.Empty\"R\x82\xd3\xe4\x93\x02\x45*C/v2/{name=projects/*/locations/*/catalogs/*/branches/*/products/**}\xda\x41\x04name\x12\x8e\x02\n\x0eImportProducts\x12-.google.cloud.retail.v2.ImportProductsRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\x82\xd3\xe4\x93\x02N\"I/v2/{parent=projects/*/locations/*/catalogs/*/branches/*}/products:import:\x01*\xca\x41V\n-google.cloud.retail.v2.ImportProductsResponse\x12%google.cloud.retail.v2.ImportMetadata\x12\xb4\x02\n\x0cSetInventory\x12+.google.cloud.retail.v2.SetInventoryRequest\x1a\x1d.google.longrunning.Operation\"\xd7\x01\x82\xd3\xe4\x93\x02_\"Z/v2/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory:\x01*\xda\x41\x12inventory,set_mask\xca\x41Z\n+google.cloud.retail.v2.SetInventoryResponse\x12+google.cloud.retail.v2.SetInventoryMetadata\x12\xca\x02\n\x14\x41\x64\x64\x46ulfillmentPlaces\x12\x33.google.cloud.retail.v2.AddFulfillmentPlacesRequest\x1a\x1d.google.longrunning.Operation\"\xdd\x01\x82\xd3\xe4\x93\x02`\"[/v2/{product=projects/*/locations/*/catalogs/*/branches/*/products/**}:addFulfillmentPlaces:\x01*\xda\x41\x07product\xca\x41j\n3google.cloud.retail.v2.AddFulfillmentPlacesResponse\x12\x33google.cloud.retail.v2.AddFulfillmentPlacesMetadata\x12\xd9\x02\n\x17RemoveFulfillmentPlaces\x12\x36.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest\x1a\x1d.google.longrunning.Operation\"\xe6\x01\x82\xd3\xe4\x93\x02\x63\"^/v2/{product=projects/*/locations/*/catalogs/*/branches/*/products/**}:removeFulfillmentPlaces:\x01*\xda\x41\x07product\xca\x41p\n6google.cloud.retail.v2.RemoveFulfillmentPlacesResponse\x12\x36google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata\x12\xc5\x02\n\x13\x41\x64\x64LocalInventories\x12\x32.google.cloud.retail.v2.AddLocalInventoriesRequest\x1a\x1d.google.longrunning.Operation\"\xda\x01\x82\xd3\xe4\x93\x02_\"Z/v2/{product=projects/*/locations/*/catalogs/*/branches/*/products/**}:addLocalInventories:\x01*\xda\x41\x07product\xca\x41h\n2google.cloud.retail.v2.AddLocalInventoriesResponse\x12\x32google.cloud.retail.v2.AddLocalInventoriesMetadata\x12\xd4\x02\n\x16RemoveLocalInventories\x12\x35.google.cloud.retail.v2.RemoveLocalInventoriesRequest\x1a\x1d.google.longrunning.Operation\"\xe3\x01\x82\xd3\xe4\x93\x02\x62\"]/v2/{product=projects/*/locations/*/catalogs/*/branches/*/products/**}:removeLocalInventories:\x01*\xda\x41\x07product\xca\x41n\n5google.cloud.retail.v2.RemoveLocalInventoriesResponse\x12\x35google.cloud.retail.v2.RemoveLocalInventoriesMetadata\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
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
23
|
+
|
24
|
+
begin
|
25
|
+
pool.add_serialized_file(descriptor_data)
|
26
|
+
rescue TypeError => e
|
27
|
+
# Compatibility code: will be removed in the next major version.
|
28
|
+
require 'google/protobuf/descriptor_pb'
|
29
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
30
|
+
parsed.clear_dependency
|
31
|
+
serialized = parsed.class.encode(parsed)
|
32
|
+
file = pool.add_serialized_file(serialized)
|
33
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
34
|
+
imports = [
|
35
|
+
["google.cloud.retail.v2.Product", "google/cloud/retail/v2/product.proto"],
|
36
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
37
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
38
|
+
["google.cloud.retail.v2.LocalInventory", "google/cloud/retail/v2/common.proto"],
|
39
|
+
]
|
40
|
+
imports.each do |type_name, expected_filename|
|
41
|
+
import_file = pool.lookup(type_name).file_descriptor
|
42
|
+
if import_file.name != expected_filename
|
43
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
99
44
|
end
|
100
45
|
end
|
46
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
47
|
+
warn "This will become an error in the next major version."
|
101
48
|
end
|
102
49
|
|
103
50
|
module Google
|
@@ -1,14 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/retail/v2/promotion.proto
|
3
4
|
|
4
5
|
require 'google/protobuf'
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
|
8
|
+
descriptor_data = "\n&google/cloud/retail/v2/promotion.proto\x12\x16google.cloud.retail.v2\"!\n\tPromotion\x12\x14\n\x0cpromotion_id\x18\x01 \x01(\tB\xb9\x01\n\x1a\x63om.google.cloud.retail.v2B\x0ePromotionProtoP\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"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
|
12
|
+
begin
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
rescue TypeError => e
|
15
|
+
# Compatibility code: will be removed in the next major version.
|
16
|
+
require 'google/protobuf/descriptor_pb'
|
17
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
18
|
+
parsed.clear_dependency
|
19
|
+
serialized = parsed.class.encode(parsed)
|
20
|
+
file = pool.add_serialized_file(serialized)
|
21
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
22
|
+
imports = [
|
23
|
+
]
|
24
|
+
imports.each do |type_name, expected_filename|
|
25
|
+
import_file = pool.lookup(type_name).file_descriptor
|
26
|
+
if import_file.name != expected_filename
|
27
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
10
28
|
end
|
11
29
|
end
|
30
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
31
|
+
warn "This will become an error in the next major version."
|
12
32
|
end
|
13
33
|
|
14
34
|
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/purge_config.proto
|
3
4
|
|
@@ -6,19 +7,31 @@ require 'google/protobuf'
|
|
6
7
|
require 'google/api/field_behavior_pb'
|
7
8
|
require 'google/api/resource_pb'
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
|
11
|
+
descriptor_data = "\n)google/cloud/retail/v2/purge_config.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x0f\n\rPurgeMetadata\"s\n\x16PurgeUserEventsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"6\n\x17PurgeUserEventsResponse\x12\x1b\n\x13purged_events_count\x18\x01 \x01(\x03\x42\xbb\x01\n\x1a\x63om.google.cloud.retail.v2B\x10PurgeConfigProtoP\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"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError => e
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
20
31
|
end
|
21
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
22
35
|
end
|
23
36
|
|
24
37
|
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/search_service.proto
|
3
4
|
|
@@ -12,145 +13,35 @@ require 'google/cloud/retail/v2/product_pb'
|
|
12
13
|
require 'google/protobuf/field_mask_pb'
|
13
14
|
require 'google/protobuf/struct_pb'
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
end
|
41
|
-
add_message "google.cloud.retail.v2.SearchRequest.FacetSpec" do
|
42
|
-
optional :facet_key, :message, 1, "google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey"
|
43
|
-
optional :limit, :int32, 2
|
44
|
-
repeated :excluded_filter_keys, :string, 3
|
45
|
-
optional :enable_dynamic_position, :bool, 4
|
46
|
-
end
|
47
|
-
add_message "google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey" do
|
48
|
-
optional :key, :string, 1
|
49
|
-
repeated :intervals, :message, 2, "google.cloud.retail.v2.Interval"
|
50
|
-
repeated :restricted_values, :string, 3
|
51
|
-
repeated :prefixes, :string, 8
|
52
|
-
repeated :contains, :string, 9
|
53
|
-
optional :case_insensitive, :bool, 10
|
54
|
-
optional :order_by, :string, 4
|
55
|
-
optional :query, :string, 5
|
56
|
-
optional :return_min_max, :bool, 11
|
57
|
-
end
|
58
|
-
add_message "google.cloud.retail.v2.SearchRequest.DynamicFacetSpec" do
|
59
|
-
optional :mode, :enum, 1, "google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode"
|
60
|
-
end
|
61
|
-
add_enum "google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode" do
|
62
|
-
value :MODE_UNSPECIFIED, 0
|
63
|
-
value :DISABLED, 1
|
64
|
-
value :ENABLED, 2
|
65
|
-
end
|
66
|
-
add_message "google.cloud.retail.v2.SearchRequest.BoostSpec" do
|
67
|
-
repeated :condition_boost_specs, :message, 1, "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec"
|
68
|
-
proto3_optional :skip_boost_spec_validation, :bool, 2
|
69
|
-
end
|
70
|
-
add_message "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec" do
|
71
|
-
optional :condition, :string, 1
|
72
|
-
optional :boost, :float, 2
|
73
|
-
end
|
74
|
-
add_message "google.cloud.retail.v2.SearchRequest.QueryExpansionSpec" do
|
75
|
-
optional :condition, :enum, 1, "google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition"
|
76
|
-
optional :pin_unexpanded_results, :bool, 2
|
77
|
-
end
|
78
|
-
add_enum "google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition" do
|
79
|
-
value :CONDITION_UNSPECIFIED, 0
|
80
|
-
value :DISABLED, 1
|
81
|
-
value :AUTO, 3
|
82
|
-
end
|
83
|
-
add_message "google.cloud.retail.v2.SearchRequest.PersonalizationSpec" do
|
84
|
-
optional :mode, :enum, 1, "google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode"
|
85
|
-
end
|
86
|
-
add_enum "google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode" do
|
87
|
-
value :MODE_UNSPECIFIED, 0
|
88
|
-
value :AUTO, 1
|
89
|
-
value :DISABLED, 2
|
90
|
-
end
|
91
|
-
add_message "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec" do
|
92
|
-
optional :mode, :enum, 1, "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode"
|
93
|
-
end
|
94
|
-
add_enum "google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode" do
|
95
|
-
value :MODE_UNSPECIFIED, 0
|
96
|
-
value :SUGGESTION_ONLY, 1
|
97
|
-
value :AUTO, 2
|
98
|
-
end
|
99
|
-
add_enum "google.cloud.retail.v2.SearchRequest.SearchMode" do
|
100
|
-
value :SEARCH_MODE_UNSPECIFIED, 0
|
101
|
-
value :PRODUCT_SEARCH_ONLY, 1
|
102
|
-
value :FACETED_SEARCH_ONLY, 2
|
103
|
-
end
|
104
|
-
add_message "google.cloud.retail.v2.SearchResponse" do
|
105
|
-
repeated :results, :message, 1, "google.cloud.retail.v2.SearchResponse.SearchResult"
|
106
|
-
repeated :facets, :message, 2, "google.cloud.retail.v2.SearchResponse.Facet"
|
107
|
-
optional :total_size, :int32, 3
|
108
|
-
optional :corrected_query, :string, 4
|
109
|
-
optional :attribution_token, :string, 5
|
110
|
-
optional :next_page_token, :string, 6
|
111
|
-
optional :query_expansion_info, :message, 7, "google.cloud.retail.v2.SearchResponse.QueryExpansionInfo"
|
112
|
-
optional :redirect_uri, :string, 10
|
113
|
-
repeated :applied_controls, :string, 12
|
114
|
-
repeated :invalid_condition_boost_specs, :message, 14, "google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec"
|
115
|
-
repeated :experiment_info, :message, 17, "google.cloud.retail.v2.ExperimentInfo"
|
116
|
-
end
|
117
|
-
add_message "google.cloud.retail.v2.SearchResponse.SearchResult" do
|
118
|
-
optional :id, :string, 1
|
119
|
-
optional :product, :message, 2, "google.cloud.retail.v2.Product"
|
120
|
-
optional :matching_variant_count, :int32, 3
|
121
|
-
map :matching_variant_fields, :string, :message, 4, "google.protobuf.FieldMask"
|
122
|
-
map :variant_rollup_values, :string, :message, 5, "google.protobuf.Value"
|
123
|
-
repeated :personal_labels, :string, 7
|
124
|
-
end
|
125
|
-
add_message "google.cloud.retail.v2.SearchResponse.Facet" do
|
126
|
-
optional :key, :string, 1
|
127
|
-
repeated :values, :message, 2, "google.cloud.retail.v2.SearchResponse.Facet.FacetValue"
|
128
|
-
optional :dynamic_facet, :bool, 3
|
129
|
-
end
|
130
|
-
add_message "google.cloud.retail.v2.SearchResponse.Facet.FacetValue" do
|
131
|
-
optional :count, :int64, 3
|
132
|
-
optional :min_value, :double, 5
|
133
|
-
optional :max_value, :double, 6
|
134
|
-
oneof :facet_value do
|
135
|
-
optional :value, :string, 1
|
136
|
-
optional :interval, :message, 2, "google.cloud.retail.v2.Interval"
|
137
|
-
end
|
138
|
-
end
|
139
|
-
add_message "google.cloud.retail.v2.SearchResponse.QueryExpansionInfo" do
|
140
|
-
optional :expanded_query, :bool, 1
|
141
|
-
optional :pinned_result_count, :int64, 2
|
142
|
-
end
|
143
|
-
add_message "google.cloud.retail.v2.ExperimentInfo" do
|
144
|
-
optional :experiment, :string, 1
|
145
|
-
oneof :experiment_metadata do
|
146
|
-
optional :serving_config_experiment, :message, 2, "google.cloud.retail.v2.ExperimentInfo.ServingConfigExperiment"
|
147
|
-
end
|
148
|
-
end
|
149
|
-
add_message "google.cloud.retail.v2.ExperimentInfo.ServingConfigExperiment" do
|
150
|
-
optional :original_serving_config, :string, 1
|
151
|
-
optional :experiment_serving_config, :string, 2
|
16
|
+
|
17
|
+
descriptor_data = "\n+google/cloud/retail/v2/search_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/product.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xbe\x13\n\rSearchRequest\x12\x16\n\tplacement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x06\x62ranch\x18\x02 \x01(\tB!\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\r\n\x05query\x18\x03 \x01(\t\x12\x17\n\nvisitor_id\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\tuser_info\x18\x05 \x01(\x0b\x32 .google.cloud.retail.v2.UserInfo\x12\x11\n\tpage_size\x18\x07 \x01(\x05\x12\x12\n\npage_token\x18\x08 \x01(\t\x12\x0e\n\x06offset\x18\t \x01(\x05\x12\x0e\n\x06\x66ilter\x18\n \x01(\t\x12\x18\n\x10\x63\x61nonical_filter\x18\x1c \x01(\t\x12\x10\n\x08order_by\x18\x0b \x01(\t\x12\x44\n\x0b\x66\x61\x63\x65t_specs\x18\x0c \x03(\x0b\x32/.google.cloud.retail.v2.SearchRequest.FacetSpec\x12V\n\x12\x64ynamic_facet_spec\x18\x15 \x01(\x0b\x32\x36.google.cloud.retail.v2.SearchRequest.DynamicFacetSpecB\x02\x18\x01\x12\x43\n\nboost_spec\x18\r \x01(\x0b\x32/.google.cloud.retail.v2.SearchRequest.BoostSpec\x12V\n\x14query_expansion_spec\x18\x0e \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec\x12\x1b\n\x13variant_rollup_keys\x18\x11 \x03(\t\x12\x17\n\x0fpage_categories\x18\x17 \x03(\t\x12\x45\n\x0bsearch_mode\x18\x1f \x01(\x0e\x32\x30.google.cloud.retail.v2.SearchRequest.SearchMode\x12W\n\x14personalization_spec\x18 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.PersonalizationSpec\x12\x41\n\x06labels\x18\" \x03(\x0b\x32\x31.google.cloud.retail.v2.SearchRequest.LabelsEntry\x12]\n\x15spell_correction_spec\x18# \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpecH\x00\x88\x01\x01\x12\x0e\n\x06\x65ntity\x18& \x01(\t\x1a\x91\x03\n\tFacetSpec\x12P\n\tfacet_key\x18\x01 \x01(\x0b\x32\x38.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKeyB\x03\xe0\x41\x02\x12\r\n\x05limit\x18\x02 \x01(\x05\x12\x1c\n\x14\x65xcluded_filter_keys\x18\x03 \x03(\t\x12\x1f\n\x17\x65nable_dynamic_position\x18\x04 \x01(\x08\x1a\xe3\x01\n\x08\x46\x61\x63\x65tKey\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\tintervals\x18\x02 \x03(\x0b\x32 .google.cloud.retail.v2.Interval\x12\x19\n\x11restricted_values\x18\x03 \x03(\t\x12\x10\n\x08prefixes\x18\x08 \x03(\t\x12\x10\n\x08\x63ontains\x18\t \x03(\t\x12\x18\n\x10\x63\x61se_insensitive\x18\n \x01(\x08\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\r\n\x05query\x18\x05 \x01(\t\x12\x16\n\x0ereturn_min_max\x18\x0b \x01(\x08\x1a\x96\x01\n\x10\x44ynamicFacetSpec\x12I\n\x04mode\x18\x01 \x01(\x0e\x32;.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Mode\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x1a\xee\x01\n\tBoostSpec\x12\x61\n\x15\x63ondition_boost_specs\x18\x01 \x03(\x0b\x32\x42.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec\x12\'\n\x1askip_boost_spec_validation\x18\x02 \x01(\x08H\x00\x88\x01\x01\x1a\x36\n\x12\x43onditionBoostSpec\x12\x11\n\tcondition\x18\x01 \x01(\t\x12\r\n\x05\x62oost\x18\x02 \x01(\x02\x42\x1d\n\x1b_skip_boost_spec_validation\x1a\xcb\x01\n\x12QueryExpansionSpec\x12U\n\tcondition\x18\x01 \x01(\x0e\x32\x42.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Condition\x12\x1e\n\x16pin_unexpanded_results\x18\x02 \x01(\x08\">\n\tCondition\x12\x19\n\x15\x43ONDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x08\n\x04\x41UTO\x10\x03\x1a\x99\x01\n\x13PersonalizationSpec\x12L\n\x04mode\x18\x01 \x01(\x0e\x32>.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Mode\"4\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41UTO\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x1a\xa0\x01\n\x13SpellCorrectionSpec\x12L\n\x04mode\x18\x01 \x01(\x0e\x32>.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Mode\";\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fSUGGESTION_ONLY\x10\x01\x12\x08\n\x04\x41UTO\x10\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"[\n\nSearchMode\x12\x1b\n\x17SEARCH_MODE_UNSPECIFIED\x10\x00\x12\x17\n\x13PRODUCT_SEARCH_ONLY\x10\x01\x12\x17\n\x13\x46\x41\x43\x45TED_SEARCH_ONLY\x10\x02\x42\x18\n\x16_spell_correction_spec\"\x9a\x0b\n\x0eSearchResponse\x12\x44\n\x07results\x18\x01 \x03(\x0b\x32\x33.google.cloud.retail.v2.SearchResponse.SearchResult\x12<\n\x06\x66\x61\x63\x65ts\x18\x02 \x03(\x0b\x32,.google.cloud.retail.v2.SearchResponse.Facet\x12\x12\n\ntotal_size\x18\x03 \x01(\x05\x12\x17\n\x0f\x63orrected_query\x18\x04 \x01(\t\x12\x19\n\x11\x61ttribution_token\x18\x05 \x01(\t\x12\x17\n\x0fnext_page_token\x18\x06 \x01(\t\x12W\n\x14query_expansion_info\x18\x07 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchResponse.QueryExpansionInfo\x12\x14\n\x0credirect_uri\x18\n \x01(\t\x12\x18\n\x10\x61pplied_controls\x18\x0c \x03(\t\x12i\n\x1dinvalid_condition_boost_specs\x18\x0e \x03(\x0b\x32\x42.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec\x12?\n\x0f\x65xperiment_info\x18\x11 \x03(\x0b\x32&.google.cloud.retail.v2.ExperimentInfo\x1a\x91\x04\n\x0cSearchResult\x12\n\n\x02id\x18\x01 \x01(\t\x12\x30\n\x07product\x18\x02 \x01(\x0b\x32\x1f.google.cloud.retail.v2.Product\x12\x1e\n\x16matching_variant_count\x18\x03 \x01(\x05\x12o\n\x17matching_variant_fields\x18\x04 \x03(\x0b\x32N.google.cloud.retail.v2.SearchResponse.SearchResult.MatchingVariantFieldsEntry\x12k\n\x15variant_rollup_values\x18\x05 \x03(\x0b\x32L.google.cloud.retail.v2.SearchResponse.SearchResult.VariantRollupValuesEntry\x12\x17\n\x0fpersonal_labels\x18\x07 \x03(\t\x1aX\n\x1aMatchingVariantFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask:\x02\x38\x01\x1aR\n\x18VariantRollupValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x1a\x8e\x02\n\x05\x46\x61\x63\x65t\x12\x0b\n\x03key\x18\x01 \x01(\t\x12G\n\x06values\x18\x02 \x03(\x0b\x32\x37.google.cloud.retail.v2.SearchResponse.Facet.FacetValue\x12\x15\n\rdynamic_facet\x18\x03 \x01(\x08\x1a\x97\x01\n\nFacetValue\x12\x0f\n\x05value\x18\x01 \x01(\tH\x00\x12\x34\n\x08interval\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.IntervalH\x00\x12\r\n\x05\x63ount\x18\x03 \x01(\x03\x12\x11\n\tmin_value\x18\x05 \x01(\x01\x12\x11\n\tmax_value\x18\x06 \x01(\x01\x42\r\n\x0b\x66\x61\x63\x65t_value\x1aI\n\x12QueryExpansionInfo\x12\x16\n\x0e\x65xpanded_query\x18\x01 \x01(\x08\x12\x1b\n\x13pinned_result_count\x18\x02 \x01(\x03\"\xfb\x02\n\x0e\x45xperimentInfo\x12\x63\n\x19serving_config_experiment\x18\x02 \x01(\x0b\x32>.google.cloud.retail.v2.ExperimentInfo.ServingConfigExperimentH\x00\x12\x39\n\nexperiment\x18\x01 \x01(\tB%\xfa\x41\"\n retail.googleapis.com/Experiment\x1a\xb1\x01\n\x17ServingConfigExperiment\x12I\n\x17original_serving_config\x18\x01 \x01(\tB(\xfa\x41%\n#retail.googleapis.com/ServingConfig\x12K\n\x19\x65xperiment_serving_config\x18\x02 \x01(\tB(\xfa\x41%\n#retail.googleapis.com/ServingConfigB\x15\n\x13\x65xperiment_metadata2\xd8\x02\n\rSearchService\x12\xfb\x01\n\x06Search\x12%.google.cloud.retail.v2.SearchRequest\x1a&.google.cloud.retail.v2.SearchResponse\"\xa1\x01\x82\xd3\xe4\x93\x02\x9a\x01\"E/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:search:\x01*ZN\"I/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:search:\x01*\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb7\x02\n\x1a\x63om.google.cloud.retail.v2B\x12SearchServiceProtoP\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::V2\xea\x41w\n retail.googleapis.com/Experiment\x12Sprojects/{project}/locations/{location}/catalogs/{catalog}/experiments/{experiment}b\x06proto3"
|
18
|
+
|
19
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
20
|
+
|
21
|
+
begin
|
22
|
+
pool.add_serialized_file(descriptor_data)
|
23
|
+
rescue TypeError => e
|
24
|
+
# Compatibility code: will be removed in the next major version.
|
25
|
+
require 'google/protobuf/descriptor_pb'
|
26
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
27
|
+
parsed.clear_dependency
|
28
|
+
serialized = parsed.class.encode(parsed)
|
29
|
+
file = pool.add_serialized_file(serialized)
|
30
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
31
|
+
imports = [
|
32
|
+
["google.cloud.retail.v2.UserInfo", "google/cloud/retail/v2/common.proto"],
|
33
|
+
["google.cloud.retail.v2.Product", "google/cloud/retail/v2/product.proto"],
|
34
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
35
|
+
["google.protobuf.Value", "google/protobuf/struct.proto"],
|
36
|
+
]
|
37
|
+
imports.each do |type_name, expected_filename|
|
38
|
+
import_file = pool.lookup(type_name).file_descriptor
|
39
|
+
if import_file.name != expected_filename
|
40
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
152
41
|
end
|
153
42
|
end
|
43
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
44
|
+
warn "This will become an error in the next major version."
|
154
45
|
end
|
155
46
|
|
156
47
|
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/serving_config.proto
|
3
4
|
|
@@ -8,35 +9,32 @@ require 'google/api/resource_pb'
|
|
8
9
|
require 'google/cloud/retail/v2/common_pb'
|
9
10
|
require 'google/cloud/retail/v2/search_service_pb'
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
34
|
-
add_enum "google.cloud.retail.v2.ServingConfig.DiversityType" do
|
35
|
-
value :DIVERSITY_TYPE_UNSPECIFIED, 0
|
36
|
-
value :RULE_BASED_DIVERSITY, 2
|
37
|
-
value :DATA_DRIVEN_DIVERSITY, 3
|
12
|
+
|
13
|
+
descriptor_data = "\n+google/cloud/retail/v2/serving_config.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/retail/v2/common.proto\x1a+google/cloud/retail/v2/search_service.proto\"\xf8\x07\n\rServingConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x08model_id\x18\x03 \x01(\t\x12\x1d\n\x15price_reranking_level\x18\x04 \x01(\t\x12\x19\n\x11\x66\x61\x63\x65t_control_ids\x18\x05 \x03(\t\x12R\n\x12\x64ynamic_facet_spec\x18\x06 \x01(\x0b\x32\x36.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec\x12\x19\n\x11\x62oost_control_ids\x18\x07 \x03(\t\x12\x1a\n\x12\x66ilter_control_ids\x18\t \x03(\t\x12\x1c\n\x14redirect_control_ids\x18\n \x03(\t\x12#\n\x1btwoway_synonyms_control_ids\x18\x12 \x03(\t\x12#\n\x1boneway_synonyms_control_ids\x18\x0c \x03(\t\x12$\n\x1c\x64o_not_associate_control_ids\x18\r \x03(\t\x12\x1f\n\x17replacement_control_ids\x18\x0e \x03(\t\x12\x1a\n\x12ignore_control_ids\x18\x0f \x03(\t\x12\x17\n\x0f\x64iversity_level\x18\x08 \x01(\t\x12K\n\x0e\x64iversity_type\x18\x14 \x01(\x0e\x32\x33.google.cloud.retail.v2.ServingConfig.DiversityType\x12$\n\x1c\x65nable_category_filter_level\x18\x10 \x01(\t\x12W\n\x14personalization_spec\x18\x15 \x01(\x0b\x32\x39.google.cloud.retail.v2.SearchRequest.PersonalizationSpec\x12\x44\n\x0esolution_types\x18\x13 \x03(\x0e\x32$.google.cloud.retail.v2.SolutionTypeB\x06\xe0\x41\x02\xe0\x41\x05\"d\n\rDiversityType\x12\x1e\n\x1a\x44IVERSITY_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14RULE_BASED_DIVERSITY\x10\x02\x12\x19\n\x15\x44\x41TA_DRIVEN_DIVERSITY\x10\x03:\x85\x01\xea\x41\x81\x01\n#retail.googleapis.com/ServingConfig\x12Zprojects/{project}/locations/{location}/catalogs/{catalog}/servingConfigs/{serving_config}B\xbd\x01\n\x1a\x63om.google.cloud.retail.v2B\x12ServingConfigProtoP\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"
|
14
|
+
|
15
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
16
|
+
|
17
|
+
begin
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
19
|
+
rescue TypeError => e
|
20
|
+
# Compatibility code: will be removed in the next major version.
|
21
|
+
require 'google/protobuf/descriptor_pb'
|
22
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
23
|
+
parsed.clear_dependency
|
24
|
+
serialized = parsed.class.encode(parsed)
|
25
|
+
file = pool.add_serialized_file(serialized)
|
26
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
27
|
+
imports = [
|
28
|
+
["google.cloud.retail.v2.SearchRequest.DynamicFacetSpec", "google/cloud/retail/v2/search_service.proto"],
|
29
|
+
]
|
30
|
+
imports.each do |type_name, expected_filename|
|
31
|
+
import_file = pool.lookup(type_name).file_descriptor
|
32
|
+
if import_file.name != expected_filename
|
33
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
38
34
|
end
|
39
35
|
end
|
36
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
37
|
+
warn "This will become an error in the next major version."
|
40
38
|
end
|
41
39
|
|
42
40
|
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/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
|