Class: Google::Apis::TpuV2alpha1::QueuedResource

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

A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueuedResource

Returns a new instance of QueuedResource.



1314
1315
1316
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1314

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

Instance Attribute Details

#best_effortGoogle::Apis::TpuV2alpha1::BestEffort

BestEffort tier definition. Corresponds to the JSON property bestEffort



1271
1272
1273
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1271

def best_effort
  @best_effort
end

#create_timeString

Output only. The time when the QueuedResource was created. Corresponds to the JSON property createTime

Returns:

  • (String)


1276
1277
1278
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1276

def create_time
  @create_time
end

#guaranteedGoogle::Apis::TpuV2alpha1::Guaranteed

Guaranteed tier definition. Corresponds to the JSON property guaranteed



1281
1282
1283
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1281

def guaranteed
  @guaranteed
end

#nameString

Output only. Immutable. The name of the QueuedResource. Corresponds to the JSON property name

Returns:

  • (String)


1286
1287
1288
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1286

def name
  @name
end

#queueing_policyGoogle::Apis::TpuV2alpha1::QueueingPolicy

Defines the policy of the QueuedRequest. Corresponds to the JSON property queueingPolicy



1291
1292
1293
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1291

def queueing_policy
  @queueing_policy
end

#reservation_nameString

Name of the reservation in which the resource should be provisioned. Format: projects/project/locations/zone/reservations/reservation Corresponds to the JSON property reservationName

Returns:

  • (String)


1297
1298
1299
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1297

def reservation_name
  @reservation_name
end

#spotGoogle::Apis::TpuV2alpha1::Spot

Spot tier definition. Corresponds to the JSON property spot



1302
1303
1304
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1302

def spot
  @spot
end

#stateGoogle::Apis::TpuV2alpha1::QueuedResourceState

QueuedResourceState defines the details of the QueuedResource request. Corresponds to the JSON property state



1307
1308
1309
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1307

def state
  @state
end

#tpuGoogle::Apis::TpuV2alpha1::Tpu

Details of the TPU resource(s) being requested. Corresponds to the JSON property tpu



1312
1313
1314
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1312

def tpu
  @tpu
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1319

def update!(**args)
  @best_effort = args[:best_effort] if args.key?(:best_effort)
  @create_time = args[:create_time] if args.key?(:create_time)
  @guaranteed = args[:guaranteed] if args.key?(:guaranteed)
  @name = args[:name] if args.key?(:name)
  @queueing_policy = args[:queueing_policy] if args.key?(:queueing_policy)
  @reservation_name = args[:reservation_name] if args.key?(:reservation_name)
  @spot = args[:spot] if args.key?(:spot)
  @state = args[:state] if args.key?(:state)
  @tpu = args[:tpu] if args.key?(:tpu)
end