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.



375
376
377
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 375

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)


367
368
369
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 367

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)


372
373
374
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 372

def reserved
  @reserved
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



380
381
382
383
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 380

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