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
defcost()->::Google::Type::Money
Returns
(::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=
defcost=(value)->::Google::Type::Money
Parameter
value (::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) — 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Recommender V1 API - Class Google::Cloud::Recommender::V1::CostProjection (v1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-CostProjection)\n- [1.2.1](/ruby/docs/reference/google-cloud-recommender-v1/1.2.1/Google-Cloud-Recommender-V1-CostProjection)\n- [1.1.0](/ruby/docs/reference/google-cloud-recommender-v1/1.1.0/Google-Cloud-Recommender-V1-CostProjection)\n- [1.0.1](/ruby/docs/reference/google-cloud-recommender-v1/1.0.1/Google-Cloud-Recommender-V1-CostProjection)\n- [0.18.0](/ruby/docs/reference/google-cloud-recommender-v1/0.18.0/Google-Cloud-Recommender-V1-CostProjection)\n- [0.17.2](/ruby/docs/reference/google-cloud-recommender-v1/0.17.2/Google-Cloud-Recommender-V1-CostProjection)\n- [0.16.0](/ruby/docs/reference/google-cloud-recommender-v1/0.16.0/Google-Cloud-Recommender-V1-CostProjection)\n- [0.15.0](/ruby/docs/reference/google-cloud-recommender-v1/0.15.0/Google-Cloud-Recommender-V1-CostProjection)\n- [0.14.0](/ruby/docs/reference/google-cloud-recommender-v1/0.14.0/Google-Cloud-Recommender-V1-CostProjection)\n- [0.13.1](/ruby/docs/reference/google-cloud-recommender-v1/0.13.1/Google-Cloud-Recommender-V1-CostProjection)\n- [0.12.0](/ruby/docs/reference/google-cloud-recommender-v1/0.12.0/Google-Cloud-Recommender-V1-CostProjection)\n- [0.11.0](/ruby/docs/reference/google-cloud-recommender-v1/0.11.0/Google-Cloud-Recommender-V1-CostProjection)\n- [0.10.0](/ruby/docs/reference/google-cloud-recommender-v1/0.10.0/Google-Cloud-Recommender-V1-CostProjection)\n- [0.9.0](/ruby/docs/reference/google-cloud-recommender-v1/0.9.0/Google-Cloud-Recommender-V1-CostProjection)\n- [0.8.6](/ruby/docs/reference/google-cloud-recommender-v1/0.8.6/Google-Cloud-Recommender-V1-CostProjection) \nReference documentation and code samples for the Recommender V1 API class Google::Cloud::Recommender::V1::CostProjection.\n\nContains metadata about how much money a recommendation can save or incur. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #cost\n\n def cost() -\u003e ::Google::Type::Money\n\n**Returns**\n\n- ([::Google::Type::Money](./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.\n\n\n A user's permissions may affect whether the cost is computed using list\n prices or custom contract prices.\n\n### #cost=\n\n def cost=(value) -\u003e ::Google::Type::Money\n\n**Parameter**\n\n- **value** ([::Google::Type::Money](./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.\n\n\n A user's permissions may affect whether the cost is computed using list\nprices or custom contract prices. \n**Returns**\n\n- ([::Google::Type::Money](./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.\n\n\n A user's permissions may affect whether the cost is computed using list\n prices or custom contract prices.\n\n### #cost_in_local_currency\n\n def cost_in_local_currency() -\u003e ::Google::Type::Money\n\n**Returns**\n\n- ([::Google::Type::Money](./Google-Type-Money)) --- The approximate cost savings in the billing account's local currency.\n\n### #cost_in_local_currency=\n\n def cost_in_local_currency=(value) -\u003e ::Google::Type::Money\n\n**Parameter**\n\n- **value** ([::Google::Type::Money](./Google-Type-Money)) --- The approximate cost savings in the billing account's local currency. \n**Returns**\n\n- ([::Google::Type::Money](./Google-Type-Money)) --- The approximate cost savings in the billing account's local currency.\n\n### #duration\n\n def duration() -\u003e ::Google::Protobuf::Duration\n\n**Returns**\n\n- ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Duration for which this cost applies.\n\n### #duration=\n\n def duration=(value) -\u003e ::Google::Protobuf::Duration\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Duration for which this cost applies. \n**Returns**\n\n- ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Duration for which this cost applies."]]