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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceRequirementsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ResourceRequirements from the JsonReader.limits()Get the limits property: The resource limits of this container instance.requests()Get the requests property: The resource requests of this container instance.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withLimits(ResourceLimits limits) Set the limits property: The resource limits of this container instance.withRequests(ResourceRequests requests) Set the requests property: The resource requests of this container instance.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
-
ResourceRequirements
public ResourceRequirements()Creates an instance of ResourceRequirements class.
-
-
Method Details
-
requests
Get the requests property: The resource requests of this container instance.- Returns:
- the requests value.
-
withRequests
Set the requests property: The resource requests of this container instance.- Parameters:
requests- the requests value to set.- Returns:
- the ResourceRequirements object itself.
-
limits
Get the limits property: The resource limits of this container instance.- Returns:
- the limits value.
-
withLimits
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
- Specified by:
toJsonin interfacecom.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.
-