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 Details

    • LifecycleConfiguration

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

    • lifecycleType

      public LifecycleType lifecycleType()
      Get the lifecycleType property: The lifecycle type of the session pool.
      Returns:
      the lifecycleType value.
    • withLifecycleType

      public LifecycleConfiguration withLifecycleType(LifecycleType lifecycleType)
      Set the lifecycleType property: The lifecycle type of the session pool.
      Parameters:
      lifecycleType - the lifecycleType value to set.
      Returns:
      the LifecycleConfiguration object itself.
    • cooldownPeriodInSeconds

      public Integer cooldownPeriodInSeconds()
      Get the cooldownPeriodInSeconds property: The cooldown period of a session in seconds when the lifecycle type is 'Timed'.
      Returns:
      the cooldownPeriodInSeconds value.
    • withCooldownPeriodInSeconds

      public LifecycleConfiguration withCooldownPeriodInSeconds(Integer cooldownPeriodInSeconds)
      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

      public Integer 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

      public LifecycleConfiguration withMaxAlivePeriodInSeconds(Integer maxAlivePeriodInSeconds)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.