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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/retail/v2/catalog_pb.rb +25 -68
  3. data/lib/google/cloud/retail/v2/catalog_service/client.rb +4 -2
  4. data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +4 -2
  5. data/lib/google/cloud/retail/v2/catalog_service/rest/service_stub.rb +11 -11
  6. data/lib/google/cloud/retail/v2/catalog_service_pb.rb +27 -55
  7. data/lib/google/cloud/retail/v2/common_pb.rb +25 -140
  8. data/lib/google/cloud/retail/v2/completion_service/client.rb +4 -2
  9. data/lib/google/cloud/retail/v2/completion_service/operations.rb +3 -1
  10. data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +4 -2
  11. data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +7 -5
  12. data/lib/google/cloud/retail/v2/completion_service/rest/service_stub.rb +2 -2
  13. data/lib/google/cloud/retail/v2/completion_service_pb.rb +25 -23
  14. data/lib/google/cloud/retail/v2/control_pb.rb +25 -11
  15. data/lib/google/cloud/retail/v2/control_service/client.rb +4 -2
  16. data/lib/google/cloud/retail/v2/control_service/rest/client.rb +4 -2
  17. data/lib/google/cloud/retail/v2/control_service/rest/service_stub.rb +5 -5
  18. data/lib/google/cloud/retail/v2/control_service_pb.rb +26 -26
  19. data/lib/google/cloud/retail/v2/import_config_pb.rb +30 -93
  20. data/lib/google/cloud/retail/v2/model_pb.rb +25 -42
  21. data/lib/google/cloud/retail/v2/model_service/client.rb +4 -2
  22. data/lib/google/cloud/retail/v2/model_service/operations.rb +3 -1
  23. data/lib/google/cloud/retail/v2/model_service/rest/client.rb +4 -2
  24. data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +7 -5
  25. data/lib/google/cloud/retail/v2/model_service/rest/service_stub.rb +8 -8
  26. data/lib/google/cloud/retail/v2/model_service_pb.rb +26 -42
  27. data/lib/google/cloud/retail/v2/prediction_service/client.rb +4 -2
  28. data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +4 -2
  29. data/lib/google/cloud/retail/v2/prediction_service/rest/service_stub.rb +1 -1
  30. data/lib/google/cloud/retail/v2/prediction_service_pb.rb +26 -21
  31. data/lib/google/cloud/retail/v2/product_pb.rb +30 -52
  32. data/lib/google/cloud/retail/v2/product_service/client.rb +4 -2
  33. data/lib/google/cloud/retail/v2/product_service/operations.rb +3 -1
  34. data/lib/google/cloud/retail/v2/product_service/rest/client.rb +4 -2
  35. data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +7 -5
  36. data/lib/google/cloud/retail/v2/product_service/rest/service_stub.rb +11 -11
  37. data/lib/google/cloud/retail/v2/product_service_pb.rb +28 -81
  38. data/lib/google/cloud/retail/v2/promotion_pb.rb +24 -4
  39. data/lib/google/cloud/retail/v2/purge_config_pb.rb +24 -11
  40. data/lib/google/cloud/retail/v2/search_service/client.rb +4 -2
  41. data/lib/google/cloud/retail/v2/search_service/rest/client.rb +4 -2
  42. data/lib/google/cloud/retail/v2/search_service/rest/service_stub.rb +1 -1
  43. data/lib/google/cloud/retail/v2/search_service_pb.rb +28 -137
  44. data/lib/google/cloud/retail/v2/serving_config_pb.rb +25 -27
  45. data/lib/google/cloud/retail/v2/serving_config_service/client.rb +4 -2
  46. data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +4 -2
  47. data/lib/google/cloud/retail/v2/serving_config_service/rest/service_stub.rb +7 -7
  48. data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +26 -33
  49. data/lib/google/cloud/retail/v2/user_event_pb.rb +28 -40
  50. data/lib/google/cloud/retail/v2/user_event_service/client.rb +4 -2
  51. data/lib/google/cloud/retail/v2/user_event_service/operations.rb +3 -1
  52. data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +4 -2
  53. data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +7 -5
  54. data/lib/google/cloud/retail/v2/user_event_service/rest/service_stub.rb +5 -5
  55. data/lib/google/cloud/retail/v2/user_event_service_pb.rb +25 -30
  56. data/lib/google/cloud/retail/v2/version.rb +1 -1
  57. data/proto_docs/google/api/client.rb +10 -1
  58. data/proto_docs/google/protobuf/any.rb +7 -4
  59. data/proto_docs/google/protobuf/struct.rb +1 -1
  60. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  61. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5c0b8b99ddda142b43391e92256b5e40721abbc0d0dca397b43dbbc9008915e
4
- data.tar.gz: 31498ffda04297766aec21a982fa96c74c5bed1a25a23228d0883b26357e8ce9
3
+ metadata.gz: 9fb75e4275291d0cff008e43cb6b2c9a405fd0a3b425891c43d78d340f104bd2
4
+ data.tar.gz: 7b7166cc04d6d905afa434308688a0cbb8449f5d55e1fc9c2a31e2ff14600895
5
5
  SHA512:
6
- metadata.gz: 56ca7e4df5b5edc7f3f25c2a574509753f6880e191c7f5078832dfa10bed5e7456800619c146c6239f4219552912a0f50b462aa226c31746191dcdc3e3e763aa
7
- data.tar.gz: f921bee36e85f1b1cbed8412ecd8866ef725ef27d0cf7aa8a0cad2a851e43e23b0af2da122be002bb9beadf28c27d9e1d7ddc0da866c4ec3c077699745753cbe
6
+ metadata.gz: ac4de21c51993911972b803fe99085b4c42b838804d2c21fd6e5ecc77bc92944e1f1710abe29e288412e1701d737edc3a63014f60a62ac30a3d916d16b0ea378
7
+ data.tar.gz: b40b961a00923777970f4cb5a919f230a0bda2b59b4fcacc9a3d4b031568559ff55b5df9f242bcdc747377f7e74d63b6ee71ec63f3708b8780871497c7b62f2a
@@ -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/catalog.proto
3
4
 
@@ -8,76 +9,32 @@ require 'google/api/resource_pb'
8
9
  require 'google/cloud/retail/v2/common_pb'
9
10
  require 'google/cloud/retail/v2/import_config_pb'
10
11
 
11
- Google::Protobuf::DescriptorPool.generated_pool.build do
12
- add_file("google/cloud/retail/v2/catalog.proto", :syntax => :proto3) do
13
- add_message "google.cloud.retail.v2.ProductLevelConfig" do
14
- optional :ingestion_product_type, :string, 1
15
- optional :merchant_center_product_id_field, :string, 2
16
- end
17
- add_message "google.cloud.retail.v2.CatalogAttribute" do
18
- optional :key, :string, 1
19
- optional :in_use, :bool, 9
20
- optional :type, :enum, 10, "google.cloud.retail.v2.CatalogAttribute.AttributeType"
21
- optional :indexable_option, :enum, 5, "google.cloud.retail.v2.CatalogAttribute.IndexableOption"
22
- optional :dynamic_facetable_option, :enum, 6, "google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption"
23
- optional :searchable_option, :enum, 7, "google.cloud.retail.v2.CatalogAttribute.SearchableOption"
24
- optional :exact_searchable_option, :enum, 11, "google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption"
25
- optional :retrievable_option, :enum, 12, "google.cloud.retail.v2.CatalogAttribute.RetrievableOption"
26
- end
27
- add_enum "google.cloud.retail.v2.CatalogAttribute.AttributeType" do
28
- value :UNKNOWN, 0
29
- value :TEXTUAL, 1
30
- value :NUMERICAL, 2
31
- end
32
- add_enum "google.cloud.retail.v2.CatalogAttribute.IndexableOption" do
33
- value :INDEXABLE_OPTION_UNSPECIFIED, 0
34
- value :INDEXABLE_ENABLED, 1
35
- value :INDEXABLE_DISABLED, 2
36
- end
37
- add_enum "google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption" do
38
- value :DYNAMIC_FACETABLE_OPTION_UNSPECIFIED, 0
39
- value :DYNAMIC_FACETABLE_ENABLED, 1
40
- value :DYNAMIC_FACETABLE_DISABLED, 2
41
- end
42
- add_enum "google.cloud.retail.v2.CatalogAttribute.SearchableOption" do
43
- value :SEARCHABLE_OPTION_UNSPECIFIED, 0
44
- value :SEARCHABLE_ENABLED, 1
45
- value :SEARCHABLE_DISABLED, 2
46
- end
47
- add_enum "google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption" do
48
- value :EXACT_SEARCHABLE_OPTION_UNSPECIFIED, 0
49
- value :EXACT_SEARCHABLE_ENABLED, 1
50
- value :EXACT_SEARCHABLE_DISABLED, 2
51
- end
52
- add_enum "google.cloud.retail.v2.CatalogAttribute.RetrievableOption" do
53
- value :RETRIEVABLE_OPTION_UNSPECIFIED, 0
54
- value :RETRIEVABLE_ENABLED, 1
55
- value :RETRIEVABLE_DISABLED, 2
56
- end
57
- add_message "google.cloud.retail.v2.AttributesConfig" do
58
- optional :name, :string, 1
59
- map :catalog_attributes, :string, :message, 2, "google.cloud.retail.v2.CatalogAttribute"
60
- optional :attribute_config_level, :enum, 3, "google.cloud.retail.v2.AttributeConfigLevel"
61
- end
62
- add_message "google.cloud.retail.v2.CompletionConfig" do
63
- optional :name, :string, 1
64
- optional :matching_order, :string, 2
65
- optional :max_suggestions, :int32, 3
66
- optional :min_prefix_length, :int32, 4
67
- optional :auto_learning, :bool, 11
68
- optional :suggestions_input_config, :message, 5, "google.cloud.retail.v2.CompletionDataInputConfig"
69
- optional :last_suggestions_import_operation, :string, 6
70
- optional :denylist_input_config, :message, 7, "google.cloud.retail.v2.CompletionDataInputConfig"
71
- optional :last_denylist_import_operation, :string, 8
72
- optional :allowlist_input_config, :message, 9, "google.cloud.retail.v2.CompletionDataInputConfig"
73
- optional :last_allowlist_import_operation, :string, 10
74
- end
75
- add_message "google.cloud.retail.v2.Catalog" do
76
- optional :name, :string, 1
77
- optional :display_name, :string, 2
78
- optional :product_level_config, :message, 4, "google.cloud.retail.v2.ProductLevelConfig"
12
+
13
+ descriptor_data = "\n$google/cloud/retail/v2/catalog.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/import_config.proto\"^\n\x12ProductLevelConfig\x12\x1e\n\x16ingestion_product_type\x18\x01 \x01(\t\x12(\n merchant_center_product_id_field\x18\x02 \x01(\t\"\xbf\t\n\x10\x43\x61talogAttribute\x12\x10\n\x03key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06in_use\x18\t \x01(\x08\x42\x03\xe0\x41\x03\x12I\n\x04type\x18\n \x01(\x0e\x32\x36.google.cloud.retail.v2.CatalogAttribute.AttributeTypeB\x03\xe0\x41\x03\x12R\n\x10indexable_option\x18\x05 \x01(\x0e\x32\x38.google.cloud.retail.v2.CatalogAttribute.IndexableOption\x12\x61\n\x18\x64ynamic_facetable_option\x18\x06 \x01(\x0e\x32?.google.cloud.retail.v2.CatalogAttribute.DynamicFacetableOption\x12T\n\x11searchable_option\x18\x07 \x01(\x0e\x32\x39.google.cloud.retail.v2.CatalogAttribute.SearchableOption\x12_\n\x17\x65xact_searchable_option\x18\x0b \x01(\x0e\x32>.google.cloud.retail.v2.CatalogAttribute.ExactSearchableOption\x12V\n\x12retrievable_option\x18\x0c \x01(\x0e\x32:.google.cloud.retail.v2.CatalogAttribute.RetrievableOption\"8\n\rAttributeType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07TEXTUAL\x10\x01\x12\r\n\tNUMERICAL\x10\x02\"b\n\x0fIndexableOption\x12 \n\x1cINDEXABLE_OPTION_UNSPECIFIED\x10\x00\x12\x15\n\x11INDEXABLE_ENABLED\x10\x01\x12\x16\n\x12INDEXABLE_DISABLED\x10\x02\"\x81\x01\n\x16\x44ynamicFacetableOption\x12(\n$DYNAMIC_FACETABLE_OPTION_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x44YNAMIC_FACETABLE_ENABLED\x10\x01\x12\x1e\n\x1a\x44YNAMIC_FACETABLE_DISABLED\x10\x02\"f\n\x10SearchableOption\x12!\n\x1dSEARCHABLE_OPTION_UNSPECIFIED\x10\x00\x12\x16\n\x12SEARCHABLE_ENABLED\x10\x01\x12\x17\n\x13SEARCHABLE_DISABLED\x10\x02\"}\n\x15\x45xactSearchableOption\x12\'\n#EXACT_SEARCHABLE_OPTION_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x45XACT_SEARCHABLE_ENABLED\x10\x01\x12\x1d\n\x19\x45XACT_SEARCHABLE_DISABLED\x10\x02\"j\n\x11RetrievableOption\x12\"\n\x1eRETRIEVABLE_OPTION_UNSPECIFIED\x10\x00\x12\x17\n\x13RETRIEVABLE_ENABLED\x10\x01\x12\x18\n\x14RETRIEVABLE_DISABLED\x10\x02\"\xb6\x03\n\x10\x41ttributesConfig\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12[\n\x12\x63\x61talog_attributes\x18\x02 \x03(\x0b\x32?.google.cloud.retail.v2.AttributesConfig.CatalogAttributesEntry\x12Q\n\x16\x61ttribute_config_level\x18\x03 \x01(\x0e\x32,.google.cloud.retail.v2.AttributeConfigLevelB\x03\xe0\x41\x03\x1a\x62\n\x16\x43\x61talogAttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.google.cloud.retail.v2.CatalogAttribute:\x02\x38\x01:x\xea\x41u\n&retail.googleapis.com/AttributesConfig\x12Kprojects/{project}/locations/{location}/catalogs/{catalog}/attributesConfig\"\x99\x05\n\x10\x43ompletionConfig\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x16\n\x0ematching_order\x18\x02 \x01(\t\x12\x17\n\x0fmax_suggestions\x18\x03 \x01(\x05\x12\x19\n\x11min_prefix_length\x18\x04 \x01(\x05\x12\x15\n\rauto_learning\x18\x0b \x01(\x08\x12X\n\x18suggestions_input_config\x18\x05 \x01(\x0b\x32\x31.google.cloud.retail.v2.CompletionDataInputConfigB\x03\xe0\x41\x03\x12.\n!last_suggestions_import_operation\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12U\n\x15\x64\x65nylist_input_config\x18\x07 \x01(\x0b\x32\x31.google.cloud.retail.v2.CompletionDataInputConfigB\x03\xe0\x41\x03\x12+\n\x1elast_denylist_import_operation\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12V\n\x16\x61llowlist_input_config\x18\t \x01(\x0b\x32\x31.google.cloud.retail.v2.CompletionDataInputConfigB\x03\xe0\x41\x03\x12,\n\x1flast_allowlist_import_operation\x18\n \x01(\tB\x03\xe0\x41\x03:x\xea\x41u\n&retail.googleapis.com/CompletionConfig\x12Kprojects/{project}/locations/{location}/catalogs/{catalog}/completionConfig\"\xec\x01\n\x07\x43\x61talog\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12\x1c\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12M\n\x14product_level_config\x18\x04 \x01(\x0b\x32*.google.cloud.retail.v2.ProductLevelConfigB\x03\xe0\x41\x02:^\xea\x41[\n\x1dretail.googleapis.com/Catalog\x12:projects/{project}/locations/{location}/catalogs/{catalog}B\xb7\x01\n\x1a\x63om.google.cloud.retail.v2B\x0c\x43\x61talogProtoP\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.CompletionDataInputConfig", "google/cloud/retail/v2/import_config.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}"
79
34
  end
80
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."
81
38
  end
82
39
 
83
40
  module Google
@@ -129,7 +129,7 @@ module Google
129
129
  credentials = @config.credentials
130
130
  # Use self-signed JWT if the endpoint is unchanged from default,
131
131
  # but only if the default endpoint does not have a region prefix.
132
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
132
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
133
133
  !@config.endpoint.split(".").first.include?("-")
134
134
  credentials ||= Credentials.default scope: @config.scope,
135
135
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -1351,7 +1351,9 @@ module Google
1351
1351
  class Configuration
1352
1352
  extend ::Gapic::Config
1353
1353
 
1354
- config_attr :endpoint, "retail.googleapis.com", ::String
1354
+ DEFAULT_ENDPOINT = "retail.googleapis.com"
1355
+
1356
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1355
1357
  config_attr :credentials, nil do |value|
1356
1358
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1357
1359
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -125,7 +125,7 @@ module Google
125
125
  credentials = @config.credentials
126
126
  # Use self-signed JWT if the endpoint is unchanged from default,
127
127
  # but only if the default endpoint does not have a region prefix.
128
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
128
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
129
129
  !@config.endpoint.split(".").first.include?("-")
130
130
  credentials ||= Credentials.default scope: @config.scope,
131
131
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -1076,7 +1076,9 @@ module Google
1076
1076
  class Configuration
1077
1077
  extend ::Gapic::Config
1078
1078
 
1079
- config_attr :endpoint, "retail.googleapis.com", ::String
1079
+ DEFAULT_ENDPOINT = "retail.googleapis.com"
1080
+
1081
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1080
1082
  config_attr :credentials, nil do |value|
1081
1083
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1082
1084
  allowed.any? { |klass| klass === value }
@@ -59,7 +59,7 @@ module Google
59
59
 
60
60
  verb, uri, query_string_params, body = ServiceStub.transcode_list_catalogs_request request_pb
61
61
  query_string_params = if query_string_params.any?
62
- query_string_params.to_h { |p| p.split("=", 2) }
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_update_catalog_request request_pb
99
99
  query_string_params = if query_string_params.any?
100
- query_string_params.to_h { |p| p.split("=", 2) }
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_set_default_branch_request request_pb
137
137
  query_string_params = if query_string_params.any?
138
- query_string_params.to_h { |p| p.split("=", 2) }
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_default_branch_request request_pb
175
175
  query_string_params = if query_string_params.any?
176
- query_string_params.to_h { |p| p.split("=", 2) }
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_get_completion_config_request request_pb
213
213
  query_string_params = if query_string_params.any?
214
- query_string_params.to_h { |p| p.split("=", 2) }
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_update_completion_config_request request_pb
251
251
  query_string_params = if query_string_params.any?
252
- query_string_params.to_h { |p| p.split("=", 2) }
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_get_attributes_config_request request_pb
289
289
  query_string_params = if query_string_params.any?
290
- query_string_params.to_h { |p| p.split("=", 2) }
290
+ query_string_params.to_h { |p| p.split "=", 2 }
291
291
  else
292
292
  {}
293
293
  end
@@ -325,7 +325,7 @@ module Google
325
325
 
326
326
  verb, uri, query_string_params, body = ServiceStub.transcode_update_attributes_config_request request_pb
327
327
  query_string_params = if query_string_params.any?
328
- query_string_params.to_h { |p| p.split("=", 2) }
328
+ query_string_params.to_h { |p| p.split "=", 2 }
329
329
  else
330
330
  {}
331
331
  end
@@ -363,7 +363,7 @@ module Google
363
363
 
364
364
  verb, uri, query_string_params, body = ServiceStub.transcode_add_catalog_attribute_request request_pb
365
365
  query_string_params = if query_string_params.any?
366
- query_string_params.to_h { |p| p.split("=", 2) }
366
+ query_string_params.to_h { |p| p.split "=", 2 }
367
367
  else
368
368
  {}
369
369
  end
@@ -401,7 +401,7 @@ module Google
401
401
 
402
402
  verb, uri, query_string_params, body = ServiceStub.transcode_remove_catalog_attribute_request request_pb
403
403
  query_string_params = if query_string_params.any?
404
- query_string_params.to_h { |p| p.split("=", 2) }
404
+ query_string_params.to_h { |p| p.split "=", 2 }
405
405
  else
406
406
  {}
407
407
  end
@@ -439,7 +439,7 @@ module Google
439
439
 
440
440
  verb, uri, query_string_params, body = ServiceStub.transcode_replace_catalog_attribute_request request_pb
441
441
  query_string_params = if query_string_params.any?
442
- query_string_params.to_h { |p| p.split("=", 2) }
442
+ query_string_params.to_h { |p| p.split "=", 2 }
443
443
  else
444
444
  {}
445
445
  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/catalog_service.proto
3
4
 
@@ -12,63 +13,34 @@ require 'google/protobuf/empty_pb'
12
13
  require 'google/protobuf/field_mask_pb'
13
14
  require 'google/protobuf/timestamp_pb'
14
15
 
15
- Google::Protobuf::DescriptorPool.generated_pool.build do
16
- add_file("google/cloud/retail/v2/catalog_service.proto", :syntax => :proto3) do
17
- add_message "google.cloud.retail.v2.ListCatalogsRequest" do
18
- optional :parent, :string, 1
19
- optional :page_size, :int32, 2
20
- optional :page_token, :string, 3
21
- end
22
- add_message "google.cloud.retail.v2.ListCatalogsResponse" do
23
- repeated :catalogs, :message, 1, "google.cloud.retail.v2.Catalog"
24
- optional :next_page_token, :string, 2
25
- end
26
- add_message "google.cloud.retail.v2.UpdateCatalogRequest" do
27
- optional :catalog, :message, 1, "google.cloud.retail.v2.Catalog"
28
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
29
- end
30
- add_message "google.cloud.retail.v2.SetDefaultBranchRequest" do
31
- optional :catalog, :string, 1
32
- optional :branch_id, :string, 2
33
- optional :note, :string, 3
34
- optional :force, :bool, 4
35
- end
36
- add_message "google.cloud.retail.v2.GetDefaultBranchRequest" do
37
- optional :catalog, :string, 1
38
- end
39
- add_message "google.cloud.retail.v2.GetDefaultBranchResponse" do
40
- optional :branch, :string, 1
41
- optional :set_time, :message, 2, "google.protobuf.Timestamp"
42
- optional :note, :string, 3
43
- end
44
- add_message "google.cloud.retail.v2.GetCompletionConfigRequest" do
45
- optional :name, :string, 1
46
- end
47
- add_message "google.cloud.retail.v2.UpdateCompletionConfigRequest" do
48
- optional :completion_config, :message, 1, "google.cloud.retail.v2.CompletionConfig"
49
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
50
- end
51
- add_message "google.cloud.retail.v2.GetAttributesConfigRequest" do
52
- optional :name, :string, 1
53
- end
54
- add_message "google.cloud.retail.v2.UpdateAttributesConfigRequest" do
55
- optional :attributes_config, :message, 1, "google.cloud.retail.v2.AttributesConfig"
56
- optional :update_mask, :message, 2, "google.protobuf.FieldMask"
57
- end
58
- add_message "google.cloud.retail.v2.AddCatalogAttributeRequest" do
59
- optional :attributes_config, :string, 1
60
- optional :catalog_attribute, :message, 2, "google.cloud.retail.v2.CatalogAttribute"
61
- end
62
- add_message "google.cloud.retail.v2.RemoveCatalogAttributeRequest" do
63
- optional :attributes_config, :string, 1
64
- optional :key, :string, 2
65
- end
66
- add_message "google.cloud.retail.v2.ReplaceCatalogAttributeRequest" do
67
- optional :attributes_config, :string, 1
68
- optional :catalog_attribute, :message, 2, "google.cloud.retail.v2.CatalogAttribute"
69
- optional :update_mask, :message, 3, "google.protobuf.FieldMask"
16
+
17
+ descriptor_data = "\n,google/cloud/retail/v2/catalog_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/catalog.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"w\n\x13ListCatalogsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"b\n\x14ListCatalogsResponse\x12\x31\n\x08\x63\x61talogs\x18\x01 \x03(\x0b\x32\x1f.google.cloud.retail.v2.Catalog\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"~\n\x14UpdateCatalogRequest\x12\x35\n\x07\x63\x61talog\x18\x01 \x01(\x0b\x32\x1f.google.cloud.retail.v2.CatalogB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa1\x01\n\x17SetDefaultBranchRequest\x12\x33\n\x07\x63\x61talog\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12\x34\n\tbranch_id\x18\x02 \x01(\tB!\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\x0c\n\x04note\x18\x03 \x01(\t\x12\r\n\x05\x66orce\x18\x04 \x01(\x08\"N\n\x17GetDefaultBranchRequest\x12\x33\n\x07\x63\x61talog\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\"\x89\x01\n\x18GetDefaultBranchResponse\x12\x31\n\x06\x62ranch\x18\x01 \x01(\tB!\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12,\n\x08set_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04note\x18\x03 \x01(\t\"Z\n\x1aGetCompletionConfigRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&retail.googleapis.com/CompletionConfig\"\x9a\x01\n\x1dUpdateCompletionConfigRequest\x12H\n\x11\x63ompletion_config\x18\x01 \x01(\x0b\x32(.google.cloud.retail.v2.CompletionConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"Z\n\x1aGetAttributesConfigRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&retail.googleapis.com/AttributesConfig\"\x9a\x01\n\x1dUpdateAttributesConfigRequest\x12H\n\x11\x61ttributes_config\x18\x01 \x01(\x0b\x32(.google.cloud.retail.v2.AttributesConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb1\x01\n\x1a\x41\x64\x64\x43\x61talogAttributeRequest\x12I\n\x11\x61ttributes_config\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&retail.googleapis.com/AttributesConfig\x12H\n\x11\x63\x61talog_attribute\x18\x02 \x01(\x0b\x32(.google.cloud.retail.v2.CatalogAttributeB\x03\xe0\x41\x02\"|\n\x1dRemoveCatalogAttributeRequest\x12I\n\x11\x61ttributes_config\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&retail.googleapis.com/AttributesConfig\x12\x10\n\x03key\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xe6\x01\n\x1eReplaceCatalogAttributeRequest\x12I\n\x11\x61ttributes_config\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&retail.googleapis.com/AttributesConfig\x12H\n\x11\x63\x61talog_attribute\x18\x02 \x01(\x0b\x32(.google.cloud.retail.v2.CatalogAttributeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask2\x97\x13\n\x0e\x43\x61talogService\x12\xa8\x01\n\x0cListCatalogs\x12+.google.cloud.retail.v2.ListCatalogsRequest\x1a,.google.cloud.retail.v2.ListCatalogsResponse\"=\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/catalogs\xda\x41\x06parent\x12\xbb\x01\n\rUpdateCatalog\x12,.google.cloud.retail.v2.UpdateCatalogRequest\x1a\x1f.google.cloud.retail.v2.Catalog\"[\x82\xd3\xe4\x93\x02?24/v2/{catalog.name=projects/*/locations/*/catalogs/*}:\x07\x63\x61talog\xda\x41\x13\x63\x61talog,update_mask\x12\xb2\x01\n\x10SetDefaultBranch\x12/.google.cloud.retail.v2.SetDefaultBranchRequest\x1a\x16.google.protobuf.Empty\"U\x82\xd3\xe4\x93\x02\x45\"@/v2/{catalog=projects/*/locations/*/catalogs/*}:setDefaultBranch:\x01*\xda\x41\x07\x63\x61talog\x12\xc9\x01\n\x10GetDefaultBranch\x12/.google.cloud.retail.v2.GetDefaultBranchRequest\x1a\x30.google.cloud.retail.v2.GetDefaultBranchResponse\"R\x82\xd3\xe4\x93\x02\x42\x12@/v2/{catalog=projects/*/locations/*/catalogs/*}:getDefaultBranch\xda\x41\x07\x63\x61talog\x12\xc1\x01\n\x13GetCompletionConfig\x12\x32.google.cloud.retail.v2.GetCompletionConfigRequest\x1a(.google.cloud.retail.v2.CompletionConfig\"L\x82\xd3\xe4\x93\x02?\x12=/v2/{name=projects/*/locations/*/catalogs/*/completionConfig}\xda\x41\x04name\x12\x86\x02\n\x16UpdateCompletionConfig\x12\x35.google.cloud.retail.v2.UpdateCompletionConfigRequest\x1a(.google.cloud.retail.v2.CompletionConfig\"\x8a\x01\x82\xd3\xe4\x93\x02\x64\x32O/v2/{completion_config.name=projects/*/locations/*/catalogs/*/completionConfig}:\x11\x63ompletion_config\xda\x41\x1d\x63ompletion_config,update_mask\x12\xc1\x01\n\x13GetAttributesConfig\x12\x32.google.cloud.retail.v2.GetAttributesConfigRequest\x1a(.google.cloud.retail.v2.AttributesConfig\"L\x82\xd3\xe4\x93\x02?\x12=/v2/{name=projects/*/locations/*/catalogs/*/attributesConfig}\xda\x41\x04name\x12\x86\x02\n\x16UpdateAttributesConfig\x12\x35.google.cloud.retail.v2.UpdateAttributesConfigRequest\x1a(.google.cloud.retail.v2.AttributesConfig\"\x8a\x01\x82\xd3\xe4\x93\x02\x64\x32O/v2/{attributes_config.name=projects/*/locations/*/catalogs/*/attributesConfig}:\x11\x61ttributes_config\xda\x41\x1d\x61ttributes_config,update_mask\x12\xde\x01\n\x13\x41\x64\x64\x43\x61talogAttribute\x12\x32.google.cloud.retail.v2.AddCatalogAttributeRequest\x1a(.google.cloud.retail.v2.AttributesConfig\"i\x82\xd3\xe4\x93\x02\x63\"^/v2/{attributes_config=projects/*/locations/*/catalogs/*/attributesConfig}:addCatalogAttribute:\x01*\x12\xe7\x01\n\x16RemoveCatalogAttribute\x12\x35.google.cloud.retail.v2.RemoveCatalogAttributeRequest\x1a(.google.cloud.retail.v2.AttributesConfig\"l\x82\xd3\xe4\x93\x02\x66\"a/v2/{attributes_config=projects/*/locations/*/catalogs/*/attributesConfig}:removeCatalogAttribute:\x01*\x12\xea\x01\n\x17ReplaceCatalogAttribute\x12\x36.google.cloud.retail.v2.ReplaceCatalogAttributeRequest\x1a(.google.cloud.retail.v2.AttributesConfig\"m\x82\xd3\xe4\x93\x02g\"b/v2/{attributes_config=projects/*/locations/*/catalogs/*/attributesConfig}:replaceCatalogAttribute:\x01*\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbe\x01\n\x1a\x63om.google.cloud.retail.v2B\x13\x43\x61talogServiceProtoP\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"
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.Catalog", "google/cloud/retail/v2/catalog.proto"],
33
+ ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
34
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
35
+ ]
36
+ imports.each do |type_name, expected_filename|
37
+ import_file = pool.lookup(type_name).file_descriptor
38
+ if import_file.name != expected_filename
39
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
70
40
  end
71
41
  end
42
+ warn "Each proto file must use a consistent fully-qualified name."
43
+ warn "This will become an error in the next major version."
72
44
  end
73
45
 
74
46
  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/common.proto
3
4
 
@@ -6,148 +7,32 @@ require 'google/protobuf'
6
7
  require 'google/api/field_behavior_pb'
7
8
  require 'google/protobuf/timestamp_pb'
8
9
 
9
- Google::Protobuf::DescriptorPool.generated_pool.build do
10
- add_file("google/cloud/retail/v2/common.proto", :syntax => :proto3) do
11
- add_message "google.cloud.retail.v2.Condition" do
12
- repeated :query_terms, :message, 1, "google.cloud.retail.v2.Condition.QueryTerm"
13
- repeated :active_time_range, :message, 3, "google.cloud.retail.v2.Condition.TimeRange"
14
- end
15
- add_message "google.cloud.retail.v2.Condition.QueryTerm" do
16
- optional :value, :string, 1
17
- optional :full_match, :bool, 2
18
- end
19
- add_message "google.cloud.retail.v2.Condition.TimeRange" do
20
- optional :start_time, :message, 1, "google.protobuf.Timestamp"
21
- optional :end_time, :message, 2, "google.protobuf.Timestamp"
22
- end
23
- add_message "google.cloud.retail.v2.Rule" do
24
- optional :condition, :message, 1, "google.cloud.retail.v2.Condition"
25
- oneof :action do
26
- optional :boost_action, :message, 2, "google.cloud.retail.v2.Rule.BoostAction"
27
- optional :redirect_action, :message, 3, "google.cloud.retail.v2.Rule.RedirectAction"
28
- optional :oneway_synonyms_action, :message, 6, "google.cloud.retail.v2.Rule.OnewaySynonymsAction"
29
- optional :do_not_associate_action, :message, 7, "google.cloud.retail.v2.Rule.DoNotAssociateAction"
30
- optional :replacement_action, :message, 8, "google.cloud.retail.v2.Rule.ReplacementAction"
31
- optional :ignore_action, :message, 9, "google.cloud.retail.v2.Rule.IgnoreAction"
32
- optional :filter_action, :message, 10, "google.cloud.retail.v2.Rule.FilterAction"
33
- optional :twoway_synonyms_action, :message, 11, "google.cloud.retail.v2.Rule.TwowaySynonymsAction"
34
- end
35
- end
36
- add_message "google.cloud.retail.v2.Rule.BoostAction" do
37
- optional :boost, :float, 1
38
- optional :products_filter, :string, 2
39
- end
40
- add_message "google.cloud.retail.v2.Rule.FilterAction" do
41
- optional :filter, :string, 1
42
- end
43
- add_message "google.cloud.retail.v2.Rule.RedirectAction" do
44
- optional :redirect_uri, :string, 1
45
- end
46
- add_message "google.cloud.retail.v2.Rule.TwowaySynonymsAction" do
47
- repeated :synonyms, :string, 1
48
- end
49
- add_message "google.cloud.retail.v2.Rule.OnewaySynonymsAction" do
50
- repeated :query_terms, :string, 3
51
- repeated :synonyms, :string, 4
52
- repeated :oneway_terms, :string, 2
53
- end
54
- add_message "google.cloud.retail.v2.Rule.DoNotAssociateAction" do
55
- repeated :query_terms, :string, 2
56
- repeated :do_not_associate_terms, :string, 3
57
- repeated :terms, :string, 1
58
- end
59
- add_message "google.cloud.retail.v2.Rule.ReplacementAction" do
60
- repeated :query_terms, :string, 2
61
- optional :replacement_term, :string, 3
62
- optional :term, :string, 1
63
- end
64
- add_message "google.cloud.retail.v2.Rule.IgnoreAction" do
65
- repeated :ignore_terms, :string, 1
66
- end
67
- add_message "google.cloud.retail.v2.Audience" do
68
- repeated :genders, :string, 1
69
- repeated :age_groups, :string, 2
70
- end
71
- add_message "google.cloud.retail.v2.ColorInfo" do
72
- repeated :color_families, :string, 1
73
- repeated :colors, :string, 2
74
- end
75
- add_message "google.cloud.retail.v2.CustomAttribute" do
76
- repeated :text, :string, 1
77
- repeated :numbers, :double, 2
78
- proto3_optional :searchable, :bool, 3
79
- proto3_optional :indexable, :bool, 4
80
- end
81
- add_message "google.cloud.retail.v2.FulfillmentInfo" do
82
- optional :type, :string, 1
83
- repeated :place_ids, :string, 2
84
- end
85
- add_message "google.cloud.retail.v2.Image" do
86
- optional :uri, :string, 1
87
- optional :height, :int32, 2
88
- optional :width, :int32, 3
89
- end
90
- add_message "google.cloud.retail.v2.Interval" do
91
- oneof :min do
92
- optional :minimum, :double, 1
93
- optional :exclusive_minimum, :double, 2
94
- end
95
- oneof :max do
96
- optional :maximum, :double, 3
97
- optional :exclusive_maximum, :double, 4
98
- end
99
- end
100
- add_message "google.cloud.retail.v2.PriceInfo" do
101
- optional :currency_code, :string, 1
102
- optional :price, :float, 2
103
- optional :original_price, :float, 3
104
- optional :cost, :float, 4
105
- optional :price_effective_time, :message, 5, "google.protobuf.Timestamp"
106
- optional :price_expire_time, :message, 6, "google.protobuf.Timestamp"
107
- optional :price_range, :message, 7, "google.cloud.retail.v2.PriceInfo.PriceRange"
108
- end
109
- add_message "google.cloud.retail.v2.PriceInfo.PriceRange" do
110
- optional :price, :message, 1, "google.cloud.retail.v2.Interval"
111
- optional :original_price, :message, 2, "google.cloud.retail.v2.Interval"
112
- end
113
- add_message "google.cloud.retail.v2.Rating" do
114
- optional :rating_count, :int32, 1
115
- optional :average_rating, :float, 2
116
- repeated :rating_histogram, :int32, 3
117
- end
118
- add_message "google.cloud.retail.v2.UserInfo" do
119
- optional :user_id, :string, 1
120
- optional :ip_address, :string, 2
121
- optional :user_agent, :string, 3
122
- optional :direct_user_request, :bool, 4
123
- end
124
- add_message "google.cloud.retail.v2.LocalInventory" do
125
- optional :place_id, :string, 1
126
- optional :price_info, :message, 2, "google.cloud.retail.v2.PriceInfo"
127
- map :attributes, :string, :message, 3, "google.cloud.retail.v2.CustomAttribute"
128
- repeated :fulfillment_types, :string, 4
129
- end
130
- add_enum "google.cloud.retail.v2.AttributeConfigLevel" do
131
- value :ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED, 0
132
- value :PRODUCT_LEVEL_ATTRIBUTE_CONFIG, 1
133
- value :CATALOG_LEVEL_ATTRIBUTE_CONFIG, 2
134
- end
135
- add_enum "google.cloud.retail.v2.SolutionType" do
136
- value :SOLUTION_TYPE_UNSPECIFIED, 0
137
- value :SOLUTION_TYPE_RECOMMENDATION, 1
138
- value :SOLUTION_TYPE_SEARCH, 2
139
- end
140
- add_enum "google.cloud.retail.v2.RecommendationsFilteringOption" do
141
- value :RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED, 0
142
- value :RECOMMENDATIONS_FILTERING_DISABLED, 1
143
- value :RECOMMENDATIONS_FILTERING_ENABLED, 3
144
- end
145
- add_enum "google.cloud.retail.v2.SearchSolutionUseCase" do
146
- value :SEARCH_SOLUTION_USE_CASE_UNSPECIFIED, 0
147
- value :SEARCH_SOLUTION_USE_CASE_SEARCH, 1
148
- value :SEARCH_SOLUTION_USE_CASE_BROWSE, 2
10
+
11
+ descriptor_data = "\n#google/cloud/retail/v2/common.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x02\n\tCondition\x12@\n\x0bquery_terms\x18\x01 \x03(\x0b\x32+.google.cloud.retail.v2.Condition.QueryTerm\x12\x46\n\x11\x61\x63tive_time_range\x18\x03 \x03(\x0b\x32+.google.cloud.retail.v2.Condition.TimeRange\x1a.\n\tQueryTerm\x12\r\n\x05value\x18\x01 \x01(\t\x12\x12\n\nfull_match\x18\x02 \x01(\x08\x1ai\n\tTimeRange\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xfd\x08\n\x04Rule\x12@\n\x0c\x62oost_action\x18\x02 \x01(\x0b\x32(.google.cloud.retail.v2.Rule.BoostActionH\x00\x12\x46\n\x0fredirect_action\x18\x03 \x01(\x0b\x32+.google.cloud.retail.v2.Rule.RedirectActionH\x00\x12S\n\x16oneway_synonyms_action\x18\x06 \x01(\x0b\x32\x31.google.cloud.retail.v2.Rule.OnewaySynonymsActionH\x00\x12T\n\x17\x64o_not_associate_action\x18\x07 \x01(\x0b\x32\x31.google.cloud.retail.v2.Rule.DoNotAssociateActionH\x00\x12L\n\x12replacement_action\x18\x08 \x01(\x0b\x32..google.cloud.retail.v2.Rule.ReplacementActionH\x00\x12\x42\n\rignore_action\x18\t \x01(\x0b\x32).google.cloud.retail.v2.Rule.IgnoreActionH\x00\x12\x42\n\rfilter_action\x18\n \x01(\x0b\x32).google.cloud.retail.v2.Rule.FilterActionH\x00\x12S\n\x16twoway_synonyms_action\x18\x0b \x01(\x0b\x32\x31.google.cloud.retail.v2.Rule.TwowaySynonymsActionH\x00\x12\x39\n\tcondition\x18\x01 \x01(\x0b\x32!.google.cloud.retail.v2.ConditionB\x03\xe0\x41\x02\x1a\x35\n\x0b\x42oostAction\x12\r\n\x05\x62oost\x18\x01 \x01(\x02\x12\x17\n\x0fproducts_filter\x18\x02 \x01(\t\x1a\x1e\n\x0c\x46ilterAction\x12\x0e\n\x06\x66ilter\x18\x01 \x01(\t\x1a&\n\x0eRedirectAction\x12\x14\n\x0credirect_uri\x18\x01 \x01(\t\x1a(\n\x14TwowaySynonymsAction\x12\x10\n\x08synonyms\x18\x01 \x03(\t\x1aS\n\x14OnewaySynonymsAction\x12\x13\n\x0bquery_terms\x18\x03 \x03(\t\x12\x10\n\x08synonyms\x18\x04 \x03(\t\x12\x14\n\x0coneway_terms\x18\x02 \x03(\t\x1aZ\n\x14\x44oNotAssociateAction\x12\x13\n\x0bquery_terms\x18\x02 \x03(\t\x12\x1e\n\x16\x64o_not_associate_terms\x18\x03 \x03(\t\x12\r\n\x05terms\x18\x01 \x03(\t\x1aP\n\x11ReplacementAction\x12\x13\n\x0bquery_terms\x18\x02 \x03(\t\x12\x18\n\x10replacement_term\x18\x03 \x01(\t\x12\x0c\n\x04term\x18\x01 \x01(\t\x1a$\n\x0cIgnoreAction\x12\x14\n\x0cignore_terms\x18\x01 \x03(\tB\x08\n\x06\x61\x63tion\"/\n\x08\x41udience\x12\x0f\n\x07genders\x18\x01 \x03(\t\x12\x12\n\nage_groups\x18\x02 \x03(\t\"3\n\tColorInfo\x12\x16\n\x0e\x63olor_families\x18\x01 \x03(\t\x12\x0e\n\x06\x63olors\x18\x02 \x03(\t\"\x86\x01\n\x0f\x43ustomAttribute\x12\x0c\n\x04text\x18\x01 \x03(\t\x12\x0f\n\x07numbers\x18\x02 \x03(\x01\x12\x1b\n\nsearchable\x18\x03 \x01(\x08\x42\x02\x18\x01H\x00\x88\x01\x01\x12\x1a\n\tindexable\x18\x04 \x01(\x08\x42\x02\x18\x01H\x01\x88\x01\x01\x42\r\n\x0b_searchableB\x0c\n\n_indexable\"2\n\x0f\x46ulfillmentInfo\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x11\n\tplace_ids\x18\x02 \x03(\t\"8\n\x05Image\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06height\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\"x\n\x08Interval\x12\x11\n\x07minimum\x18\x01 \x01(\x01H\x00\x12\x1b\n\x11\x65xclusive_minimum\x18\x02 \x01(\x01H\x00\x12\x11\n\x07maximum\x18\x03 \x01(\x01H\x01\x12\x1b\n\x11\x65xclusive_maximum\x18\x04 \x01(\x01H\x01\x42\x05\n\x03minB\x05\n\x03max\"\x89\x03\n\tPriceInfo\x12\x15\n\rcurrency_code\x18\x01 \x01(\t\x12\r\n\x05price\x18\x02 \x01(\x02\x12\x16\n\x0eoriginal_price\x18\x03 \x01(\x02\x12\x0c\n\x04\x63ost\x18\x04 \x01(\x02\x12\x38\n\x14price_effective_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11price_expire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x46\n\x0bprice_range\x18\x07 \x01(\x0b\x32,.google.cloud.retail.v2.PriceInfo.PriceRangeB\x03\xe0\x41\x03\x1aw\n\nPriceRange\x12/\n\x05price\x18\x01 \x01(\x0b\x32 .google.cloud.retail.v2.Interval\x12\x38\n\x0eoriginal_price\x18\x02 \x01(\x0b\x32 .google.cloud.retail.v2.Interval\"P\n\x06Rating\x12\x14\n\x0crating_count\x18\x01 \x01(\x05\x12\x16\n\x0e\x61verage_rating\x18\x02 \x01(\x02\x12\x18\n\x10rating_histogram\x18\x03 \x03(\x05\"`\n\x08UserInfo\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x12\n\nip_address\x18\x02 \x01(\t\x12\x12\n\nuser_agent\x18\x03 \x01(\t\x12\x1b\n\x13\x64irect_user_request\x18\x04 \x01(\x08\"\xa1\x02\n\x0eLocalInventory\x12\x10\n\x08place_id\x18\x01 \x01(\t\x12\x35\n\nprice_info\x18\x02 \x01(\x0b\x32!.google.cloud.retail.v2.PriceInfo\x12J\n\nattributes\x18\x03 \x03(\x0b\x32\x36.google.cloud.retail.v2.LocalInventory.AttributesEntry\x12\x1e\n\x11\x66ulfillment_types\x18\x04 \x03(\tB\x03\xe0\x41\x04\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*\x86\x01\n\x14\x41ttributeConfigLevel\x12&\n\"ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED\x10\x00\x12\"\n\x1ePRODUCT_LEVEL_ATTRIBUTE_CONFIG\x10\x01\x12\"\n\x1e\x43\x41TALOG_LEVEL_ATTRIBUTE_CONFIG\x10\x02*i\n\x0cSolutionType\x12\x1d\n\x19SOLUTION_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1cSOLUTION_TYPE_RECOMMENDATION\x10\x01\x12\x18\n\x14SOLUTION_TYPE_SEARCH\x10\x02*\xa1\x01\n\x1eRecommendationsFilteringOption\x12\x30\n,RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED\x10\x00\x12&\n\"RECOMMENDATIONS_FILTERING_DISABLED\x10\x01\x12%\n!RECOMMENDATIONS_FILTERING_ENABLED\x10\x03*\x8b\x01\n\x15SearchSolutionUseCase\x12(\n$SEARCH_SOLUTION_USE_CASE_UNSPECIFIED\x10\x00\x12#\n\x1fSEARCH_SOLUTION_USE_CASE_SEARCH\x10\x01\x12#\n\x1fSEARCH_SOLUTION_USE_CASE_BROWSE\x10\x02\x42\xb6\x01\n\x1a\x63om.google.cloud.retail.v2B\x0b\x43ommonProtoP\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
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
27
+ ]
28
+ imports.each do |type_name, expected_filename|
29
+ import_file = pool.lookup(type_name).file_descriptor
30
+ if import_file.name != expected_filename
31
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
149
32
  end
150
33
  end
34
+ warn "Each proto file must use a consistent fully-qualified name."
35
+ warn "This will become an error in the next major version."
151
36
  end
152
37
 
153
38
  module Google
@@ -132,7 +132,7 @@ module Google
132
132
  credentials = @config.credentials
133
133
  # Use self-signed JWT if the endpoint is unchanged from default,
134
134
  # but only if the default endpoint does not have a region prefix.
135
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
135
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
136
136
  !@config.endpoint.split(".").first.include?("-")
137
137
  credentials ||= Credentials.default scope: @config.scope,
138
138
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -530,7 +530,9 @@ module Google
530
530
  class Configuration
531
531
  extend ::Gapic::Config
532
532
 
533
- config_attr :endpoint, "retail.googleapis.com", ::String
533
+ DEFAULT_ENDPOINT = "retail.googleapis.com"
534
+
535
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
534
536
  config_attr :credentials, nil do |value|
535
537
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
536
538
  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
- config_attr :endpoint, "retail.googleapis.com", ::String
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
@@ -128,7 +128,7 @@ module Google
128
128
  credentials = @config.credentials
129
129
  # Use self-signed JWT if the endpoint is unchanged from default,
130
130
  # but only if the default endpoint does not have a region prefix.
131
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
131
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
132
132
  !@config.endpoint.split(".").first.include?("-")
133
133
  credentials ||= Credentials.default scope: @config.scope,
134
134
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -459,7 +459,9 @@ module Google
459
459
  class Configuration
460
460
  extend ::Gapic::Config
461
461
 
462
- config_attr :endpoint, "retail.googleapis.com", ::String
462
+ DEFAULT_ENDPOINT = "retail.googleapis.com"
463
+
464
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
463
465
  config_attr :credentials, nil do |value|
464
466
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
465
467
  allowed.any? { |klass| klass === value }