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 -
Method Summary
Modifier and TypeMethodDescriptioncpu()Get the cpu property: Required CPU.static ResourceRequestsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ResourceRequests from the JsonReader.memory()Get the memory property: Required memory.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the cpu property: Required CPU.withMemory(String memory) Set the memory property: Required memory.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
-
ResourceRequests
public ResourceRequests()Creates an instance of ResourceRequests class.
-
-
Method Details
-
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
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
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
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ResourceRequests>- Throws:
IOException
-
fromJson
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.
-