Class: Google::Apis::TpuV2alpha1::Reservation

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 reservation describes the amount of a resource 'allotted' for a defined period of time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Reservation

Returns a new instance of Reservation.



1423
1424
1425
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1423

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

Instance Attribute Details

#nameString

The reservation name with the format: projects/projectID/locations/location /reservations/reservationID Corresponds to the JSON property name

Returns:

  • (String)


1411
1412
1413
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1411

def name
  @name
end

#standardGoogle::Apis::TpuV2alpha1::Standard

Corresponds to the JSON property standard



1416
1417
1418
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1416

def standard
  @standard
end

#stateString

Output only. The state of the Reservation. Corresponds to the JSON property state

Returns:

  • (String)


1421
1422
1423
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1421

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1428
1429
1430
1431
1432
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1428

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @standard = args[:standard] if args.key?(:standard)
  @state = args[:state] if args.key?(:state)
end