LifetimeAction Class

  • java.lang.Object
    • com.azure.security.keyvault.certificates.models.LifetimeAction

Implements

public final class LifetimeAction
implements JsonSerializable<LifetimeAction>

Represents a LifeTimeAction in CertificatePolicy

Constructor Summary

Constructor Description
LifetimeAction(CertificatePolicyAction action)

Creates a new LifetimeAction instance, with the provided CertificatePolicyAction.

Method Summary

Modifier and Type Method and Description
static LifetimeAction fromJson(JsonReader jsonReader)

Reads a JSON stream into a LifetimeAction.

CertificatePolicyAction getAction()

Get the lifetime action.

Integer getDaysBeforeExpiry()

Get the days before expiry.

Integer getLifetimePercentage()

Get the lifetime percentage.

LifetimeAction setDaysBeforeExpiry(Integer daysBeforeExpiry)

Set the days before expiry.

LifetimeAction setLifetimePercentage(Integer lifetimePercentage)

Set the lifetime percentage.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

LifetimeAction

public LifetimeAction(CertificatePolicyAction action)

Creates a new LifetimeAction instance, with the provided CertificatePolicyAction.

Parameters:

action - The action type of this LifetimeAction.

Method Details

fromJson

public static LifetimeAction fromJson(JsonReader jsonReader)

Reads a JSON stream into a LifetimeAction.

Parameters:

jsonReader - The JsonReader being read.

Returns:

The LifetimeAction that the JSON stream represented, may return null.

Throws:

IOException

- If a LifetimeAction fails to be read from the jsonReader.

getAction

public CertificatePolicyAction getAction()

Get the lifetime action.

Returns:

the lifetime action

getDaysBeforeExpiry

public Integer getDaysBeforeExpiry()

Get the days before expiry.

Returns:

the days before expiry

getLifetimePercentage

public Integer getLifetimePercentage()

Get the lifetime percentage.

Returns:

the lifetime percentage

setDaysBeforeExpiry

public LifetimeAction setDaysBeforeExpiry(Integer daysBeforeExpiry)

Set the days before expiry.

Parameters:

daysBeforeExpiry - The days before expiry to set

Returns:

the LifetimeAction object itself.

setLifetimePercentage

public LifetimeAction setLifetimePercentage(Integer lifetimePercentage)

Set the lifetime percentage.

Parameters:

lifetimePercentage - The lifetime percentage to set

Returns:

the LifetimeAction object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to