google-cloud-retail-v2 0.15.0 → 0.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/retail/v2/catalog_pb.rb +25 -68
- data/lib/google/cloud/retail/v2/catalog_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/catalog_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/catalog_service/rest/service_stub.rb +11 -11
- data/lib/google/cloud/retail/v2/catalog_service_pb.rb +27 -55
- data/lib/google/cloud/retail/v2/common_pb.rb +25 -140
- data/lib/google/cloud/retail/v2/completion_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/completion_service/operations.rb +3 -1
- data/lib/google/cloud/retail/v2/completion_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/completion_service/rest/operations.rb +7 -5
- data/lib/google/cloud/retail/v2/completion_service/rest/service_stub.rb +2 -2
- data/lib/google/cloud/retail/v2/completion_service_pb.rb +25 -23
- data/lib/google/cloud/retail/v2/control_pb.rb +25 -11
- data/lib/google/cloud/retail/v2/control_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/control_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/control_service/rest/service_stub.rb +5 -5
- data/lib/google/cloud/retail/v2/control_service_pb.rb +26 -26
- data/lib/google/cloud/retail/v2/import_config_pb.rb +30 -93
- data/lib/google/cloud/retail/v2/model_pb.rb +25 -42
- data/lib/google/cloud/retail/v2/model_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/model_service/operations.rb +3 -1
- data/lib/google/cloud/retail/v2/model_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/model_service/rest/operations.rb +7 -5
- data/lib/google/cloud/retail/v2/model_service/rest/service_stub.rb +8 -8
- data/lib/google/cloud/retail/v2/model_service_pb.rb +26 -42
- data/lib/google/cloud/retail/v2/prediction_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/prediction_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/prediction_service/rest/service_stub.rb +1 -1
- data/lib/google/cloud/retail/v2/prediction_service_pb.rb +26 -21
- data/lib/google/cloud/retail/v2/product_pb.rb +30 -52
- data/lib/google/cloud/retail/v2/product_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/product_service/operations.rb +3 -1
- data/lib/google/cloud/retail/v2/product_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/product_service/rest/operations.rb +7 -5
- data/lib/google/cloud/retail/v2/product_service/rest/service_stub.rb +11 -11
- data/lib/google/cloud/retail/v2/product_service_pb.rb +28 -81
- data/lib/google/cloud/retail/v2/promotion_pb.rb +24 -4
- data/lib/google/cloud/retail/v2/purge_config_pb.rb +24 -11
- data/lib/google/cloud/retail/v2/search_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/search_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/search_service/rest/service_stub.rb +1 -1
- data/lib/google/cloud/retail/v2/search_service_pb.rb +28 -137
- data/lib/google/cloud/retail/v2/serving_config_pb.rb +25 -27
- data/lib/google/cloud/retail/v2/serving_config_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/serving_config_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/serving_config_service/rest/service_stub.rb +7 -7
- data/lib/google/cloud/retail/v2/serving_config_service_pb.rb +26 -33
- data/lib/google/cloud/retail/v2/user_event_pb.rb +28 -40
- data/lib/google/cloud/retail/v2/user_event_service/client.rb +4 -2
- data/lib/google/cloud/retail/v2/user_event_service/operations.rb +3 -1
- data/lib/google/cloud/retail/v2/user_event_service/rest/client.rb +4 -2
- data/lib/google/cloud/retail/v2/user_event_service/rest/operations.rb +7 -5
- data/lib/google/cloud/retail/v2/user_event_service/rest/service_stub.rb +5 -5
- data/lib/google/cloud/retail/v2/user_event_service_pb.rb +25 -30
- data/lib/google/cloud/retail/v2/version.rb +1 -1
- data/proto_docs/google/api/client.rb +10 -1
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/struct.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +4 -4
@@ -446,7 +446,9 @@ module Google
|
|
446
446
|
class Configuration
|
447
447
|
extend ::Gapic::Config
|
448
448
|
|
449
|
-
|
449
|
+
DEFAULT_ENDPOINT = "retail.googleapis.com"
|
450
|
+
|
451
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
450
452
|
config_attr :credentials, nil do |value|
|
451
453
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
452
454
|
allowed.any? { |klass| klass === value }
|
@@ -567,7 +569,7 @@ module Google
|
|
567
569
|
|
568
570
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
|
569
571
|
query_string_params = if query_string_params.any?
|
570
|
-
query_string_params.to_h { |p| p.split
|
572
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
571
573
|
else
|
572
574
|
{}
|
573
575
|
end
|
@@ -605,7 +607,7 @@ module Google
|
|
605
607
|
|
606
608
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
|
607
609
|
query_string_params = if query_string_params.any?
|
608
|
-
query_string_params.to_h { |p| p.split
|
610
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
609
611
|
else
|
610
612
|
{}
|
611
613
|
end
|
@@ -643,7 +645,7 @@ module Google
|
|
643
645
|
|
644
646
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
|
645
647
|
query_string_params = if query_string_params.any?
|
646
|
-
query_string_params.to_h { |p| p.split
|
648
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
647
649
|
else
|
648
650
|
{}
|
649
651
|
end
|
@@ -681,7 +683,7 @@ module Google
|
|
681
683
|
|
682
684
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
|
683
685
|
query_string_params = if query_string_params.any?
|
684
|
-
query_string_params.to_h { |p| p.split
|
686
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
685
687
|
else
|
686
688
|
{}
|
687
689
|
end
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_complete_query_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_import_completion_data_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -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/completion_service.proto
|
3
4
|
|
@@ -11,31 +12,32 @@ require 'google/cloud/retail/v2/common_pb'
|
|
11
12
|
require 'google/cloud/retail/v2/import_config_pb'
|
12
13
|
require 'google/longrunning/operations_pb'
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
optional :recent_search, :string, 1
|
15
|
+
|
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\"\xdd\x01\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\x0e\n\x06\x65ntity\x18\n \x01(\t\"\x85\x04\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_\n\x15recent_search_results\x18\x03 \x03(\x0b\x32@.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult\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(\t2\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\x82\xd3\xe4\x93\x02I\"D/v2/{parent=projects/*/locations/*/catalogs/*}/completionData:import:\x01*\xca\x41\\\n3google.cloud.retail.v2.ImportCompletionDataResponse\x12%google.cloud.retail.v2.ImportMetadata\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
|
+
|
18
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
|
+
|
20
|
+
begin
|
21
|
+
pool.add_serialized_file(descriptor_data)
|
22
|
+
rescue TypeError => e
|
23
|
+
# Compatibility code: will be removed in the next major version.
|
24
|
+
require 'google/protobuf/descriptor_pb'
|
25
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
26
|
+
parsed.clear_dependency
|
27
|
+
serialized = parsed.class.encode(parsed)
|
28
|
+
file = pool.add_serialized_file(serialized)
|
29
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
30
|
+
imports = [
|
31
|
+
["google.cloud.retail.v2.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
37
|
end
|
38
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."
|
39
41
|
end
|
40
42
|
|
41
43
|
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/control.proto
|
3
4
|
|
@@ -7,19 +8,32 @@ require 'google/api/field_behavior_pb'
|
|
7
8
|
require 'google/api/resource_pb'
|
8
9
|
require 'google/cloud/retail/v2/common_pb'
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
11
|
+
|
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
|
+
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
|
+
|
16
|
+
begin
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
18
|
+
rescue TypeError => e
|
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}"
|
21
33
|
end
|
22
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."
|
23
37
|
end
|
24
38
|
|
25
39
|
module Google
|
@@ -124,7 +124,7 @@ module Google
|
|
124
124
|
credentials = @config.credentials
|
125
125
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
126
126
|
# but only if the default endpoint does not have a region prefix.
|
127
|
-
enable_self_signed_jwt = @config.endpoint ==
|
127
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
128
128
|
!@config.endpoint.split(".").first.include?("-")
|
129
129
|
credentials ||= Credentials.default scope: @config.scope,
|
130
130
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -715,7 +715,9 @@ module Google
|
|
715
715
|
class Configuration
|
716
716
|
extend ::Gapic::Config
|
717
717
|
|
718
|
-
|
718
|
+
DEFAULT_ENDPOINT = "retail.googleapis.com"
|
719
|
+
|
720
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
719
721
|
config_attr :credentials, nil do |value|
|
720
722
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
721
723
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -120,7 +120,7 @@ module Google
|
|
120
120
|
credentials = @config.credentials
|
121
121
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
122
122
|
# but only if the default endpoint does not have a region prefix.
|
123
|
-
enable_self_signed_jwt = @config.endpoint ==
|
123
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
124
124
|
!@config.endpoint.split(".").first.include?("-")
|
125
125
|
credentials ||= Credentials.default scope: @config.scope,
|
126
126
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -578,7 +578,9 @@ module Google
|
|
578
578
|
class Configuration
|
579
579
|
extend ::Gapic::Config
|
580
580
|
|
581
|
-
|
581
|
+
DEFAULT_ENDPOINT = "retail.googleapis.com"
|
582
|
+
|
583
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
582
584
|
config_attr :credentials, nil do |value|
|
583
585
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
584
586
|
allowed.any? { |klass| klass === value }
|
@@ -59,7 +59,7 @@ module Google
|
|
59
59
|
|
60
60
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_control_request request_pb
|
61
61
|
query_string_params = if query_string_params.any?
|
62
|
-
query_string_params.to_h { |p| p.split
|
62
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
63
63
|
else
|
64
64
|
{}
|
65
65
|
end
|
@@ -97,7 +97,7 @@ module Google
|
|
97
97
|
|
98
98
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_control_request request_pb
|
99
99
|
query_string_params = if query_string_params.any?
|
100
|
-
query_string_params.to_h { |p| p.split
|
100
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
101
101
|
else
|
102
102
|
{}
|
103
103
|
end
|
@@ -135,7 +135,7 @@ module Google
|
|
135
135
|
|
136
136
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_control_request request_pb
|
137
137
|
query_string_params = if query_string_params.any?
|
138
|
-
query_string_params.to_h { |p| p.split
|
138
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
139
139
|
else
|
140
140
|
{}
|
141
141
|
end
|
@@ -173,7 +173,7 @@ module Google
|
|
173
173
|
|
174
174
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_control_request request_pb
|
175
175
|
query_string_params = if query_string_params.any?
|
176
|
-
query_string_params.to_h { |p| p.split
|
176
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
177
177
|
else
|
178
178
|
{}
|
179
179
|
end
|
@@ -211,7 +211,7 @@ module Google
|
|
211
211
|
|
212
212
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_controls_request request_pb
|
213
213
|
query_string_params = if query_string_params.any?
|
214
|
-
query_string_params.to_h { |p| p.split
|
214
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
215
215
|
else
|
216
216
|
{}
|
217
217
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/retail/v2/control_service.proto
|
3
4
|
|
@@ -11,34 +12,33 @@ require 'google/cloud/retail/v2/control_pb'
|
|
11
12
|
require 'google/protobuf/empty_pb'
|
12
13
|
require 'google/protobuf/field_mask_pb'
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
add_message "google.cloud.retail.v2.ListControlsResponse" do
|
38
|
-
repeated :controls, :message, 1, "google.cloud.retail.v2.Control"
|
39
|
-
optional :next_page_token, :string, 2
|
15
|
+
|
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\x82\xd3\xe4\x93\x02\x42\"7/v2/{parent=projects/*/locations/*/catalogs/*}/controls:\x07\x63ontrol\xda\x41\x19parent,control,control_id\x12\x9d\x01\n\rDeleteControl\x12,.google.cloud.retail.v2.DeleteControlRequest\x1a\x16.google.protobuf.Empty\"F\x82\xd3\xe4\x93\x02\x39*7/v2/{name=projects/*/locations/*/catalogs/*/controls/*}\xda\x41\x04name\x12\xc6\x01\n\rUpdateControl\x12,.google.cloud.retail.v2.UpdateControlRequest\x1a\x1f.google.cloud.retail.v2.Control\"f\x82\xd3\xe4\x93\x02J2?/v2/{control.name=projects/*/locations/*/catalogs/*/controls/*}:\x07\x63ontrol\xda\x41\x13\x63ontrol,update_mask\x12\xa0\x01\n\nGetControl\x12).google.cloud.retail.v2.GetControlRequest\x1a\x1f.google.cloud.retail.v2.Control\"F\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{name=projects/*/locations/*/catalogs/*/controls/*}\xda\x41\x04name\x12\xb3\x01\n\x0cListControls\x12+.google.cloud.retail.v2.ListControlsRequest\x1a,.google.cloud.retail.v2.ListControlsResponse\"H\x82\xd3\xe4\x93\x02\x39\x12\x37/v2/{parent=projects/*/locations/*/catalogs/*}/controls\xda\x41\x06parent\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
|
+
|
18
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
19
|
+
|
20
|
+
begin
|
21
|
+
pool.add_serialized_file(descriptor_data)
|
22
|
+
rescue TypeError => e
|
23
|
+
# Compatibility code: will be removed in the next major version.
|
24
|
+
require 'google/protobuf/descriptor_pb'
|
25
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
26
|
+
parsed.clear_dependency
|
27
|
+
serialized = parsed.class.encode(parsed)
|
28
|
+
file = pool.add_serialized_file(serialized)
|
29
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
30
|
+
imports = [
|
31
|
+
["google.cloud.retail.v2.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}"
|
40
38
|
end
|
41
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
42
|
end
|
43
43
|
|
44
44
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/cloud/retail/v2/import_config.proto
|
3
4
|
|
@@ -12,101 +13,37 @@ require 'google/protobuf/timestamp_pb'
|
|
12
13
|
require 'google/rpc/status_pb'
|
13
14
|
require 'google/type/date_pb'
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
add_message "google.cloud.retail.v2.ImportProductsRequest" do
|
43
|
-
optional :parent, :string, 1
|
44
|
-
optional :request_id, :string, 6
|
45
|
-
optional :input_config, :message, 2, "google.cloud.retail.v2.ProductInputConfig"
|
46
|
-
optional :errors_config, :message, 3, "google.cloud.retail.v2.ImportErrorsConfig"
|
47
|
-
optional :update_mask, :message, 4, "google.protobuf.FieldMask"
|
48
|
-
optional :reconciliation_mode, :enum, 5, "google.cloud.retail.v2.ImportProductsRequest.ReconciliationMode"
|
49
|
-
optional :notification_pubsub_topic, :string, 7
|
50
|
-
end
|
51
|
-
add_enum "google.cloud.retail.v2.ImportProductsRequest.ReconciliationMode" do
|
52
|
-
value :RECONCILIATION_MODE_UNSPECIFIED, 0
|
53
|
-
value :INCREMENTAL, 1
|
54
|
-
value :FULL, 2
|
55
|
-
end
|
56
|
-
add_message "google.cloud.retail.v2.ImportUserEventsRequest" do
|
57
|
-
optional :parent, :string, 1
|
58
|
-
optional :input_config, :message, 2, "google.cloud.retail.v2.UserEventInputConfig"
|
59
|
-
optional :errors_config, :message, 3, "google.cloud.retail.v2.ImportErrorsConfig"
|
60
|
-
end
|
61
|
-
add_message "google.cloud.retail.v2.ImportCompletionDataRequest" do
|
62
|
-
optional :parent, :string, 1
|
63
|
-
optional :input_config, :message, 2, "google.cloud.retail.v2.CompletionDataInputConfig"
|
64
|
-
optional :notification_pubsub_topic, :string, 3
|
65
|
-
end
|
66
|
-
add_message "google.cloud.retail.v2.ProductInputConfig" do
|
67
|
-
oneof :source do
|
68
|
-
optional :product_inline_source, :message, 1, "google.cloud.retail.v2.ProductInlineSource"
|
69
|
-
optional :gcs_source, :message, 2, "google.cloud.retail.v2.GcsSource"
|
70
|
-
optional :big_query_source, :message, 3, "google.cloud.retail.v2.BigQuerySource"
|
71
|
-
end
|
72
|
-
end
|
73
|
-
add_message "google.cloud.retail.v2.UserEventInputConfig" do
|
74
|
-
oneof :source do
|
75
|
-
optional :user_event_inline_source, :message, 1, "google.cloud.retail.v2.UserEventInlineSource"
|
76
|
-
optional :gcs_source, :message, 2, "google.cloud.retail.v2.GcsSource"
|
77
|
-
optional :big_query_source, :message, 3, "google.cloud.retail.v2.BigQuerySource"
|
78
|
-
end
|
79
|
-
end
|
80
|
-
add_message "google.cloud.retail.v2.CompletionDataInputConfig" do
|
81
|
-
oneof :source do
|
82
|
-
optional :big_query_source, :message, 1, "google.cloud.retail.v2.BigQuerySource"
|
83
|
-
end
|
84
|
-
end
|
85
|
-
add_message "google.cloud.retail.v2.ImportMetadata" do
|
86
|
-
optional :create_time, :message, 1, "google.protobuf.Timestamp"
|
87
|
-
optional :update_time, :message, 2, "google.protobuf.Timestamp"
|
88
|
-
optional :success_count, :int64, 3
|
89
|
-
optional :failure_count, :int64, 4
|
90
|
-
optional :request_id, :string, 5
|
91
|
-
optional :notification_pubsub_topic, :string, 6
|
92
|
-
end
|
93
|
-
add_message "google.cloud.retail.v2.ImportProductsResponse" do
|
94
|
-
repeated :error_samples, :message, 1, "google.rpc.Status"
|
95
|
-
optional :errors_config, :message, 2, "google.cloud.retail.v2.ImportErrorsConfig"
|
96
|
-
end
|
97
|
-
add_message "google.cloud.retail.v2.ImportUserEventsResponse" do
|
98
|
-
repeated :error_samples, :message, 1, "google.rpc.Status"
|
99
|
-
optional :errors_config, :message, 2, "google.cloud.retail.v2.ImportErrorsConfig"
|
100
|
-
optional :import_summary, :message, 3, "google.cloud.retail.v2.UserEventImportSummary"
|
101
|
-
end
|
102
|
-
add_message "google.cloud.retail.v2.UserEventImportSummary" do
|
103
|
-
optional :joined_events_count, :int64, 1
|
104
|
-
optional :unjoined_events_count, :int64, 2
|
105
|
-
end
|
106
|
-
add_message "google.cloud.retail.v2.ImportCompletionDataResponse" do
|
107
|
-
repeated :error_samples, :message, 1, "google.rpc.Status"
|
16
|
+
|
17
|
+
descriptor_data = "\n*google/cloud/retail/v2/import_config.proto\x12\x16google.cloud.retail.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/retail/v2/product.proto\x1a\'google/cloud/retail/v2/user_event.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\x1a\x16google/type/date.proto\"9\n\tGcsSource\x12\x17\n\ninput_uris\x18\x01 \x03(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64\x61ta_schema\x18\x02 \x01(\t\"\xbc\x01\n\x0e\x42igQuerySource\x12+\n\x0epartition_date\x18\x06 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x12\n\nproject_id\x18\x05 \x01(\t\x12\x17\n\ndataset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08table_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0fgcs_staging_dir\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x61ta_schema\x18\x04 \x01(\tB\x0b\n\tpartition\"M\n\x13ProductInlineSource\x12\x36\n\x08products\x18\x01 \x03(\x0b\x32\x1f.google.cloud.retail.v2.ProductB\x03\xe0\x41\x02\"T\n\x15UserEventInlineSource\x12;\n\x0buser_events\x18\x01 \x03(\x0b\x32!.google.cloud.retail.v2.UserEventB\x03\xe0\x41\x02\"9\n\x12ImportErrorsConfig\x12\x14\n\ngcs_prefix\x18\x01 \x01(\tH\x00\x42\r\n\x0b\x64\x65stination\"\xf8\x03\n\x15ImportProductsRequest\x12\x34\n\x06parent\x18\x01 \x01(\tB$\xe0\x41\x02\xfa\x41\x1e\n\x1cretail.googleapis.com/Branch\x12\x16\n\nrequest_id\x18\x06 \x01(\tB\x02\x18\x01\x12\x45\n\x0cinput_config\x18\x02 \x01(\x0b\x32*.google.cloud.retail.v2.ProductInputConfigB\x03\xe0\x41\x02\x12\x41\n\rerrors_config\x18\x03 \x01(\x0b\x32*.google.cloud.retail.v2.ImportErrorsConfig\x12/\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12]\n\x13reconciliation_mode\x18\x05 \x01(\x0e\x32@.google.cloud.retail.v2.ImportProductsRequest.ReconciliationMode\x12!\n\x19notification_pubsub_topic\x18\x07 \x01(\t\"T\n\x12ReconciliationMode\x12#\n\x1fRECONCILIATION_MODE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bINCREMENTAL\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\"\xdc\x01\n\x17ImportUserEventsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12G\n\x0cinput_config\x18\x02 \x01(\x0b\x32,.google.cloud.retail.v2.UserEventInputConfigB\x03\xe0\x41\x02\x12\x41\n\rerrors_config\x18\x03 \x01(\x0b\x32*.google.cloud.retail.v2.ImportErrorsConfig\"\xc5\x01\n\x1bImportCompletionDataRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1dretail.googleapis.com/Catalog\x12L\n\x0cinput_config\x18\x02 \x01(\x0b\x32\x31.google.cloud.retail.v2.CompletionDataInputConfigB\x03\xe0\x41\x02\x12!\n\x19notification_pubsub_topic\x18\x03 \x01(\t\"\xe9\x01\n\x12ProductInputConfig\x12L\n\x15product_inline_source\x18\x01 \x01(\x0b\x32+.google.cloud.retail.v2.ProductInlineSourceH\x00\x12\x37\n\ngcs_source\x18\x02 \x01(\x0b\x32!.google.cloud.retail.v2.GcsSourceH\x00\x12\x42\n\x10\x62ig_query_source\x18\x03 \x01(\x0b\x32&.google.cloud.retail.v2.BigQuerySourceH\x00\x42\x08\n\x06source\"\xff\x01\n\x14UserEventInputConfig\x12V\n\x18user_event_inline_source\x18\x01 \x01(\x0b\x32-.google.cloud.retail.v2.UserEventInlineSourceB\x03\xe0\x41\x02H\x00\x12<\n\ngcs_source\x18\x02 \x01(\x0b\x32!.google.cloud.retail.v2.GcsSourceB\x03\xe0\x41\x02H\x00\x12G\n\x10\x62ig_query_source\x18\x03 \x01(\x0b\x32&.google.cloud.retail.v2.BigQuerySourceB\x03\xe0\x41\x02H\x00\x42\x08\n\x06source\"n\n\x19\x43ompletionDataInputConfig\x12G\n\x10\x62ig_query_source\x18\x01 \x01(\x0b\x32&.google.cloud.retail.v2.BigQuerySourceB\x03\xe0\x41\x02H\x00\x42\x08\n\x06source\"\xdb\x01\n\x0eImportMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rsuccess_count\x18\x03 \x01(\x03\x12\x15\n\rfailure_count\x18\x04 \x01(\x03\x12\x16\n\nrequest_id\x18\x05 \x01(\tB\x02\x18\x01\x12!\n\x19notification_pubsub_topic\x18\x06 \x01(\t\"\x86\x01\n\x16ImportProductsResponse\x12)\n\rerror_samples\x18\x01 \x03(\x0b\x32\x12.google.rpc.Status\x12\x41\n\rerrors_config\x18\x02 \x01(\x0b\x32*.google.cloud.retail.v2.ImportErrorsConfig\"\xd0\x01\n\x18ImportUserEventsResponse\x12)\n\rerror_samples\x18\x01 \x03(\x0b\x32\x12.google.rpc.Status\x12\x41\n\rerrors_config\x18\x02 \x01(\x0b\x32*.google.cloud.retail.v2.ImportErrorsConfig\x12\x46\n\x0eimport_summary\x18\x03 \x01(\x0b\x32..google.cloud.retail.v2.UserEventImportSummary\"T\n\x16UserEventImportSummary\x12\x1b\n\x13joined_events_count\x18\x01 \x01(\x03\x12\x1d\n\x15unjoined_events_count\x18\x02 \x01(\x03\"I\n\x1cImportCompletionDataResponse\x12)\n\rerror_samples\x18\x01 \x03(\x0b\x32\x12.google.rpc.StatusB\xbc\x01\n\x1a\x63om.google.cloud.retail.v2B\x11ImportConfigProtoP\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.type.Date", "google/type/date.proto"],
|
33
|
+
["google.cloud.retail.v2.Product", "google/cloud/retail/v2/product.proto"],
|
34
|
+
["google.cloud.retail.v2.UserEvent", "google/cloud/retail/v2/user_event.proto"],
|
35
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
36
|
+
["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
|
37
|
+
["google.rpc.Status", "google/rpc/status.proto"],
|
38
|
+
]
|
39
|
+
imports.each do |type_name, expected_filename|
|
40
|
+
import_file = pool.lookup(type_name).file_descriptor
|
41
|
+
if import_file.name != expected_filename
|
42
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
108
43
|
end
|
109
44
|
end
|
45
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
46
|
+
warn "This will become an error in the next major version."
|
110
47
|
end
|
111
48
|
|
112
49
|
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/model.proto
|
3
4
|
|
@@ -8,50 +9,32 @@ require 'google/api/resource_pb'
|
|
8
9
|
require 'google/cloud/retail/v2/common_pb'
|
9
10
|
require 'google/protobuf/timestamp_pb'
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
value :SERVING_STATE_UNSPECIFIED, 0
|
34
|
-
value :INACTIVE, 1
|
35
|
-
value :ACTIVE, 2
|
36
|
-
value :TUNED, 3
|
37
|
-
end
|
38
|
-
add_enum "google.cloud.retail.v2.Model.TrainingState" do
|
39
|
-
value :TRAINING_STATE_UNSPECIFIED, 0
|
40
|
-
value :PAUSED, 1
|
41
|
-
value :TRAINING, 2
|
42
|
-
end
|
43
|
-
add_enum "google.cloud.retail.v2.Model.PeriodicTuningState" do
|
44
|
-
value :PERIODIC_TUNING_STATE_UNSPECIFIED, 0
|
45
|
-
value :PERIODIC_TUNING_DISABLED, 1
|
46
|
-
value :ALL_TUNING_DISABLED, 3
|
47
|
-
value :PERIODIC_TUNING_ENABLED, 2
|
48
|
-
end
|
49
|
-
add_enum "google.cloud.retail.v2.Model.DataState" do
|
50
|
-
value :DATA_STATE_UNSPECIFIED, 0
|
51
|
-
value :DATA_OK, 1
|
52
|
-
value :DATA_ERROR, 2
|
12
|
+
|
13
|
+
descriptor_data = "\n\"google/cloud/retail/v2/model.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\x1fgoogle/protobuf/timestamp.proto\"\xa2\n\n\x05Model\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12H\n\x0etraining_state\x18\x03 \x01(\x0e\x32+.google.cloud.retail.v2.Model.TrainingStateB\x03\xe0\x41\x01\x12\x46\n\rserving_state\x18\x04 \x01(\x0e\x32*.google.cloud.retail.v2.Model.ServingStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x07 \x01(\tB\x03\xe0\x41\x02\x12#\n\x16optimization_objective\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12U\n\x15periodic_tuning_state\x18\x0b \x01(\x0e\x32\x31.google.cloud.retail.v2.Model.PeriodicTuningStateB\x03\xe0\x41\x01\x12\x37\n\x0elast_tune_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1d\n\x10tuning_operation\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12@\n\ndata_state\x18\x10 \x01(\x0e\x32\'.google.cloud.retail.v2.Model.DataStateB\x03\xe0\x41\x03\x12U\n\x10\x66iltering_option\x18\x12 \x01(\x0e\x32\x36.google.cloud.retail.v2.RecommendationsFilteringOptionB\x03\xe0\x41\x01\x12R\n\x14serving_config_lists\x18\x13 \x03(\x0b\x32/.google.cloud.retail.v2.Model.ServingConfigListB\x03\xe0\x41\x03\x1a\x34\n\x11ServingConfigList\x12\x1f\n\x12serving_config_ids\x18\x01 \x03(\tB\x03\xe0\x41\x01\"R\n\x0cServingState\x12\x1d\n\x19SERVING_STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08INACTIVE\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\t\n\x05TUNED\x10\x03\"I\n\rTrainingState\x12\x1e\n\x1aTRAINING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06PAUSED\x10\x01\x12\x0c\n\x08TRAINING\x10\x02\"\x90\x01\n\x13PeriodicTuningState\x12%\n!PERIODIC_TUNING_STATE_UNSPECIFIED\x10\x00\x12\x1c\n\x18PERIODIC_TUNING_DISABLED\x10\x01\x12\x17\n\x13\x41LL_TUNING_DISABLED\x10\x03\x12\x1b\n\x17PERIODIC_TUNING_ENABLED\x10\x02\"D\n\tDataState\x12\x1a\n\x16\x44\x41TA_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x41TA_OK\x10\x01\x12\x0e\n\nDATA_ERROR\x10\x02:k\xea\x41h\n\x1bretail.googleapis.com/Model\x12Iprojects/{project}/locations/{location}/catalogs/{catalog}/models/{model}B\xb5\x01\n\x1a\x63om.google.cloud.retail.v2B\nModelProtoP\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.protobuf.Timestamp", "google/protobuf/timestamp.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}"
|
53
34
|
end
|
54
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."
|
55
38
|
end
|
56
39
|
|
57
40
|
module Google
|
@@ -140,7 +140,7 @@ module Google
|
|
140
140
|
credentials = @config.credentials
|
141
141
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
142
142
|
# but only if the default endpoint does not have a region prefix.
|
143
|
-
enable_self_signed_jwt = @config.endpoint ==
|
143
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
144
144
|
!@config.endpoint.split(".").first.include?("-")
|
145
145
|
credentials ||= Credentials.default scope: @config.scope,
|
146
146
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -1001,7 +1001,9 @@ module Google
|
|
1001
1001
|
class Configuration
|
1002
1002
|
extend ::Gapic::Config
|
1003
1003
|
|
1004
|
-
|
1004
|
+
DEFAULT_ENDPOINT = "retail.googleapis.com"
|
1005
|
+
|
1006
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
1005
1007
|
config_attr :credentials, nil do |value|
|
1006
1008
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1007
1009
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -664,7 +664,9 @@ module Google
|
|
664
664
|
class Configuration
|
665
665
|
extend ::Gapic::Config
|
666
666
|
|
667
|
-
|
667
|
+
DEFAULT_ENDPOINT = "retail.googleapis.com"
|
668
|
+
|
669
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
668
670
|
config_attr :credentials, nil do |value|
|
669
671
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
670
672
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -136,7 +136,7 @@ module Google
|
|
136
136
|
credentials = @config.credentials
|
137
137
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
138
138
|
# but only if the default endpoint does not have a region prefix.
|
139
|
-
enable_self_signed_jwt = @config.endpoint ==
|
139
|
+
enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
140
140
|
!@config.endpoint.split(".").first.include?("-")
|
141
141
|
credentials ||= Credentials.default scope: @config.scope,
|
142
142
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -781,7 +781,9 @@ module Google
|
|
781
781
|
class Configuration
|
782
782
|
extend ::Gapic::Config
|
783
783
|
|
784
|
-
|
784
|
+
DEFAULT_ENDPOINT = "retail.googleapis.com"
|
785
|
+
|
786
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
785
787
|
config_attr :credentials, nil do |value|
|
786
788
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
787
789
|
allowed.any? { |klass| klass === value }
|