Class KeyVaultKeyReference

java.lang.Object
com.azure.resourcemanager.compute.models.KeyVaultKeyReference
All Implemented Interfaces:
com.azure.json.JsonSerializable<KeyVaultKeyReference>

public final class KeyVaultKeyReference extends Object implements com.azure.json.JsonSerializable<KeyVaultKeyReference>
Describes a reference to Key Vault Key.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of KeyVaultKeyReference class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of KeyVaultKeyReference from the JsonReader.
    Get the keyUrl property: The URL referencing a key encryption key in Key Vault.
    com.azure.core.management.SubResource
    Get the sourceVault property: The relative URL of the Key Vault containing the key.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the keyUrl property: The URL referencing a key encryption key in Key Vault.
    withSourceVault(com.azure.core.management.SubResource sourceVault)
    Set the sourceVault property: The relative URL of the Key Vault containing the key.

    Methods inherited from class 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

    • KeyVaultKeyReference

      public KeyVaultKeyReference()
      Creates an instance of KeyVaultKeyReference class.
  • Method Details

    • keyUrl

      public String keyUrl()
      Get the keyUrl property: The URL referencing a key encryption key in Key Vault.
      Returns:
      the keyUrl value.
    • withKeyUrl

      public KeyVaultKeyReference withKeyUrl(String keyUrl)
      Set the keyUrl property: The URL referencing a key encryption key in Key Vault.
      Parameters:
      keyUrl - the keyUrl value to set.
      Returns:
      the KeyVaultKeyReference object itself.
    • sourceVault

      public com.azure.core.management.SubResource sourceVault()
      Get the sourceVault property: The relative URL of the Key Vault containing the key.
      Returns:
      the sourceVault value.
    • withSourceVault

      public KeyVaultKeyReference withSourceVault(com.azure.core.management.SubResource sourceVault)
      Set the sourceVault property: The relative URL of the Key Vault containing the key.
      Parameters:
      sourceVault - the sourceVault value to set.
      Returns:
      the KeyVaultKeyReference object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<KeyVaultKeyReference>
      Throws:
      IOException
    • fromJson

      public static KeyVaultKeyReference fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of KeyVaultKeyReference from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of KeyVaultKeyReference 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 KeyVaultKeyReference.