Class VirtualNetworkEncryption
java.lang.Object
com.azure.resourcemanager.network.models.VirtualNetworkEncryption
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VirtualNetworkEncryption>
public final class VirtualNetworkEncryption
extends Object
implements com.azure.json.JsonSerializable<VirtualNetworkEncryption>
Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet.
-
Constructor Summary
ConstructorDescriptionCreates an instance of VirtualNetworkEncryption class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
enabled()
Get the enabled property: Indicates if encryption is enabled on the virtual network.Get the enforcement property: If the encrypted VNet allows VM that does not support encryption.static VirtualNetworkEncryption
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of VirtualNetworkEncryption from the JsonReader.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withEnabled
(boolean enabled) Set the enabled property: Indicates if encryption is enabled on the virtual network.withEnforcement
(VirtualNetworkEncryptionEnforcement enforcement) Set the enforcement property: If the encrypted VNet allows VM that does not support encryption.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
-
VirtualNetworkEncryption
public VirtualNetworkEncryption()Creates an instance of VirtualNetworkEncryption class.
-
-
Method Details
-
enabled
public boolean enabled()Get the enabled property: Indicates if encryption is enabled on the virtual network.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: Indicates if encryption is enabled on the virtual network.- Parameters:
enabled
- the enabled value to set.- Returns:
- the VirtualNetworkEncryption object itself.
-
enforcement
Get the enforcement property: If the encrypted VNet allows VM that does not support encryption. This field is for future support, AllowUnencrypted is the only supported value at general availability.- Returns:
- the enforcement value.
-
withEnforcement
Set the enforcement property: If the encrypted VNet allows VM that does not support encryption. This field is for future support, AllowUnencrypted is the only supported value at general availability.- Parameters:
enforcement
- the enforcement value to set.- Returns:
- the VirtualNetworkEncryption object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<VirtualNetworkEncryption>
- Throws:
IOException
-
fromJson
public static VirtualNetworkEncryption fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of VirtualNetworkEncryption from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of VirtualNetworkEncryption 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 VirtualNetworkEncryption.
-