Class: Google::Apis::CloudbillingV1beta::Commitment
- Inherits:
-
Object
- Object
- Google::Apis::CloudbillingV1beta::Commitment
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudbilling_v1beta/classes.rb,
lib/google/apis/cloudbilling_v1beta/representations.rb,
lib/google/apis/cloudbilling_v1beta/representations.rb
Overview
Commitments give you the ability to pay a recurring fee in exchange for a benefit, such as a discount for your use. For example, this object might contain details of a spend-based committed use discount (CUD). Within a CostScenario, adding a commitment includes the cost of the commitment and any discounts.
Instance Attribute Summary collapse
-
#name ⇒ String
Required.
-
#vm_resource_based_cud ⇒ Google::Apis::CloudbillingV1beta::VmResourceBasedCud
Specifies a resource-based committed use discount (CUD).
Instance Method Summary collapse
-
#initialize(**args) ⇒ Commitment
constructor
A new instance of Commitment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Commitment
Returns a new instance of Commitment.
294 295 296 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 294 def initialize(**args) update!(**args) end |
Instance Attribute Details
#name ⇒ String
Required. A name for this commitment. All commitments in a CostScenario must
have unique names. Each name may be at most 128 characters long.
Corresponds to the JSON property name
287 288 289 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 287 def name @name end |
#vm_resource_based_cud ⇒ Google::Apis::CloudbillingV1beta::VmResourceBasedCud
Specifies a resource-based committed use discount (CUD).
Corresponds to the JSON property vmResourceBasedCud
292 293 294 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 292 def vm_resource_based_cud @vm_resource_based_cud end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
299 300 301 302 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 299 def update!(**args) @name = args[:name] if args.key?(:name) @vm_resource_based_cud = args[:vm_resource_based_cud] if args.key?(:vm_resource_based_cud) end |