google-cloud-recommender-v1 0.8.2 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/lib/google/cloud/recommender/v1/insight_pb.rb +2 -2
- data/lib/google/cloud/recommender/v1/recommendation_pb.rb +2 -2
- data/lib/google/cloud/recommender/v1/recommender/client.rb +231 -74
- data/lib/google/cloud/recommender/v1/recommender_service_pb.rb +2 -2
- data/lib/google/cloud/recommender/v1/recommender_service_services_pb.rb +1 -1
- data/lib/google/cloud/recommender/v1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/recommender/v1/recommendation.rb +15 -6
- data/proto_docs/google/cloud/recommender/v1/recommender_service.rb +6 -6
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b97b08a96016fb2cebf2d28f8d9325cfbf476016cd51c4be2af0a061e32dcc64
|
4
|
+
data.tar.gz: e5557458191319b608bb6cc114f90d05e90dc3f397715a93e850c5e36f7d51c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a1595d1725b3d5f4d96c57801e19a7fed4d05f205244ae244b7058cb7699d13315d3c35df2c642cd15b80b65d732b195d95806956261e7efbbe036eef7fbfc7
|
7
|
+
data.tar.gz: '03813af5d7dbdebccf3270437d18a499e37f119de5822c165f29aaf54b89de5053a6a3c125590a57e40404e445d33af31e301df3e0b9394c3ead22dbadc53815'
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/recommender/v1/insight.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/resource_pb'
|
7
5
|
require 'google/protobuf/duration_pb'
|
8
6
|
require 'google/protobuf/struct_pb'
|
9
7
|
require 'google/protobuf/timestamp_pb'
|
8
|
+
require 'google/protobuf'
|
9
|
+
|
10
10
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
11
|
add_file("google/cloud/recommender/v1/insight.proto", :syntax => :proto3) do
|
12
12
|
add_message "google.cloud.recommender.v1.Insight" do
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/recommender/v1/recommendation.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/resource_pb'
|
7
5
|
require 'google/protobuf/duration_pb'
|
8
6
|
require 'google/protobuf/struct_pb'
|
9
7
|
require 'google/protobuf/timestamp_pb'
|
10
8
|
require 'google/type/money_pb'
|
9
|
+
require 'google/protobuf'
|
10
|
+
|
11
11
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
12
|
add_file("google/cloud/recommender/v1/recommendation.proto", :syntax => :proto3) do
|
13
13
|
add_message "google.cloud.recommender.v1.Recommendation" do
|
@@ -44,13 +44,12 @@ module Google
|
|
44
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
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
# end
|
49
|
+
# # Modify the configuration for all Recommender clients
|
50
|
+
# ::Google::Cloud::Recommender::V1::Recommender::Client.configure do |config|
|
51
|
+
# config.timeout = 10.0
|
52
|
+
# end
|
54
53
|
#
|
55
54
|
# @yield [config] Configure the Client client.
|
56
55
|
# @yieldparam config [Client::Configuration]
|
@@ -125,19 +124,15 @@ module Google
|
|
125
124
|
##
|
126
125
|
# Create a new Recommender client object.
|
127
126
|
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
# To create a new Recommender client with the default
|
131
|
-
# configuration:
|
132
|
-
#
|
133
|
-
# client = ::Google::Cloud::Recommender::V1::Recommender::Client.new
|
127
|
+
# @example
|
134
128
|
#
|
135
|
-
#
|
136
|
-
#
|
129
|
+
# # Create a client using the default configuration
|
130
|
+
# client = ::Google::Cloud::Recommender::V1::Recommender::Client.new
|
137
131
|
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
132
|
+
# # Create a client using a custom configuration
|
133
|
+
# client = ::Google::Cloud::Recommender::V1::Recommender::Client.new do |config|
|
134
|
+
# config.timeout = 10.0
|
135
|
+
# end
|
141
136
|
#
|
142
137
|
# @yield [config] Configure the Recommender client.
|
143
138
|
# @yieldparam config [Client::Configuration]
|
@@ -157,10 +152,9 @@ module Google
|
|
157
152
|
|
158
153
|
# Create credentials
|
159
154
|
credentials = @config.credentials
|
160
|
-
# Use self-signed JWT if the
|
155
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
161
156
|
# but only if the default endpoint does not have a region prefix.
|
162
|
-
enable_self_signed_jwt = @config.
|
163
|
-
@config.endpoint == Client.configure.endpoint &&
|
157
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
164
158
|
!@config.endpoint.split(".").first.include?("-")
|
165
159
|
credentials ||= Credentials.default scope: @config.scope,
|
166
160
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -233,6 +227,27 @@ module Google
|
|
233
227
|
#
|
234
228
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
235
229
|
#
|
230
|
+
# @example Basic example
|
231
|
+
# require "google/cloud/recommender/v1"
|
232
|
+
#
|
233
|
+
# # Create a client object. The client can be reused for multiple calls.
|
234
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
235
|
+
#
|
236
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
237
|
+
# request = Google::Cloud::Recommender::V1::ListInsightsRequest.new
|
238
|
+
#
|
239
|
+
# # Call the list_insights method.
|
240
|
+
# result = client.list_insights request
|
241
|
+
#
|
242
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
243
|
+
# # iterate over all elements by calling #each, and the enumerable
|
244
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
245
|
+
# # methods are also available for managing paging directly.
|
246
|
+
# result.each do |response|
|
247
|
+
# # Each element is of type ::Google::Cloud::Recommender::V1::Insight.
|
248
|
+
# p response
|
249
|
+
# end
|
250
|
+
#
|
236
251
|
def list_insights request, options = nil
|
237
252
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
238
253
|
|
@@ -250,16 +265,20 @@ module Google
|
|
250
265
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
251
266
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
252
267
|
|
253
|
-
header_params = {
|
254
|
-
|
255
|
-
|
268
|
+
header_params = {}
|
269
|
+
if request.parent
|
270
|
+
header_params["parent"] = request.parent
|
271
|
+
end
|
272
|
+
|
256
273
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
257
274
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
258
275
|
|
259
276
|
options.apply_defaults timeout: @config.rpcs.list_insights.timeout,
|
260
277
|
metadata: metadata,
|
261
278
|
retry_policy: @config.rpcs.list_insights.retry_policy
|
262
|
-
|
279
|
+
|
280
|
+
options.apply_defaults timeout: @config.timeout,
|
281
|
+
metadata: @config.metadata,
|
263
282
|
retry_policy: @config.retry_policy
|
264
283
|
|
265
284
|
@recommender_stub.call_rpc :list_insights, request, options: options do |response, operation|
|
@@ -301,6 +320,21 @@ module Google
|
|
301
320
|
#
|
302
321
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
303
322
|
#
|
323
|
+
# @example Basic example
|
324
|
+
# require "google/cloud/recommender/v1"
|
325
|
+
#
|
326
|
+
# # Create a client object. The client can be reused for multiple calls.
|
327
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
328
|
+
#
|
329
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
330
|
+
# request = Google::Cloud::Recommender::V1::GetInsightRequest.new
|
331
|
+
#
|
332
|
+
# # Call the get_insight method.
|
333
|
+
# result = client.get_insight request
|
334
|
+
#
|
335
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Insight.
|
336
|
+
# p result
|
337
|
+
#
|
304
338
|
def get_insight request, options = nil
|
305
339
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
306
340
|
|
@@ -318,16 +352,20 @@ module Google
|
|
318
352
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
319
353
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
320
354
|
|
321
|
-
header_params = {
|
322
|
-
|
323
|
-
|
355
|
+
header_params = {}
|
356
|
+
if request.name
|
357
|
+
header_params["name"] = request.name
|
358
|
+
end
|
359
|
+
|
324
360
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
325
361
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
326
362
|
|
327
363
|
options.apply_defaults timeout: @config.rpcs.get_insight.timeout,
|
328
364
|
metadata: metadata,
|
329
365
|
retry_policy: @config.rpcs.get_insight.retry_policy
|
330
|
-
|
366
|
+
|
367
|
+
options.apply_defaults timeout: @config.timeout,
|
368
|
+
metadata: @config.metadata,
|
331
369
|
retry_policy: @config.retry_policy
|
332
370
|
|
333
371
|
@recommender_stub.call_rpc :get_insight, request, options: options do |response, operation|
|
@@ -377,6 +415,21 @@ module Google
|
|
377
415
|
#
|
378
416
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
379
417
|
#
|
418
|
+
# @example Basic example
|
419
|
+
# require "google/cloud/recommender/v1"
|
420
|
+
#
|
421
|
+
# # Create a client object. The client can be reused for multiple calls.
|
422
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
423
|
+
#
|
424
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
425
|
+
# request = Google::Cloud::Recommender::V1::MarkInsightAcceptedRequest.new
|
426
|
+
#
|
427
|
+
# # Call the mark_insight_accepted method.
|
428
|
+
# result = client.mark_insight_accepted request
|
429
|
+
#
|
430
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Insight.
|
431
|
+
# p result
|
432
|
+
#
|
380
433
|
def mark_insight_accepted request, options = nil
|
381
434
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
382
435
|
|
@@ -394,16 +447,20 @@ module Google
|
|
394
447
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
395
448
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
396
449
|
|
397
|
-
header_params = {
|
398
|
-
|
399
|
-
|
450
|
+
header_params = {}
|
451
|
+
if request.name
|
452
|
+
header_params["name"] = request.name
|
453
|
+
end
|
454
|
+
|
400
455
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
401
456
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
402
457
|
|
403
458
|
options.apply_defaults timeout: @config.rpcs.mark_insight_accepted.timeout,
|
404
459
|
metadata: metadata,
|
405
460
|
retry_policy: @config.rpcs.mark_insight_accepted.retry_policy
|
406
|
-
|
461
|
+
|
462
|
+
options.apply_defaults timeout: @config.timeout,
|
463
|
+
metadata: @config.metadata,
|
407
464
|
retry_policy: @config.retry_policy
|
408
465
|
|
409
466
|
@recommender_stub.call_rpc :mark_insight_accepted, request, options: options do |response, operation|
|
@@ -466,6 +523,27 @@ module Google
|
|
466
523
|
#
|
467
524
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
468
525
|
#
|
526
|
+
# @example Basic example
|
527
|
+
# require "google/cloud/recommender/v1"
|
528
|
+
#
|
529
|
+
# # Create a client object. The client can be reused for multiple calls.
|
530
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
531
|
+
#
|
532
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
533
|
+
# request = Google::Cloud::Recommender::V1::ListRecommendationsRequest.new
|
534
|
+
#
|
535
|
+
# # Call the list_recommendations method.
|
536
|
+
# result = client.list_recommendations request
|
537
|
+
#
|
538
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
539
|
+
# # iterate over all elements by calling #each, and the enumerable
|
540
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
541
|
+
# # methods are also available for managing paging directly.
|
542
|
+
# result.each do |response|
|
543
|
+
# # Each element is of type ::Google::Cloud::Recommender::V1::Recommendation.
|
544
|
+
# p response
|
545
|
+
# end
|
546
|
+
#
|
469
547
|
def list_recommendations request, options = nil
|
470
548
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
471
549
|
|
@@ -483,16 +561,20 @@ module Google
|
|
483
561
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
484
562
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
485
563
|
|
486
|
-
header_params = {
|
487
|
-
|
488
|
-
|
564
|
+
header_params = {}
|
565
|
+
if request.parent
|
566
|
+
header_params["parent"] = request.parent
|
567
|
+
end
|
568
|
+
|
489
569
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
490
570
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
491
571
|
|
492
572
|
options.apply_defaults timeout: @config.rpcs.list_recommendations.timeout,
|
493
573
|
metadata: metadata,
|
494
574
|
retry_policy: @config.rpcs.list_recommendations.retry_policy
|
495
|
-
|
575
|
+
|
576
|
+
options.apply_defaults timeout: @config.timeout,
|
577
|
+
metadata: @config.metadata,
|
496
578
|
retry_policy: @config.retry_policy
|
497
579
|
|
498
580
|
@recommender_stub.call_rpc :list_recommendations, request, options: options do |response, operation|
|
@@ -534,6 +616,21 @@ module Google
|
|
534
616
|
#
|
535
617
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
536
618
|
#
|
619
|
+
# @example Basic example
|
620
|
+
# require "google/cloud/recommender/v1"
|
621
|
+
#
|
622
|
+
# # Create a client object. The client can be reused for multiple calls.
|
623
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
624
|
+
#
|
625
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
626
|
+
# request = Google::Cloud::Recommender::V1::GetRecommendationRequest.new
|
627
|
+
#
|
628
|
+
# # Call the get_recommendation method.
|
629
|
+
# result = client.get_recommendation request
|
630
|
+
#
|
631
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Recommendation.
|
632
|
+
# p result
|
633
|
+
#
|
537
634
|
def get_recommendation request, options = nil
|
538
635
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
539
636
|
|
@@ -551,16 +648,20 @@ module Google
|
|
551
648
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
552
649
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
553
650
|
|
554
|
-
header_params = {
|
555
|
-
|
556
|
-
|
651
|
+
header_params = {}
|
652
|
+
if request.name
|
653
|
+
header_params["name"] = request.name
|
654
|
+
end
|
655
|
+
|
557
656
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
558
657
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
559
658
|
|
560
659
|
options.apply_defaults timeout: @config.rpcs.get_recommendation.timeout,
|
561
660
|
metadata: metadata,
|
562
661
|
retry_policy: @config.rpcs.get_recommendation.retry_policy
|
563
|
-
|
662
|
+
|
663
|
+
options.apply_defaults timeout: @config.timeout,
|
664
|
+
metadata: @config.metadata,
|
564
665
|
retry_policy: @config.retry_policy
|
565
666
|
|
566
667
|
@recommender_stub.call_rpc :get_recommendation, request, options: options do |response, operation|
|
@@ -603,8 +704,8 @@ module Google
|
|
603
704
|
# @param state_metadata [::Hash{::String => ::String}]
|
604
705
|
# State properties to include with this state. Overwrites any existing
|
605
706
|
# `state_metadata`.
|
606
|
-
# Keys must match the regex
|
607
|
-
# Values must match the regex
|
707
|
+
# Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`.
|
708
|
+
# Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.
|
608
709
|
# @param etag [::String]
|
609
710
|
# Required. Fingerprint of the Recommendation. Provides optimistic locking.
|
610
711
|
#
|
@@ -616,6 +717,21 @@ module Google
|
|
616
717
|
#
|
617
718
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
618
719
|
#
|
720
|
+
# @example Basic example
|
721
|
+
# require "google/cloud/recommender/v1"
|
722
|
+
#
|
723
|
+
# # Create a client object. The client can be reused for multiple calls.
|
724
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
725
|
+
#
|
726
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
727
|
+
# request = Google::Cloud::Recommender::V1::MarkRecommendationClaimedRequest.new
|
728
|
+
#
|
729
|
+
# # Call the mark_recommendation_claimed method.
|
730
|
+
# result = client.mark_recommendation_claimed request
|
731
|
+
#
|
732
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Recommendation.
|
733
|
+
# p result
|
734
|
+
#
|
619
735
|
def mark_recommendation_claimed request, options = nil
|
620
736
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
621
737
|
|
@@ -633,16 +749,20 @@ module Google
|
|
633
749
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
634
750
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
635
751
|
|
636
|
-
header_params = {
|
637
|
-
|
638
|
-
|
752
|
+
header_params = {}
|
753
|
+
if request.name
|
754
|
+
header_params["name"] = request.name
|
755
|
+
end
|
756
|
+
|
639
757
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
640
758
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
641
759
|
|
642
760
|
options.apply_defaults timeout: @config.rpcs.mark_recommendation_claimed.timeout,
|
643
761
|
metadata: metadata,
|
644
762
|
retry_policy: @config.rpcs.mark_recommendation_claimed.retry_policy
|
645
|
-
|
763
|
+
|
764
|
+
options.apply_defaults timeout: @config.timeout,
|
765
|
+
metadata: @config.metadata,
|
646
766
|
retry_policy: @config.retry_policy
|
647
767
|
|
648
768
|
@recommender_stub.call_rpc :mark_recommendation_claimed, request, options: options do |response, operation|
|
@@ -686,8 +806,8 @@ module Google
|
|
686
806
|
# @param state_metadata [::Hash{::String => ::String}]
|
687
807
|
# State properties to include with this state. Overwrites any existing
|
688
808
|
# `state_metadata`.
|
689
|
-
# Keys must match the regex
|
690
|
-
# Values must match the regex
|
809
|
+
# Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`.
|
810
|
+
# Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.
|
691
811
|
# @param etag [::String]
|
692
812
|
# Required. Fingerprint of the Recommendation. Provides optimistic locking.
|
693
813
|
#
|
@@ -699,6 +819,21 @@ module Google
|
|
699
819
|
#
|
700
820
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
701
821
|
#
|
822
|
+
# @example Basic example
|
823
|
+
# require "google/cloud/recommender/v1"
|
824
|
+
#
|
825
|
+
# # Create a client object. The client can be reused for multiple calls.
|
826
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
827
|
+
#
|
828
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
829
|
+
# request = Google::Cloud::Recommender::V1::MarkRecommendationSucceededRequest.new
|
830
|
+
#
|
831
|
+
# # Call the mark_recommendation_succeeded method.
|
832
|
+
# result = client.mark_recommendation_succeeded request
|
833
|
+
#
|
834
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Recommendation.
|
835
|
+
# p result
|
836
|
+
#
|
702
837
|
def mark_recommendation_succeeded request, options = nil
|
703
838
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
704
839
|
|
@@ -716,16 +851,20 @@ module Google
|
|
716
851
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
717
852
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
718
853
|
|
719
|
-
header_params = {
|
720
|
-
|
721
|
-
|
854
|
+
header_params = {}
|
855
|
+
if request.name
|
856
|
+
header_params["name"] = request.name
|
857
|
+
end
|
858
|
+
|
722
859
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
723
860
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
724
861
|
|
725
862
|
options.apply_defaults timeout: @config.rpcs.mark_recommendation_succeeded.timeout,
|
726
863
|
metadata: metadata,
|
727
864
|
retry_policy: @config.rpcs.mark_recommendation_succeeded.retry_policy
|
728
|
-
|
865
|
+
|
866
|
+
options.apply_defaults timeout: @config.timeout,
|
867
|
+
metadata: @config.metadata,
|
729
868
|
retry_policy: @config.retry_policy
|
730
869
|
|
731
870
|
@recommender_stub.call_rpc :mark_recommendation_succeeded, request, options: options do |response, operation|
|
@@ -769,8 +908,8 @@ module Google
|
|
769
908
|
# @param state_metadata [::Hash{::String => ::String}]
|
770
909
|
# State properties to include with this state. Overwrites any existing
|
771
910
|
# `state_metadata`.
|
772
|
-
# Keys must match the regex
|
773
|
-
# Values must match the regex
|
911
|
+
# Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`.
|
912
|
+
# Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.
|
774
913
|
# @param etag [::String]
|
775
914
|
# Required. Fingerprint of the Recommendation. Provides optimistic locking.
|
776
915
|
#
|
@@ -782,6 +921,21 @@ module Google
|
|
782
921
|
#
|
783
922
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
784
923
|
#
|
924
|
+
# @example Basic example
|
925
|
+
# require "google/cloud/recommender/v1"
|
926
|
+
#
|
927
|
+
# # Create a client object. The client can be reused for multiple calls.
|
928
|
+
# client = Google::Cloud::Recommender::V1::Recommender::Client.new
|
929
|
+
#
|
930
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
931
|
+
# request = Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest.new
|
932
|
+
#
|
933
|
+
# # Call the mark_recommendation_failed method.
|
934
|
+
# result = client.mark_recommendation_failed request
|
935
|
+
#
|
936
|
+
# # The returned object is of type Google::Cloud::Recommender::V1::Recommendation.
|
937
|
+
# p result
|
938
|
+
#
|
785
939
|
def mark_recommendation_failed request, options = nil
|
786
940
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
787
941
|
|
@@ -799,16 +953,20 @@ module Google
|
|
799
953
|
gapic_version: ::Google::Cloud::Recommender::V1::VERSION
|
800
954
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
801
955
|
|
802
|
-
header_params = {
|
803
|
-
|
804
|
-
|
956
|
+
header_params = {}
|
957
|
+
if request.name
|
958
|
+
header_params["name"] = request.name
|
959
|
+
end
|
960
|
+
|
805
961
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
806
962
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
807
963
|
|
808
964
|
options.apply_defaults timeout: @config.rpcs.mark_recommendation_failed.timeout,
|
809
965
|
metadata: metadata,
|
810
966
|
retry_policy: @config.rpcs.mark_recommendation_failed.retry_policy
|
811
|
-
|
967
|
+
|
968
|
+
options.apply_defaults timeout: @config.timeout,
|
969
|
+
metadata: @config.metadata,
|
812
970
|
retry_policy: @config.retry_policy
|
813
971
|
|
814
972
|
@recommender_stub.call_rpc :mark_recommendation_failed, request, options: options do |response, operation|
|
@@ -832,22 +990,21 @@ module Google
|
|
832
990
|
# Configuration can be applied globally to all clients, or to a single client
|
833
991
|
# on construction.
|
834
992
|
#
|
835
|
-
#
|
836
|
-
#
|
837
|
-
#
|
838
|
-
# to 20 seconds,
|
839
|
-
#
|
840
|
-
#
|
841
|
-
#
|
842
|
-
#
|
843
|
-
#
|
844
|
-
#
|
845
|
-
#
|
846
|
-
#
|
847
|
-
#
|
848
|
-
#
|
849
|
-
#
|
850
|
-
# end
|
993
|
+
# @example
|
994
|
+
#
|
995
|
+
# # Modify the global config, setting the timeout for
|
996
|
+
# # list_insights to 20 seconds,
|
997
|
+
# # and all remaining timeouts to 10 seconds.
|
998
|
+
# ::Google::Cloud::Recommender::V1::Recommender::Client.configure do |config|
|
999
|
+
# config.timeout = 10.0
|
1000
|
+
# config.rpcs.list_insights.timeout = 20.0
|
1001
|
+
# end
|
1002
|
+
#
|
1003
|
+
# # Apply the above configuration only to a new client.
|
1004
|
+
# client = ::Google::Cloud::Recommender::V1::Recommender::Client.new do |config|
|
1005
|
+
# config.timeout = 10.0
|
1006
|
+
# config.rpcs.list_insights.timeout = 20.0
|
1007
|
+
# end
|
851
1008
|
#
|
852
1009
|
# @!attribute [rw] endpoint
|
853
1010
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/recommender/v1/recommender_service.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
9
7
|
require 'google/api/resource_pb'
|
10
8
|
require 'google/cloud/recommender/v1/insight_pb'
|
11
9
|
require 'google/cloud/recommender/v1/recommendation_pb'
|
10
|
+
require 'google/protobuf'
|
11
|
+
|
12
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
13
|
add_file("google/cloud/recommender/v1/recommender_service.proto", :syntax => :proto3) do
|
14
14
|
add_message "google.cloud.recommender.v1.ListInsightsRequest" do
|
@@ -30,7 +30,7 @@ module Google
|
|
30
30
|
# based on analysis of user resources, configuration and monitoring metrics.
|
31
31
|
class Service
|
32
32
|
|
33
|
-
include GRPC::GenericService
|
33
|
+
include ::GRPC::GenericService
|
34
34
|
|
35
35
|
self.marshal_class_method = :encode
|
36
36
|
self.unmarshal_class_method = :decode
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
@@ -158,18 +158,27 @@ module Google
|
|
158
158
|
# This is intended to be an exact match per filter. To perform advanced
|
159
159
|
# matching, use path_value_matchers.
|
160
160
|
#
|
161
|
-
# * Example:
|
161
|
+
# * Example:
|
162
|
+
# ```
|
163
|
+
# {
|
162
164
|
# "/versions/*/name" : "it-123"
|
163
165
|
# "/versions/*/targetSize/percent": 20
|
164
|
-
#
|
165
|
-
#
|
166
|
+
# }
|
167
|
+
# ```
|
168
|
+
# * Example:
|
169
|
+
# ```
|
170
|
+
# {
|
166
171
|
# "/bindings/*/role": "roles/owner"
|
167
172
|
# "/bindings/*/condition" : null
|
168
|
-
#
|
169
|
-
#
|
173
|
+
# }
|
174
|
+
# ```
|
175
|
+
# * Example:
|
176
|
+
# ```
|
177
|
+
# {
|
170
178
|
# "/bindings/*/role": "roles/owner"
|
171
179
|
# "/bindings/*/members/*" : ["x@example.com", "y@example.com"]
|
172
|
-
#
|
180
|
+
# }
|
181
|
+
# ```
|
173
182
|
# When both path_filters and path_value_matchers are set, an implicit AND
|
174
183
|
# must be performed.
|
175
184
|
# @!attribute [rw] path_value_matchers
|
@@ -166,8 +166,8 @@ module Google
|
|
166
166
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
167
167
|
# State properties to include with this state. Overwrites any existing
|
168
168
|
# `state_metadata`.
|
169
|
-
# Keys must match the regex
|
170
|
-
# Values must match the regex
|
169
|
+
# Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`.
|
170
|
+
# Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.
|
171
171
|
# @!attribute [rw] etag
|
172
172
|
# @return [::String]
|
173
173
|
# Required. Fingerprint of the Recommendation. Provides optimistic locking.
|
@@ -193,8 +193,8 @@ module Google
|
|
193
193
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
194
194
|
# State properties to include with this state. Overwrites any existing
|
195
195
|
# `state_metadata`.
|
196
|
-
# Keys must match the regex
|
197
|
-
# Values must match the regex
|
196
|
+
# Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`.
|
197
|
+
# Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.
|
198
198
|
# @!attribute [rw] etag
|
199
199
|
# @return [::String]
|
200
200
|
# Required. Fingerprint of the Recommendation. Provides optimistic locking.
|
@@ -220,8 +220,8 @@ module Google
|
|
220
220
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
221
221
|
# State properties to include with this state. Overwrites any existing
|
222
222
|
# `state_metadata`.
|
223
|
-
# Keys must match the regex
|
224
|
-
# Values must match the regex
|
223
|
+
# Keys must match the regex `/^[a-z0-9][a-z0-9_.-]{0,62}$/`.
|
224
|
+
# Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.
|
225
225
|
# @!attribute [rw] etag
|
226
226
|
# @return [::String]
|
227
227
|
# Required. Fingerprint of the Recommendation. Provides optimistic locking.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-recommender-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
- !ruby/object:Gem::Version
|
210
210
|
version: '0'
|
211
211
|
requirements: []
|
212
|
-
rubygems_version: 3.
|
212
|
+
rubygems_version: 3.3.4
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
215
|
summary: API Client library for the Recommender V1 API
|