Recommender V1 Client - Class SustainabilityProjection (2.0.3)

Reference documentation and code samples for the Recommender V1 Client class SustainabilityProjection.

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

Generated from protobuf message google.cloud.recommender.v1.SustainabilityProjection

Namespace

Google \ Cloud \ Recommender \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ kg_c_o2e float

Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).

↳ duration Google\Protobuf\Duration

Duration for which this sustainability applies.

getKgCO2E

Carbon Footprint generated in kg of CO2 equivalent.

Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).

Returns
Type Description
float

setKgCO2E

Carbon Footprint generated in kg of CO2 equivalent.

Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).

Parameter
Name Description
var float
Returns
Type Description
$this

getDuration

Duration for which this sustainability applies.

Returns
Type Description
Google\Protobuf\Duration|null

hasDuration

clearDuration

setDuration

Duration for which this sustainability applies.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this