Class: Google::Apis::TpuV2alpha1::Guaranteed

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

Overview

Guaranteed tier definition.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Guaranteed

Returns a new instance of Guaranteed.



438
439
440
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 438

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

Instance Attribute Details

#min_durationString

Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration. Corresponds to the JSON property minDuration

Returns:

  • (String)


430
431
432
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 430

def min_duration
  @min_duration
end

#reservedBoolean Also known as: reserved?

Optional. Specifies the request should be scheduled on reserved capacity. Corresponds to the JSON property reserved

Returns:

  • (Boolean)


435
436
437
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 435

def reserved
  @reserved
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



443
444
445
446
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 443

def update!(**args)
  @min_duration = args[:min_duration] if args.key?(:min_duration)
  @reserved = args[:reserved] if args.key?(:reserved)
end