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.
308 309 310 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 308 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
301 302 303 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 301 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
306 307 308 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 306 def vm_resource_based_cud @vm_resource_based_cud end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
313 314 315 316 |
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 313 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 |