Class ContainerResources

java.lang.Object
com.azure.resourcemanager.appservice.models.ContainerResources
All Implemented Interfaces:
com.azure.json.JsonSerializable<ContainerResources>

public final class ContainerResources extends Object implements com.azure.json.JsonSerializable<ContainerResources>
Container App container resource requirements.
  • Constructor Details

    • ContainerResources

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

    • cpu

      public Double cpu()
      Get the cpu property: Required CPU in cores, e.g. 0.5.
      Returns:
      the cpu value.
    • withCpu

      public ContainerResources withCpu(Double cpu)
      Set the cpu property: Required CPU in cores, e.g. 0.5.
      Parameters:
      cpu - the cpu value to set.
      Returns:
      the ContainerResources object itself.
    • memory

      public String memory()
      Get the memory property: Required memory, e.g. "250Mb".
      Returns:
      the memory value.
    • withMemory

      public ContainerResources withMemory(String memory)
      Set the memory property: Required memory, e.g. "250Mb".
      Parameters:
      memory - the memory value to set.
      Returns:
      the ContainerResources 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<ContainerResources>
      Throws:
      IOException
    • fromJson

      public static ContainerResources fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ContainerResources from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ContainerResources 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 ContainerResources.