google-cloud-recommender-v1 0.8.6 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -6
- data/lib/google/cloud/recommender/v1/insight_pb.rb +11 -1
- data/lib/google/cloud/recommender/v1/insight_type_config_pb.rb +37 -0
- data/lib/google/cloud/recommender/v1/recommendation_pb.rb +18 -1
- data/lib/google/cloud/recommender/v1/recommender/client.rb +477 -29
- data/lib/google/cloud/recommender/v1/recommender/paths.rb +86 -0
- data/lib/google/cloud/recommender/v1/recommender_config_pb.rb +37 -0
- data/lib/google/cloud/recommender/v1/recommender_service_pb.rb +25 -1
- data/lib/google/cloud/recommender/v1/recommender_service_services_pb.rb +16 -4
- data/lib/google/cloud/recommender/v1/version.rb +1 -1
- data/lib/google/cloud/recommender/v1.rb +2 -0
- data/proto_docs/google/cloud/recommender/v1/insight.rb +21 -0
- data/proto_docs/google/cloud/recommender/v1/insight_type_config.rb +88 -0
- data/proto_docs/google/cloud/recommender/v1/recommendation.rb +47 -2
- data/proto_docs/google/cloud/recommender/v1/recommender_config.rb +88 -0
- data/proto_docs/google/cloud/recommender/v1/recommender_service.rb +141 -25
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +2 -2
- metadata +17 -12
@@ -178,6 +178,49 @@ module Google
|
|
178
178
|
resource.call(**args)
|
179
179
|
end
|
180
180
|
|
181
|
+
##
|
182
|
+
# Create a fully-qualified InsightTypeConfig resource string.
|
183
|
+
#
|
184
|
+
# @overload insight_type_config_path(project:, location:, insight_type:)
|
185
|
+
# The resource will be in the following format:
|
186
|
+
#
|
187
|
+
# `projects/{project}/locations/{location}/insightTypes/{insight_type}/config`
|
188
|
+
#
|
189
|
+
# @param project [String]
|
190
|
+
# @param location [String]
|
191
|
+
# @param insight_type [String]
|
192
|
+
#
|
193
|
+
# @overload insight_type_config_path(organization:, location:, insight_type:)
|
194
|
+
# The resource will be in the following format:
|
195
|
+
#
|
196
|
+
# `organizations/{organization}/locations/{location}/insightTypes/{insight_type}/config`
|
197
|
+
#
|
198
|
+
# @param organization [String]
|
199
|
+
# @param location [String]
|
200
|
+
# @param insight_type [String]
|
201
|
+
#
|
202
|
+
# @return [::String]
|
203
|
+
def insight_type_config_path **args
|
204
|
+
resources = {
|
205
|
+
"insight_type:location:project" => (proc do |project:, location:, insight_type:|
|
206
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
207
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
208
|
+
|
209
|
+
"projects/#{project}/locations/#{location}/insightTypes/#{insight_type}/config"
|
210
|
+
end),
|
211
|
+
"insight_type:location:organization" => (proc do |organization:, location:, insight_type:|
|
212
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
213
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
214
|
+
|
215
|
+
"organizations/#{organization}/locations/#{location}/insightTypes/#{insight_type}/config"
|
216
|
+
end)
|
217
|
+
}
|
218
|
+
|
219
|
+
resource = resources[args.keys.sort.join(":")]
|
220
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
221
|
+
resource.call(**args)
|
222
|
+
end
|
223
|
+
|
181
224
|
##
|
182
225
|
# Create a fully-qualified Recommendation resource string.
|
183
226
|
#
|
@@ -332,6 +375,49 @@ module Google
|
|
332
375
|
resource.call(**args)
|
333
376
|
end
|
334
377
|
|
378
|
+
##
|
379
|
+
# Create a fully-qualified RecommenderConfig resource string.
|
380
|
+
#
|
381
|
+
# @overload recommender_config_path(project:, location:, recommender:)
|
382
|
+
# The resource will be in the following format:
|
383
|
+
#
|
384
|
+
# `projects/{project}/locations/{location}/recommenders/{recommender}/config`
|
385
|
+
#
|
386
|
+
# @param project [String]
|
387
|
+
# @param location [String]
|
388
|
+
# @param recommender [String]
|
389
|
+
#
|
390
|
+
# @overload recommender_config_path(organization:, location:, recommender:)
|
391
|
+
# The resource will be in the following format:
|
392
|
+
#
|
393
|
+
# `organizations/{organization}/locations/{location}/recommenders/{recommender}/config`
|
394
|
+
#
|
395
|
+
# @param organization [String]
|
396
|
+
# @param location [String]
|
397
|
+
# @param recommender [String]
|
398
|
+
#
|
399
|
+
# @return [::String]
|
400
|
+
def recommender_config_path **args
|
401
|
+
resources = {
|
402
|
+
"location:project:recommender" => (proc do |project:, location:, recommender:|
|
403
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
404
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
405
|
+
|
406
|
+
"projects/#{project}/locations/#{location}/recommenders/#{recommender}/config"
|
407
|
+
end),
|
408
|
+
"location:organization:recommender" => (proc do |organization:, location:, recommender:|
|
409
|
+
raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/"
|
410
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
411
|
+
|
412
|
+
"organizations/#{organization}/locations/#{location}/recommenders/#{recommender}/config"
|
413
|
+
end)
|
414
|
+
}
|
415
|
+
|
416
|
+
resource = resources[args.keys.sort.join(":")]
|
417
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
418
|
+
resource.call(**args)
|
419
|
+
end
|
420
|
+
|
335
421
|
extend self
|
336
422
|
end
|
337
423
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/recommender/v1/recommender_config.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/field_behavior_pb'
|
7
|
+
require 'google/api/resource_pb'
|
8
|
+
require 'google/protobuf/struct_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
10
|
+
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
|
+
add_file("google/cloud/recommender/v1/recommender_config.proto", :syntax => :proto3) do
|
13
|
+
add_message "google.cloud.recommender.v1.RecommenderConfig" do
|
14
|
+
optional :name, :string, 1
|
15
|
+
optional :recommender_generation_config, :message, 2, "google.cloud.recommender.v1.RecommenderGenerationConfig"
|
16
|
+
optional :etag, :string, 3
|
17
|
+
optional :update_time, :message, 4, "google.protobuf.Timestamp"
|
18
|
+
optional :revision_id, :string, 5
|
19
|
+
map :annotations, :string, :string, 6
|
20
|
+
optional :display_name, :string, 7
|
21
|
+
end
|
22
|
+
add_message "google.cloud.recommender.v1.RecommenderGenerationConfig" do
|
23
|
+
optional :params, :message, 1, "google.protobuf.Struct"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
module Google
|
29
|
+
module Cloud
|
30
|
+
module Recommender
|
31
|
+
module V1
|
32
|
+
RecommenderConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.RecommenderConfig").msgclass
|
33
|
+
RecommenderGenerationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.RecommenderGenerationConfig").msgclass
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -1,13 +1,17 @@
|
|
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
|
+
|
4
6
|
require 'google/api/annotations_pb'
|
5
7
|
require 'google/api/client_pb'
|
6
8
|
require 'google/api/field_behavior_pb'
|
7
9
|
require 'google/api/resource_pb'
|
8
10
|
require 'google/cloud/recommender/v1/insight_pb'
|
11
|
+
require 'google/cloud/recommender/v1/insight_type_config_pb'
|
9
12
|
require 'google/cloud/recommender/v1/recommendation_pb'
|
10
|
-
require 'google/
|
13
|
+
require 'google/cloud/recommender/v1/recommender_config_pb'
|
14
|
+
require 'google/protobuf/field_mask_pb'
|
11
15
|
|
12
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
17
|
add_file("google/cloud/recommender/v1/recommender_service.proto", :syntax => :proto3) do
|
@@ -57,6 +61,22 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
57
61
|
map :state_metadata, :string, :string, 2
|
58
62
|
optional :etag, :string, 3
|
59
63
|
end
|
64
|
+
add_message "google.cloud.recommender.v1.GetRecommenderConfigRequest" do
|
65
|
+
optional :name, :string, 1
|
66
|
+
end
|
67
|
+
add_message "google.cloud.recommender.v1.UpdateRecommenderConfigRequest" do
|
68
|
+
optional :recommender_config, :message, 1, "google.cloud.recommender.v1.RecommenderConfig"
|
69
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
70
|
+
optional :validate_only, :bool, 3
|
71
|
+
end
|
72
|
+
add_message "google.cloud.recommender.v1.GetInsightTypeConfigRequest" do
|
73
|
+
optional :name, :string, 1
|
74
|
+
end
|
75
|
+
add_message "google.cloud.recommender.v1.UpdateInsightTypeConfigRequest" do
|
76
|
+
optional :insight_type_config, :message, 1, "google.cloud.recommender.v1.InsightTypeConfig"
|
77
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
78
|
+
optional :validate_only, :bool, 3
|
79
|
+
end
|
60
80
|
end
|
61
81
|
end
|
62
82
|
|
@@ -74,6 +94,10 @@ module Google
|
|
74
94
|
MarkRecommendationClaimedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.MarkRecommendationClaimedRequest").msgclass
|
75
95
|
MarkRecommendationSucceededRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.MarkRecommendationSucceededRequest").msgclass
|
76
96
|
MarkRecommendationFailedRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.MarkRecommendationFailedRequest").msgclass
|
97
|
+
GetRecommenderConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.GetRecommenderConfigRequest").msgclass
|
98
|
+
UpdateRecommenderConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.UpdateRecommenderConfigRequest").msgclass
|
99
|
+
GetInsightTypeConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.GetInsightTypeConfigRequest").msgclass
|
100
|
+
UpdateInsightTypeConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.recommender.v1.UpdateInsightTypeConfigRequest").msgclass
|
77
101
|
end
|
78
102
|
end
|
79
103
|
end
|
@@ -36,8 +36,8 @@ module Google
|
|
36
36
|
self.unmarshal_class_method = :decode
|
37
37
|
self.service_name = 'google.cloud.recommender.v1.Recommender'
|
38
38
|
|
39
|
-
# Lists insights for
|
40
|
-
# permission for the specified insight type.
|
39
|
+
# Lists insights for the specified Cloud Resource. Requires the
|
40
|
+
# recommender.*.list IAM permission for the specified insight type.
|
41
41
|
rpc :ListInsights, ::Google::Cloud::Recommender::V1::ListInsightsRequest, ::Google::Cloud::Recommender::V1::ListInsightsResponse
|
42
42
|
# Gets the requested insight. Requires the recommender.*.get IAM permission
|
43
43
|
# for the specified insight type.
|
@@ -49,8 +49,8 @@ module Google
|
|
49
49
|
# MarkInsightAccepted can be applied to insights in ACTIVE state. Requires
|
50
50
|
# the recommender.*.update IAM permission for the specified insight.
|
51
51
|
rpc :MarkInsightAccepted, ::Google::Cloud::Recommender::V1::MarkInsightAcceptedRequest, ::Google::Cloud::Recommender::V1::Insight
|
52
|
-
# Lists recommendations for
|
53
|
-
# IAM permission for the specified recommender.
|
52
|
+
# Lists recommendations for the specified Cloud Resource. Requires the
|
53
|
+
# recommender.*.list IAM permission for the specified recommender.
|
54
54
|
rpc :ListRecommendations, ::Google::Cloud::Recommender::V1::ListRecommendationsRequest, ::Google::Cloud::Recommender::V1::ListRecommendationsResponse
|
55
55
|
# Gets the requested recommendation. Requires the recommender.*.get
|
56
56
|
# IAM permission for the specified recommender.
|
@@ -90,6 +90,18 @@ module Google
|
|
90
90
|
# Requires the recommender.*.update IAM permission for the specified
|
91
91
|
# recommender.
|
92
92
|
rpc :MarkRecommendationFailed, ::Google::Cloud::Recommender::V1::MarkRecommendationFailedRequest, ::Google::Cloud::Recommender::V1::Recommendation
|
93
|
+
# Gets the requested Recommender Config. There is only one instance of the
|
94
|
+
# config for each Recommender.
|
95
|
+
rpc :GetRecommenderConfig, ::Google::Cloud::Recommender::V1::GetRecommenderConfigRequest, ::Google::Cloud::Recommender::V1::RecommenderConfig
|
96
|
+
# Updates a Recommender Config. This will create a new revision of the
|
97
|
+
# config.
|
98
|
+
rpc :UpdateRecommenderConfig, ::Google::Cloud::Recommender::V1::UpdateRecommenderConfigRequest, ::Google::Cloud::Recommender::V1::RecommenderConfig
|
99
|
+
# Gets the requested InsightTypeConfig. There is only one instance of the
|
100
|
+
# config for each InsightType.
|
101
|
+
rpc :GetInsightTypeConfig, ::Google::Cloud::Recommender::V1::GetInsightTypeConfigRequest, ::Google::Cloud::Recommender::V1::InsightTypeConfig
|
102
|
+
# Updates an InsightTypeConfig change. This will create a new revision of the
|
103
|
+
# config.
|
104
|
+
rpc :UpdateInsightTypeConfig, ::Google::Cloud::Recommender::V1::UpdateInsightTypeConfigRequest, ::Google::Cloud::Recommender::V1::InsightTypeConfig
|
93
105
|
end
|
94
106
|
|
95
107
|
Stub = Service.rpc_stub_class
|
@@ -54,6 +54,9 @@ module Google
|
|
54
54
|
# @!attribute [rw] category
|
55
55
|
# @return [::Google::Cloud::Recommender::V1::Insight::Category]
|
56
56
|
# Category being targeted by the insight.
|
57
|
+
# @!attribute [rw] severity
|
58
|
+
# @return [::Google::Cloud::Recommender::V1::Insight::Severity]
|
59
|
+
# Insight's severity.
|
57
60
|
# @!attribute [rw] etag
|
58
61
|
# @return [::String]
|
59
62
|
# Fingerprint of the Insight. Provides optimistic locking when updating
|
@@ -92,6 +95,24 @@ module Google
|
|
92
95
|
# This insight is related to manageability.
|
93
96
|
MANAGEABILITY = 4
|
94
97
|
end
|
98
|
+
|
99
|
+
# Insight severity levels.
|
100
|
+
module Severity
|
101
|
+
# Insight has unspecified severity.
|
102
|
+
SEVERITY_UNSPECIFIED = 0
|
103
|
+
|
104
|
+
# Insight has low severity.
|
105
|
+
LOW = 1
|
106
|
+
|
107
|
+
# Insight has medium severity.
|
108
|
+
MEDIUM = 2
|
109
|
+
|
110
|
+
# Insight has high severity.
|
111
|
+
HIGH = 3
|
112
|
+
|
113
|
+
# Insight has critical severity.
|
114
|
+
CRITICAL = 4
|
115
|
+
end
|
95
116
|
end
|
96
117
|
|
97
118
|
# Information related to insight state.
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Recommender
|
23
|
+
module V1
|
24
|
+
# Configuration for an InsightType.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Name of insight type config.
|
28
|
+
# Eg,
|
29
|
+
# projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config
|
30
|
+
# @!attribute [rw] insight_type_generation_config
|
31
|
+
# @return [::Google::Cloud::Recommender::V1::InsightTypeGenerationConfig]
|
32
|
+
# InsightTypeGenerationConfig which configures the generation of
|
33
|
+
# insights for this insight type.
|
34
|
+
# @!attribute [rw] etag
|
35
|
+
# @return [::String]
|
36
|
+
# Fingerprint of the InsightTypeConfig. Provides optimistic locking when
|
37
|
+
# updating.
|
38
|
+
# @!attribute [rw] update_time
|
39
|
+
# @return [::Google::Protobuf::Timestamp]
|
40
|
+
# Last time when the config was updated.
|
41
|
+
# @!attribute [r] revision_id
|
42
|
+
# @return [::String]
|
43
|
+
# Output only. Immutable. The revision ID of the config.
|
44
|
+
# A new revision is committed whenever the config is changed in any way.
|
45
|
+
# The format is an 8-character hexadecimal string.
|
46
|
+
# @!attribute [rw] annotations
|
47
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
48
|
+
# Allows clients to store small amounts of arbitrary data. Annotations must
|
49
|
+
# follow the Kubernetes syntax.
|
50
|
+
# The total size of all keys and values combined is limited to 256k.
|
51
|
+
# Key can have 2 segments: prefix (optional) and name (required),
|
52
|
+
# separated by a slash (/).
|
53
|
+
# Prefix must be a DNS subdomain.
|
54
|
+
# Name must be 63 characters or less, begin and end with alphanumerics,
|
55
|
+
# with dashes (-), underscores (_), dots (.), and alphanumerics between.
|
56
|
+
# @!attribute [rw] display_name
|
57
|
+
# @return [::String]
|
58
|
+
# A user-settable field to provide a human-readable name to be used in user
|
59
|
+
# interfaces.
|
60
|
+
class InsightTypeConfig
|
61
|
+
include ::Google::Protobuf::MessageExts
|
62
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
63
|
+
|
64
|
+
# @!attribute [rw] key
|
65
|
+
# @return [::String]
|
66
|
+
# @!attribute [rw] value
|
67
|
+
# @return [::String]
|
68
|
+
class AnnotationsEntry
|
69
|
+
include ::Google::Protobuf::MessageExts
|
70
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# A configuration to customize the generation of insights.
|
75
|
+
# Eg, customizing the lookback period considered when generating a
|
76
|
+
# insight.
|
77
|
+
# @!attribute [rw] params
|
78
|
+
# @return [::Google::Protobuf::Struct]
|
79
|
+
# Parameters for this InsightTypeGenerationConfig. These configs can be used
|
80
|
+
# by or are applied to all subtypes.
|
81
|
+
class InsightTypeGenerationConfig
|
82
|
+
include ::Google::Protobuf::MessageExts
|
83
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -54,6 +54,9 @@ module Google
|
|
54
54
|
# Optional set of additional impact that this recommendation may have when
|
55
55
|
# trying to optimize for the primary category. These may be positive
|
56
56
|
# or negative.
|
57
|
+
# @!attribute [rw] priority
|
58
|
+
# @return [::Google::Cloud::Recommender::V1::Recommendation::Priority]
|
59
|
+
# Recommendation's priority.
|
57
60
|
# @!attribute [rw] content
|
58
61
|
# @return [::Google::Cloud::Recommender::V1::RecommendationContent]
|
59
62
|
# Content of the recommendation describing recommended changes to resources.
|
@@ -67,6 +70,12 @@ module Google
|
|
67
70
|
# @!attribute [rw] associated_insights
|
68
71
|
# @return [::Array<::Google::Cloud::Recommender::V1::Recommendation::InsightReference>]
|
69
72
|
# Insights that led to this recommendation.
|
73
|
+
# @!attribute [rw] xor_group_id
|
74
|
+
# @return [::String]
|
75
|
+
# Corresponds to a mutually exclusive group ID within a recommender.
|
76
|
+
# A non-empty ID indicates that the recommendation belongs to a mutually
|
77
|
+
# exclusive group. This means that only one recommendation within the group
|
78
|
+
# is suggested to be applied.
|
70
79
|
class Recommendation
|
71
80
|
include ::Google::Protobuf::MessageExts
|
72
81
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -80,6 +89,24 @@ module Google
|
|
80
89
|
include ::Google::Protobuf::MessageExts
|
81
90
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
82
91
|
end
|
92
|
+
|
93
|
+
# Recommendation priority levels.
|
94
|
+
module Priority
|
95
|
+
# Recommendation has unspecified priority.
|
96
|
+
PRIORITY_UNSPECIFIED = 0
|
97
|
+
|
98
|
+
# Recommendation has P4 priority (lowest priority).
|
99
|
+
P4 = 1
|
100
|
+
|
101
|
+
# Recommendation has P3 priority (second lowest priority).
|
102
|
+
P3 = 2
|
103
|
+
|
104
|
+
# Recommendation has P2 priority (second highest priority).
|
105
|
+
P2 = 3
|
106
|
+
|
107
|
+
# Recommendation has P1 priority (highest priority).
|
108
|
+
P1 = 4
|
109
|
+
end
|
83
110
|
end
|
84
111
|
|
85
112
|
# Contains what resources are changing and how they are changing.
|
@@ -88,6 +115,9 @@ module Google
|
|
88
115
|
# Operations to one or more Google Cloud resources grouped in such a way
|
89
116
|
# that, all operations within one group are expected to be performed
|
90
117
|
# atomically and in an order.
|
118
|
+
# @!attribute [rw] overview
|
119
|
+
# @return [::Google::Protobuf::Struct]
|
120
|
+
# Condensed overview information about the recommendation.
|
91
121
|
class RecommendationContent
|
92
122
|
include ::Google::Protobuf::MessageExts
|
93
123
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -114,7 +144,7 @@ module Google
|
|
114
144
|
# See https://tools.ietf.org/html/rfc6902 for details on the original RFC.
|
115
145
|
# @!attribute [rw] action
|
116
146
|
# @return [::String]
|
117
|
-
# Type of this operation. Contains one of '
|
147
|
+
# Type of this operation. Contains one of 'add', 'remove', 'replace', 'move',
|
118
148
|
# 'copy', 'test' and custom operations. This field is case-insensitive and
|
119
149
|
# always populated.
|
120
150
|
# @!attribute [rw] resource_type
|
@@ -184,7 +214,7 @@ module Google
|
|
184
214
|
# @!attribute [rw] path_value_matchers
|
185
215
|
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Recommender::V1::ValueMatcher}]
|
186
216
|
# Similar to path_filters, this contains set of filters to apply if `path`
|
187
|
-
# field
|
217
|
+
# field refers to array elements. This is meant to support value matching
|
188
218
|
# beyond exact match. To perform exact match, use path_filters.
|
189
219
|
# When both path_filters and path_value_matchers are set, an implicit AND
|
190
220
|
# must be performed.
|
@@ -228,6 +258,9 @@ module Google
|
|
228
258
|
# An approximate projection on amount saved or amount incurred. Negative cost
|
229
259
|
# units indicate cost savings and positive cost units indicate increase.
|
230
260
|
# See google.type.Money documentation for positive/negative units.
|
261
|
+
#
|
262
|
+
# A user's permissions may affect whether the cost is computed using list
|
263
|
+
# prices or custom contract prices.
|
231
264
|
# @!attribute [rw] duration
|
232
265
|
# @return [::Google::Protobuf::Duration]
|
233
266
|
# Duration for which this cost applies.
|
@@ -236,6 +269,15 @@ module Google
|
|
236
269
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
237
270
|
end
|
238
271
|
|
272
|
+
# Contains various ways of describing the impact on Security.
|
273
|
+
# @!attribute [rw] details
|
274
|
+
# @return [::Google::Protobuf::Struct]
|
275
|
+
# Additional security impact details that is provided by the recommender.
|
276
|
+
class SecurityProjection
|
277
|
+
include ::Google::Protobuf::MessageExts
|
278
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
279
|
+
end
|
280
|
+
|
239
281
|
# Contains the impact a recommendation can have for a given category.
|
240
282
|
# @!attribute [rw] category
|
241
283
|
# @return [::Google::Cloud::Recommender::V1::Impact::Category]
|
@@ -243,6 +285,9 @@ module Google
|
|
243
285
|
# @!attribute [rw] cost_projection
|
244
286
|
# @return [::Google::Cloud::Recommender::V1::CostProjection]
|
245
287
|
# Use with CategoryType.COST
|
288
|
+
# @!attribute [rw] security_projection
|
289
|
+
# @return [::Google::Cloud::Recommender::V1::SecurityProjection]
|
290
|
+
# Use with CategoryType.SECURITY
|
246
291
|
class Impact
|
247
292
|
include ::Google::Protobuf::MessageExts
|
248
293
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Recommender
|
23
|
+
module V1
|
24
|
+
# Configuration for a Recommender.
|
25
|
+
# @!attribute [rw] name
|
26
|
+
# @return [::String]
|
27
|
+
# Name of recommender config.
|
28
|
+
# Eg,
|
29
|
+
# projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config
|
30
|
+
# @!attribute [rw] recommender_generation_config
|
31
|
+
# @return [::Google::Cloud::Recommender::V1::RecommenderGenerationConfig]
|
32
|
+
# RecommenderGenerationConfig which configures the Generation of
|
33
|
+
# recommendations for this recommender.
|
34
|
+
# @!attribute [rw] etag
|
35
|
+
# @return [::String]
|
36
|
+
# Fingerprint of the RecommenderConfig. Provides optimistic locking when
|
37
|
+
# updating.
|
38
|
+
# @!attribute [rw] update_time
|
39
|
+
# @return [::Google::Protobuf::Timestamp]
|
40
|
+
# Last time when the config was updated.
|
41
|
+
# @!attribute [r] revision_id
|
42
|
+
# @return [::String]
|
43
|
+
# Output only. Immutable. The revision ID of the config.
|
44
|
+
# A new revision is committed whenever the config is changed in any way.
|
45
|
+
# The format is an 8-character hexadecimal string.
|
46
|
+
# @!attribute [rw] annotations
|
47
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
48
|
+
# Allows clients to store small amounts of arbitrary data. Annotations must
|
49
|
+
# follow the Kubernetes syntax.
|
50
|
+
# The total size of all keys and values combined is limited to 256k.
|
51
|
+
# Key can have 2 segments: prefix (optional) and name (required),
|
52
|
+
# separated by a slash (/).
|
53
|
+
# Prefix must be a DNS subdomain.
|
54
|
+
# Name must be 63 characters or less, begin and end with alphanumerics,
|
55
|
+
# with dashes (-), underscores (_), dots (.), and alphanumerics between.
|
56
|
+
# @!attribute [rw] display_name
|
57
|
+
# @return [::String]
|
58
|
+
# A user-settable field to provide a human-readable name to be used in user
|
59
|
+
# interfaces.
|
60
|
+
class RecommenderConfig
|
61
|
+
include ::Google::Protobuf::MessageExts
|
62
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
63
|
+
|
64
|
+
# @!attribute [rw] key
|
65
|
+
# @return [::String]
|
66
|
+
# @!attribute [rw] value
|
67
|
+
# @return [::String]
|
68
|
+
class AnnotationsEntry
|
69
|
+
include ::Google::Protobuf::MessageExts
|
70
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# A Configuration to customize the generation of recommendations.
|
75
|
+
# Eg, customizing the lookback period considered when generating a
|
76
|
+
# recommendation.
|
77
|
+
# @!attribute [rw] params
|
78
|
+
# @return [::Google::Protobuf::Struct]
|
79
|
+
# Parameters for this RecommenderGenerationConfig. These configs can be used
|
80
|
+
# by or are applied to all subtypes.
|
81
|
+
class RecommenderGenerationConfig
|
82
|
+
include ::Google::Protobuf::MessageExts
|
83
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|