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.



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

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

Instance Attribute Details

#best_effortGoogle::Apis::TpuV2alpha1::BestEffort

BestEffort tier definition. Corresponds to the JSON property bestEffort



1085
1086
1087
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1085

def best_effort
  @best_effort
end

#guaranteedGoogle::Apis::TpuV2alpha1::Guaranteed

Guaranteed tier definition. Corresponds to the JSON property guaranteed



1090
1091
1092
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1090

def guaranteed
  @guaranteed
end

#nameString

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

Returns:

  • (String)


1095
1096
1097
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1095

def name
  @name
end

#queueing_policyGoogle::Apis::TpuV2alpha1::QueueingPolicy

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



1100
1101
1102
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1100

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)


1106
1107
1108
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1106

def reservation_name
  @reservation_name
end

#stateGoogle::Apis::TpuV2alpha1::QueuedResourceState

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



1111
1112
1113
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1111

def state
  @state
end

#tpuGoogle::Apis::TpuV2alpha1::Tpu

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



1116
1117
1118
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1116

def tpu
  @tpu
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1123
1124
1125
1126
1127
1128
1129
1130
1131
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1123

def update!(**args)
  @best_effort = args[:best_effort] if args.key?(:best_effort)
  @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)
  @state = args[:state] if args.key?(:state)
  @tpu = args[:tpu] if args.key?(:tpu)
end