Class ContainerResourceSettings
java.lang.Object
com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ContainerResourceSettings>
public final class ContainerResourceSettings
extends Object
implements com.azure.json.JsonSerializable<ContainerResourceSettings>
The ContainerResourceSettings model.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ContainerResourceSettings class. -
Method Summary
Modifier and TypeMethodDescriptioncpu()Get the cpu property: Number of vCPUs request/limit for container.static ContainerResourceSettingsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ContainerResourceSettings from the JsonReader.gpu()Get the gpu property: Number of Nvidia GPU cards request/limit for container.memory()Get the memory property: Memory size request/limit for container.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the cpu property: Number of vCPUs request/limit for container.Set the gpu property: Number of Nvidia GPU cards request/limit for container.withMemory(String memory) Set the memory property: Memory size request/limit for container.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ContainerResourceSettings
public ContainerResourceSettings()Creates an instance of ContainerResourceSettings class.
-
-
Method Details
-
cpu
Get the cpu property: Number of vCPUs request/limit for container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.- Returns:
- the cpu value.
-
withCpu
Set the cpu property: Number of vCPUs request/limit for container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.- Parameters:
cpu- the cpu value to set.- Returns:
- the ContainerResourceSettings object itself.
-
memory
Get the memory property: Memory size request/limit for container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.- Returns:
- the memory value.
-
withMemory
Set the memory property: Memory size request/limit for container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.- Parameters:
memory- the memory value to set.- Returns:
- the ContainerResourceSettings object itself.
-
gpu
Get the gpu property: Number of Nvidia GPU cards request/limit for container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.- Returns:
- the gpu value.
-
withGpu
Set the gpu property: Number of Nvidia GPU cards request/limit for container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/.- Parameters:
gpu- the gpu value to set.- Returns:
- the ContainerResourceSettings object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ContainerResourceSettings>- Throws:
IOException
-
fromJson
public static ContainerResourceSettings fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ContainerResourceSettings from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ContainerResourceSettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ContainerResourceSettings.
-