Class LifecycleConfiguration
java.lang.Object
com.azure.resourcemanager.appcontainers.models.LifecycleConfiguration
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LifecycleConfiguration>
public final class LifecycleConfiguration
extends Object
implements com.azure.json.JsonSerializable<LifecycleConfiguration>
The lifecycle configuration properties of a session in the dynamic session pool.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of LifecycleConfiguration class. -
Method Summary
Modifier and TypeMethodDescriptionGet the cooldownPeriodInSeconds property: The cooldown period of a session in seconds when the lifecycle type is 'Timed'.static LifecycleConfiguration
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of LifecycleConfiguration from the JsonReader.Get the lifecycleType property: The lifecycle type of the session pool.Get the maxAlivePeriodInSeconds property: The maximum alive period of a session in seconds when the lifecycle type is 'OnContainerExit'.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withCooldownPeriodInSeconds
(Integer cooldownPeriodInSeconds) Set the cooldownPeriodInSeconds property: The cooldown period of a session in seconds when the lifecycle type is 'Timed'.withLifecycleType
(LifecycleType lifecycleType) Set the lifecycleType property: The lifecycle type of the session pool.withMaxAlivePeriodInSeconds
(Integer maxAlivePeriodInSeconds) Set the maxAlivePeriodInSeconds property: The maximum alive period of a session in seconds when the lifecycle type is 'OnContainerExit'.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
-
LifecycleConfiguration
public LifecycleConfiguration()Creates an instance of LifecycleConfiguration class.
-
-
Method Details
-
lifecycleType
Get the lifecycleType property: The lifecycle type of the session pool.- Returns:
- the lifecycleType value.
-
withLifecycleType
Set the lifecycleType property: The lifecycle type of the session pool.- Parameters:
lifecycleType
- the lifecycleType value to set.- Returns:
- the LifecycleConfiguration object itself.
-
cooldownPeriodInSeconds
Get the cooldownPeriodInSeconds property: The cooldown period of a session in seconds when the lifecycle type is 'Timed'.- Returns:
- the cooldownPeriodInSeconds value.
-
withCooldownPeriodInSeconds
Set the cooldownPeriodInSeconds property: The cooldown period of a session in seconds when the lifecycle type is 'Timed'.- Parameters:
cooldownPeriodInSeconds
- the cooldownPeriodInSeconds value to set.- Returns:
- the LifecycleConfiguration object itself.
-
maxAlivePeriodInSeconds
Get the maxAlivePeriodInSeconds property: The maximum alive period of a session in seconds when the lifecycle type is 'OnContainerExit'.- Returns:
- the maxAlivePeriodInSeconds value.
-
withMaxAlivePeriodInSeconds
Set the maxAlivePeriodInSeconds property: The maximum alive period of a session in seconds when the lifecycle type is 'OnContainerExit'.- Parameters:
maxAlivePeriodInSeconds
- the maxAlivePeriodInSeconds value to set.- Returns:
- the LifecycleConfiguration 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<LifecycleConfiguration>
- Throws:
IOException
-
fromJson
public static LifecycleConfiguration fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of LifecycleConfiguration from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of LifecycleConfiguration 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 LifecycleConfiguration.
-