Class CookieExpiration

java.lang.Object
com.azure.resourcemanager.appservice.models.CookieExpiration
All Implemented Interfaces:
com.azure.json.JsonSerializable<CookieExpiration>

public final class CookieExpiration extends Object implements com.azure.json.JsonSerializable<CookieExpiration>
The configuration settings of the session cookie's expiration.
  • Constructor Details

    • CookieExpiration

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

    • convention

      public CookieExpirationConvention convention()
      Get the convention property: The convention used when determining the session cookie's expiration.
      Returns:
      the convention value.
    • withConvention

      public CookieExpiration withConvention(CookieExpirationConvention convention)
      Set the convention property: The convention used when determining the session cookie's expiration.
      Parameters:
      convention - the convention value to set.
      Returns:
      the CookieExpiration object itself.
    • timeToExpiration

      public String timeToExpiration()
      Get the timeToExpiration property: The time after the request is made when the session cookie should expire.
      Returns:
      the timeToExpiration value.
    • withTimeToExpiration

      public CookieExpiration withTimeToExpiration(String timeToExpiration)
      Set the timeToExpiration property: The time after the request is made when the session cookie should expire.
      Parameters:
      timeToExpiration - the timeToExpiration value to set.
      Returns:
      the CookieExpiration 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<CookieExpiration>
      Throws:
      IOException
    • fromJson

      public static CookieExpiration fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of CookieExpiration from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of CookieExpiration 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 CookieExpiration.