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 Details

    • ContainerResourceSettings

      public ContainerResourceSettings()
      Creates an instance of ContainerResourceSettings class.
  • Method Details

    • cpu

      public String 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

      public ContainerResourceSettings withCpu(String cpu)
      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

      public String 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

      public ContainerResourceSettings withMemory(String memory)
      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

      public String 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

      public ContainerResourceSettings withGpu(String gpu)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.