Class: Google::Apis::TpuV2alpha1::Standard

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Standard

Returns a new instance of Standard.



1691
1692
1693
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1691

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

Instance Attribute Details

#capacity_unitsString

Corresponds to the JSON property capacityUnits

Returns:

  • (String)


1665
1666
1667
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1665

def capacity_units
  @capacity_units
end

#intervalGoogle::Apis::TpuV2alpha1::Interval

Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. Corresponds to the JSON property interval



1673
1674
1675
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1673

def interval
  @interval
end

#resource_typeString

The resource type of the reservation. Corresponds to the JSON property resourceType

Returns:

  • (String)


1678
1679
1680
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1678

def resource_type
  @resource_type
end

#sizeFixnum

The size of the reservation, in the units specified in the 'capacity_units' field. Corresponds to the JSON property size

Returns:

  • (Fixnum)


1684
1685
1686
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1684

def size
  @size
end

#usageGoogle::Apis::TpuV2alpha1::Usage

Corresponds to the JSON property usage



1689
1690
1691
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1689

def usage
  @usage
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1696
1697
1698
1699
1700
1701
1702
# File 'lib/google/apis/tpu_v2alpha1/classes.rb', line 1696

def update!(**args)
  @capacity_units = args[:capacity_units] if args.key?(:capacity_units)
  @interval = args[:interval] if args.key?(:interval)
  @resource_type = args[:resource_type] if args.key?(:resource_type)
  @size = args[:size] if args.key?(:size)
  @usage = args[:usage] if args.key?(:usage)
end