Recommender V1 Client - Class CostProjection (1.10.0)

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

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

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

Namespace

Google \ Cloud \ Recommender \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ cost Google\Type\Money

An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.

↳ duration Google\Protobuf\Duration

Duration for which this cost applies.

↳ cost_in_local_currency Google\Type\Money

The approximate cost savings in the billing account's local currency.

getCost

An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase.

See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.

Returns
TypeDescription
Google\Type\Money|null

hasCost

clearCost

setCost

An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase.

See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices.

Parameter
NameDescription
var Google\Type\Money
Returns
TypeDescription
$this

getDuration

Duration for which this cost applies.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasDuration

clearDuration

setDuration

Duration for which this cost applies.

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

getCostInLocalCurrency

The approximate cost savings in the billing account's local currency.

Returns
TypeDescription
Google\Type\Money|null

hasCostInLocalCurrency

clearCostInLocalCurrency

setCostInLocalCurrency

The approximate cost savings in the billing account's local currency.

Parameter
NameDescription
var Google\Type\Money
Returns
TypeDescription
$this