Class: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1SustainabilityProjection
- Inherits:
-
Object
- Object
- Google::Apis::RecommenderV1::GoogleCloudRecommenderV1SustainabilityProjection
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/recommender_v1/classes.rb,
lib/google/apis/recommender_v1/representations.rb,
lib/google/apis/recommender_v1/representations.rb
Overview
Contains metadata about how much sustainability a recommendation can save or incur.
Instance Attribute Summary collapse
-
#duration ⇒ String
Duration for which this sustainability applies.
-
#kg_co2e ⇒ Float
Carbon Footprint generated in kg of CO2 equivalent.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRecommenderV1SustainabilityProjection
constructor
A new instance of GoogleCloudRecommenderV1SustainabilityProjection.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRecommenderV1SustainabilityProjection
Returns a new instance of GoogleCloudRecommenderV1SustainabilityProjection.
959 960 961 |
# File 'lib/google/apis/recommender_v1/classes.rb', line 959 def initialize(**args) update!(**args) end |
Instance Attribute Details
#duration ⇒ String
Duration for which this sustainability applies.
Corresponds to the JSON property duration
951 952 953 |
# File 'lib/google/apis/recommender_v1/classes.rb', line 951 def duration @duration end |
#kg_co2e ⇒ Float
Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the
name renders correctly in camelCase (kgCO2e).
Corresponds to the JSON property kgCO2e
957 958 959 |
# File 'lib/google/apis/recommender_v1/classes.rb', line 957 def kg_co2e @kg_co2e end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
964 965 966 967 |
# File 'lib/google/apis/recommender_v1/classes.rb', line 964 def update!(**args) @duration = args[:duration] if args.key?(:duration) @kg_co2e = args[:kg_co2e] if args.key?(:kg_co2e) end |