Class: Google::Apis::TpuV2::QueuedResource

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/tpu_v2/classes.rb,
lib/google/apis/tpu_v2/representations.rb,
lib/google/apis/tpu_v2/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.



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

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

Instance Attribute Details

#create_timeString

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

Returns:

  • (String)


1180
1181
1182
# File 'lib/google/apis/tpu_v2/classes.rb', line 1180

def create_time
  @create_time
end

#guaranteedGoogle::Apis::TpuV2::Guaranteed

Guaranteed tier definition. Corresponds to the JSON property guaranteed



1185
1186
1187
# File 'lib/google/apis/tpu_v2/classes.rb', line 1185

def guaranteed
  @guaranteed
end

#nameString

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

Returns:

  • (String)


1190
1191
1192
# File 'lib/google/apis/tpu_v2/classes.rb', line 1190

def name
  @name
end

#queueing_policyGoogle::Apis::TpuV2::QueueingPolicy

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



1195
1196
1197
# File 'lib/google/apis/tpu_v2/classes.rb', line 1195

def queueing_policy
  @queueing_policy
end

#reservation_nameString

Optional. 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)


1201
1202
1203
# File 'lib/google/apis/tpu_v2/classes.rb', line 1201

def reservation_name
  @reservation_name
end

#spotGoogle::Apis::TpuV2::Spot

Spot tier definition. Corresponds to the JSON property spot



1206
1207
1208
# File 'lib/google/apis/tpu_v2/classes.rb', line 1206

def spot
  @spot
end

#stateGoogle::Apis::TpuV2::QueuedResourceState

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



1211
1212
1213
# File 'lib/google/apis/tpu_v2/classes.rb', line 1211

def state
  @state
end

#tpuGoogle::Apis::TpuV2::Tpu

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



1216
1217
1218
# File 'lib/google/apis/tpu_v2/classes.rb', line 1216

def tpu
  @tpu
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
# File 'lib/google/apis/tpu_v2/classes.rb', line 1223

def update!(**args)
  @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