google-cloud-retail-v2 2.6.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/retail/v2/analytics_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/analytics_service/operations.rb +20 -3
- data/lib/google/cloud/retail/v2/analytics_service_pb.rb +2 -23
- data/lib/google/cloud/retail/v2/catalog_pb.rb +2 -26
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +2 -26
- data/lib/google/cloud/retail/v2/common_pb.rb +2 -24
- data/lib/google/cloud/retail/v2/completion_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +20 -3
- data/lib/google/cloud/retail/v2/completion_service_pb.rb +2 -24
- data/lib/google/cloud/retail/v2/control_pb.rb +2 -24
- data/lib/google/cloud/retail/v2/control_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/control_service_pb.rb +2 -25
- data/lib/google/cloud/retail/v2/conversational_search_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/conversational_search_service_pb.rb +2 -26
- data/lib/google/cloud/retail/v2/export_config_pb.rb +2 -25
- data/lib/google/cloud/retail/v2/generative_question_pb.rb +2 -23
- data/lib/google/cloud/retail/v2/generative_question_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/generative_question_service_pb.rb +2 -25
- data/lib/google/cloud/retail/v2/import_config_pb.rb +2 -29
- data/lib/google/cloud/retail/v2/model_pb.rb +2 -24
- data/lib/google/cloud/retail/v2/model_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/model_service/operations.rb +20 -3
- data/lib/google/cloud/retail/v2/model_service_pb.rb +2 -25
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/prediction_service_pb.rb +2 -25
- data/lib/google/cloud/retail/v2/product_pb.rb +2 -29
- data/lib/google/cloud/retail/v2/product_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/product_service/operations.rb +20 -3
- data/lib/google/cloud/retail/v2/product_service_pb.rb +2 -27
- data/lib/google/cloud/retail/v2/promotion_pb.rb +2 -23
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +2 -24
- data/lib/google/cloud/retail/v2/safety_pb.rb +2 -23
- data/lib/google/cloud/retail/v2/search_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/search_service_pb.rb +2 -27
- data/lib/google/cloud/retail/v2/serving_config_pb.rb +2 -24
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +2 -25
- data/lib/google/cloud/retail/v2/user_event_pb.rb +2 -27
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +20 -3
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +20 -3
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +2 -24
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/proto_docs/google/protobuf/wrappers.rb +27 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1f51252939a404eeefa9d2ed716a160c71ef9fa6ba8d53f7b2f61f83f9fcedf7
|
|
4
|
+
data.tar.gz: fe30fd68e05cb1272028baaeb037f2497f8ed12ff70f67ca5c640a959caa0171
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c7dabddfb7ea2d7817418197e8182ca83ee3acfce7d42f08853f7df44b392778f6681b3e3668fd85aa8047523b5e40b1d915e80c805b762c72a061425aa95b5f
|
|
7
|
+
data.tar.gz: fe1ee4baa18ab380871e8661079e3239df6a10223c94c03b3a352982927c6eff1801d0bf6422aaed5e6b41616e117c4271246892d033b70850d05b55c75704b6
|
|
@@ -370,8 +370,6 @@ module Google
|
|
|
370
370
|
# @return [::String,nil]
|
|
371
371
|
# @!attribute [rw] credentials
|
|
372
372
|
# Credentials to send with calls. You may provide any of the following types:
|
|
373
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
374
|
-
# * (`Hash`) A service account key as a Hash
|
|
375
373
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
376
374
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
377
375
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -380,7 +378,26 @@ module Google
|
|
|
380
378
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
381
379
|
# * (`nil`) indicating no credentials
|
|
382
380
|
#
|
|
383
|
-
# Warning:
|
|
381
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
382
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
383
|
+
# Google APIs can compromise the security of your systems and data.
|
|
384
|
+
#
|
|
385
|
+
# @example
|
|
386
|
+
#
|
|
387
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
388
|
+
# # on the appropriate credentials class for your environment.
|
|
389
|
+
#
|
|
390
|
+
# require "googleauth"
|
|
391
|
+
#
|
|
392
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
393
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
394
|
+
# )
|
|
395
|
+
#
|
|
396
|
+
# client = ::Google::Cloud::Retail::V2::AnalyticsService::Client.new do |config|
|
|
397
|
+
# config.credentials = credentials
|
|
398
|
+
# end
|
|
399
|
+
#
|
|
400
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
384
401
|
# external source for authentication to Google Cloud, you must validate it before
|
|
385
402
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
386
403
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -642,8 +642,6 @@ module Google
|
|
|
642
642
|
# @return [::String,nil]
|
|
643
643
|
# @!attribute [rw] credentials
|
|
644
644
|
# Credentials to send with calls. You may provide any of the following types:
|
|
645
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
646
|
-
# * (`Hash`) A service account key as a Hash
|
|
647
645
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
648
646
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
649
647
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -652,7 +650,26 @@ module Google
|
|
|
652
650
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
653
651
|
# * (`nil`) indicating no credentials
|
|
654
652
|
#
|
|
655
|
-
# Warning:
|
|
653
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
654
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
655
|
+
# Google APIs can compromise the security of your systems and data.
|
|
656
|
+
#
|
|
657
|
+
# @example
|
|
658
|
+
#
|
|
659
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
660
|
+
# # on the appropriate credentials class for your environment.
|
|
661
|
+
#
|
|
662
|
+
# require "googleauth"
|
|
663
|
+
#
|
|
664
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
665
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
666
|
+
# )
|
|
667
|
+
#
|
|
668
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
|
669
|
+
# config.credentials = credentials
|
|
670
|
+
# end
|
|
671
|
+
#
|
|
672
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
656
673
|
# external source for authentication to Google Cloud, you must validate it before
|
|
657
674
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
658
675
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -14,29 +14,8 @@ require 'google/longrunning/operations_pb'
|
|
|
14
14
|
|
|
15
15
|
descriptor_data = "\n.google/cloud/retail/v2/analytics_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/export_config.proto\x1a#google/longrunning/operations.proto2\x83\x03\n\x10\x41nalyticsService\x12\xa3\x02\n\x16\x45xportAnalyticsMetrics\x12\x35.google.cloud.retail.v2.ExportAnalyticsMetricsRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41^\n5google.cloud.retail.v2.ExportAnalyticsMetricsResponse\x12%google.cloud.retail.v2.ExportMetadata\x82\xd3\xe4\x93\x02K\"F/v2/{catalog=projects/*/locations/*/catalogs/*}:exportAnalyticsMetrics:\x01*\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc0\x01\n\x1a\x63om.google.cloud.retail.v2B\x15\x41nalyticsServiceProtoP\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"
|
|
16
16
|
|
|
17
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
18
|
-
|
|
19
|
-
begin
|
|
20
|
-
pool.add_serialized_file(descriptor_data)
|
|
21
|
-
rescue TypeError
|
|
22
|
-
# Compatibility code: will be removed in the next major version.
|
|
23
|
-
require 'google/protobuf/descriptor_pb'
|
|
24
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
25
|
-
parsed.clear_dependency
|
|
26
|
-
serialized = parsed.class.encode(parsed)
|
|
27
|
-
file = pool.add_serialized_file(serialized)
|
|
28
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
29
|
-
imports = [
|
|
30
|
-
]
|
|
31
|
-
imports.each do |type_name, expected_filename|
|
|
32
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
33
|
-
if import_file.name != expected_filename
|
|
34
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
38
|
-
warn "This will become an error in the next major version."
|
|
39
|
-
end
|
|
17
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
18
|
+
pool.add_serialized_file(descriptor_data)
|
|
40
19
|
|
|
41
20
|
module Google
|
|
42
21
|
module Cloud
|
|
@@ -13,32 +13,8 @@ require 'google/protobuf/timestamp_pb'
|
|
|
13
13
|
|
|
14
14
|
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\x1a\x1fgoogle/protobuf/timestamp.proto\"^\n\x12ProductLevelConfig\x12\x1e\n\x16ingestion_product_type\x18\x01 \x01(\t\x12(\n merchant_center_product_id_field\x18\x02 \x01(\t\"\xf7\x0f\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\x12J\n\x0c\x66\x61\x63\x65t_config\x18\r \x01(\x0b\x32\x34.google.cloud.retail.v2.CatalogAttribute.FacetConfig\x1a\xe9\x05\n\x0b\x46\x61\x63\x65tConfig\x12\x39\n\x0f\x66\x61\x63\x65t_intervals\x18\x01 \x03(\x0b\x32 .google.cloud.retail.v2.Interval\x12\x65\n\x14ignored_facet_values\x18\x02 \x03(\x0b\x32G.google.cloud.retail.v2.CatalogAttribute.FacetConfig.IgnoredFacetValues\x12\x62\n\x13merged_facet_values\x18\x03 \x03(\x0b\x32\x45.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacetValue\x12V\n\x0cmerged_facet\x18\x04 \x01(\x0b\x32@.google.cloud.retail.v2.CatalogAttribute.FacetConfig.MergedFacet\x12X\n\rrerank_config\x18\x05 \x01(\x0b\x32\x41.google.cloud.retail.v2.CatalogAttribute.FacetConfig.RerankConfig\x1a\x82\x01\n\x12IgnoredFacetValues\x12\x0e\n\x06values\x18\x01 \x03(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x38\n\x10MergedFacetValue\x12\x0e\n\x06values\x18\x01 \x03(\t\x12\x14\n\x0cmerged_value\x18\x02 \x01(\t\x1a\'\n\x0bMergedFacet\x12\x18\n\x10merged_facet_key\x18\x01 \x01(\t\x1a:\n\x0cRerankConfig\x12\x14\n\x0crerank_facet\x18\x01 \x01(\x08\x12\x14\n\x0c\x66\x61\x63\x65t_values\x18\x02 \x03(\t\"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"
|
|
15
15
|
|
|
16
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
17
|
-
|
|
18
|
-
begin
|
|
19
|
-
pool.add_serialized_file(descriptor_data)
|
|
20
|
-
rescue TypeError
|
|
21
|
-
# Compatibility code: will be removed in the next major version.
|
|
22
|
-
require 'google/protobuf/descriptor_pb'
|
|
23
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
24
|
-
parsed.clear_dependency
|
|
25
|
-
serialized = parsed.class.encode(parsed)
|
|
26
|
-
file = pool.add_serialized_file(serialized)
|
|
27
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
28
|
-
imports = [
|
|
29
|
-
["google.cloud.retail.v2.Interval", "google/cloud/retail/v2/common.proto"],
|
|
30
|
-
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
|
31
|
-
["google.cloud.retail.v2.CompletionDataInputConfig", "google/cloud/retail/v2/import_config.proto"],
|
|
32
|
-
]
|
|
33
|
-
imports.each do |type_name, expected_filename|
|
|
34
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
35
|
-
if import_file.name != expected_filename
|
|
36
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
40
|
-
warn "This will become an error in the next major version."
|
|
41
|
-
end
|
|
16
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
|
42
18
|
|
|
43
19
|
module Google
|
|
44
20
|
module Cloud
|
|
@@ -1347,8 +1347,6 @@ module Google
|
|
|
1347
1347
|
# @return [::String,nil]
|
|
1348
1348
|
# @!attribute [rw] credentials
|
|
1349
1349
|
# Credentials to send with calls. You may provide any of the following types:
|
|
1350
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
1351
|
-
# * (`Hash`) A service account key as a Hash
|
|
1352
1350
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1353
1351
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1354
1352
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -1357,7 +1355,26 @@ module Google
|
|
|
1357
1355
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1358
1356
|
# * (`nil`) indicating no credentials
|
|
1359
1357
|
#
|
|
1360
|
-
# Warning:
|
|
1358
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
1359
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
1360
|
+
# Google APIs can compromise the security of your systems and data.
|
|
1361
|
+
#
|
|
1362
|
+
# @example
|
|
1363
|
+
#
|
|
1364
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
1365
|
+
# # on the appropriate credentials class for your environment.
|
|
1366
|
+
#
|
|
1367
|
+
# require "googleauth"
|
|
1368
|
+
#
|
|
1369
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
1370
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
1371
|
+
# )
|
|
1372
|
+
#
|
|
1373
|
+
# client = ::Google::Cloud::Retail::V2::CatalogService::Client.new do |config|
|
|
1374
|
+
# config.credentials = credentials
|
|
1375
|
+
# end
|
|
1376
|
+
#
|
|
1377
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1361
1378
|
# external source for authentication to Google Cloud, you must validate it before
|
|
1362
1379
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1363
1380
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -16,32 +16,8 @@ require 'google/protobuf/timestamp_pb'
|
|
|
16
16
|
|
|
17
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\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/catalogs\x12\xbb\x01\n\rUpdateCatalog\x12,.google.cloud.retail.v2.UpdateCatalogRequest\x1a\x1f.google.cloud.retail.v2.Catalog\"[\xda\x41\x13\x63\x61talog,update_mask\x82\xd3\xe4\x93\x02?24/v2/{catalog.name=projects/*/locations/*/catalogs/*}:\x07\x63\x61talog\x12\xb2\x01\n\x10SetDefaultBranch\x12/.google.cloud.retail.v2.SetDefaultBranchRequest\x1a\x16.google.protobuf.Empty\"U\xda\x41\x07\x63\x61talog\x82\xd3\xe4\x93\x02\x45\"@/v2/{catalog=projects/*/locations/*/catalogs/*}:setDefaultBranch:\x01*\x12\xc9\x01\n\x10GetDefaultBranch\x12/.google.cloud.retail.v2.GetDefaultBranchRequest\x1a\x30.google.cloud.retail.v2.GetDefaultBranchResponse\"R\xda\x41\x07\x63\x61talog\x82\xd3\xe4\x93\x02\x42\x12@/v2/{catalog=projects/*/locations/*/catalogs/*}:getDefaultBranch\x12\xc1\x01\n\x13GetCompletionConfig\x12\x32.google.cloud.retail.v2.GetCompletionConfigRequest\x1a(.google.cloud.retail.v2.CompletionConfig\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v2/{name=projects/*/locations/*/catalogs/*/completionConfig}\x12\x86\x02\n\x16UpdateCompletionConfig\x12\x35.google.cloud.retail.v2.UpdateCompletionConfigRequest\x1a(.google.cloud.retail.v2.CompletionConfig\"\x8a\x01\xda\x41\x1d\x63ompletion_config,update_mask\x82\xd3\xe4\x93\x02\x64\x32O/v2/{completion_config.name=projects/*/locations/*/catalogs/*/completionConfig}:\x11\x63ompletion_config\x12\xc1\x01\n\x13GetAttributesConfig\x12\x32.google.cloud.retail.v2.GetAttributesConfigRequest\x1a(.google.cloud.retail.v2.AttributesConfig\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v2/{name=projects/*/locations/*/catalogs/*/attributesConfig}\x12\x86\x02\n\x16UpdateAttributesConfig\x12\x35.google.cloud.retail.v2.UpdateAttributesConfigRequest\x1a(.google.cloud.retail.v2.AttributesConfig\"\x8a\x01\xda\x41\x1d\x61ttributes_config,update_mask\x82\xd3\xe4\x93\x02\x64\x32O/v2/{attributes_config.name=projects/*/locations/*/catalogs/*/attributesConfig}:\x11\x61ttributes_config\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
18
|
|
|
19
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
20
|
-
|
|
21
|
-
begin
|
|
22
|
-
pool.add_serialized_file(descriptor_data)
|
|
23
|
-
rescue TypeError
|
|
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}"
|
|
40
|
-
end
|
|
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."
|
|
44
|
-
end
|
|
19
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
20
|
+
pool.add_serialized_file(descriptor_data)
|
|
45
21
|
|
|
46
22
|
module Google
|
|
47
23
|
module Cloud
|
|
@@ -10,30 +10,8 @@ require 'google/protobuf/timestamp_pb'
|
|
|
10
10
|
|
|
11
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\"\xc9\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\x12\x17\n\x0fpage_categories\x18\x04 \x03(\t\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\"\xea\r\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\x12X\n\x19\x66orce_return_facet_action\x18\x0c \x01(\x0b\x32\x33.google.cloud.retail.v2.Rule.ForceReturnFacetActionH\x00\x12M\n\x13remove_facet_action\x18\r \x01(\x0b\x32..google.cloud.retail.v2.Rule.RemoveFacetActionH\x00\x12<\n\npin_action\x18\x0e \x01(\x0b\x32&.google.cloud.retail.v2.Rule.PinActionH\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(\t\x1a\xce\x01\n\x16\x46orceReturnFacetAction\x12o\n\x1a\x66\x61\x63\x65t_position_adjustments\x18\x01 \x03(\x0b\x32K.google.cloud.retail.v2.Rule.ForceReturnFacetAction.FacetPositionAdjustment\x1a\x43\n\x17\x46\x61\x63\x65tPositionAdjustment\x12\x16\n\x0e\x61ttribute_name\x18\x01 \x01(\t\x12\x10\n\x08position\x18\x02 \x01(\x05\x1a,\n\x11RemoveFacetAction\x12\x17\n\x0f\x61ttribute_names\x18\x01 \x03(\t\x1a\x84\x01\n\tPinAction\x12H\n\x07pin_map\x18\x01 \x03(\x0b\x32\x32.google.cloud.retail.v2.Rule.PinAction.PinMapEntryB\x03\xe0\x41\x02\x1a-\n\x0bPinMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\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\"\xb0\x02\n\x0eLocalInventory\x12\x15\n\x08place_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12:\n\nprice_info\x18\x02 \x01(\x0b\x32!.google.cloud.retail.v2.PriceInfoB\x03\xe0\x41\x01\x12O\n\nattributes\x18\x03 \x03(\x0b\x32\x36.google.cloud.retail.v2.LocalInventory.AttributesEntryB\x03\xe0\x41\x01\x12\x1e\n\x11\x66ulfillment_types\x18\x04 \x03(\tB\x03\xe0\x41\x01\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\"\xbf\x03\n\x12PinControlMetadata\x12X\n\x10\x61ll_matched_pins\x18\x01 \x03(\x0b\x32>.google.cloud.retail.v2.PinControlMetadata.AllMatchedPinsEntry\x12Q\n\x0c\x64ropped_pins\x18\x02 \x03(\x0b\x32;.google.cloud.retail.v2.PinControlMetadata.DroppedPinsEntry\x1a!\n\x0bProductPins\x12\x12\n\nproduct_id\x18\x01 \x03(\t\x1am\n\x13\x41llMatchedPinsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.retail.v2.PinControlMetadata.ProductPins:\x02\x38\x01\x1aj\n\x10\x44roppedPinsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.google.cloud.retail.v2.PinControlMetadata.ProductPins:\x02\x38\x01\"\x1c\n\nStringList\x12\x0e\n\x06values\x18\x01 \x03(\t\"\x1c\n\nDoubleList\x12\x0e\n\x06values\x18\x01 \x03(\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
12
|
|
|
13
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
-
|
|
15
|
-
begin
|
|
16
|
-
pool.add_serialized_file(descriptor_data)
|
|
17
|
-
rescue TypeError
|
|
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}"
|
|
32
|
-
end
|
|
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."
|
|
36
|
-
end
|
|
13
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
14
|
+
pool.add_serialized_file(descriptor_data)
|
|
37
15
|
|
|
38
16
|
module Google
|
|
39
17
|
module Cloud
|
|
@@ -536,8 +536,6 @@ module Google
|
|
|
536
536
|
# @return [::String,nil]
|
|
537
537
|
# @!attribute [rw] credentials
|
|
538
538
|
# Credentials to send with calls. You may provide any of the following types:
|
|
539
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
540
|
-
# * (`Hash`) A service account key as a Hash
|
|
541
539
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
542
540
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
543
541
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -546,7 +544,26 @@ module Google
|
|
|
546
544
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
547
545
|
# * (`nil`) indicating no credentials
|
|
548
546
|
#
|
|
549
|
-
# Warning:
|
|
547
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
548
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
549
|
+
# Google APIs can compromise the security of your systems and data.
|
|
550
|
+
#
|
|
551
|
+
# @example
|
|
552
|
+
#
|
|
553
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
554
|
+
# # on the appropriate credentials class for your environment.
|
|
555
|
+
#
|
|
556
|
+
# require "googleauth"
|
|
557
|
+
#
|
|
558
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
559
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
560
|
+
# )
|
|
561
|
+
#
|
|
562
|
+
# client = ::Google::Cloud::Retail::V2::CompletionService::Client.new do |config|
|
|
563
|
+
# config.credentials = credentials
|
|
564
|
+
# end
|
|
565
|
+
#
|
|
566
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
550
567
|
# external source for authentication to Google Cloud, you must validate it before
|
|
551
568
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
552
569
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -642,8 +642,6 @@ module Google
|
|
|
642
642
|
# @return [::String,nil]
|
|
643
643
|
# @!attribute [rw] credentials
|
|
644
644
|
# Credentials to send with calls. You may provide any of the following types:
|
|
645
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
646
|
-
# * (`Hash`) A service account key as a Hash
|
|
647
645
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
648
646
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
649
647
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -652,7 +650,26 @@ module Google
|
|
|
652
650
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
653
651
|
# * (`nil`) indicating no credentials
|
|
654
652
|
#
|
|
655
|
-
# Warning:
|
|
653
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
654
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
655
|
+
# Google APIs can compromise the security of your systems and data.
|
|
656
|
+
#
|
|
657
|
+
# @example
|
|
658
|
+
#
|
|
659
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
660
|
+
# # on the appropriate credentials class for your environment.
|
|
661
|
+
#
|
|
662
|
+
# require "googleauth"
|
|
663
|
+
#
|
|
664
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
665
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
666
|
+
# )
|
|
667
|
+
#
|
|
668
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
|
669
|
+
# config.credentials = credentials
|
|
670
|
+
# end
|
|
671
|
+
#
|
|
672
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
656
673
|
# external source for authentication to Google Cloud, you must validate it before
|
|
657
674
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
658
675
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -15,30 +15,8 @@ require 'google/longrunning/operations_pb'
|
|
|
15
15
|
|
|
16
16
|
descriptor_data = "\n/google/cloud/retail/v2/completion_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/longrunning/operations.proto\"\x83\x02\n\x14\x43ompleteQueryRequest\x12\x36\n\x07\x63\x61talog\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12\x12\n\x05query\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\nvisitor_id\x18\x07 \x01(\t\x12\x16\n\x0elanguage_codes\x18\x03 \x03(\t\x12\x13\n\x0b\x64\x65vice_type\x18\x04 \x01(\t\x12\x0f\n\x07\x64\x61taset\x18\x06 \x01(\t\x12\x17\n\x0fmax_suggestions\x18\x05 \x01(\x05\x12$\n\x1c\x65nable_attribute_suggestions\x18\t \x01(\x08\x12\x0e\n\x06\x65ntity\x18\n \x01(\t\"\x8d\x06\n\x15\x43ompleteQueryResponse\x12Z\n\x12\x63ompletion_results\x18\x01 \x03(\x0b\x32>.google.cloud.retail.v2.CompleteQueryResponse.CompletionResult\x12\x19\n\x11\x61ttribution_token\x18\x02 \x01(\t\x12\x63\n\x15recent_search_results\x18\x03 \x03(\x0b\x32@.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResultB\x02\x18\x01\x12^\n\x11\x61ttribute_results\x18\x04 \x03(\x0b\x32\x43.google.cloud.retail.v2.CompleteQueryResponse.AttributeResultsEntry\x1a\xe6\x01\n\x10\x43ompletionResult\x12\x12\n\nsuggestion\x18\x01 \x01(\t\x12\x62\n\nattributes\x18\x02 \x03(\x0b\x32N.google.cloud.retail.v2.CompleteQueryResponse.CompletionResult.AttributesEntry\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\x1a/\n\x12RecentSearchResult\x12\x15\n\rrecent_search\x18\x01 \x01(\t:\x02\x18\x01\x1a&\n\x0f\x41ttributeResult\x12\x13\n\x0bsuggestions\x18\x01 \x03(\t\x1av\n\x15\x41ttributeResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12L\n\x05value\x18\x02 \x01(\x0b\x32=.google.cloud.retail.v2.CompleteQueryResponse.AttributeResult:\x02\x38\x01\x32\xb2\x04\n\x11\x43ompletionService\x12\xb3\x01\n\rCompleteQuery\x12,.google.cloud.retail.v2.CompleteQueryRequest\x1a-.google.cloud.retail.v2.CompleteQueryResponse\"E\x82\xd3\xe4\x93\x02?\x12=/v2/{catalog=projects/*/locations/*/catalogs/*}:completeQuery\x12\x9b\x02\n\x14ImportCompletionData\x12\x33.google.cloud.retail.v2.ImportCompletionDataRequest\x1a\x1d.google.longrunning.Operation\"\xae\x01\xca\x41\\\n3google.cloud.retail.v2.ImportCompletionDataResponse\x12%google.cloud.retail.v2.ImportMetadata\x82\xd3\xe4\x93\x02I\"D/v2/{parent=projects/*/locations/*/catalogs/*}/completionData:import:\x01*\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc1\x01\n\x1a\x63om.google.cloud.retail.v2B\x16\x43ompletionServiceProtoP\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
17
|
|
|
18
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
19
|
-
|
|
20
|
-
begin
|
|
21
|
-
pool.add_serialized_file(descriptor_data)
|
|
22
|
-
rescue TypeError
|
|
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.CustomAttribute", "google/cloud/retail/v2/common.proto"],
|
|
32
|
-
]
|
|
33
|
-
imports.each do |type_name, expected_filename|
|
|
34
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
35
|
-
if import_file.name != expected_filename
|
|
36
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
40
|
-
warn "This will become an error in the next major version."
|
|
41
|
-
end
|
|
18
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
19
|
+
pool.add_serialized_file(descriptor_data)
|
|
42
20
|
|
|
43
21
|
module Google
|
|
44
22
|
module Cloud
|
|
@@ -11,30 +11,8 @@ require 'google/cloud/retail/v2/common_pb'
|
|
|
11
11
|
|
|
12
12
|
descriptor_data = "\n$google/cloud/retail/v2/control.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/cloud/retail/v2/common.proto\"\xa6\x03\n\x07\x43ontrol\x12,\n\x04rule\x18\x04 \x01(\x0b\x32\x1c.google.cloud.retail.v2.RuleH\x00\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*\n\x1d\x61ssociated_serving_config_ids\x18\x05 \x03(\tB\x03\xe0\x41\x03\x12\x44\n\x0esolution_types\x18\x06 \x03(\x0e\x32$.google.cloud.retail.v2.SolutionTypeB\x06\xe0\x41\x02\xe0\x41\x05\x12O\n\x18search_solution_use_case\x18\x07 \x03(\x0e\x32-.google.cloud.retail.v2.SearchSolutionUseCase:q\xea\x41n\n\x1dretail.googleapis.com/Control\x12Mprojects/{project}/locations/{location}/catalogs/{catalog}/controls/{control}B\t\n\x07\x63ontrolB\xb7\x01\n\x1a\x63om.google.cloud.retail.v2B\x0c\x43ontrolProtoP\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"
|
|
13
13
|
|
|
14
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
15
|
-
|
|
16
|
-
begin
|
|
17
|
-
pool.add_serialized_file(descriptor_data)
|
|
18
|
-
rescue TypeError
|
|
19
|
-
# Compatibility code: will be removed in the next major version.
|
|
20
|
-
require 'google/protobuf/descriptor_pb'
|
|
21
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
22
|
-
parsed.clear_dependency
|
|
23
|
-
serialized = parsed.class.encode(parsed)
|
|
24
|
-
file = pool.add_serialized_file(serialized)
|
|
25
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
26
|
-
imports = [
|
|
27
|
-
["google.cloud.retail.v2.Rule", "google/cloud/retail/v2/common.proto"],
|
|
28
|
-
]
|
|
29
|
-
imports.each do |type_name, expected_filename|
|
|
30
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
31
|
-
if import_file.name != expected_filename
|
|
32
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
36
|
-
warn "This will become an error in the next major version."
|
|
37
|
-
end
|
|
14
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
15
|
+
pool.add_serialized_file(descriptor_data)
|
|
38
16
|
|
|
39
17
|
module Google
|
|
40
18
|
module Cloud
|
|
@@ -710,8 +710,6 @@ module Google
|
|
|
710
710
|
# @return [::String,nil]
|
|
711
711
|
# @!attribute [rw] credentials
|
|
712
712
|
# Credentials to send with calls. You may provide any of the following types:
|
|
713
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
714
|
-
# * (`Hash`) A service account key as a Hash
|
|
715
713
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
716
714
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
717
715
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -720,7 +718,26 @@ module Google
|
|
|
720
718
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
721
719
|
# * (`nil`) indicating no credentials
|
|
722
720
|
#
|
|
723
|
-
# Warning:
|
|
721
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
722
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
723
|
+
# Google APIs can compromise the security of your systems and data.
|
|
724
|
+
#
|
|
725
|
+
# @example
|
|
726
|
+
#
|
|
727
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
728
|
+
# # on the appropriate credentials class for your environment.
|
|
729
|
+
#
|
|
730
|
+
# require "googleauth"
|
|
731
|
+
#
|
|
732
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
733
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
734
|
+
# )
|
|
735
|
+
#
|
|
736
|
+
# client = ::Google::Cloud::Retail::V2::ControlService::Client.new do |config|
|
|
737
|
+
# config.credentials = credentials
|
|
738
|
+
# end
|
|
739
|
+
#
|
|
740
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
724
741
|
# external source for authentication to Google Cloud, you must validate it before
|
|
725
742
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
726
743
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -15,31 +15,8 @@ require 'google/protobuf/field_mask_pb'
|
|
|
15
15
|
|
|
16
16
|
descriptor_data = "\n,google/cloud/retail/v2/control_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/control.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x9d\x01\n\x14\x43reateControlRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12\x35\n\x07\x63ontrol\x18\x02 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ControlB\x03\xe0\x41\x02\x12\x17\n\ncontrol_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"~\n\x14UpdateControlRequest\x12\x35\n\x07\x63ontrol\x18\x01 \x01(\x0b\x32\x1f.google.cloud.retail.v2.ControlB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"K\n\x14\x44\x65leteControlRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Control\"H\n\x11GetControlRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Control\"\x92\x01\n\x13ListControlsRequest\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\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"b\n\x14ListControlsResponse\x12\x31\n\x08\x63ontrols\x18\x01 \x03(\x0b\x32\x1f.google.cloud.retail.v2.Control\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xe4\x07\n\x0e\x43ontrolService\x12\xc4\x01\n\rCreateControl\x12,.google.cloud.retail.v2.CreateControlRequest\x1a\x1f.google.cloud.retail.v2.Control\"d\xda\x41\x19parent,control,control_id\x82\xd3\xe4\x93\x02\x42\"7/v2/{parent=projects/*/locations/*/catalogs/*}/controls:\x07\x63ontrol\x12\x9d\x01\n\rDeleteControl\x12,.google.cloud.retail.v2.DeleteControlRequest\x1a\x16.google.protobuf.Empty\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v2/{name=projects/*/locations/*/catalogs/*/controls/*}\x12\xc6\x01\n\rUpdateControl\x12,.google.cloud.retail.v2.UpdateControlRequest\x1a\x1f.google.cloud.retail.v2.Control\"f\xda\x41\x13\x63ontrol,update_mask\x82\xd3\xe4\x93\x02J2?/v2/{control.name=projects/*/locations/*/catalogs/*/controls/*}:\x07\x63ontrol\x12\xa0\x01\n\nGetControl\x12).google.cloud.retail.v2.GetControlRequest\x1a\x1f.google.cloud.retail.v2.Control\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/catalogs/*/controls/*}\x12\xb3\x01\n\x0cListControls\x12+.google.cloud.retail.v2.ListControlsRequest\x1a,.google.cloud.retail.v2.ListControlsResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{parent=projects/*/locations/*/catalogs/*}/controls\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\x43ontrolServiceProtoP\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
17
|
|
|
18
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
19
|
-
|
|
20
|
-
begin
|
|
21
|
-
pool.add_serialized_file(descriptor_data)
|
|
22
|
-
rescue TypeError
|
|
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.Control", "google/cloud/retail/v2/control.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}"
|
|
38
|
-
end
|
|
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."
|
|
42
|
-
end
|
|
18
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
19
|
+
pool.add_serialized_file(descriptor_data)
|
|
43
20
|
|
|
44
21
|
module Google
|
|
45
22
|
module Cloud
|
|
@@ -403,8 +403,6 @@ module Google
|
|
|
403
403
|
# @return [::String,nil]
|
|
404
404
|
# @!attribute [rw] credentials
|
|
405
405
|
# Credentials to send with calls. You may provide any of the following types:
|
|
406
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
407
|
-
# * (`Hash`) A service account key as a Hash
|
|
408
406
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
409
407
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
410
408
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -413,7 +411,26 @@ module Google
|
|
|
413
411
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
414
412
|
# * (`nil`) indicating no credentials
|
|
415
413
|
#
|
|
416
|
-
# Warning:
|
|
414
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
415
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
416
|
+
# Google APIs can compromise the security of your systems and data.
|
|
417
|
+
#
|
|
418
|
+
# @example
|
|
419
|
+
#
|
|
420
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
421
|
+
# # on the appropriate credentials class for your environment.
|
|
422
|
+
#
|
|
423
|
+
# require "googleauth"
|
|
424
|
+
#
|
|
425
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
426
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
427
|
+
# )
|
|
428
|
+
#
|
|
429
|
+
# client = ::Google::Cloud::Retail::V2::ConversationalSearchService::Client.new do |config|
|
|
430
|
+
# config.credentials = credentials
|
|
431
|
+
# end
|
|
432
|
+
#
|
|
433
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
417
434
|
# external source for authentication to Google Cloud, you must validate it before
|
|
418
435
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
419
436
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -15,32 +15,8 @@ require 'google/cloud/retail/v2/search_service_pb'
|
|
|
15
15
|
|
|
16
16
|
descriptor_data = "\n:google/cloud/retail/v2/conversational_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/safety.proto\x1a+google/cloud/retail/v2/search_service.proto\"\xef\x0b\n\x1b\x43onversationalSearchRequest\x12\x16\n\tplacement\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x06\x62ranch\x18\x02 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\x12\n\x05query\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fpage_categories\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x1c\n\x0f\x63onversation_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\\\n\rsearch_params\x18\x06 \x01(\x0b\x32@.google.cloud.retail.v2.ConversationalSearchRequest.SearchParamsB\x03\xe0\x41\x01\x12\x17\n\nvisitor_id\x18\t \x01(\tB\x03\xe0\x41\x02\x12\x38\n\tuser_info\x18\x07 \x01(\x0b\x32 .google.cloud.retail.v2.UserInfoB\x03\xe0\x41\x01\x12{\n\x1d\x63onversational_filtering_spec\x18\x08 \x01(\x0b\x32O.google.cloud.retail.v2.ConversationalSearchRequest.ConversationalFilteringSpecB\x03\xe0\x41\x01\x12]\n\x0buser_labels\x18\x0c \x03(\x0b\x32\x43.google.cloud.retail.v2.ConversationalSearchRequest.UserLabelsEntryB\x03\xe0\x41\x01\x12\x43\n\x0fsafety_settings\x18\x0e \x03(\x0b\x32%.google.cloud.retail.v2.SafetySettingB\x03\xe0\x41\x01\x1a\xa2\x01\n\x0cSearchParams\x12\x13\n\x06\x66ilter\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x63\x61nonical_filter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07sort_by\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12H\n\nboost_spec\x18\x04 \x01(\x0b\x32/.google.cloud.retail.v2.SearchRequest.BoostSpecB\x03\xe0\x41\x01\x1a\x81\x02\n\nUserAnswer\x12\x15\n\x0btext_answer\x18\x01 \x01(\tH\x00\x12m\n\x0fselected_answer\x18\x02 \x01(\x0b\x32M.google.cloud.retail.v2.ConversationalSearchRequest.UserAnswer.SelectedAnswerB\x03\xe0\x41\x01H\x00\x1a\x65\n\x0eSelectedAnswer\x12S\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValueB\x03\xe0\x41\x01\x42\x06\n\x04type\x1a\x83\x03\n\x1b\x43onversationalFilteringSpec\x12.\n\x1f\x65nable_conversational_filtering\x18\x01 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12X\n\x0buser_answer\x18\x02 \x01(\x0b\x32>.google.cloud.retail.v2.ConversationalSearchRequest.UserAnswerB\x03\xe0\x41\x01\x12\x80\x01\n\x1d\x63onversational_filtering_mode\x18\x04 \x01(\x0e\x32T.google.cloud.retail.v2.ConversationalSearchRequest.ConversationalFilteringSpec.ModeB\x03\xe0\x41\x01\"W\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\x12\x1e\n\x1a\x43ONVERSATIONAL_FILTER_ONLY\x10\x03\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xcd\t\n\x1c\x43onversationalSearchResponse\x12\x18\n\x10user_query_types\x18\n \x03(\t\x12$\n\x1c\x63onversational_text_response\x18\x02 \x01(\t\x12`\n\x11\x66ollowup_question\x18\x03 \x01(\x0b\x32\x45.google.cloud.retail.v2.ConversationalSearchResponse.FollowupQuestion\x12\x17\n\x0f\x63onversation_id\x18\x04 \x01(\t\x12Z\n\x0erefined_search\x18\x06 \x03(\x0b\x32\x42.google.cloud.retail.v2.ConversationalSearchResponse.RefinedSearch\x12{\n\x1f\x63onversational_filtering_result\x18\x07 \x01(\x0b\x32R.google.cloud.retail.v2.ConversationalSearchResponse.ConversationalFilteringResult\x12N\n\x05state\x18\t \x01(\x0e\x32:.google.cloud.retail.v2.ConversationalSearchResponse.StateB\x03\xe0\x41\x03\x1a\x82\x02\n\x10\x46ollowupQuestion\x12\x19\n\x11\x66ollowup_question\x18\x01 \x01(\t\x12p\n\x11suggested_answers\x18\x02 \x03(\x0b\x32U.google.cloud.retail.v2.ConversationalSearchResponse.FollowupQuestion.SuggestedAnswer\x1a\x61\n\x0fSuggestedAnswer\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\x1a\x1e\n\rRefinedSearch\x12\r\n\x05query\x18\x01 \x01(\t\x1a\xe5\x02\n\x1d\x43onversationalFilteringResult\x12`\n\x11\x66ollowup_question\x18\x01 \x01(\x0b\x32\x45.google.cloud.retail.v2.ConversationalSearchResponse.FollowupQuestion\x12~\n\x11\x61\x64\x64itional_filter\x18\x02 \x01(\x0b\x32\x63.google.cloud.retail.v2.ConversationalSearchResponse.ConversationalFilteringResult.AdditionalFilter\x1a\x62\n\x10\x41\x64\x64itionalFilter\x12N\n\x17product_attribute_value\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.ProductAttributeValue\"<\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\r\n\tSTREAMING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x32\xae\x03\n\x1b\x43onversationalSearchService\x12\xc3\x02\n\x14\x43onversationalSearch\x12\x33.google.cloud.retail.v2.ConversationalSearchRequest\x1a\x34.google.cloud.retail.v2.ConversationalSearchResponse\"\xbd\x01\x82\xd3\xe4\x93\x02\xb6\x01\"S/v2/{placement=projects/*/locations/*/catalogs/*/placements/*}:conversationalSearch:\x01*Z\\\"W/v2/{placement=projects/*/locations/*/catalogs/*/servingConfigs/*}:conversationalSearch:\x01*0\x01\x1aI\xca\x41\x15retail.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xcb\x01\n\x1a\x63om.google.cloud.retail.v2B ConversationalSearchServiceProtoP\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
17
|
|
|
18
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
19
|
-
|
|
20
|
-
begin
|
|
21
|
-
pool.add_serialized_file(descriptor_data)
|
|
22
|
-
rescue TypeError
|
|
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.UserInfo", "google/cloud/retail/v2/common.proto"],
|
|
32
|
-
["google.cloud.retail.v2.SafetySetting", "google/cloud/retail/v2/safety.proto"],
|
|
33
|
-
["google.cloud.retail.v2.SearchRequest.BoostSpec", "google/cloud/retail/v2/search_service.proto"],
|
|
34
|
-
]
|
|
35
|
-
imports.each do |type_name, expected_filename|
|
|
36
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
37
|
-
if import_file.name != expected_filename
|
|
38
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
42
|
-
warn "This will become an error in the next major version."
|
|
43
|
-
end
|
|
18
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
19
|
+
pool.add_serialized_file(descriptor_data)
|
|
44
20
|
|
|
45
21
|
module Google
|
|
46
22
|
module Cloud
|