Class: Google::Apis::RecommenderV1beta1::GoogleCloudRecommenderV1beta1SustainabilityProjection

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/recommender_v1beta1/classes.rb,
lib/google/apis/recommender_v1beta1/representations.rb,
lib/google/apis/recommender_v1beta1/representations.rb

Overview

Contains metadata about how much sustainability a recommendation can save or incur.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecommenderV1beta1SustainabilityProjection

Returns a new instance of GoogleCloudRecommenderV1beta1SustainabilityProjection.



1116
1117
1118
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 1116

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#durationString

Duration for which this sustanability applies. Corresponds to the JSON property duration

Returns:

  • (String)


1108
1109
1110
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 1108

def duration
  @duration
end

#kg_co2eFloat

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

Returns:

  • (Float)


1114
1115
1116
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 1114

def kg_co2e
  @kg_co2e
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1121
1122
1123
1124
# File 'lib/google/apis/recommender_v1beta1/classes.rb', line 1121

def update!(**args)
  @duration = args[:duration] if args.key?(:duration)
  @kg_co2e = args[:kg_co2e] if args.key?(:kg_co2e)
end