Class KeyVaultAndKeyReference
java.lang.Object
com.azure.resourcemanager.compute.models.KeyVaultAndKeyReference
- All Implemented Interfaces:
com.azure.json.JsonSerializable<KeyVaultAndKeyReference>
public final class KeyVaultAndKeyReference
extends Object
implements com.azure.json.JsonSerializable<KeyVaultAndKeyReference>
Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of KeyVaultAndKeyReference class. -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyVaultAndKeyReferencefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of KeyVaultAndKeyReference from the JsonReader.keyUrl()Get the keyUrl property: Url pointing to a key or secret in KeyVault.Get the sourceVault property: Resource id of the KeyVault containing the key or secret.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withKeyUrl(String keyUrl) Set the keyUrl property: Url pointing to a key or secret in KeyVault.withSourceVault(SourceVault sourceVault) Set the sourceVault property: Resource id of the KeyVault containing the key or secret.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
-
KeyVaultAndKeyReference
public KeyVaultAndKeyReference()Creates an instance of KeyVaultAndKeyReference class.
-
-
Method Details
-
sourceVault
Get the sourceVault property: Resource id of the KeyVault containing the key or secret.- Returns:
- the sourceVault value.
-
withSourceVault
Set the sourceVault property: Resource id of the KeyVault containing the key or secret.- Parameters:
sourceVault- the sourceVault value to set.- Returns:
- the KeyVaultAndKeyReference object itself.
-
keyUrl
Get the keyUrl property: Url pointing to a key or secret in KeyVault.- Returns:
- the keyUrl value.
-
withKeyUrl
Set the keyUrl property: Url pointing to a key or secret in KeyVault.- Parameters:
keyUrl- the keyUrl value to set.- Returns:
- the KeyVaultAndKeyReference 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<KeyVaultAndKeyReference>- Throws:
IOException
-
fromJson
public static KeyVaultAndKeyReference fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of KeyVaultAndKeyReference from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of KeyVaultAndKeyReference 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 KeyVaultAndKeyReference.
-