Skip to content

Commit 44d6bef

Browse files
Google APIscopybara-github
authored andcommitted
feat: Sustainability Projection
Incorporate above new features, as well as update .bazel files. PiperOrigin-RevId: 427821134
1 parent 55b9e1e commit 44d6bef

4 files changed

Lines changed: 17 additions & 3 deletions

File tree

google/cloud/recommender/v1beta1/insight.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ message Insight {
8484
// Reference to an associated recommendation.
8585
message RecommendationReference {
8686
// Recommendation resource name, e.g.
87-
// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]`
87+
// projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]
8888
string recommendation = 1;
8989
}
9090

google/cloud/recommender/v1beta1/insight_type_config.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ message InsightTypeConfig {
6767
// separated by a slash (/).
6868
// Prefix must be a DNS subdomain.
6969
// Name must be 63 characters or less, begin and end with alphanumerics,
70-
// with dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
70+
// with dashes (-), underscores (_), dots (.), and alphanumerics between.
7171
map<string, string> annotations = 6;
7272

7373
// A user-settable field to provide a human-readable name to be used in user

google/cloud/recommender/v1beta1/recommendation.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,17 @@ message SecurityProjection {
265265
google.protobuf.Struct details = 2;
266266
}
267267

268+
// Contains metadata about how much sustainability a recommendation can save or
269+
// incur.
270+
message SustainabilityProjection {
271+
// Carbon Footprint generated in kg of CO2 equivalent.
272+
// Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).
273+
double kg_c_o2e = 1;
274+
275+
// Duration for which this sustanability applies.
276+
google.protobuf.Duration duration = 2;
277+
}
278+
268279
// Contains the impact a recommendation can have for a given category.
269280
message Impact {
270281
// The category of the impact.
@@ -298,6 +309,9 @@ message Impact {
298309

299310
// Use with CategoryType.SECURITY
300311
SecurityProjection security_projection = 101;
312+
313+
// Use with CategoryType.SUSTAINABILITY
314+
SustainabilityProjection sustainability_projection = 102;
301315
}
302316
}
303317

google/cloud/recommender/v1beta1/recommender_config.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ message RecommenderConfig {
6767
// separated by a slash (/).
6868
// Prefix must be a DNS subdomain.
6969
// Name must be 63 characters or less, begin and end with alphanumerics,
70-
// with dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
70+
// with dashes (-), underscores (_), dots (.), and alphanumerics between.
7171
map<string, string> annotations = 6;
7272

7373
// A user-settable field to provide a human-readable name to be used in user

0 commit comments

Comments
 (0)