Class: Google::Apis::CloudbillingV1beta::Commitment

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#nameString

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

Returns:

  • (String)


287
288
289
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 287

def name
  @name
end

#vm_resource_based_cudGoogle::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