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.



1261
1262
1263
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1261

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

Instance Attribute Details

#best_effortGoogle::Apis::TpuV2alpha1::BestEffort

BestEffort tier definition. Corresponds to the JSON property bestEffort



1218
1219
1220
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1218

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)


1223
1224
1225
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1223

def create_time
  @create_time
end

#guaranteedGoogle::Apis::TpuV2alpha1::Guaranteed

Guaranteed tier definition. Corresponds to the JSON property guaranteed



1228
1229
1230
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1228

def guaranteed
  @guaranteed
end

#nameString

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

Returns:

  • (String)


1233
1234
1235
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1233

def name
  @name
end

#queueing_policyGoogle::Apis::TpuV2alpha1::QueueingPolicy

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



1238
1239
1240
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1238

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)


1244
1245
1246
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1244

def reservation_name
  @reservation_name
end

#spotGoogle::Apis::TpuV2alpha1::Spot

Spot tier definition. Corresponds to the JSON property spot



1249
1250
1251
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1249

def spot
  @spot
end

#stateGoogle::Apis::TpuV2alpha1::QueuedResourceState

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



1254
1255
1256
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1254

def state
  @state
end

#tpuGoogle::Apis::TpuV2alpha1::Tpu

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



1259
1260
1261
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1259

def tpu
  @tpu
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1266

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