google-apis-recommender_v1beta1 0.1.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a187d465cf3856424a891e6e66582c2c0a1066083f90a9406f89e0d9279ef4a0
4
- data.tar.gz: 798a30c5a9e75ac8035dbdd042978707a0a330b5988fcc8a12c293b8f9d814e2
3
+ metadata.gz: c4fbcebd4d42f73b67b4fca3bc4f4baf845fea346d0677642fc1c085a611801e
4
+ data.tar.gz: 3e8c176400ab48b0b62b4214d6f5ec8f5fc27c60bbc0f3090631f756867ec7a0
5
5
  SHA512:
6
- metadata.gz: b72fe996c4a83430f92073ada9722102a5a2f85d33df069ee500f6e05f7e781f4d96ad0331af79c249dba65f850407cf2337cf5180ecbbc7bda44bcb5c99bbf1
7
- data.tar.gz: 2242083e90a57b7b6e23ebf04b448758575b69657d5ebe6555dbcab9d289306e26a32df01995f26236c59df866478d0375be81c0ea19e5442422be4d73fc9e11
6
+ metadata.gz: 6da5a83224a907d4f9ef6c0054881e105564d86cd89d6f7cd7a2c73300e208efa48e8e625e276ca79b8435929d9205e4f1cd1b85dc9eb20f4d34e3bb3810fe07
7
+ data.tar.gz: 83a9087552d9a46ca77087f0f4deabba676f9554517a3808c48a4b7e6574161dca92a6059355db16a6c83dd7a65c19d85e0d49354a334ccdb43e6f81250577e0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Release history for google-apis-recommender_v1beta1
2
2
 
3
+ ### v0.6.0 (2021-05-13)
4
+
5
+ * Regenerated from discovery document revision 20210510
6
+
7
+ ### v0.5.0 (2021-03-31)
8
+
9
+ * Regenerated from discovery document revision 20210319
10
+
11
+ ### v0.4.0 (2021-03-10)
12
+
13
+ * Regenerated from discovery document revision 20210307
14
+ * Regenerated using generator version 0.2.0
15
+
16
+ ### v0.3.0 (2021-03-04)
17
+
18
+ * Regenerated from discovery document revision 20210227
19
+
20
+ ### v0.2.0 (2021-01-21)
21
+
22
+ * Regenerated from discovery document revision 20210118
23
+ * Regenerated using generator version 0.1.2
24
+
3
25
  ### v0.1.0 (2021-01-07)
4
26
 
5
27
  * Regenerated using generator version 0.1.1
@@ -29,7 +29,7 @@ module Google
29
29
  # This is NOT the gem version.
30
30
  VERSION = 'V1beta1'
31
31
 
32
- # View and manage your data across Google Cloud Platform services
32
+ # See, edit, configure, and delete your Google Cloud Platform data
33
33
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
34
34
  end
35
35
  end
@@ -61,6 +61,11 @@ module Google
61
61
  # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1CostProjection]
62
62
  attr_accessor :cost_projection
63
63
 
64
+ # Contains various ways of describing the impact on Security.
65
+ # Corresponds to the JSON property `securityProjection`
66
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1SecurityProjection]
67
+ attr_accessor :security_projection
68
+
64
69
  def initialize(**args)
65
70
  update!(**args)
66
71
  end
@@ -69,6 +74,7 @@ module Google
69
74
  def update!(**args)
70
75
  @category = args[:category] if args.key?(:category)
71
76
  @cost_projection = args[:cost_projection] if args.key?(:cost_projection)
77
+ @security_projection = args[:security_projection] if args.key?(:security_projection)
72
78
  end
73
79
  end
74
80
 
@@ -126,6 +132,11 @@ module Google
126
132
  # @return [String]
127
133
  attr_accessor :observation_period
128
134
 
135
+ # Insight's severity.
136
+ # Corresponds to the JSON property `severity`
137
+ # @return [String]
138
+ attr_accessor :severity
139
+
129
140
  # Information related to insight state.
130
141
  # Corresponds to the JSON property `stateInfo`
131
142
  # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1InsightStateInfo]
@@ -151,6 +162,7 @@ module Google
151
162
  @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
152
163
  @name = args[:name] if args.key?(:name)
153
164
  @observation_period = args[:observation_period] if args.key?(:observation_period)
165
+ @severity = args[:severity] if args.key?(:severity)
154
166
  @state_info = args[:state_info] if args.key?(:state_info)
155
167
  @target_resources = args[:target_resources] if args.key?(:target_resources)
156
168
  end
@@ -396,9 +408,9 @@ module Google
396
408
  attr_accessor :path_filters
397
409
 
398
410
  # Similar to path_filters, this contains set of filters to apply if `path` field
399
- # referes to array elements. This is meant to support value matching beyond
400
- # exact match. To perform exact match, use path_filters. When both path_filters
401
- # and path_value_matchers are set, an implicit AND must be performed.
411
+ # refers to array elements. This is meant to support value matching beyond exact
412
+ # match. To perform exact match, use path_filters. When both path_filters and
413
+ # path_value_matchers are set, an implicit AND must be performed.
402
414
  # Corresponds to the JSON property `pathValueMatchers`
403
415
  # @return [Hash<String,Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ValueMatcher>]
404
416
  attr_accessor :path_value_matchers
@@ -530,6 +542,11 @@ module Google
530
542
  # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact]
531
543
  attr_accessor :primary_impact
532
544
 
545
+ # Recommendation's priority.
546
+ # Corresponds to the JSON property `priority`
547
+ # @return [String]
548
+ attr_accessor :priority
549
+
533
550
  # Contains an identifier for a subtype of recommendations produced for the same
534
551
  # recommender. Subtype is a function of content and impact, meaning a new
535
552
  # subtype might be added when significant changes to `content` or `
@@ -560,6 +577,7 @@ module Google
560
577
  @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
561
578
  @name = args[:name] if args.key?(:name)
562
579
  @primary_impact = args[:primary_impact] if args.key?(:primary_impact)
580
+ @priority = args[:priority] if args.key?(:priority)
563
581
  @recommender_subtype = args[:recommender_subtype] if args.key?(:recommender_subtype)
564
582
  @state_info = args[:state_info] if args.key?(:state_info)
565
583
  end
@@ -631,6 +649,26 @@ module Google
631
649
  end
632
650
  end
633
651
 
652
+ # Contains various ways of describing the impact on Security.
653
+ class GoogleCloudRecommenderV1beta1SecurityProjection
654
+ include Google::Apis::Core::Hashable
655
+
656
+ # This field can be used by the recommender to define details specific to
657
+ # security impact.
658
+ # Corresponds to the JSON property `details`
659
+ # @return [Hash<String,Object>]
660
+ attr_accessor :details
661
+
662
+ def initialize(**args)
663
+ update!(**args)
664
+ end
665
+
666
+ # Update properties of this object
667
+ def update!(**args)
668
+ @details = args[:details] if args.key?(:details)
669
+ end
670
+ end
671
+
634
672
  # Contains various matching options for values for a GCP resource field.
635
673
  class GoogleCloudRecommenderV1beta1ValueMatcher
636
674
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module RecommenderV1beta1
18
18
  # Version of the google-apis-recommender_v1beta1 gem
19
- GEM_VERSION = "0.1.0"
19
+ GEM_VERSION = "0.6.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.1.1"
22
+ GENERATOR_VERSION = "0.2.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20201204"
25
+ REVISION = "20210510"
26
26
  end
27
27
  end
28
28
  end
@@ -124,6 +124,12 @@ module Google
124
124
  include Google::Apis::Core::JsonObjectSupport
125
125
  end
126
126
 
127
+ class GoogleCloudRecommenderV1beta1SecurityProjection
128
+ class Representation < Google::Apis::Core::JsonRepresentation; end
129
+
130
+ include Google::Apis::Core::JsonObjectSupport
131
+ end
132
+
127
133
  class GoogleCloudRecommenderV1beta1ValueMatcher
128
134
  class Representation < Google::Apis::Core::JsonRepresentation; end
129
135
 
@@ -151,6 +157,8 @@ module Google
151
157
  property :category, as: 'category'
152
158
  property :cost_projection, as: 'costProjection', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1CostProjection, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1CostProjection::Representation
153
159
 
160
+ property :security_projection, as: 'securityProjection', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1SecurityProjection, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1SecurityProjection::Representation
161
+
154
162
  end
155
163
  end
156
164
 
@@ -167,6 +175,7 @@ module Google
167
175
  property :last_refresh_time, as: 'lastRefreshTime'
168
176
  property :name, as: 'name'
169
177
  property :observation_period, as: 'observationPeriod'
178
+ property :severity, as: 'severity'
170
179
  property :state_info, as: 'stateInfo', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1InsightStateInfo, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1InsightStateInfo::Representation
171
180
 
172
181
  collection :target_resources, as: 'targetResources'
@@ -279,6 +288,7 @@ module Google
279
288
  property :name, as: 'name'
280
289
  property :primary_impact, as: 'primaryImpact', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Impact::Representation
281
290
 
291
+ property :priority, as: 'priority'
282
292
  property :recommender_subtype, as: 'recommenderSubtype'
283
293
  property :state_info, as: 'stateInfo', class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationStateInfo, decorator: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1RecommendationStateInfo::Representation
284
294
 
@@ -308,6 +318,13 @@ module Google
308
318
  end
309
319
  end
310
320
 
321
+ class GoogleCloudRecommenderV1beta1SecurityProjection
322
+ # @private
323
+ class Representation < Google::Apis::Core::JsonRepresentation
324
+ hash :details, as: 'details'
325
+ end
326
+ end
327
+
311
328
  class GoogleCloudRecommenderV1beta1ValueMatcher
312
329
  # @private
313
330
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -84,13 +84,22 @@ module Google
84
84
  # permission for the specified insight type.
85
85
  # @param [String] parent
86
86
  # Required. The container resource on which to execute the request. Acceptable
87
- # formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
88
- # INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.
89
- # com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https:/
90
- # /cloud.google.com/recommender/docs/insights/insight-types.
87
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
88
+ # INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]
89
+ # /insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
90
+ # insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
91
+ # LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP
92
+ # Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to
93
+ # supported insight types: https://cloud.google.com/recommender/docs/insights/
94
+ # insight-types.
91
95
  # @param [String] filter
92
96
  # Optional. Filter expression to restrict the insights returned. Supported
93
- # filter fields: state Eg: `state:"DISMISSED" or state:"ACTIVE"
97
+ # filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: *
98
+ # `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype =
99
+ # PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.
100
+ # state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These
101
+ # expressions are based on the filter language described at https://google.aip.
102
+ # dev/160)
94
103
  # @param [Fixnum] page_size
95
104
  # Optional. The maximum number of results to return from this request. Non-
96
105
  # positive values are ignored. If not specified, the server will determine the
@@ -202,14 +211,21 @@ module Google
202
211
  # permission for the specified recommender.
203
212
  # @param [String] parent
204
213
  # Required. The container resource on which to execute the request. Acceptable
205
- # formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
206
- # RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.
207
- # com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://
208
- # cloud.google.com/recommender/docs/recommenders.
214
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
215
+ # RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/
216
+ # recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
217
+ # recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
218
+ # LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations:
219
+ # https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
220
+ # recommenders: https://cloud.google.com/recommender/docs/recommenders.
209
221
  # @param [String] filter
210
222
  # Filter expression to restrict the recommendations returned. Supported filter
211
- # fields: state_info.state Eg: `state_info.state:"DISMISSED" or state_info.state:
212
- # "FAILED"
223
+ # fields: * `state_info.state` * `recommenderSubtype` * `priority` Examples: * `
224
+ # stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype
225
+ # = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR
226
+ # priority = P2` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)
227
+ # ` (These expressions are based on the filter language described at https://
228
+ # google.aip.dev/160)
213
229
  # @param [Fixnum] page_size
214
230
  # Optional. The maximum number of results to return from this request. Non-
215
231
  # positive values are ignored. If not specified, the server will determine the
@@ -366,6 +382,672 @@ module Google
366
382
  execute_or_queue_command(command, &block)
367
383
  end
368
384
 
385
+ # Gets the requested insight. Requires the recommender.*.get IAM permission for
386
+ # the specified insight type.
387
+ # @param [String] name
388
+ # Required. Name of the insight.
389
+ # @param [String] fields
390
+ # Selector specifying which fields to include in a partial response.
391
+ # @param [String] quota_user
392
+ # Available to use for quota purposes for server-side applications. Can be any
393
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
394
+ # @param [Google::Apis::RequestOptions] options
395
+ # Request-specific options
396
+ #
397
+ # @yield [result, err] Result & error if block supplied
398
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight] parsed result object
399
+ # @yieldparam err [StandardError] error object if request failed
400
+ #
401
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight]
402
+ #
403
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
404
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
405
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
406
+ def get_folder_location_insight_type_insight(name, fields: nil, quota_user: nil, options: nil, &block)
407
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
408
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight::Representation
409
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight
410
+ command.params['name'] = name unless name.nil?
411
+ command.query['fields'] = fields unless fields.nil?
412
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
413
+ execute_or_queue_command(command, &block)
414
+ end
415
+
416
+ # Lists insights for a Cloud project. Requires the recommender.*.list IAM
417
+ # permission for the specified insight type.
418
+ # @param [String] parent
419
+ # Required. The container resource on which to execute the request. Acceptable
420
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
421
+ # INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]
422
+ # /insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
423
+ # insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
424
+ # LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP
425
+ # Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to
426
+ # supported insight types: https://cloud.google.com/recommender/docs/insights/
427
+ # insight-types.
428
+ # @param [String] filter
429
+ # Optional. Filter expression to restrict the insights returned. Supported
430
+ # filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: *
431
+ # `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype =
432
+ # PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.
433
+ # state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These
434
+ # expressions are based on the filter language described at https://google.aip.
435
+ # dev/160)
436
+ # @param [Fixnum] page_size
437
+ # Optional. The maximum number of results to return from this request. Non-
438
+ # positive values are ignored. If not specified, the server will determine the
439
+ # number of results to return.
440
+ # @param [String] page_token
441
+ # Optional. If present, retrieves the next batch of results from the preceding
442
+ # call to this method. `page_token` must be the value of `next_page_token` from
443
+ # the previous response. The values of other method parameters must be identical
444
+ # to those in the previous call.
445
+ # @param [String] fields
446
+ # Selector specifying which fields to include in a partial response.
447
+ # @param [String] quota_user
448
+ # Available to use for quota purposes for server-side applications. Can be any
449
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
450
+ # @param [Google::Apis::RequestOptions] options
451
+ # Request-specific options
452
+ #
453
+ # @yield [result, err] Result & error if block supplied
454
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse] parsed result object
455
+ # @yieldparam err [StandardError] error object if request failed
456
+ #
457
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse]
458
+ #
459
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
460
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
461
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
462
+ def list_folder_location_insight_type_insights(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
463
+ command = make_simple_command(:get, 'v1beta1/{+parent}/insights', options)
464
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse::Representation
465
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse
466
+ command.params['parent'] = parent unless parent.nil?
467
+ command.query['filter'] = filter unless filter.nil?
468
+ command.query['pageSize'] = page_size unless page_size.nil?
469
+ command.query['pageToken'] = page_token unless page_token.nil?
470
+ command.query['fields'] = fields unless fields.nil?
471
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
472
+ execute_or_queue_command(command, &block)
473
+ end
474
+
475
+ # Marks the Insight State as Accepted. Users can use this method to indicate to
476
+ # the Recommender API that they have applied some action based on the insight.
477
+ # This stops the insight content from being updated. MarkInsightAccepted can be
478
+ # applied to insights in ACTIVE state. Requires the recommender.*.update IAM
479
+ # permission for the specified insight.
480
+ # @param [String] name
481
+ # Required. Name of the insight.
482
+ # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest] google_cloud_recommender_v1beta1_mark_insight_accepted_request_object
483
+ # @param [String] fields
484
+ # Selector specifying which fields to include in a partial response.
485
+ # @param [String] quota_user
486
+ # Available to use for quota purposes for server-side applications. Can be any
487
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
488
+ # @param [Google::Apis::RequestOptions] options
489
+ # Request-specific options
490
+ #
491
+ # @yield [result, err] Result & error if block supplied
492
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight] parsed result object
493
+ # @yieldparam err [StandardError] error object if request failed
494
+ #
495
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight]
496
+ #
497
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
498
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
499
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
500
+ def mark_folder_location_insight_type_insight_accepted(name, google_cloud_recommender_v1beta1_mark_insight_accepted_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
501
+ command = make_simple_command(:post, 'v1beta1/{+name}:markAccepted', options)
502
+ command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest::Representation
503
+ command.request_object = google_cloud_recommender_v1beta1_mark_insight_accepted_request_object
504
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight::Representation
505
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight
506
+ command.params['name'] = name unless name.nil?
507
+ command.query['fields'] = fields unless fields.nil?
508
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
509
+ execute_or_queue_command(command, &block)
510
+ end
511
+
512
+ # Gets the requested recommendation. Requires the recommender.*.get IAM
513
+ # permission for the specified recommender.
514
+ # @param [String] name
515
+ # Required. Name of the recommendation.
516
+ # @param [String] fields
517
+ # Selector specifying which fields to include in a partial response.
518
+ # @param [String] quota_user
519
+ # Available to use for quota purposes for server-side applications. Can be any
520
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
521
+ # @param [Google::Apis::RequestOptions] options
522
+ # Request-specific options
523
+ #
524
+ # @yield [result, err] Result & error if block supplied
525
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object
526
+ # @yieldparam err [StandardError] error object if request failed
527
+ #
528
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation]
529
+ #
530
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
531
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
532
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
533
+ def get_folder_location_recommender_recommendation(name, fields: nil, quota_user: nil, options: nil, &block)
534
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
535
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation
536
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation
537
+ command.params['name'] = name unless name.nil?
538
+ command.query['fields'] = fields unless fields.nil?
539
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
540
+ execute_or_queue_command(command, &block)
541
+ end
542
+
543
+ # Lists recommendations for a Cloud project. Requires the recommender.*.list IAM
544
+ # permission for the specified recommender.
545
+ # @param [String] parent
546
+ # Required. The container resource on which to execute the request. Acceptable
547
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
548
+ # RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/
549
+ # recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
550
+ # recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
551
+ # LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations:
552
+ # https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
553
+ # recommenders: https://cloud.google.com/recommender/docs/recommenders.
554
+ # @param [String] filter
555
+ # Filter expression to restrict the recommendations returned. Supported filter
556
+ # fields: * `state_info.state` * `recommenderSubtype` * `priority` Examples: * `
557
+ # stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype
558
+ # = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR
559
+ # priority = P2` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)
560
+ # ` (These expressions are based on the filter language described at https://
561
+ # google.aip.dev/160)
562
+ # @param [Fixnum] page_size
563
+ # Optional. The maximum number of results to return from this request. Non-
564
+ # positive values are ignored. If not specified, the server will determine the
565
+ # number of results to return.
566
+ # @param [String] page_token
567
+ # Optional. If present, retrieves the next batch of results from the preceding
568
+ # call to this method. `page_token` must be the value of `next_page_token` from
569
+ # the previous response. The values of other method parameters must be identical
570
+ # to those in the previous call.
571
+ # @param [String] fields
572
+ # Selector specifying which fields to include in a partial response.
573
+ # @param [String] quota_user
574
+ # Available to use for quota purposes for server-side applications. Can be any
575
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
576
+ # @param [Google::Apis::RequestOptions] options
577
+ # Request-specific options
578
+ #
579
+ # @yield [result, err] Result & error if block supplied
580
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse] parsed result object
581
+ # @yieldparam err [StandardError] error object if request failed
582
+ #
583
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse]
584
+ #
585
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
586
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
587
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
588
+ def list_folder_location_recommender_recommendations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
589
+ command = make_simple_command(:get, 'v1beta1/{+parent}/recommendations', options)
590
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse::Representation
591
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse
592
+ command.params['parent'] = parent unless parent.nil?
593
+ command.query['filter'] = filter unless filter.nil?
594
+ command.query['pageSize'] = page_size unless page_size.nil?
595
+ command.query['pageToken'] = page_token unless page_token.nil?
596
+ command.query['fields'] = fields unless fields.nil?
597
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
598
+ execute_or_queue_command(command, &block)
599
+ end
600
+
601
+ # Marks the Recommendation State as Claimed. Users can use this method to
602
+ # indicate to the Recommender API that they are starting to apply the
603
+ # recommendation themselves. This stops the recommendation content from being
604
+ # updated. Associated insights are frozen and placed in the ACCEPTED state.
605
+ # MarkRecommendationClaimed can be applied to recommendations in CLAIMED or
606
+ # ACTIVE state. Requires the recommender.*.update IAM permission for the
607
+ # specified recommender.
608
+ # @param [String] name
609
+ # Required. Name of the recommendation.
610
+ # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest] google_cloud_recommender_v1beta1_mark_recommendation_claimed_request_object
611
+ # @param [String] fields
612
+ # Selector specifying which fields to include in a partial response.
613
+ # @param [String] quota_user
614
+ # Available to use for quota purposes for server-side applications. Can be any
615
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
616
+ # @param [Google::Apis::RequestOptions] options
617
+ # Request-specific options
618
+ #
619
+ # @yield [result, err] Result & error if block supplied
620
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object
621
+ # @yieldparam err [StandardError] error object if request failed
622
+ #
623
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation]
624
+ #
625
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
626
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
627
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
628
+ def mark_folder_location_recommender_recommendation_claimed(name, google_cloud_recommender_v1beta1_mark_recommendation_claimed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
629
+ command = make_simple_command(:post, 'v1beta1/{+name}:markClaimed', options)
630
+ command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest::Representation
631
+ command.request_object = google_cloud_recommender_v1beta1_mark_recommendation_claimed_request_object
632
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation
633
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation
634
+ command.params['name'] = name unless name.nil?
635
+ command.query['fields'] = fields unless fields.nil?
636
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
637
+ execute_or_queue_command(command, &block)
638
+ end
639
+
640
+ # Marks the Recommendation State as Failed. Users can use this method to
641
+ # indicate to the Recommender API that they have applied the recommendation
642
+ # themselves, and the operation failed. This stops the recommendation content
643
+ # from being updated. Associated insights are frozen and placed in the ACCEPTED
644
+ # state. MarkRecommendationFailed can be applied to recommendations in ACTIVE,
645
+ # CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM
646
+ # permission for the specified recommender.
647
+ # @param [String] name
648
+ # Required. Name of the recommendation.
649
+ # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest] google_cloud_recommender_v1beta1_mark_recommendation_failed_request_object
650
+ # @param [String] fields
651
+ # Selector specifying which fields to include in a partial response.
652
+ # @param [String] quota_user
653
+ # Available to use for quota purposes for server-side applications. Can be any
654
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
655
+ # @param [Google::Apis::RequestOptions] options
656
+ # Request-specific options
657
+ #
658
+ # @yield [result, err] Result & error if block supplied
659
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object
660
+ # @yieldparam err [StandardError] error object if request failed
661
+ #
662
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation]
663
+ #
664
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
665
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
666
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
667
+ def mark_folder_location_recommender_recommendation_failed(name, google_cloud_recommender_v1beta1_mark_recommendation_failed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
668
+ command = make_simple_command(:post, 'v1beta1/{+name}:markFailed', options)
669
+ command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest::Representation
670
+ command.request_object = google_cloud_recommender_v1beta1_mark_recommendation_failed_request_object
671
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation
672
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation
673
+ command.params['name'] = name unless name.nil?
674
+ command.query['fields'] = fields unless fields.nil?
675
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
676
+ execute_or_queue_command(command, &block)
677
+ end
678
+
679
+ # Marks the Recommendation State as Succeeded. Users can use this method to
680
+ # indicate to the Recommender API that they have applied the recommendation
681
+ # themselves, and the operation was successful. This stops the recommendation
682
+ # content from being updated. Associated insights are frozen and placed in the
683
+ # ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations
684
+ # in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.
685
+ # update IAM permission for the specified recommender.
686
+ # @param [String] name
687
+ # Required. Name of the recommendation.
688
+ # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest] google_cloud_recommender_v1beta1_mark_recommendation_succeeded_request_object
689
+ # @param [String] fields
690
+ # Selector specifying which fields to include in a partial response.
691
+ # @param [String] quota_user
692
+ # Available to use for quota purposes for server-side applications. Can be any
693
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
694
+ # @param [Google::Apis::RequestOptions] options
695
+ # Request-specific options
696
+ #
697
+ # @yield [result, err] Result & error if block supplied
698
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object
699
+ # @yieldparam err [StandardError] error object if request failed
700
+ #
701
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation]
702
+ #
703
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
704
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
705
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
706
+ def mark_folder_location_recommender_recommendation_succeeded(name, google_cloud_recommender_v1beta1_mark_recommendation_succeeded_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
707
+ command = make_simple_command(:post, 'v1beta1/{+name}:markSucceeded', options)
708
+ command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest::Representation
709
+ command.request_object = google_cloud_recommender_v1beta1_mark_recommendation_succeeded_request_object
710
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation
711
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation
712
+ command.params['name'] = name unless name.nil?
713
+ command.query['fields'] = fields unless fields.nil?
714
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
715
+ execute_or_queue_command(command, &block)
716
+ end
717
+
718
+ # Gets the requested insight. Requires the recommender.*.get IAM permission for
719
+ # the specified insight type.
720
+ # @param [String] name
721
+ # Required. Name of the insight.
722
+ # @param [String] fields
723
+ # Selector specifying which fields to include in a partial response.
724
+ # @param [String] quota_user
725
+ # Available to use for quota purposes for server-side applications. Can be any
726
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
727
+ # @param [Google::Apis::RequestOptions] options
728
+ # Request-specific options
729
+ #
730
+ # @yield [result, err] Result & error if block supplied
731
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight] parsed result object
732
+ # @yieldparam err [StandardError] error object if request failed
733
+ #
734
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight]
735
+ #
736
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
737
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
738
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
739
+ def get_organization_location_insight_type_insight(name, fields: nil, quota_user: nil, options: nil, &block)
740
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
741
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight::Representation
742
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight
743
+ command.params['name'] = name unless name.nil?
744
+ command.query['fields'] = fields unless fields.nil?
745
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
746
+ execute_or_queue_command(command, &block)
747
+ end
748
+
749
+ # Lists insights for a Cloud project. Requires the recommender.*.list IAM
750
+ # permission for the specified insight type.
751
+ # @param [String] parent
752
+ # Required. The container resource on which to execute the request. Acceptable
753
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
754
+ # INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]
755
+ # /insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
756
+ # insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
757
+ # LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP
758
+ # Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to
759
+ # supported insight types: https://cloud.google.com/recommender/docs/insights/
760
+ # insight-types.
761
+ # @param [String] filter
762
+ # Optional. Filter expression to restrict the insights returned. Supported
763
+ # filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: *
764
+ # `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype =
765
+ # PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.
766
+ # state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These
767
+ # expressions are based on the filter language described at https://google.aip.
768
+ # dev/160)
769
+ # @param [Fixnum] page_size
770
+ # Optional. The maximum number of results to return from this request. Non-
771
+ # positive values are ignored. If not specified, the server will determine the
772
+ # number of results to return.
773
+ # @param [String] page_token
774
+ # Optional. If present, retrieves the next batch of results from the preceding
775
+ # call to this method. `page_token` must be the value of `next_page_token` from
776
+ # the previous response. The values of other method parameters must be identical
777
+ # to those in the previous call.
778
+ # @param [String] fields
779
+ # Selector specifying which fields to include in a partial response.
780
+ # @param [String] quota_user
781
+ # Available to use for quota purposes for server-side applications. Can be any
782
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
783
+ # @param [Google::Apis::RequestOptions] options
784
+ # Request-specific options
785
+ #
786
+ # @yield [result, err] Result & error if block supplied
787
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse] parsed result object
788
+ # @yieldparam err [StandardError] error object if request failed
789
+ #
790
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse]
791
+ #
792
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
793
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
794
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
795
+ def list_organization_location_insight_type_insights(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
796
+ command = make_simple_command(:get, 'v1beta1/{+parent}/insights', options)
797
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse::Representation
798
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListInsightsResponse
799
+ command.params['parent'] = parent unless parent.nil?
800
+ command.query['filter'] = filter unless filter.nil?
801
+ command.query['pageSize'] = page_size unless page_size.nil?
802
+ command.query['pageToken'] = page_token unless page_token.nil?
803
+ command.query['fields'] = fields unless fields.nil?
804
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
805
+ execute_or_queue_command(command, &block)
806
+ end
807
+
808
+ # Marks the Insight State as Accepted. Users can use this method to indicate to
809
+ # the Recommender API that they have applied some action based on the insight.
810
+ # This stops the insight content from being updated. MarkInsightAccepted can be
811
+ # applied to insights in ACTIVE state. Requires the recommender.*.update IAM
812
+ # permission for the specified insight.
813
+ # @param [String] name
814
+ # Required. Name of the insight.
815
+ # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest] google_cloud_recommender_v1beta1_mark_insight_accepted_request_object
816
+ # @param [String] fields
817
+ # Selector specifying which fields to include in a partial response.
818
+ # @param [String] quota_user
819
+ # Available to use for quota purposes for server-side applications. Can be any
820
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
821
+ # @param [Google::Apis::RequestOptions] options
822
+ # Request-specific options
823
+ #
824
+ # @yield [result, err] Result & error if block supplied
825
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight] parsed result object
826
+ # @yieldparam err [StandardError] error object if request failed
827
+ #
828
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight]
829
+ #
830
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
831
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
832
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
833
+ def mark_organization_location_insight_type_insight_accepted(name, google_cloud_recommender_v1beta1_mark_insight_accepted_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
834
+ command = make_simple_command(:post, 'v1beta1/{+name}:markAccepted', options)
835
+ command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest::Representation
836
+ command.request_object = google_cloud_recommender_v1beta1_mark_insight_accepted_request_object
837
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight::Representation
838
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Insight
839
+ command.params['name'] = name unless name.nil?
840
+ command.query['fields'] = fields unless fields.nil?
841
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
842
+ execute_or_queue_command(command, &block)
843
+ end
844
+
845
+ # Gets the requested recommendation. Requires the recommender.*.get IAM
846
+ # permission for the specified recommender.
847
+ # @param [String] name
848
+ # Required. Name of the recommendation.
849
+ # @param [String] fields
850
+ # Selector specifying which fields to include in a partial response.
851
+ # @param [String] quota_user
852
+ # Available to use for quota purposes for server-side applications. Can be any
853
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
854
+ # @param [Google::Apis::RequestOptions] options
855
+ # Request-specific options
856
+ #
857
+ # @yield [result, err] Result & error if block supplied
858
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object
859
+ # @yieldparam err [StandardError] error object if request failed
860
+ #
861
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation]
862
+ #
863
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
864
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
865
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
866
+ def get_organization_location_recommender_recommendation(name, fields: nil, quota_user: nil, options: nil, &block)
867
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
868
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation
869
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation
870
+ command.params['name'] = name unless name.nil?
871
+ command.query['fields'] = fields unless fields.nil?
872
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
873
+ execute_or_queue_command(command, &block)
874
+ end
875
+
876
+ # Lists recommendations for a Cloud project. Requires the recommender.*.list IAM
877
+ # permission for the specified recommender.
878
+ # @param [String] parent
879
+ # Required. The container resource on which to execute the request. Acceptable
880
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
881
+ # RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/
882
+ # recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
883
+ # recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
884
+ # LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations:
885
+ # https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
886
+ # recommenders: https://cloud.google.com/recommender/docs/recommenders.
887
+ # @param [String] filter
888
+ # Filter expression to restrict the recommendations returned. Supported filter
889
+ # fields: * `state_info.state` * `recommenderSubtype` * `priority` Examples: * `
890
+ # stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype
891
+ # = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR
892
+ # priority = P2` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)
893
+ # ` (These expressions are based on the filter language described at https://
894
+ # google.aip.dev/160)
895
+ # @param [Fixnum] page_size
896
+ # Optional. The maximum number of results to return from this request. Non-
897
+ # positive values are ignored. If not specified, the server will determine the
898
+ # number of results to return.
899
+ # @param [String] page_token
900
+ # Optional. If present, retrieves the next batch of results from the preceding
901
+ # call to this method. `page_token` must be the value of `next_page_token` from
902
+ # the previous response. The values of other method parameters must be identical
903
+ # to those in the previous call.
904
+ # @param [String] fields
905
+ # Selector specifying which fields to include in a partial response.
906
+ # @param [String] quota_user
907
+ # Available to use for quota purposes for server-side applications. Can be any
908
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
909
+ # @param [Google::Apis::RequestOptions] options
910
+ # Request-specific options
911
+ #
912
+ # @yield [result, err] Result & error if block supplied
913
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse] parsed result object
914
+ # @yieldparam err [StandardError] error object if request failed
915
+ #
916
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse]
917
+ #
918
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
919
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
920
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
921
+ def list_organization_location_recommender_recommendations(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
922
+ command = make_simple_command(:get, 'v1beta1/{+parent}/recommendations', options)
923
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse::Representation
924
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1ListRecommendationsResponse
925
+ command.params['parent'] = parent unless parent.nil?
926
+ command.query['filter'] = filter unless filter.nil?
927
+ command.query['pageSize'] = page_size unless page_size.nil?
928
+ command.query['pageToken'] = page_token unless page_token.nil?
929
+ command.query['fields'] = fields unless fields.nil?
930
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
931
+ execute_or_queue_command(command, &block)
932
+ end
933
+
934
+ # Marks the Recommendation State as Claimed. Users can use this method to
935
+ # indicate to the Recommender API that they are starting to apply the
936
+ # recommendation themselves. This stops the recommendation content from being
937
+ # updated. Associated insights are frozen and placed in the ACCEPTED state.
938
+ # MarkRecommendationClaimed can be applied to recommendations in CLAIMED or
939
+ # ACTIVE state. Requires the recommender.*.update IAM permission for the
940
+ # specified recommender.
941
+ # @param [String] name
942
+ # Required. Name of the recommendation.
943
+ # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest] google_cloud_recommender_v1beta1_mark_recommendation_claimed_request_object
944
+ # @param [String] fields
945
+ # Selector specifying which fields to include in a partial response.
946
+ # @param [String] quota_user
947
+ # Available to use for quota purposes for server-side applications. Can be any
948
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
949
+ # @param [Google::Apis::RequestOptions] options
950
+ # Request-specific options
951
+ #
952
+ # @yield [result, err] Result & error if block supplied
953
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object
954
+ # @yieldparam err [StandardError] error object if request failed
955
+ #
956
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation]
957
+ #
958
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
959
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
960
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
961
+ def mark_organization_location_recommender_recommendation_claimed(name, google_cloud_recommender_v1beta1_mark_recommendation_claimed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
962
+ command = make_simple_command(:post, 'v1beta1/{+name}:markClaimed', options)
963
+ command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest::Representation
964
+ command.request_object = google_cloud_recommender_v1beta1_mark_recommendation_claimed_request_object
965
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation
966
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation
967
+ command.params['name'] = name unless name.nil?
968
+ command.query['fields'] = fields unless fields.nil?
969
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
970
+ execute_or_queue_command(command, &block)
971
+ end
972
+
973
+ # Marks the Recommendation State as Failed. Users can use this method to
974
+ # indicate to the Recommender API that they have applied the recommendation
975
+ # themselves, and the operation failed. This stops the recommendation content
976
+ # from being updated. Associated insights are frozen and placed in the ACCEPTED
977
+ # state. MarkRecommendationFailed can be applied to recommendations in ACTIVE,
978
+ # CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM
979
+ # permission for the specified recommender.
980
+ # @param [String] name
981
+ # Required. Name of the recommendation.
982
+ # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest] google_cloud_recommender_v1beta1_mark_recommendation_failed_request_object
983
+ # @param [String] fields
984
+ # Selector specifying which fields to include in a partial response.
985
+ # @param [String] quota_user
986
+ # Available to use for quota purposes for server-side applications. Can be any
987
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
988
+ # @param [Google::Apis::RequestOptions] options
989
+ # Request-specific options
990
+ #
991
+ # @yield [result, err] Result & error if block supplied
992
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object
993
+ # @yieldparam err [StandardError] error object if request failed
994
+ #
995
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation]
996
+ #
997
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
998
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
999
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1000
+ def mark_organization_location_recommender_recommendation_failed(name, google_cloud_recommender_v1beta1_mark_recommendation_failed_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1001
+ command = make_simple_command(:post, 'v1beta1/{+name}:markFailed', options)
1002
+ command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest::Representation
1003
+ command.request_object = google_cloud_recommender_v1beta1_mark_recommendation_failed_request_object
1004
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation
1005
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation
1006
+ command.params['name'] = name unless name.nil?
1007
+ command.query['fields'] = fields unless fields.nil?
1008
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1009
+ execute_or_queue_command(command, &block)
1010
+ end
1011
+
1012
+ # Marks the Recommendation State as Succeeded. Users can use this method to
1013
+ # indicate to the Recommender API that they have applied the recommendation
1014
+ # themselves, and the operation was successful. This stops the recommendation
1015
+ # content from being updated. Associated insights are frozen and placed in the
1016
+ # ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations
1017
+ # in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.
1018
+ # update IAM permission for the specified recommender.
1019
+ # @param [String] name
1020
+ # Required. Name of the recommendation.
1021
+ # @param [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest] google_cloud_recommender_v1beta1_mark_recommendation_succeeded_request_object
1022
+ # @param [String] fields
1023
+ # Selector specifying which fields to include in a partial response.
1024
+ # @param [String] quota_user
1025
+ # Available to use for quota purposes for server-side applications. Can be any
1026
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1027
+ # @param [Google::Apis::RequestOptions] options
1028
+ # Request-specific options
1029
+ #
1030
+ # @yield [result, err] Result & error if block supplied
1031
+ # @yieldparam result [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation] parsed result object
1032
+ # @yieldparam err [StandardError] error object if request failed
1033
+ #
1034
+ # @return [Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation]
1035
+ #
1036
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1037
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1038
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1039
+ def mark_organization_location_recommender_recommendation_succeeded(name, google_cloud_recommender_v1beta1_mark_recommendation_succeeded_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1040
+ command = make_simple_command(:post, 'v1beta1/{+name}:markSucceeded', options)
1041
+ command.request_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest::Representation
1042
+ command.request_object = google_cloud_recommender_v1beta1_mark_recommendation_succeeded_request_object
1043
+ command.response_representation = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation::Representation
1044
+ command.response_class = Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1Recommendation
1045
+ command.params['name'] = name unless name.nil?
1046
+ command.query['fields'] = fields unless fields.nil?
1047
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1048
+ execute_or_queue_command(command, &block)
1049
+ end
1050
+
369
1051
  # Gets the requested insight. Requires the recommender.*.get IAM permission for
370
1052
  # the specified insight type.
371
1053
  # @param [String] name
@@ -401,13 +1083,22 @@ module Google
401
1083
  # permission for the specified insight type.
402
1084
  # @param [String] parent
403
1085
  # Required. The container resource on which to execute the request. Acceptable
404
- # formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
405
- # INSIGHT_TYPE_ID]", LOCATION here refers to GCP Locations: https://cloud.google.
406
- # com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https:/
407
- # /cloud.google.com/recommender/docs/insights/insight-types.
1086
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[
1087
+ # INSIGHT_TYPE_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]
1088
+ # /insightTypes/[INSIGHT_TYPE_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
1089
+ # insightTypes/[INSIGHT_TYPE_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
1090
+ # LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP
1091
+ # Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to
1092
+ # supported insight types: https://cloud.google.com/recommender/docs/insights/
1093
+ # insight-types.
408
1094
  # @param [String] filter
409
1095
  # Optional. Filter expression to restrict the insights returned. Supported
410
- # filter fields: state Eg: `state:"DISMISSED" or state:"ACTIVE"
1096
+ # filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: *
1097
+ # `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype =
1098
+ # PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.
1099
+ # state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These
1100
+ # expressions are based on the filter language described at https://google.aip.
1101
+ # dev/160)
411
1102
  # @param [Fixnum] page_size
412
1103
  # Optional. The maximum number of results to return from this request. Non-
413
1104
  # positive values are ignored. If not specified, the server will determine the
@@ -519,14 +1210,21 @@ module Google
519
1210
  # permission for the specified recommender.
520
1211
  # @param [String] parent
521
1212
  # Required. The container resource on which to execute the request. Acceptable
522
- # formats: 1. "projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
523
- # RECOMMENDER_ID]", LOCATION here refers to GCP Locations: https://cloud.google.
524
- # com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://
525
- # cloud.google.com/recommender/docs/recommenders.
1213
+ # formats: 1. `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[
1214
+ # RECOMMENDER_ID]` 2. `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/
1215
+ # recommenders/[RECOMMENDER_ID]` 3. `folders/[FOLDER_ID]/locations/[LOCATION]/
1216
+ # recommenders/[RECOMMENDER_ID]` 4. `organizations/[ORGANIZATION_ID]/locations/[
1217
+ # LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations:
1218
+ # https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported
1219
+ # recommenders: https://cloud.google.com/recommender/docs/recommenders.
526
1220
  # @param [String] filter
527
1221
  # Filter expression to restrict the recommendations returned. Supported filter
528
- # fields: state_info.state Eg: `state_info.state:"DISMISSED" or state_info.state:
529
- # "FAILED"
1222
+ # fields: * `state_info.state` * `recommenderSubtype` * `priority` Examples: * `
1223
+ # stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype
1224
+ # = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR
1225
+ # priority = P2` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)
1226
+ # ` (These expressions are based on the filter language described at https://
1227
+ # google.aip.dev/160)
530
1228
  # @param [Fixnum] page_size
531
1229
  # Optional. The maximum number of results to return from this request. Non-
532
1230
  # positive values are ignored. If not specified, the server will determine the
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-recommender_v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-08 00:00:00.000000000 Z
11
+ date: 2021-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -52,7 +52,7 @@ licenses:
52
52
  metadata:
53
53
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
54
54
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-recommender_v1beta1/CHANGELOG.md
55
- documentation_uri: https://googleapis.dev/ruby/google-apis-recommender_v1beta1/v0.1.0
55
+ documentation_uri: https://googleapis.dev/ruby/google-apis-recommender_v1beta1/v0.6.0
56
56
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-recommender_v1beta1
57
57
  post_install_message:
58
58
  rdoc_options: []
@@ -62,14 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: '2.4'
65
+ version: '2.5'
66
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.1.4
72
+ rubygems_version: 3.2.17
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Simple REST client for Recommender API V1beta1