Class SessionContainerResources
java.lang.Object
com.azure.resourcemanager.appcontainers.models.SessionContainerResources
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SessionContainerResources>
public final class SessionContainerResources
extends Object
implements com.azure.json.JsonSerializable<SessionContainerResources>
Container resource requirements for sessions of the session pool.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SessionContainerResources class. -
Method Summary
Modifier and TypeMethodDescriptioncpu()
Get the cpu property: Required CPU in cores, e.g. 0.5.static SessionContainerResources
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of SessionContainerResources from the JsonReader.memory()
Get the memory property: Required memory, e.g. "250Mb".com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.Set the cpu property: Required CPU in cores, e.g. 0.5.withMemory
(String memory) Set the memory property: Required memory, e.g. "250Mb".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
-
SessionContainerResources
public SessionContainerResources()Creates an instance of SessionContainerResources class.
-
-
Method Details
-
cpu
Get the cpu property: Required CPU in cores, e.g. 0.5.- Returns:
- the cpu value.
-
withCpu
Set the cpu property: Required CPU in cores, e.g. 0.5.- Parameters:
cpu
- the cpu value to set.- Returns:
- the SessionContainerResources object itself.
-
memory
Get the memory property: Required memory, e.g. "250Mb".- Returns:
- the memory value.
-
withMemory
Set the memory property: Required memory, e.g. "250Mb".- Parameters:
memory
- the memory value to set.- Returns:
- the SessionContainerResources object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<SessionContainerResources>
- Throws:
IOException
-
fromJson
public static SessionContainerResources fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SessionContainerResources from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of SessionContainerResources 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 SessionContainerResources.
-