Class: Google::Apis::ComputeAlpha::ResourceCommitment

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb

Overview

Commitment for a particular resource (a Commitment is composed of one or more of these).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResourceCommitment

Returns a new instance of ResourceCommitment.



35098
35099
35100
# File 'lib/google/apis/compute_alpha/classes.rb', line 35098

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#accelerator_typeString

Name of the accelerator type resource. Applicable only when the type is ACCELERATOR. Corresponds to the JSON property acceleratorType

Returns:

  • (String)


35082
35083
35084
# File 'lib/google/apis/compute_alpha/classes.rb', line 35082

def accelerator_type
  @accelerator_type
end

#amountFixnum

The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU. Corresponds to the JSON property amount

Returns:

  • (Fixnum)


35090
35091
35092
# File 'lib/google/apis/compute_alpha/classes.rb', line 35090

def amount
  @amount
end

#typeString

Type of resource for which this commitment applies. Possible values are VCPU and MEMORY Corresponds to the JSON property type

Returns:

  • (String)


35096
35097
35098
# File 'lib/google/apis/compute_alpha/classes.rb', line 35096

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



35103
35104
35105
35106
35107
# File 'lib/google/apis/compute_alpha/classes.rb', line 35103

def update!(**args)
  @accelerator_type = args[:accelerator_type] if args.key?(:accelerator_type)
  @amount = args[:amount] if args.key?(:amount)
  @type = args[:type] if args.key?(:type)
end