# Recommender V1 API - Class Google::Cloud::Recommender::V1::CostProjection (v1.8.0)

1.8.0 (latest) 1.7.0 1.6.1 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.18.0 0.17.2 0.16.0 0.15.0 0.14.0 0.13.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.6 Reference documentation and code samples for the Recommender V1 API class Google::Cloud::Recommender::V1::CostProjection.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #cost

    def cost() -> ::Google::Type::Money

**Returns**

- ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/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.

### #cost=

    def cost=(value) -> ::Google::Type::Money

**Parameter**

- **value** ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/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.
**Returns**

- ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/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.

### #cost_in_local_currency

    def cost_in_local_currency() -> ::Google::Type::Money

**Returns**

- ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Type-Money)) --- The approximate cost savings in the billing account's local currency.

### #cost_in_local_currency=

    def cost_in_local_currency=(value) -> ::Google::Type::Money

**Parameter**

- **value** ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Type-Money)) --- The approximate cost savings in the billing account's local currency.
**Returns**

- ([::Google::Type::Money](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Type-Money)) --- The approximate cost savings in the billing account's local currency.

### #duration

    def duration() -> ::Google::Protobuf::Duration

**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Protobuf-Duration)) --- Duration for which this cost applies.

### #duration=

    def duration=(value) -> ::Google::Protobuf::Duration

**Parameter**

- **value** ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Protobuf-Duration)) --- Duration for which this cost applies.
**Returns**

- ([::Google::Protobuf::Duration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Protobuf-Duration)) --- Duration for which this cost applies.