Class V1beta1NodeAllocatableResourceMapping
java.lang.Object
io.micronaut.kubernetes.client.openapi.model.V1beta1NodeAllocatableResourceMapping
@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class V1beta1NodeAllocatableResourceMapping
extends Object
NodeAllocatableResourceMapping defines the translation between the DRA device/capacity units requested to the corresponding quantity of the node allocatable resource.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocationMultiplier(String allocationMultiplier) Set allocationMultiplier in a chainable fashion.capacityKey(String capacityKey) Set capacityKey in a chainable fashion.booleanQuantity is a fixed-point representation of a number.CapacityKey references a capacity name defined as a key in the `spec.devices[*].capacity` map.inthashCode()voidsetAllocationMultiplier(String allocationMultiplier) Set the allocationMultiplier property valuevoidsetCapacityKey(String capacityKey) Set the capacityKey property valuetoString()
-
Field Details
-
JSON_PROPERTY_ALLOCATION_MULTIPLIER
- See Also:
-
JSON_PROPERTY_CAPACITY_KEY
- See Also:
-
-
Constructor Details
-
V1beta1NodeAllocatableResourceMapping
public V1beta1NodeAllocatableResourceMapping()
-
-
Method Details
-
getAllocationMultiplier
Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. The serialization format is: ```::= (Note that may be empty, from the \"\" case in .) ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) ::= m | \"\" | k | M | G | T | P | E (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) ::= \"e\" | \"E\" ``` No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. Before serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: - No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible. The sign will be omitted unless the number is negative. Examples: - 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\" Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. - Returns:
- the allocationMultiplier property value
-
setAllocationMultiplier
Set the allocationMultiplier property value- Parameters:
allocationMultiplier- property value to set
-
allocationMultiplier
Set allocationMultiplier in a chainable fashion.- Returns:
- The same instance of V1beta1NodeAllocatableResourceMapping for chaining.
-
getCapacityKey
CapacityKey references a capacity name defined as a key in the `spec.devices[*].capacity` map. When this field is set, the value associated with this key in the `status.allocation.devices.results[*].consumedCapacity` map (for a specific claim allocation) determines the base quantity for the node allocatable resource. If `allocationMultiplier` is also set, it is multiplied with the base quantity. For example, if `spec.devices[*].capacity` has an entry \"dra.example.com/memory\": \"128Gi\", and this field is set to \"dra.example.com/memory\", then for a claim allocation that consumes { \"dra.example.com/memory\": \"4Gi\" } the base quantity for the node allocatable resource mapping will be \"4Gi\", and `allocationMultiplier` should be omitted or set to \"1\".- Returns:
- the capacityKey property value
-
setCapacityKey
Set the capacityKey property value- Parameters:
capacityKey- property value to set
-
capacityKey
Set capacityKey in a chainable fashion.- Returns:
- The same instance of V1beta1NodeAllocatableResourceMapping for chaining.
-
equals
-
hashCode
-
toString
-