Class ResourceRequirements

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

public final class ResourceRequirements extends Object implements com.azure.json.JsonSerializable<ResourceRequirements>
The resource requirements.
  • Constructor Details

    • ResourceRequirements

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

    • requests

      public ResourceRequests requests()
      Get the requests property: The resource requests of this container instance.
      Returns:
      the requests value.
    • withRequests

      public ResourceRequirements withRequests(ResourceRequests requests)
      Set the requests property: The resource requests of this container instance.
      Parameters:
      requests - the requests value to set.
      Returns:
      the ResourceRequirements object itself.
    • limits

      public ResourceLimits limits()
      Get the limits property: The resource limits of this container instance.
      Returns:
      the limits value.
    • withLimits

      public ResourceRequirements withLimits(ResourceLimits limits)
      Set the limits property: The resource limits of this container instance.
      Parameters:
      limits - the limits value to set.
      Returns:
      the ResourceRequirements 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<ResourceRequirements>
      Throws:
      IOException
    • fromJson

      public static ResourceRequirements fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ResourceRequirements from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ResourceRequirements if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the ResourceRequirements.