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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the convention property: The convention used when determining the session cookie's expiration.static CookieExpiration
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of CookieExpiration from the JsonReader.Get the timeToExpiration property: The time after the request is made when the session cookie should expire.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withConvention
(CookieExpirationConvention convention) Set the convention property: The convention used when determining the session cookie's expiration.withTimeToExpiration
(String timeToExpiration) Set the timeToExpiration property: The time after the request is made when the session cookie should expire.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
-
CookieExpiration
public CookieExpiration()Creates an instance of CookieExpiration class.
-
-
Method Details
-
convention
Get the convention property: The convention used when determining the session cookie's expiration.- Returns:
- the convention value.
-
withConvention
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
Get the timeToExpiration property: The time after the request is made when the session cookie should expire.- Returns:
- the timeToExpiration value.
-
withTimeToExpiration
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<CookieExpiration>
- Throws:
IOException
-
fromJson
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.
-