Class KeyVaultAndSecretReference

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

public final class KeyVaultAndSecretReference extends Object implements com.azure.json.JsonSerializable<KeyVaultAndSecretReference>
Key Vault Secret Url and vault id of the encryption key.
  • Constructor Details

    • KeyVaultAndSecretReference

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

    • sourceVault

      public SourceVault sourceVault()
      Get the sourceVault property: Resource id of the KeyVault containing the key or secret.
      Returns:
      the sourceVault value.
    • withSourceVault

      public KeyVaultAndSecretReference withSourceVault(SourceVault sourceVault)
      Set the sourceVault property: Resource id of the KeyVault containing the key or secret.
      Parameters:
      sourceVault - the sourceVault value to set.
      Returns:
      the KeyVaultAndSecretReference object itself.
    • secretUrl

      public String secretUrl()
      Get the secretUrl property: Url pointing to a key or secret in KeyVault.
      Returns:
      the secretUrl value.
    • withSecretUrl

      public KeyVaultAndSecretReference withSecretUrl(String secretUrl)
      Set the secretUrl property: Url pointing to a key or secret in KeyVault.
      Parameters:
      secretUrl - the secretUrl value to set.
      Returns:
      the KeyVaultAndSecretReference 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<KeyVaultAndSecretReference>
      Throws:
      IOException
    • fromJson

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