Class ResourceRequests

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

public final class ResourceRequests extends Object implements com.azure.json.JsonSerializable<ResourceRequests>
Deployment resource request payload.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of ResourceRequests class.
  • Method Summary

    Modifier and Type
    Method
    Description
    cpu()
    Get the cpu property: Required CPU. 1 core can be represented by 1 or 1000m.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ResourceRequests from the JsonReader.
    Get the memory property: Required memory. 1 GB can be represented by 1Gi or 1024Mi.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the cpu property: Required CPU. 1 core can be represented by 1 or 1000m.
    Set the memory property: Required memory. 1 GB can be represented by 1Gi or 1024Mi.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • ResourceRequests

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

    • cpu

      public String cpu()
      Get the cpu property: Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard tier.
      Returns:
      the cpu value.
    • withCpu

      public ResourceRequests withCpu(String cpu)
      Set the cpu property: Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard tier.
      Parameters:
      cpu - the cpu value to set.
      Returns:
      the ResourceRequests object itself.
    • memory

      public String memory()
      Get the memory property: Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier.
      Returns:
      the memory value.
    • withMemory

      public ResourceRequests withMemory(String memory)
      Set the memory property: Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier.
      Parameters:
      memory - the memory value to set.
      Returns:
      the ResourceRequests 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<ResourceRequests>
      Throws:
      IOException
    • fromJson

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