google-cloud-recommender-v1 0.3.2 → 0.3.3
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/AUTHENTICATION.md +6 -6
- data/README.md +1 -1
- data/lib/google/cloud/recommender/v1.rb +1 -1
- data/lib/google/cloud/recommender/v1/recommender.rb +1 -1
- data/lib/google/cloud/recommender/v1/recommender/client.rb +126 -126
- data/lib/google/cloud/recommender/v1/recommender/credentials.rb +1 -1
- data/lib/google/cloud/recommender/v1/recommender/paths.rb +7 -7
- data/lib/google/cloud/recommender/v1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +12 -12
- data/proto_docs/google/cloud/recommender/v1/recommendation.rb +56 -56
- data/proto_docs/google/cloud/recommender/v1/recommender_service.rb +40 -40
- data/proto_docs/google/protobuf/duration.rb +4 -4
- data/proto_docs/google/protobuf/struct.rb +18 -18
- data/proto_docs/google/protobuf/timestamp.rb +4 -4
- data/proto_docs/google/type/money.rb +5 -5
- 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: 76b110606c19b3d659b791e9a3431770484409e85ae31fee3a54f53173317d1d
|
4
|
+
data.tar.gz: 3a8e932360d298c605873ed1ddb5aff2ba1261e0fd1aff95ce3d8e753f0aee26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55d790ace960b66c0c12e49261a3e8581d55a2ab40c26976ac35a177008b09bb061863c8a8bbde365e017d014819715444aa2b970bf27d65488b6baaca53e037
|
7
|
+
data.tar.gz: 11633d0d9789f71e679f36e788dc6e8aa8b7b9bc7c5efb680a0a32b3dd4cabb0b13ddfaff10a34c8693aa309a5db96074eb59b9d29ebe6427043a400041f362f
|
data/AUTHENTICATION.md
CHANGED
@@ -27,7 +27,7 @@ export RECOMMENDER_CREDENTIALS=path/to/keyfile.json
|
|
27
27
|
```ruby
|
28
28
|
require "google/cloud/recommender/v1"
|
29
29
|
|
30
|
-
client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
30
|
+
client = ::Google::Cloud::Recommender::V1::Recommender::Client.new
|
31
31
|
```
|
32
32
|
|
33
33
|
## Credential Lookup
|
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
64
64
|
|
65
65
|
The environment variables that google-cloud-recommender-v1
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
{Google::Cloud::Recommender::V1::Recommender::Credentials}):
|
67
|
+
{::Google::Cloud::Recommender::V1::Recommender::Credentials}):
|
68
68
|
|
69
69
|
1. `RECOMMENDER_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
70
|
2. `RECOMMENDER_KEYFILE` - Path to JSON file, or JSON contents
|
@@ -77,7 +77,7 @@ require "google/cloud/recommender/v1"
|
|
77
77
|
|
78
78
|
ENV["RECOMMENDER_CREDENTIALS"] = "path/to/keyfile.json"
|
79
79
|
|
80
|
-
client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
80
|
+
client = ::Google::Cloud::Recommender::V1::Recommender::Client.new
|
81
81
|
```
|
82
82
|
|
83
83
|
### Configuration
|
@@ -88,7 +88,7 @@ environment variables. Either on an individual client initialization:
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/recommender/v1"
|
90
90
|
|
91
|
-
client = Google::Cloud::Recommender::V1::Recommender::Client.new do |config|
|
91
|
+
client = ::Google::Cloud::Recommender::V1::Recommender::Client.new do |config|
|
92
92
|
config.credentials = "path/to/keyfile.json"
|
93
93
|
end
|
94
94
|
```
|
@@ -98,11 +98,11 @@ Or configured globally for all clients:
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/recommender/v1"
|
100
100
|
|
101
|
-
Google::Cloud::Recommender::V1::Recommender::Client.configure do |config|
|
101
|
+
::Google::Cloud::Recommender::V1::Recommender::Client.configure do |config|
|
102
102
|
config.credentials = "path/to/keyfile.json"
|
103
103
|
end
|
104
104
|
|
105
|
-
client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
105
|
+
client = ::Google::Cloud::Recommender::V1::Recommender::Client.new
|
106
106
|
```
|
107
107
|
|
108
108
|
### Cloud SDK
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ In order to use this library, you first need to go through the following steps:
|
|
25
25
|
```ruby
|
26
26
|
require "google/cloud/recommender/v1"
|
27
27
|
|
28
|
-
client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
28
|
+
client = ::Google::Cloud::Recommender::V1::Recommender::Client.new
|
29
29
|
request = my_create_request
|
30
30
|
response = client.list_recommendations request
|
31
31
|
```
|
@@ -26,7 +26,7 @@ module Google
|
|
26
26
|
# To load this package, including all its services, and instantiate a client:
|
27
27
|
#
|
28
28
|
# require "google/cloud/recommender/v1"
|
29
|
-
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
29
|
+
# client = ::Google::Cloud::Recommender::V1::Recommender::Client.new
|
30
30
|
#
|
31
31
|
module V1
|
32
32
|
end
|
@@ -39,7 +39,7 @@ module Google
|
|
39
39
|
# To load this service and instantiate a client:
|
40
40
|
#
|
41
41
|
# require "google/cloud/recommender/v1/recommender"
|
42
|
-
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
42
|
+
# client = ::Google::Cloud::Recommender::V1::Recommender::Client.new
|
43
43
|
#
|
44
44
|
module Recommender
|
45
45
|
end
|
@@ -41,15 +41,15 @@ module Google
|
|
41
41
|
##
|
42
42
|
# Configure the Recommender Client class.
|
43
43
|
#
|
44
|
-
# See {Google::Cloud::Recommender::V1::Recommender::Client::Configuration}
|
44
|
+
# See {::Google::Cloud::Recommender::V1::Recommender::Client::Configuration}
|
45
45
|
# for a description of the configuration fields.
|
46
46
|
#
|
47
47
|
# ## Example
|
48
48
|
#
|
49
49
|
# To modify the configuration for all Recommender clients:
|
50
50
|
#
|
51
|
-
# Google::Cloud::Recommender::V1::Recommender::Client.configure do |config|
|
52
|
-
# config.timeout =
|
51
|
+
# ::Google::Cloud::Recommender::V1::Recommender::Client.configure do |config|
|
52
|
+
# config.timeout = 10.0
|
53
53
|
# end
|
54
54
|
#
|
55
55
|
# @yield [config] Configure the Client client.
|
@@ -103,7 +103,7 @@ module Google
|
|
103
103
|
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
104
104
|
# should be made on {Client.configure}.
|
105
105
|
#
|
106
|
-
# See {Google::Cloud::Recommender::V1::Recommender::Client::Configuration}
|
106
|
+
# See {::Google::Cloud::Recommender::V1::Recommender::Client::Configuration}
|
107
107
|
# for a description of the configuration fields.
|
108
108
|
#
|
109
109
|
# @yield [config] Configure the Client client.
|
@@ -124,13 +124,13 @@ module Google
|
|
124
124
|
# To create a new Recommender client with the default
|
125
125
|
# configuration:
|
126
126
|
#
|
127
|
-
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
127
|
+
# client = ::Google::Cloud::Recommender::V1::Recommender::Client.new
|
128
128
|
#
|
129
129
|
# To create a new Recommender client with a custom
|
130
130
|
# configuration:
|
131
131
|
#
|
132
|
-
# client = Google::Cloud::Recommender::V1::Recommender::Client.new do |config|
|
133
|
-
# config.timeout =
|
132
|
+
# client = ::Google::Cloud::Recommender::V1::Recommender::Client.new do |config|
|
133
|
+
# config.timeout = 10.0
|
134
134
|
# end
|
135
135
|
#
|
136
136
|
# @yield [config] Configure the Recommender client.
|
@@ -157,8 +157,8 @@ module Google
|
|
157
157
|
end
|
158
158
|
@quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
|
159
159
|
|
160
|
-
@recommender_stub = Gapic::ServiceStub.new(
|
161
|
-
Google::Cloud::Recommender::V1::Recommender::Stub,
|
160
|
+
@recommender_stub = ::Gapic::ServiceStub.new(
|
161
|
+
::Google::Cloud::Recommender::V1::Recommender::Stub,
|
162
162
|
credentials: credentials,
|
163
163
|
endpoint: @config.endpoint,
|
164
164
|
channel_args: @config.channel_args,
|
@@ -174,12 +174,12 @@ module Google
|
|
174
174
|
#
|
175
175
|
# @overload list_recommendations(request, options = nil)
|
176
176
|
# Pass arguments to `list_recommendations` via a request object, either of type
|
177
|
-
# {Google::Cloud::Recommender::V1::ListRecommendationsRequest} or an equivalent Hash.
|
177
|
+
# {::Google::Cloud::Recommender::V1::ListRecommendationsRequest} or an equivalent Hash.
|
178
178
|
#
|
179
|
-
# @param request [Google::Cloud::Recommender::V1::ListRecommendationsRequest, Hash]
|
179
|
+
# @param request [::Google::Cloud::Recommender::V1::ListRecommendationsRequest, ::Hash]
|
180
180
|
# A request object representing the call parameters. Required. To specify no
|
181
181
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
182
|
-
# @param options [Gapic::CallOptions, Hash]
|
182
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
183
183
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
184
184
|
#
|
185
185
|
# @overload list_recommendations(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
@@ -187,7 +187,7 @@ module Google
|
|
187
187
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
188
188
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
189
189
|
#
|
190
|
-
# @param parent [String]
|
190
|
+
# @param parent [::String]
|
191
191
|
# Required. The container resource on which to execute the request.
|
192
192
|
# Acceptable formats:
|
193
193
|
#
|
@@ -196,41 +196,41 @@ module Google
|
|
196
196
|
#
|
197
197
|
# LOCATION here refers to GCP Locations:
|
198
198
|
# https://cloud.google.com/about/locations/
|
199
|
-
# @param page_size [Integer]
|
199
|
+
# @param page_size [::Integer]
|
200
200
|
# Optional. The maximum number of results to return from this request. Non-positive
|
201
201
|
# values are ignored. If not specified, the server will determine the number
|
202
202
|
# of results to return.
|
203
|
-
# @param page_token [String]
|
203
|
+
# @param page_token [::String]
|
204
204
|
# Optional. If present, retrieves the next batch of results from the preceding call to
|
205
205
|
# this method. `page_token` must be the value of `next_page_token` from the
|
206
206
|
# previous response. The values of other method parameters must be identical
|
207
207
|
# to those in the previous call.
|
208
|
-
# @param filter [String]
|
208
|
+
# @param filter [::String]
|
209
209
|
# Filter expression to restrict the recommendations returned. Supported
|
210
210
|
# filter fields: state_info.state
|
211
211
|
# Eg: `state_info.state:"DISMISSED" or state_info.state:"FAILED"
|
212
212
|
#
|
213
213
|
# @yield [response, operation] Access the result along with the RPC operation
|
214
|
-
# @yieldparam response [Gapic::PagedEnumerable
|
215
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
214
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Recommender::V1::Recommendation>]
|
215
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
216
216
|
#
|
217
|
-
# @return [Gapic::PagedEnumerable
|
217
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Recommender::V1::Recommendation>]
|
218
218
|
#
|
219
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
219
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
220
220
|
#
|
221
221
|
def list_recommendations request, options = nil
|
222
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
222
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
223
223
|
|
224
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Recommender::V1::ListRecommendationsRequest
|
224
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Recommender::V1::ListRecommendationsRequest
|
225
225
|
|
226
226
|
# Converts hash and nil to an options object
|
227
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
227
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
228
228
|
|
229
229
|
# Customize the options with defaults
|
230
230
|
metadata = @config.rpcs.list_recommendations.metadata.to_h
|
231
231
|
|
232
232
|
# Set x-goog-api-client and x-goog-user-project headers
|
233
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
233
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
234
234
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
235
235
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
236
236
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -248,12 +248,12 @@ module Google
|
|
248
248
|
retry_policy: @config.retry_policy
|
249
249
|
|
250
250
|
@recommender_stub.call_rpc :list_recommendations, request, options: options do |response, operation|
|
251
|
-
response = Gapic::PagedEnumerable.new @recommender_stub, :list_recommendations, request, response, operation, options
|
251
|
+
response = ::Gapic::PagedEnumerable.new @recommender_stub, :list_recommendations, request, response, operation, options
|
252
252
|
yield response, operation if block_given?
|
253
253
|
return response
|
254
254
|
end
|
255
|
-
rescue GRPC::BadStatus => e
|
256
|
-
raise Google::Cloud::Error.from_error(e)
|
255
|
+
rescue ::GRPC::BadStatus => e
|
256
|
+
raise ::Google::Cloud::Error.from_error(e)
|
257
257
|
end
|
258
258
|
|
259
259
|
##
|
@@ -262,12 +262,12 @@ module Google
|
|
262
262
|
#
|
263
263
|
# @overload get_recommendation(request, options = nil)
|
264
264
|
# Pass arguments to `get_recommendation` via a request object, either of type
|
265
|
-
# {Google::Cloud::Recommender::V1::GetRecommendationRequest} or an equivalent Hash.
|
265
|
+
# {::Google::Cloud::Recommender::V1::GetRecommendationRequest} or an equivalent Hash.
|
266
266
|
#
|
267
|
-
# @param request [Google::Cloud::Recommender::V1::GetRecommendationRequest, Hash]
|
267
|
+
# @param request [::Google::Cloud::Recommender::V1::GetRecommendationRequest, ::Hash]
|
268
268
|
# A request object representing the call parameters. Required. To specify no
|
269
269
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
270
|
-
# @param options [Gapic::CallOptions, Hash]
|
270
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
271
271
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
272
272
|
#
|
273
273
|
# @overload get_recommendation(name: nil)
|
@@ -275,30 +275,30 @@ module Google
|
|
275
275
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
276
276
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
277
277
|
#
|
278
|
-
# @param name [String]
|
278
|
+
# @param name [::String]
|
279
279
|
# Required. Name of the recommendation.
|
280
280
|
#
|
281
281
|
# @yield [response, operation] Access the result along with the RPC operation
|
282
|
-
# @yieldparam response [Google::Cloud::Recommender::V1::Recommendation]
|
283
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
282
|
+
# @yieldparam response [::Google::Cloud::Recommender::V1::Recommendation]
|
283
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
284
284
|
#
|
285
|
-
# @return [Google::Cloud::Recommender::V1::Recommendation]
|
285
|
+
# @return [::Google::Cloud::Recommender::V1::Recommendation]
|
286
286
|
#
|
287
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
287
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
288
288
|
#
|
289
289
|
def get_recommendation request, options = nil
|
290
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
290
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
291
291
|
|
292
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Recommender::V1::GetRecommendationRequest
|
292
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Recommender::V1::GetRecommendationRequest
|
293
293
|
|
294
294
|
# Converts hash and nil to an options object
|
295
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
295
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
296
296
|
|
297
297
|
# Customize the options with defaults
|
298
298
|
metadata = @config.rpcs.get_recommendation.metadata.to_h
|
299
299
|
|
300
300
|
# Set x-goog-api-client and x-goog-user-project headers
|
301
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
301
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
302
302
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
303
303
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
304
304
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -319,8 +319,8 @@ module Google
|
|
319
319
|
yield response, operation if block_given?
|
320
320
|
return response
|
321
321
|
end
|
322
|
-
rescue GRPC::BadStatus => e
|
323
|
-
raise Google::Cloud::Error.from_error(e)
|
322
|
+
rescue ::GRPC::BadStatus => e
|
323
|
+
raise ::Google::Cloud::Error.from_error(e)
|
324
324
|
end
|
325
325
|
|
326
326
|
##
|
@@ -337,12 +337,12 @@ module Google
|
|
337
337
|
#
|
338
338
|
# @overload mark_recommendation_claimed(request, options = nil)
|
339
339
|
# Pass arguments to `mark_recommendation_claimed` via a request object, either of type
|
340
|
-
# {Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest} or an equivalent Hash.
|
340
|
+
# {::Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest} or an equivalent Hash.
|
341
341
|
#
|
342
|
-
# @param request [Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest, Hash]
|
342
|
+
# @param request [::Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest, ::Hash]
|
343
343
|
# A request object representing the call parameters. Required. To specify no
|
344
344
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
345
|
-
# @param options [Gapic::CallOptions, Hash]
|
345
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
346
346
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
347
347
|
#
|
348
348
|
# @overload mark_recommendation_claimed(name: nil, state_metadata: nil, etag: nil)
|
@@ -350,37 +350,37 @@ module Google
|
|
350
350
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
351
351
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
352
352
|
#
|
353
|
-
# @param name [String]
|
353
|
+
# @param name [::String]
|
354
354
|
# Required. Name of the recommendation.
|
355
|
-
# @param state_metadata [Hash{String => String}]
|
355
|
+
# @param state_metadata [::Hash{::String => ::String}]
|
356
356
|
# State properties to include with this state. Overwrites any existing
|
357
357
|
# `state_metadata`.
|
358
358
|
# Keys must match the regex /^[a-z0-9][a-z0-9_.-]\\{0,62}$/.
|
359
359
|
# Values must match the regex /^[a-zA-Z0-9_./-]\\{0,255}$/.
|
360
|
-
# @param etag [String]
|
360
|
+
# @param etag [::String]
|
361
361
|
# Required. Fingerprint of the Recommendation. Provides optimistic locking.
|
362
362
|
#
|
363
363
|
# @yield [response, operation] Access the result along with the RPC operation
|
364
|
-
# @yieldparam response [Google::Cloud::Recommender::V1::Recommendation]
|
365
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
364
|
+
# @yieldparam response [::Google::Cloud::Recommender::V1::Recommendation]
|
365
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
366
366
|
#
|
367
|
-
# @return [Google::Cloud::Recommender::V1::Recommendation]
|
367
|
+
# @return [::Google::Cloud::Recommender::V1::Recommendation]
|
368
368
|
#
|
369
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
369
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
370
370
|
#
|
371
371
|
def mark_recommendation_claimed request, options = nil
|
372
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
372
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
373
373
|
|
374
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest
|
374
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest
|
375
375
|
|
376
376
|
# Converts hash and nil to an options object
|
377
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
377
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
378
378
|
|
379
379
|
# Customize the options with defaults
|
380
380
|
metadata = @config.rpcs.mark_recommendation_claimed.metadata.to_h
|
381
381
|
|
382
382
|
# Set x-goog-api-client and x-goog-user-project headers
|
383
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
383
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
384
384
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
385
385
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
386
386
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -401,8 +401,8 @@ module Google
|
|
401
401
|
yield response, operation if block_given?
|
402
402
|
return response
|
403
403
|
end
|
404
|
-
rescue GRPC::BadStatus => e
|
405
|
-
raise Google::Cloud::Error.from_error(e)
|
404
|
+
rescue ::GRPC::BadStatus => e
|
405
|
+
raise ::Google::Cloud::Error.from_error(e)
|
406
406
|
end
|
407
407
|
|
408
408
|
##
|
@@ -419,12 +419,12 @@ module Google
|
|
419
419
|
#
|
420
420
|
# @overload mark_recommendation_succeeded(request, options = nil)
|
421
421
|
# Pass arguments to `mark_recommendation_succeeded` via a request object, either of type
|
422
|
-
# {Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest} or an equivalent Hash.
|
422
|
+
# {::Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest} or an equivalent Hash.
|
423
423
|
#
|
424
|
-
# @param request [Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest, Hash]
|
424
|
+
# @param request [::Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest, ::Hash]
|
425
425
|
# A request object representing the call parameters. Required. To specify no
|
426
426
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
427
|
-
# @param options [Gapic::CallOptions, Hash]
|
427
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
428
428
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
429
429
|
#
|
430
430
|
# @overload mark_recommendation_succeeded(name: nil, state_metadata: nil, etag: nil)
|
@@ -432,37 +432,37 @@ module Google
|
|
432
432
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
433
433
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
434
434
|
#
|
435
|
-
# @param name [String]
|
435
|
+
# @param name [::String]
|
436
436
|
# Required. Name of the recommendation.
|
437
|
-
# @param state_metadata [Hash{String => String}]
|
437
|
+
# @param state_metadata [::Hash{::String => ::String}]
|
438
438
|
# State properties to include with this state. Overwrites any existing
|
439
439
|
# `state_metadata`.
|
440
440
|
# Keys must match the regex /^[a-z0-9][a-z0-9_.-]\\{0,62}$/.
|
441
441
|
# Values must match the regex /^[a-zA-Z0-9_./-]\\{0,255}$/.
|
442
|
-
# @param etag [String]
|
442
|
+
# @param etag [::String]
|
443
443
|
# Required. Fingerprint of the Recommendation. Provides optimistic locking.
|
444
444
|
#
|
445
445
|
# @yield [response, operation] Access the result along with the RPC operation
|
446
|
-
# @yieldparam response [Google::Cloud::Recommender::V1::Recommendation]
|
447
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
446
|
+
# @yieldparam response [::Google::Cloud::Recommender::V1::Recommendation]
|
447
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
448
448
|
#
|
449
|
-
# @return [Google::Cloud::Recommender::V1::Recommendation]
|
449
|
+
# @return [::Google::Cloud::Recommender::V1::Recommendation]
|
450
450
|
#
|
451
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
451
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
452
452
|
#
|
453
453
|
def mark_recommendation_succeeded request, options = nil
|
454
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
454
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
455
455
|
|
456
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest
|
456
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest
|
457
457
|
|
458
458
|
# Converts hash and nil to an options object
|
459
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
459
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
460
460
|
|
461
461
|
# Customize the options with defaults
|
462
462
|
metadata = @config.rpcs.mark_recommendation_succeeded.metadata.to_h
|
463
463
|
|
464
464
|
# Set x-goog-api-client and x-goog-user-project headers
|
465
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
465
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
466
466
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
467
467
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
468
468
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -483,8 +483,8 @@ module Google
|
|
483
483
|
yield response, operation if block_given?
|
484
484
|
return response
|
485
485
|
end
|
486
|
-
rescue GRPC::BadStatus => e
|
487
|
-
raise Google::Cloud::Error.from_error(e)
|
486
|
+
rescue ::GRPC::BadStatus => e
|
487
|
+
raise ::Google::Cloud::Error.from_error(e)
|
488
488
|
end
|
489
489
|
|
490
490
|
##
|
@@ -501,12 +501,12 @@ module Google
|
|
501
501
|
#
|
502
502
|
# @overload mark_recommendation_failed(request, options = nil)
|
503
503
|
# Pass arguments to `mark_recommendation_failed` via a request object, either of type
|
504
|
-
# {Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest} or an equivalent Hash.
|
504
|
+
# {::Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest} or an equivalent Hash.
|
505
505
|
#
|
506
|
-
# @param request [Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest, Hash]
|
506
|
+
# @param request [::Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest, ::Hash]
|
507
507
|
# A request object representing the call parameters. Required. To specify no
|
508
508
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
509
|
-
# @param options [Gapic::CallOptions, Hash]
|
509
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
510
510
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
511
511
|
#
|
512
512
|
# @overload mark_recommendation_failed(name: nil, state_metadata: nil, etag: nil)
|
@@ -514,37 +514,37 @@ module Google
|
|
514
514
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
515
515
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
516
516
|
#
|
517
|
-
# @param name [String]
|
517
|
+
# @param name [::String]
|
518
518
|
# Required. Name of the recommendation.
|
519
|
-
# @param state_metadata [Hash{String => String}]
|
519
|
+
# @param state_metadata [::Hash{::String => ::String}]
|
520
520
|
# State properties to include with this state. Overwrites any existing
|
521
521
|
# `state_metadata`.
|
522
522
|
# Keys must match the regex /^[a-z0-9][a-z0-9_.-]\\{0,62}$/.
|
523
523
|
# Values must match the regex /^[a-zA-Z0-9_./-]\\{0,255}$/.
|
524
|
-
# @param etag [String]
|
524
|
+
# @param etag [::String]
|
525
525
|
# Required. Fingerprint of the Recommendation. Provides optimistic locking.
|
526
526
|
#
|
527
527
|
# @yield [response, operation] Access the result along with the RPC operation
|
528
|
-
# @yieldparam response [Google::Cloud::Recommender::V1::Recommendation]
|
529
|
-
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
528
|
+
# @yieldparam response [::Google::Cloud::Recommender::V1::Recommendation]
|
529
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
530
530
|
#
|
531
|
-
# @return [Google::Cloud::Recommender::V1::Recommendation]
|
531
|
+
# @return [::Google::Cloud::Recommender::V1::Recommendation]
|
532
532
|
#
|
533
|
-
# @raise [Google::Cloud::Error] if the RPC is aborted.
|
533
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
534
534
|
#
|
535
535
|
def mark_recommendation_failed request, options = nil
|
536
|
-
raise ArgumentError, "request must be provided" if request.nil?
|
536
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
537
537
|
|
538
|
-
request = Gapic::Protobuf.coerce request, to: Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest
|
538
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest
|
539
539
|
|
540
540
|
# Converts hash and nil to an options object
|
541
|
-
options = Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
541
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
542
542
|
|
543
543
|
# Customize the options with defaults
|
544
544
|
metadata = @config.rpcs.mark_recommendation_failed.metadata.to_h
|
545
545
|
|
546
546
|
# Set x-goog-api-client and x-goog-user-project headers
|
547
|
-
metadata[:"x-goog-api-client"] ||= Gapic::Headers.x_goog_api_client \
|
547
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
548
548
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
549
549
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
550
550
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
@@ -565,8 +565,8 @@ module Google
|
|
565
565
|
yield response, operation if block_given?
|
566
566
|
return response
|
567
567
|
end
|
568
|
-
rescue GRPC::BadStatus => e
|
569
|
-
raise Google::Cloud::Error.from_error(e)
|
568
|
+
rescue ::GRPC::BadStatus => e
|
569
|
+
raise ::Google::Cloud::Error.from_error(e)
|
570
570
|
end
|
571
571
|
|
572
572
|
##
|
@@ -576,7 +576,7 @@ module Google
|
|
576
576
|
# providing control over timeouts, retry behavior, logging, transport
|
577
577
|
# parameters, and other low-level controls. Certain parameters can also be
|
578
578
|
# applied individually to specific RPCs. See
|
579
|
-
# {Google::Cloud::Recommender::V1::Recommender::Client::Configuration::Rpcs}
|
579
|
+
# {::Google::Cloud::Recommender::V1::Recommender::Client::Configuration::Rpcs}
|
580
580
|
# for a list of RPCs that can be configured independently.
|
581
581
|
#
|
582
582
|
# Configuration can be applied globally to all clients, or to a single client
|
@@ -587,22 +587,22 @@ module Google
|
|
587
587
|
# To modify the global config, setting the timeout for list_recommendations
|
588
588
|
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
589
589
|
#
|
590
|
-
# Google::Cloud::Recommender::V1::Recommender::Client.configure do |config|
|
591
|
-
# config.timeout =
|
592
|
-
# config.rpcs.list_recommendations.timeout =
|
590
|
+
# ::Google::Cloud::Recommender::V1::Recommender::Client.configure do |config|
|
591
|
+
# config.timeout = 10.0
|
592
|
+
# config.rpcs.list_recommendations.timeout = 20.0
|
593
593
|
# end
|
594
594
|
#
|
595
595
|
# To apply the above configuration only to a new client:
|
596
596
|
#
|
597
|
-
# client = Google::Cloud::Recommender::V1::Recommender::Client.new do |config|
|
598
|
-
# config.timeout =
|
599
|
-
# config.rpcs.list_recommendations.timeout =
|
597
|
+
# client = ::Google::Cloud::Recommender::V1::Recommender::Client.new do |config|
|
598
|
+
# config.timeout = 10.0
|
599
|
+
# config.rpcs.list_recommendations.timeout = 20.0
|
600
600
|
# end
|
601
601
|
#
|
602
602
|
# @!attribute [rw] endpoint
|
603
603
|
# The hostname or hostname:port of the service endpoint.
|
604
604
|
# Defaults to `"recommender.googleapis.com"`.
|
605
|
-
# @return [String]
|
605
|
+
# @return [::String]
|
606
606
|
# @!attribute [rw] credentials
|
607
607
|
# Credentials to send with calls. You may provide any of the following types:
|
608
608
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -614,29 +614,29 @@ module Google
|
|
614
614
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
615
615
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
616
616
|
# * (`nil`) indicating no credentials
|
617
|
-
# @return [Object]
|
617
|
+
# @return [::Object]
|
618
618
|
# @!attribute [rw] scope
|
619
619
|
# The OAuth scopes
|
620
|
-
# @return [Array
|
620
|
+
# @return [::Array<::String>]
|
621
621
|
# @!attribute [rw] lib_name
|
622
622
|
# The library name as recorded in instrumentation and logging
|
623
|
-
# @return [String]
|
623
|
+
# @return [::String]
|
624
624
|
# @!attribute [rw] lib_version
|
625
625
|
# The library version as recorded in instrumentation and logging
|
626
|
-
# @return [String]
|
626
|
+
# @return [::String]
|
627
627
|
# @!attribute [rw] channel_args
|
628
628
|
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
629
629
|
# `GRPC::Core::Channel` object is provided as the credential.
|
630
|
-
# @return [Hash]
|
630
|
+
# @return [::Hash]
|
631
631
|
# @!attribute [rw] interceptors
|
632
632
|
# An array of interceptors that are run before calls are executed.
|
633
|
-
# @return [Array
|
633
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
634
634
|
# @!attribute [rw] timeout
|
635
|
-
# The call timeout in
|
636
|
-
# @return [Numeric]
|
635
|
+
# The call timeout in seconds.
|
636
|
+
# @return [::Numeric]
|
637
637
|
# @!attribute [rw] metadata
|
638
638
|
# Additional gRPC headers to be sent with the call.
|
639
|
-
# @return [Hash{Symbol
|
639
|
+
# @return [::Hash{::Symbol=>::String}]
|
640
640
|
# @!attribute [rw] retry_policy
|
641
641
|
# The retry policy. The value is a hash with the following keys:
|
642
642
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
@@ -644,10 +644,10 @@ module Google
|
|
644
644
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
645
645
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
646
646
|
# trigger a retry.
|
647
|
-
# @return [Hash]
|
647
|
+
# @return [::Hash]
|
648
648
|
#
|
649
649
|
class Configuration
|
650
|
-
extend Gapic::Config
|
650
|
+
extend ::Gapic::Config
|
651
651
|
|
652
652
|
config_attr :endpoint, "recommender.googleapis.com", String
|
653
653
|
config_attr :credentials, nil do |value|
|
@@ -655,14 +655,14 @@ module Google
|
|
655
655
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
656
656
|
allowed.any? { |klass| klass === value }
|
657
657
|
end
|
658
|
-
config_attr :scope, nil, String, Array, nil
|
659
|
-
config_attr :lib_name, nil, String, nil
|
660
|
-
config_attr :lib_version, nil, String, nil
|
661
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, Hash, nil)
|
662
|
-
config_attr :interceptors, nil, Array, nil
|
663
|
-
config_attr :timeout, nil, Numeric, nil
|
664
|
-
config_attr :metadata, nil, Hash, nil
|
665
|
-
config_attr :retry_policy, nil, Hash, Proc, nil
|
658
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
659
|
+
config_attr :lib_name, nil, ::String, nil
|
660
|
+
config_attr :lib_version, nil, ::String, nil
|
661
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
662
|
+
config_attr :interceptors, nil, ::Array, nil
|
663
|
+
config_attr :timeout, nil, ::Numeric, nil
|
664
|
+
config_attr :metadata, nil, ::Hash, nil
|
665
|
+
config_attr :retry_policy, nil, ::Hash, Proc, nil
|
666
666
|
|
667
667
|
# @private
|
668
668
|
def initialize parent_config = nil
|
@@ -703,42 +703,42 @@ module Google
|
|
703
703
|
class Rpcs
|
704
704
|
##
|
705
705
|
# RPC-specific configuration for `list_recommendations`
|
706
|
-
# @return [Gapic::Config::Method]
|
706
|
+
# @return [::Gapic::Config::Method]
|
707
707
|
#
|
708
708
|
attr_reader :list_recommendations
|
709
709
|
##
|
710
710
|
# RPC-specific configuration for `get_recommendation`
|
711
|
-
# @return [Gapic::Config::Method]
|
711
|
+
# @return [::Gapic::Config::Method]
|
712
712
|
#
|
713
713
|
attr_reader :get_recommendation
|
714
714
|
##
|
715
715
|
# RPC-specific configuration for `mark_recommendation_claimed`
|
716
|
-
# @return [Gapic::Config::Method]
|
716
|
+
# @return [::Gapic::Config::Method]
|
717
717
|
#
|
718
718
|
attr_reader :mark_recommendation_claimed
|
719
719
|
##
|
720
720
|
# RPC-specific configuration for `mark_recommendation_succeeded`
|
721
|
-
# @return [Gapic::Config::Method]
|
721
|
+
# @return [::Gapic::Config::Method]
|
722
722
|
#
|
723
723
|
attr_reader :mark_recommendation_succeeded
|
724
724
|
##
|
725
725
|
# RPC-specific configuration for `mark_recommendation_failed`
|
726
|
-
# @return [Gapic::Config::Method]
|
726
|
+
# @return [::Gapic::Config::Method]
|
727
727
|
#
|
728
728
|
attr_reader :mark_recommendation_failed
|
729
729
|
|
730
730
|
# @private
|
731
731
|
def initialize parent_rpcs = nil
|
732
732
|
list_recommendations_config = parent_rpcs&.list_recommendations if parent_rpcs&.respond_to? :list_recommendations
|
733
|
-
@list_recommendations = Gapic::Config::Method.new list_recommendations_config
|
733
|
+
@list_recommendations = ::Gapic::Config::Method.new list_recommendations_config
|
734
734
|
get_recommendation_config = parent_rpcs&.get_recommendation if parent_rpcs&.respond_to? :get_recommendation
|
735
|
-
@get_recommendation = Gapic::Config::Method.new get_recommendation_config
|
735
|
+
@get_recommendation = ::Gapic::Config::Method.new get_recommendation_config
|
736
736
|
mark_recommendation_claimed_config = parent_rpcs&.mark_recommendation_claimed if parent_rpcs&.respond_to? :mark_recommendation_claimed
|
737
|
-
@mark_recommendation_claimed = Gapic::Config::Method.new mark_recommendation_claimed_config
|
737
|
+
@mark_recommendation_claimed = ::Gapic::Config::Method.new mark_recommendation_claimed_config
|
738
738
|
mark_recommendation_succeeded_config = parent_rpcs&.mark_recommendation_succeeded if parent_rpcs&.respond_to? :mark_recommendation_succeeded
|
739
|
-
@mark_recommendation_succeeded = Gapic::Config::Method.new mark_recommendation_succeeded_config
|
739
|
+
@mark_recommendation_succeeded = ::Gapic::Config::Method.new mark_recommendation_succeeded_config
|
740
740
|
mark_recommendation_failed_config = parent_rpcs&.mark_recommendation_failed if parent_rpcs&.respond_to? :mark_recommendation_failed
|
741
|
-
@mark_recommendation_failed = Gapic::Config::Method.new mark_recommendation_failed_config
|
741
|
+
@mark_recommendation_failed = ::Gapic::Config::Method.new mark_recommendation_failed_config
|
742
742
|
|
743
743
|
yield self if block_given?
|
744
744
|
end
|