KeyAttributes Class

  • java.lang.Object
    • com.azure.resourcemanager.keyvault.models.KeyAttributes

Implements

public final class KeyAttributes
implements JsonSerializable<KeyAttributes>

The object attributes managed by the Azure Key Vault service.

Constructor Summary

Constructor Description
KeyAttributes()

Creates an instance of KeyAttributes class.

Method Summary

Modifier and Type Method and Description
Long created()

Get the created property: Creation time in seconds since 1970-01-01T00:00:00Z.

Boolean enabled()

Get the enabled property: Determines whether or not the object is enabled.

Long expires()

Get the expires property: Expiry date in seconds since 1970-01-01T00:00:00Z.

Boolean exportable()

Get the exportable property: Indicates if the private key can be exported.

static KeyAttributes fromJson(JsonReader jsonReader)

Reads an instance of KeyAttributes from the JsonReader.

Long notBefore()

Get the notBefore property: Not before date in seconds since 1970-01-01T00:00:00Z.

DeletionRecoveryLevel recoveryLevel()

Get the recoveryLevel property: The deletion recovery level currently in effect for the object.

JsonWriter toJson(JsonWriter jsonWriter)
Long updated()

Get the updated property: Last updated time in seconds since 1970-01-01T00:00:00Z.

void validate()

Validates the instance.

KeyAttributes withEnabled(Boolean enabled)

Set the enabled property: Determines whether or not the object is enabled.

KeyAttributes withExpires(Long expires)

Set the expires property: Expiry date in seconds since 1970-01-01T00:00:00Z.

KeyAttributes withExportable(Boolean exportable)

Set the exportable property: Indicates if the private key can be exported.

KeyAttributes withNotBefore(Long notBefore)

Set the notBefore property: Not before date in seconds since 1970-01-01T00:00:00Z.

Methods inherited from java.lang.Object

Constructor Details

KeyAttributes

public KeyAttributes()

Creates an instance of KeyAttributes class.

Method Details

created

public Long created()

Get the created property: Creation time in seconds since 1970-01-01T00:00:00Z.

Returns:

the created value.

enabled

public Boolean enabled()

Get the enabled property: Determines whether or not the object is enabled.

Returns:

the enabled value.

expires

public Long expires()

Get the expires property: Expiry date in seconds since 1970-01-01T00:00:00Z.

Returns:

the expires value.

exportable

public Boolean exportable()

Get the exportable property: Indicates if the private key can be exported.

Returns:

the exportable value.

fromJson

public static KeyAttributes fromJson(JsonReader jsonReader)

Reads an instance of KeyAttributes from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KeyAttributes 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 KeyAttributes.

notBefore

public Long notBefore()

Get the notBefore property: Not before date in seconds since 1970-01-01T00:00:00Z.

Returns:

the notBefore value.

recoveryLevel

public DeletionRecoveryLevel recoveryLevel()

Get the recoveryLevel property: The deletion recovery level currently in effect for the object. If it contains 'Purgeable', then the object can be permanently deleted by a privileged user; otherwise, only the system can purge the object at the end of the retention interval.

Returns:

the recoveryLevel value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

updated

public Long updated()

Get the updated property: Last updated time in seconds since 1970-01-01T00:00:00Z.

Returns:

the updated value.

validate

public void validate()

Validates the instance.

withEnabled

public KeyAttributes withEnabled(Boolean enabled)

Set the enabled property: Determines whether or not the object is enabled.

Parameters:

enabled - the enabled value to set.

Returns:

the KeyAttributes object itself.

withExpires

public KeyAttributes withExpires(Long expires)

Set the expires property: Expiry date in seconds since 1970-01-01T00:00:00Z.

Parameters:

expires - the expires value to set.

Returns:

the KeyAttributes object itself.

withExportable

public KeyAttributes withExportable(Boolean exportable)

Set the exportable property: Indicates if the private key can be exported.

Parameters:

exportable - the exportable value to set.

Returns:

the KeyAttributes object itself.

withNotBefore

public KeyAttributes withNotBefore(Long notBefore)

Set the notBefore property: Not before date in seconds since 1970-01-01T00:00:00Z.

Parameters:

notBefore - the notBefore value to set.

Returns:

the KeyAttributes object itself.

Applies to