Class EncryptionSettingsCollection
java.lang.Object
com.azure.resourcemanager.compute.models.EncryptionSettingsCollection
- All Implemented Interfaces:
com.azure.json.JsonSerializable<EncryptionSettingsCollection>
public final class EncryptionSettingsCollection
extends Object
implements com.azure.json.JsonSerializable<EncryptionSettingsCollection>
Encryption settings for disk or snapshot.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of EncryptionSettingsCollection class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanenabled()Get the enabled property: Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption.Get the encryptionSettings property: A collection of encryption settings, one for each disk volume.Get the encryptionSettingsVersion property: Describes what type of encryption is used for the disks.static EncryptionSettingsCollectionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of EncryptionSettingsCollection from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withEnabled(boolean enabled) Set the enabled property: Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption.withEncryptionSettings(List<EncryptionSettingsElement> encryptionSettings) Set the encryptionSettings property: A collection of encryption settings, one for each disk volume.withEncryptionSettingsVersion(String encryptionSettingsVersion) Set the encryptionSettingsVersion property: Describes what type of encryption is used for the disks.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
-
EncryptionSettingsCollection
public EncryptionSettingsCollection()Creates an instance of EncryptionSettingsCollection class.
-
-
Method Details
-
enabled
public boolean enabled()Get the enabled property: Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.- Parameters:
enabled- the enabled value to set.- Returns:
- the EncryptionSettingsCollection object itself.
-
encryptionSettings
Get the encryptionSettings property: A collection of encryption settings, one for each disk volume.- Returns:
- the encryptionSettings value.
-
withEncryptionSettings
public EncryptionSettingsCollection withEncryptionSettings(List<EncryptionSettingsElement> encryptionSettings) Set the encryptionSettings property: A collection of encryption settings, one for each disk volume.- Parameters:
encryptionSettings- the encryptionSettings value to set.- Returns:
- the EncryptionSettingsCollection object itself.
-
encryptionSettingsVersion
Get the encryptionSettingsVersion property: Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.- Returns:
- the encryptionSettingsVersion value.
-
withEncryptionSettingsVersion
Set the encryptionSettingsVersion property: Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.- Parameters:
encryptionSettingsVersion- the encryptionSettingsVersion value to set.- Returns:
- the EncryptionSettingsCollection 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<EncryptionSettingsCollection>- Throws:
IOException
-
fromJson
public static EncryptionSettingsCollection fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of EncryptionSettingsCollection from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of EncryptionSettingsCollection if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the EncryptionSettingsCollection.
-