Class LifetimeAction
java.lang.Object
com.azure.security.keyvault.certificates.models.LifetimeAction
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LifetimeAction>
public final class LifetimeAction
extends Object
implements com.azure.json.JsonSerializable<LifetimeAction>
Represents a LifeTimeAction in
CertificatePolicy
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new LifetimeAction instance, with the providedCertificatePolicyAction
. -
Method Summary
Modifier and TypeMethodDescriptionstatic LifetimeAction
fromJson
(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aLifetimeAction
.Get the lifetime action.Get the days before expiry.Get the lifetime percentage.setDaysBeforeExpiry
(Integer daysBeforeExpiry) Set the days before expiry.setLifetimePercentage
(Integer lifetimePercentage) Set the lifetime percentage.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) 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
-
LifetimeAction
Creates a new LifetimeAction instance, with the providedCertificatePolicyAction
.- Parameters:
action
- The action type of this LifetimeAction.
-
-
Method Details
-
getLifetimePercentage
Get the lifetime percentage.- Returns:
- the lifetime percentage
-
setLifetimePercentage
Set the lifetime percentage.- Parameters:
lifetimePercentage
- The lifetime percentage to set- Returns:
- the LifetimeAction object itself.
-
getDaysBeforeExpiry
Get the days before expiry.- Returns:
- the days before expiry
-
setDaysBeforeExpiry
Set the days before expiry.- Parameters:
daysBeforeExpiry
- The days before expiry to set- Returns:
- the LifetimeAction object itself.
-
getAction
Get the lifetime action.- Returns:
- the lifetime action
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<LifetimeAction>
- Throws:
IOException
-
fromJson
Reads a JSON stream into aLifetimeAction
.- Parameters:
jsonReader
- TheJsonReader
being read.- Returns:
- The
LifetimeAction
that the JSON stream represented, may return null. - Throws:
IOException
- If aLifetimeAction
fails to be read from thejsonReader
.
-