Recommender V1 Client - Class SustainabilityProjection (1.10.0)

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
NameDescription
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
TypeDescription
float

setKgCO2E

Carbon Footprint generated in kg of CO2 equivalent.

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

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getDuration

Duration for which this sustainability applies.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasDuration

clearDuration

setDuration

Duration for which this sustainability applies.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this