Class ResourceLimits
- java.lang.Object
-
- com.azure.resourcemanager.containerinstance.models.ResourceLimits
-
public final class ResourceLimits extends Object
The resource limits.
-
-
Constructor Summary
Constructors Constructor Description ResourceLimits()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Doublecpu()Get the cpu property: The CPU limit of this container instance.GpuResourcegpu()Get the gpu property: The GPU limit of this container instance.DoublememoryInGB()Get the memoryInGB property: The memory limit in GB of this container instance.voidvalidate()Validates the instance.ResourceLimitswithCpu(Double cpu)Set the cpu property: The CPU limit of this container instance.ResourceLimitswithGpu(GpuResource gpu)Set the gpu property: The GPU limit of this container instance.ResourceLimitswithMemoryInGB(Double memoryInGB)Set the memoryInGB property: The memory limit in GB of this container instance.
-
-
-
Method Detail
-
memoryInGB
public Double memoryInGB()
Get the memoryInGB property: The memory limit in GB of this container instance.- Returns:
- the memoryInGB value.
-
withMemoryInGB
public ResourceLimits withMemoryInGB(Double memoryInGB)
Set the memoryInGB property: The memory limit in GB of this container instance.- Parameters:
memoryInGB- the memoryInGB value to set.- Returns:
- the ResourceLimits object itself.
-
cpu
public Double cpu()
Get the cpu property: The CPU limit of this container instance.- Returns:
- the cpu value.
-
withCpu
public ResourceLimits withCpu(Double cpu)
Set the cpu property: The CPU limit of this container instance.- Parameters:
cpu- the cpu value to set.- Returns:
- the ResourceLimits object itself.
-
gpu
public GpuResource gpu()
Get the gpu property: The GPU limit of this container instance.- Returns:
- the gpu value.
-
withGpu
public ResourceLimits withGpu(GpuResource gpu)
Set the gpu property: The GPU limit of this container instance.- Parameters:
gpu- the gpu value to set.- Returns:
- the ResourceLimits object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-