ResourceLimits Class
- java.
lang. Object - com.
azure. resourcemanager. containerinstance. models. ResourceLimits
- com.
Implements
public final class ResourceLimits
implements JsonSerializable<ResourceLimits>
The resource limits.
Constructor Summary
Constructor | Description |
---|---|
ResourceLimits() |
Creates an instance of Resource |
Method Summary
Modifier and Type | Method and Description |
---|---|
Double |
cpu()
Get the cpu property: The CPU limit of this container instance. |
static
Resource |
fromJson(JsonReader jsonReader)
Reads an instance of Resource |
Gpu |
gpu()
Get the gpu property: The GPU limit of this container instance. |
Double |
memoryInGB()
Get the memory |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Resource |
withCpu(Double cpu)
Set the cpu property: The CPU limit of this container instance. |
Resource |
withGpu(GpuResource gpu)
Set the gpu property: The GPU limit of this container instance. |
Resource |
withMemoryInGB(Double memoryInGB)
Set the memory |
Methods inherited from java.lang.Object
Constructor Details
ResourceLimits
public ResourceLimits()
Creates an instance of ResourceLimits class.
Method Details
cpu
public Double cpu()
Get the cpu property: The CPU limit of this container instance.
Returns:
fromJson
public static ResourceLimits fromJson(JsonReader jsonReader)
Reads an instance of ResourceLimits from the JsonReader.
Parameters:
Returns:
Throws:
gpu
public GpuResource gpu()
Get the gpu property: The GPU limit of this container instance.
Returns:
memoryInGB
public Double memoryInGB()
Get the memoryInGB property: The memory limit in GB of this container instance.
Returns:
toJson
validate
public void validate()
Validates the instance.
withCpu
public ResourceLimits withCpu(Double cpu)
Set the cpu property: The CPU limit of this container instance.
Parameters:
Returns:
withGpu
public ResourceLimits withGpu(GpuResource gpu)
Set the gpu property: The GPU limit of this container instance.
Parameters:
Returns:
withMemoryInGB
public ResourceLimits withMemoryInGB(Double memoryInGB)
Set the memoryInGB property: The memory limit in GB of this container instance.
Parameters:
Returns:
Applies to
Azure SDK for Java