Class EncryptionService
java.lang.Object
com.azure.resourcemanager.storage.models.EncryptionService
- All Implemented Interfaces:
com.azure.json.JsonSerializable<EncryptionService>
public final class EncryptionService
extends Object
implements com.azure.json.JsonSerializable<EncryptionService>
A service that allows server-side encryption to be used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionenabled()Get the enabled property: A boolean indicating whether or not the service encrypts the data as it is stored.static EncryptionServicefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of EncryptionService from the JsonReader.keyType()Get the keyType property: Encryption key type to be used for the encryption service.Get the lastEnabledTime property: Gets a rough estimate of the date/time when the encryption was last enabled by the user.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withEnabled(Boolean enabled) Set the enabled property: A boolean indicating whether or not the service encrypts the data as it is stored.withKeyType(KeyType keyType) Set the keyType property: Encryption key type to be used for the encryption service.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
EncryptionService
public EncryptionService()Creates an instance of EncryptionService class.
-
-
Method Details
-
enabled
Get the enabled property: A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default today and cannot be disabled.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default today and cannot be disabled.- Parameters:
enabled- the enabled value to set.- Returns:
- the EncryptionService object itself.
-
lastEnabledTime
Get the lastEnabledTime property: Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is encrypted at rest by default today and cannot be disabled.- Returns:
- the lastEnabledTime value.
-
keyType
Get the keyType property: Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used.- Returns:
- the keyType value.
-
withKeyType
Set the keyType property: Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used.- Parameters:
keyType- the keyType value to set.- Returns:
- the EncryptionService object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<EncryptionService>- Throws:
IOException
-
fromJson
Reads an instance of EncryptionService from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of EncryptionService 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 EncryptionService.
-