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.



1146
1147
1148
# File 'lib/google/apis/tpu_v2/classes.rb', line 1146

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)


1108
1109
1110
# File 'lib/google/apis/tpu_v2/classes.rb', line 1108

def create_time
  @create_time
end

#guaranteedGoogle::Apis::TpuV2::Guaranteed

Guaranteed tier definition. Corresponds to the JSON property guaranteed



1113
1114
1115
# File 'lib/google/apis/tpu_v2/classes.rb', line 1113

def guaranteed
  @guaranteed
end

#nameString

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

Returns:

  • (String)


1118
1119
1120
# File 'lib/google/apis/tpu_v2/classes.rb', line 1118

def name
  @name
end

#queueing_policyGoogle::Apis::TpuV2::QueueingPolicy

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



1123
1124
1125
# File 'lib/google/apis/tpu_v2/classes.rb', line 1123

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)


1129
1130
1131
# File 'lib/google/apis/tpu_v2/classes.rb', line 1129

def reservation_name
  @reservation_name
end

#spotGoogle::Apis::TpuV2::Spot

Spot tier definition. Corresponds to the JSON property spot



1134
1135
1136
# File 'lib/google/apis/tpu_v2/classes.rb', line 1134

def spot
  @spot
end

#stateGoogle::Apis::TpuV2::QueuedResourceState

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



1139
1140
1141
# File 'lib/google/apis/tpu_v2/classes.rb', line 1139

def state
  @state
end

#tpuGoogle::Apis::TpuV2::Tpu

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



1144
1145
1146
# File 'lib/google/apis/tpu_v2/classes.rb', line 1144

def tpu
  @tpu
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
# File 'lib/google/apis/tpu_v2/classes.rb', line 1151

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