google-cloud-recommendation_engine-v1beta1 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -101
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/client.rb +32 -8
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/operations.rb +28 -6
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/rest/client.rb +34 -7
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/rest/operations.rb +33 -8
- data/lib/google/cloud/recommendation_engine/v1beta1/catalog_service/rest/service_stub.rb +14 -2
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/client.rb +31 -8
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/rest/client.rb +33 -7
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/rest/service_stub.rb +14 -2
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/client.rb +31 -8
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/rest/client.rb +33 -7
- data/lib/google/cloud/recommendation_engine/v1beta1/prediction_service/rest/service_stub.rb +14 -2
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/client.rb +32 -8
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/operations.rb +28 -6
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/rest/client.rb +34 -7
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/rest/operations.rb +33 -8
- data/lib/google/cloud/recommendation_engine/v1beta1/user_event_service/rest/service_stub.rb +14 -2
- data/lib/google/cloud/recommendation_engine/v1beta1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -0
- metadata +5 -5
@@ -34,6 +34,9 @@ module Google
|
|
34
34
|
# key. You can register up to 20 API keys per project.
|
35
35
|
#
|
36
36
|
class Client
|
37
|
+
# @private
|
38
|
+
DEFAULT_ENDPOINT_TEMPLATE = "recommendationengine.$UNIVERSE_DOMAIN$"
|
39
|
+
|
37
40
|
include Paths
|
38
41
|
|
39
42
|
# @private
|
@@ -109,6 +112,15 @@ module Google
|
|
109
112
|
@config
|
110
113
|
end
|
111
114
|
|
115
|
+
##
|
116
|
+
# The effective universe domain
|
117
|
+
#
|
118
|
+
# @return [String]
|
119
|
+
#
|
120
|
+
def universe_domain
|
121
|
+
@prediction_api_key_registry_stub.universe_domain
|
122
|
+
end
|
123
|
+
|
112
124
|
##
|
113
125
|
# Create a new PredictionApiKeyRegistry client object.
|
114
126
|
#
|
@@ -142,8 +154,9 @@ module Google
|
|
142
154
|
credentials = @config.credentials
|
143
155
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
144
156
|
# but only if the default endpoint does not have a region prefix.
|
145
|
-
enable_self_signed_jwt = @config.endpoint
|
146
|
-
|
157
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
158
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
159
|
+
!@config.endpoint.split(".").first.include?("-"))
|
147
160
|
credentials ||= Credentials.default scope: @config.scope,
|
148
161
|
enable_self_signed_jwt: enable_self_signed_jwt
|
149
162
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -154,8 +167,10 @@ module Google
|
|
154
167
|
|
155
168
|
@prediction_api_key_registry_stub = ::Gapic::ServiceStub.new(
|
156
169
|
::Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Stub,
|
157
|
-
credentials:
|
158
|
-
endpoint:
|
170
|
+
credentials: credentials,
|
171
|
+
endpoint: @config.endpoint,
|
172
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
173
|
+
universe_domain: @config.universe_domain,
|
159
174
|
channel_args: @config.channel_args,
|
160
175
|
interceptors: @config.interceptors,
|
161
176
|
channel_pool_config: @config.channel_pool
|
@@ -464,9 +479,9 @@ module Google
|
|
464
479
|
# end
|
465
480
|
#
|
466
481
|
# @!attribute [rw] endpoint
|
467
|
-
#
|
468
|
-
#
|
469
|
-
# @return [::String]
|
482
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
483
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
484
|
+
# @return [::String,nil]
|
470
485
|
# @!attribute [rw] credentials
|
471
486
|
# Credentials to send with calls. You may provide any of the following types:
|
472
487
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -512,13 +527,20 @@ module Google
|
|
512
527
|
# @!attribute [rw] quota_project
|
513
528
|
# A separate project against which to charge quota.
|
514
529
|
# @return [::String]
|
530
|
+
# @!attribute [rw] universe_domain
|
531
|
+
# The universe domain within which to make requests. This determines the
|
532
|
+
# default endpoint URL. The default value of nil uses the environment
|
533
|
+
# universe (usually the default "googleapis.com" universe).
|
534
|
+
# @return [::String,nil]
|
515
535
|
#
|
516
536
|
class Configuration
|
517
537
|
extend ::Gapic::Config
|
518
538
|
|
539
|
+
# @private
|
540
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
519
541
|
DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
|
520
542
|
|
521
|
-
config_attr :endpoint,
|
543
|
+
config_attr :endpoint, nil, ::String, nil
|
522
544
|
config_attr :credentials, nil do |value|
|
523
545
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
524
546
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -533,6 +555,7 @@ module Google
|
|
533
555
|
config_attr :metadata, nil, ::Hash, nil
|
534
556
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
535
557
|
config_attr :quota_project, nil, ::String, nil
|
558
|
+
config_attr :universe_domain, nil, ::String, nil
|
536
559
|
|
537
560
|
# @private
|
538
561
|
def initialize parent_config = nil
|
data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/rest/client.rb
CHANGED
@@ -36,6 +36,9 @@ module Google
|
|
36
36
|
# key. You can register up to 20 API keys per project.
|
37
37
|
#
|
38
38
|
class Client
|
39
|
+
# @private
|
40
|
+
DEFAULT_ENDPOINT_TEMPLATE = "recommendationengine.$UNIVERSE_DOMAIN$"
|
41
|
+
|
39
42
|
include Paths
|
40
43
|
|
41
44
|
# @private
|
@@ -111,6 +114,15 @@ module Google
|
|
111
114
|
@config
|
112
115
|
end
|
113
116
|
|
117
|
+
##
|
118
|
+
# The effective universe domain
|
119
|
+
#
|
120
|
+
# @return [String]
|
121
|
+
#
|
122
|
+
def universe_domain
|
123
|
+
@prediction_api_key_registry_stub.universe_domain
|
124
|
+
end
|
125
|
+
|
114
126
|
##
|
115
127
|
# Create a new PredictionApiKeyRegistry REST client object.
|
116
128
|
#
|
@@ -138,8 +150,9 @@ module Google
|
|
138
150
|
credentials = @config.credentials
|
139
151
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
140
152
|
# but only if the default endpoint does not have a region prefix.
|
141
|
-
enable_self_signed_jwt = @config.endpoint
|
142
|
-
|
153
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
154
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
155
|
+
!@config.endpoint.split(".").first.include?("-"))
|
143
156
|
credentials ||= Credentials.default scope: @config.scope,
|
144
157
|
enable_self_signed_jwt: enable_self_signed_jwt
|
145
158
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -149,7 +162,12 @@ module Google
|
|
149
162
|
@quota_project_id = @config.quota_project
|
150
163
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
151
164
|
|
152
|
-
@prediction_api_key_registry_stub = ::Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Rest::ServiceStub.new
|
165
|
+
@prediction_api_key_registry_stub = ::Google::Cloud::RecommendationEngine::V1beta1::PredictionApiKeyRegistry::Rest::ServiceStub.new(
|
166
|
+
endpoint: @config.endpoint,
|
167
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
168
|
+
universe_domain: @config.universe_domain,
|
169
|
+
credentials: credentials
|
170
|
+
)
|
153
171
|
end
|
154
172
|
|
155
173
|
# Service calls
|
@@ -433,9 +451,9 @@ module Google
|
|
433
451
|
# end
|
434
452
|
#
|
435
453
|
# @!attribute [rw] endpoint
|
436
|
-
#
|
437
|
-
#
|
438
|
-
# @return [::String]
|
454
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
455
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
456
|
+
# @return [::String,nil]
|
439
457
|
# @!attribute [rw] credentials
|
440
458
|
# Credentials to send with calls. You may provide any of the following types:
|
441
459
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -472,13 +490,20 @@ module Google
|
|
472
490
|
# @!attribute [rw] quota_project
|
473
491
|
# A separate project against which to charge quota.
|
474
492
|
# @return [::String]
|
493
|
+
# @!attribute [rw] universe_domain
|
494
|
+
# The universe domain within which to make requests. This determines the
|
495
|
+
# default endpoint URL. The default value of nil uses the environment
|
496
|
+
# universe (usually the default "googleapis.com" universe).
|
497
|
+
# @return [::String,nil]
|
475
498
|
#
|
476
499
|
class Configuration
|
477
500
|
extend ::Gapic::Config
|
478
501
|
|
502
|
+
# @private
|
503
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
479
504
|
DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
|
480
505
|
|
481
|
-
config_attr :endpoint,
|
506
|
+
config_attr :endpoint, nil, ::String, nil
|
482
507
|
config_attr :credentials, nil do |value|
|
483
508
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
484
509
|
allowed.any? { |klass| klass === value }
|
@@ -490,6 +515,7 @@ module Google
|
|
490
515
|
config_attr :metadata, nil, ::Hash, nil
|
491
516
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
492
517
|
config_attr :quota_project, nil, ::String, nil
|
518
|
+
config_attr :universe_domain, nil, ::String, nil
|
493
519
|
|
494
520
|
# @private
|
495
521
|
def initialize parent_config = nil
|
data/lib/google/cloud/recommendation_engine/v1beta1/prediction_api_key_registry/rest/service_stub.rb
CHANGED
@@ -30,16 +30,28 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
def initialize endpoint:, credentials:
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
34
34
|
# These require statements are intentionally placed here to initialize
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
39
|
+
endpoint_template: endpoint_template,
|
40
|
+
universe_domain: universe_domain,
|
41
|
+
credentials: credentials,
|
39
42
|
numeric_enums: true,
|
40
43
|
raise_faraday_errors: false
|
41
44
|
end
|
42
45
|
|
46
|
+
##
|
47
|
+
# The effective universe domain
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
def universe_domain
|
52
|
+
@client_stub.universe_domain
|
53
|
+
end
|
54
|
+
|
43
55
|
##
|
44
56
|
# Baseline implementation for the create_prediction_api_key_registration REST call
|
45
57
|
#
|
@@ -30,6 +30,9 @@ module Google
|
|
30
30
|
# Service for making recommendation prediction.
|
31
31
|
#
|
32
32
|
class Client
|
33
|
+
# @private
|
34
|
+
DEFAULT_ENDPOINT_TEMPLATE = "recommendationengine.$UNIVERSE_DOMAIN$"
|
35
|
+
|
33
36
|
include Paths
|
34
37
|
|
35
38
|
# @private
|
@@ -95,6 +98,15 @@ module Google
|
|
95
98
|
@config
|
96
99
|
end
|
97
100
|
|
101
|
+
##
|
102
|
+
# The effective universe domain
|
103
|
+
#
|
104
|
+
# @return [String]
|
105
|
+
#
|
106
|
+
def universe_domain
|
107
|
+
@prediction_service_stub.universe_domain
|
108
|
+
end
|
109
|
+
|
98
110
|
##
|
99
111
|
# Create a new PredictionService client object.
|
100
112
|
#
|
@@ -128,8 +140,9 @@ module Google
|
|
128
140
|
credentials = @config.credentials
|
129
141
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
130
142
|
# but only if the default endpoint does not have a region prefix.
|
131
|
-
enable_self_signed_jwt = @config.endpoint
|
132
|
-
|
143
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
144
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
145
|
+
!@config.endpoint.split(".").first.include?("-"))
|
133
146
|
credentials ||= Credentials.default scope: @config.scope,
|
134
147
|
enable_self_signed_jwt: enable_self_signed_jwt
|
135
148
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -140,8 +153,10 @@ module Google
|
|
140
153
|
|
141
154
|
@prediction_service_stub = ::Gapic::ServiceStub.new(
|
142
155
|
::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Stub,
|
143
|
-
credentials:
|
144
|
-
endpoint:
|
156
|
+
credentials: credentials,
|
157
|
+
endpoint: @config.endpoint,
|
158
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
159
|
+
universe_domain: @config.universe_domain,
|
145
160
|
channel_args: @config.channel_args,
|
146
161
|
interceptors: @config.interceptors,
|
147
162
|
channel_pool_config: @config.channel_pool
|
@@ -360,9 +375,9 @@ module Google
|
|
360
375
|
# end
|
361
376
|
#
|
362
377
|
# @!attribute [rw] endpoint
|
363
|
-
#
|
364
|
-
#
|
365
|
-
# @return [::String]
|
378
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
379
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
380
|
+
# @return [::String,nil]
|
366
381
|
# @!attribute [rw] credentials
|
367
382
|
# Credentials to send with calls. You may provide any of the following types:
|
368
383
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -408,13 +423,20 @@ module Google
|
|
408
423
|
# @!attribute [rw] quota_project
|
409
424
|
# A separate project against which to charge quota.
|
410
425
|
# @return [::String]
|
426
|
+
# @!attribute [rw] universe_domain
|
427
|
+
# The universe domain within which to make requests. This determines the
|
428
|
+
# default endpoint URL. The default value of nil uses the environment
|
429
|
+
# universe (usually the default "googleapis.com" universe).
|
430
|
+
# @return [::String,nil]
|
411
431
|
#
|
412
432
|
class Configuration
|
413
433
|
extend ::Gapic::Config
|
414
434
|
|
435
|
+
# @private
|
436
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
415
437
|
DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
|
416
438
|
|
417
|
-
config_attr :endpoint,
|
439
|
+
config_attr :endpoint, nil, ::String, nil
|
418
440
|
config_attr :credentials, nil do |value|
|
419
441
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
420
442
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -429,6 +451,7 @@ module Google
|
|
429
451
|
config_attr :metadata, nil, ::Hash, nil
|
430
452
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
431
453
|
config_attr :quota_project, nil, ::String, nil
|
454
|
+
config_attr :universe_domain, nil, ::String, nil
|
432
455
|
|
433
456
|
# @private
|
434
457
|
def initialize parent_config = nil
|
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# Service for making recommendation prediction.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
DEFAULT_ENDPOINT_TEMPLATE = "recommendationengine.$UNIVERSE_DOMAIN$"
|
37
|
+
|
35
38
|
include Paths
|
36
39
|
|
37
40
|
# @private
|
@@ -97,6 +100,15 @@ module Google
|
|
97
100
|
@config
|
98
101
|
end
|
99
102
|
|
103
|
+
##
|
104
|
+
# The effective universe domain
|
105
|
+
#
|
106
|
+
# @return [String]
|
107
|
+
#
|
108
|
+
def universe_domain
|
109
|
+
@prediction_service_stub.universe_domain
|
110
|
+
end
|
111
|
+
|
100
112
|
##
|
101
113
|
# Create a new PredictionService REST client object.
|
102
114
|
#
|
@@ -124,8 +136,9 @@ module Google
|
|
124
136
|
credentials = @config.credentials
|
125
137
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
126
138
|
# but only if the default endpoint does not have a region prefix.
|
127
|
-
enable_self_signed_jwt = @config.endpoint
|
128
|
-
|
139
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
140
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
141
|
+
!@config.endpoint.split(".").first.include?("-"))
|
129
142
|
credentials ||= Credentials.default scope: @config.scope,
|
130
143
|
enable_self_signed_jwt: enable_self_signed_jwt
|
131
144
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -135,7 +148,12 @@ module Google
|
|
135
148
|
@quota_project_id = @config.quota_project
|
136
149
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
137
150
|
|
138
|
-
@prediction_service_stub = ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Rest::ServiceStub.new
|
151
|
+
@prediction_service_stub = ::Google::Cloud::RecommendationEngine::V1beta1::PredictionService::Rest::ServiceStub.new(
|
152
|
+
endpoint: @config.endpoint,
|
153
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
154
|
+
universe_domain: @config.universe_domain,
|
155
|
+
credentials: credentials
|
156
|
+
)
|
139
157
|
end
|
140
158
|
|
141
159
|
# Service calls
|
@@ -343,9 +361,9 @@ module Google
|
|
343
361
|
# end
|
344
362
|
#
|
345
363
|
# @!attribute [rw] endpoint
|
346
|
-
#
|
347
|
-
#
|
348
|
-
# @return [::String]
|
364
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
365
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
366
|
+
# @return [::String,nil]
|
349
367
|
# @!attribute [rw] credentials
|
350
368
|
# Credentials to send with calls. You may provide any of the following types:
|
351
369
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -382,13 +400,20 @@ module Google
|
|
382
400
|
# @!attribute [rw] quota_project
|
383
401
|
# A separate project against which to charge quota.
|
384
402
|
# @return [::String]
|
403
|
+
# @!attribute [rw] universe_domain
|
404
|
+
# The universe domain within which to make requests. This determines the
|
405
|
+
# default endpoint URL. The default value of nil uses the environment
|
406
|
+
# universe (usually the default "googleapis.com" universe).
|
407
|
+
# @return [::String,nil]
|
385
408
|
#
|
386
409
|
class Configuration
|
387
410
|
extend ::Gapic::Config
|
388
411
|
|
412
|
+
# @private
|
413
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
389
414
|
DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
|
390
415
|
|
391
|
-
config_attr :endpoint,
|
416
|
+
config_attr :endpoint, nil, ::String, nil
|
392
417
|
config_attr :credentials, nil do |value|
|
393
418
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
394
419
|
allowed.any? { |klass| klass === value }
|
@@ -400,6 +425,7 @@ module Google
|
|
400
425
|
config_attr :metadata, nil, ::Hash, nil
|
401
426
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
402
427
|
config_attr :quota_project, nil, ::String, nil
|
428
|
+
config_attr :universe_domain, nil, ::String, nil
|
403
429
|
|
404
430
|
# @private
|
405
431
|
def initialize parent_config = nil
|
@@ -30,16 +30,28 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
def initialize endpoint:, credentials:
|
33
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
|
34
34
|
# These require statements are intentionally placed here to initialize
|
35
35
|
# the REST modules only when it's required.
|
36
36
|
require "gapic/rest"
|
37
37
|
|
38
|
-
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
|
39
|
+
endpoint_template: endpoint_template,
|
40
|
+
universe_domain: universe_domain,
|
41
|
+
credentials: credentials,
|
39
42
|
numeric_enums: true,
|
40
43
|
raise_faraday_errors: false
|
41
44
|
end
|
42
45
|
|
46
|
+
##
|
47
|
+
# The effective universe domain
|
48
|
+
#
|
49
|
+
# @return [String]
|
50
|
+
#
|
51
|
+
def universe_domain
|
52
|
+
@client_stub.universe_domain
|
53
|
+
end
|
54
|
+
|
43
55
|
##
|
44
56
|
# Baseline implementation for the predict REST call
|
45
57
|
#
|
@@ -30,6 +30,9 @@ module Google
|
|
30
30
|
# Service for ingesting end user actions on the customer website.
|
31
31
|
#
|
32
32
|
class Client
|
33
|
+
# @private
|
34
|
+
DEFAULT_ENDPOINT_TEMPLATE = "recommendationengine.$UNIVERSE_DOMAIN$"
|
35
|
+
|
33
36
|
include Paths
|
34
37
|
|
35
38
|
# @private
|
@@ -115,6 +118,15 @@ module Google
|
|
115
118
|
@config
|
116
119
|
end
|
117
120
|
|
121
|
+
##
|
122
|
+
# The effective universe domain
|
123
|
+
#
|
124
|
+
# @return [String]
|
125
|
+
#
|
126
|
+
def universe_domain
|
127
|
+
@user_event_service_stub.universe_domain
|
128
|
+
end
|
129
|
+
|
118
130
|
##
|
119
131
|
# Create a new UserEventService client object.
|
120
132
|
#
|
@@ -148,8 +160,9 @@ module Google
|
|
148
160
|
credentials = @config.credentials
|
149
161
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
150
162
|
# but only if the default endpoint does not have a region prefix.
|
151
|
-
enable_self_signed_jwt = @config.endpoint
|
152
|
-
|
163
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
164
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
165
|
+
!@config.endpoint.split(".").first.include?("-"))
|
153
166
|
credentials ||= Credentials.default scope: @config.scope,
|
154
167
|
enable_self_signed_jwt: enable_self_signed_jwt
|
155
168
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -162,12 +175,15 @@ module Google
|
|
162
175
|
config.credentials = credentials
|
163
176
|
config.quota_project = @quota_project_id
|
164
177
|
config.endpoint = @config.endpoint
|
178
|
+
config.universe_domain = @config.universe_domain
|
165
179
|
end
|
166
180
|
|
167
181
|
@user_event_service_stub = ::Gapic::ServiceStub.new(
|
168
182
|
::Google::Cloud::RecommendationEngine::V1beta1::UserEventService::Stub,
|
169
|
-
credentials:
|
170
|
-
endpoint:
|
183
|
+
credentials: credentials,
|
184
|
+
endpoint: @config.endpoint,
|
185
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
186
|
+
universe_domain: @config.universe_domain,
|
171
187
|
channel_args: @config.channel_args,
|
172
188
|
interceptors: @config.interceptors,
|
173
189
|
channel_pool_config: @config.channel_pool
|
@@ -763,9 +779,9 @@ module Google
|
|
763
779
|
# end
|
764
780
|
#
|
765
781
|
# @!attribute [rw] endpoint
|
766
|
-
#
|
767
|
-
#
|
768
|
-
# @return [::String]
|
782
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
783
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
784
|
+
# @return [::String,nil]
|
769
785
|
# @!attribute [rw] credentials
|
770
786
|
# Credentials to send with calls. You may provide any of the following types:
|
771
787
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -811,13 +827,20 @@ module Google
|
|
811
827
|
# @!attribute [rw] quota_project
|
812
828
|
# A separate project against which to charge quota.
|
813
829
|
# @return [::String]
|
830
|
+
# @!attribute [rw] universe_domain
|
831
|
+
# The universe domain within which to make requests. This determines the
|
832
|
+
# default endpoint URL. The default value of nil uses the environment
|
833
|
+
# universe (usually the default "googleapis.com" universe).
|
834
|
+
# @return [::String,nil]
|
814
835
|
#
|
815
836
|
class Configuration
|
816
837
|
extend ::Gapic::Config
|
817
838
|
|
839
|
+
# @private
|
840
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
818
841
|
DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
|
819
842
|
|
820
|
-
config_attr :endpoint,
|
843
|
+
config_attr :endpoint, nil, ::String, nil
|
821
844
|
config_attr :credentials, nil do |value|
|
822
845
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
823
846
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -832,6 +855,7 @@ module Google
|
|
832
855
|
config_attr :metadata, nil, ::Hash, nil
|
833
856
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
834
857
|
config_attr :quota_project, nil, ::String, nil
|
858
|
+
config_attr :universe_domain, nil, ::String, nil
|
835
859
|
|
836
860
|
# @private
|
837
861
|
def initialize parent_config = nil
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module UserEventService
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
DEFAULT_ENDPOINT_TEMPLATE = "recommendationengine.$UNIVERSE_DOMAIN$"
|
31
|
+
|
29
32
|
# @private
|
30
33
|
attr_reader :operations_stub
|
31
34
|
|
@@ -60,6 +63,15 @@ module Google
|
|
60
63
|
@config
|
61
64
|
end
|
62
65
|
|
66
|
+
##
|
67
|
+
# The effective universe domain
|
68
|
+
#
|
69
|
+
# @return [String]
|
70
|
+
#
|
71
|
+
def universe_domain
|
72
|
+
@operations_stub.universe_domain
|
73
|
+
end
|
74
|
+
|
63
75
|
##
|
64
76
|
# Create a new Operations client object.
|
65
77
|
#
|
@@ -90,8 +102,10 @@ module Google
|
|
90
102
|
|
91
103
|
@operations_stub = ::Gapic::ServiceStub.new(
|
92
104
|
::Google::Longrunning::Operations::Stub,
|
93
|
-
credentials:
|
94
|
-
endpoint:
|
105
|
+
credentials: credentials,
|
106
|
+
endpoint: @config.endpoint,
|
107
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
108
|
+
universe_domain: @config.universe_domain,
|
95
109
|
channel_args: @config.channel_args,
|
96
110
|
interceptors: @config.interceptors,
|
97
111
|
channel_pool_config: @config.channel_pool
|
@@ -613,9 +627,9 @@ module Google
|
|
613
627
|
# end
|
614
628
|
#
|
615
629
|
# @!attribute [rw] endpoint
|
616
|
-
#
|
617
|
-
#
|
618
|
-
# @return [::String]
|
630
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
631
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
632
|
+
# @return [::String,nil]
|
619
633
|
# @!attribute [rw] credentials
|
620
634
|
# Credentials to send with calls. You may provide any of the following types:
|
621
635
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -661,13 +675,20 @@ module Google
|
|
661
675
|
# @!attribute [rw] quota_project
|
662
676
|
# A separate project against which to charge quota.
|
663
677
|
# @return [::String]
|
678
|
+
# @!attribute [rw] universe_domain
|
679
|
+
# The universe domain within which to make requests. This determines the
|
680
|
+
# default endpoint URL. The default value of nil uses the environment
|
681
|
+
# universe (usually the default "googleapis.com" universe).
|
682
|
+
# @return [::String,nil]
|
664
683
|
#
|
665
684
|
class Configuration
|
666
685
|
extend ::Gapic::Config
|
667
686
|
|
687
|
+
# @private
|
688
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
668
689
|
DEFAULT_ENDPOINT = "recommendationengine.googleapis.com"
|
669
690
|
|
670
|
-
config_attr :endpoint,
|
691
|
+
config_attr :endpoint, nil, ::String, nil
|
671
692
|
config_attr :credentials, nil do |value|
|
672
693
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
673
694
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -682,6 +703,7 @@ module Google
|
|
682
703
|
config_attr :metadata, nil, ::Hash, nil
|
683
704
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
684
705
|
config_attr :quota_project, nil, ::String, nil
|
706
|
+
config_attr :universe_domain, nil, ::String, nil
|
685
707
|
|
686
708
|
# @private
|
687
709
|
def initialize parent_config = nil
|