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.



106
107
108
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 106

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 must be a maximum of 32 characters. Corresponds to the JSON property name

Returns:

  • (String)


99
100
101
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 99

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



104
105
106
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 104

def vm_resource_based_cud
  @vm_resource_based_cud
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



111
112
113
114
# File 'lib/google/apis/cloudbilling_v1beta/classes.rb', line 111

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