Class SecretReference

java.lang.Object
com.azure.resourcemanager.hdinsight.containers.models.SecretReference
All Implemented Interfaces:
com.azure.json.JsonSerializable<SecretReference>

public final class SecretReference extends Object implements com.azure.json.JsonSerializable<SecretReference>
Secret reference and corresponding properties of a key vault secret.
  • Constructor Details

    • SecretReference

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

    • referenceName

      public String referenceName()
      Get the referenceName property: Reference name of the secret to be used in service configs.
      Returns:
      the referenceName value.
    • withReferenceName

      public SecretReference withReferenceName(String referenceName)
      Set the referenceName property: Reference name of the secret to be used in service configs.
      Parameters:
      referenceName - the referenceName value to set.
      Returns:
      the SecretReference object itself.
    • type

      public KeyVaultObjectType type()
      Get the type property: Type of key vault object: secret, key or certificate.
      Returns:
      the type value.
    • withType

      public SecretReference withType(KeyVaultObjectType type)
      Set the type property: Type of key vault object: secret, key or certificate.
      Parameters:
      type - the type value to set.
      Returns:
      the SecretReference object itself.
    • version

      public String version()
      Get the version property: Version of the secret in key vault.
      Returns:
      the version value.
    • withVersion

      public SecretReference withVersion(String version)
      Set the version property: Version of the secret in key vault.
      Parameters:
      version - the version value to set.
      Returns:
      the SecretReference object itself.
    • keyVaultObjectName

      public String keyVaultObjectName()
      Get the keyVaultObjectName property: Object identifier name of the secret in key vault.
      Returns:
      the keyVaultObjectName value.
    • withKeyVaultObjectName

      public SecretReference withKeyVaultObjectName(String keyVaultObjectName)
      Set the keyVaultObjectName property: Object identifier name of the secret in key vault.
      Parameters:
      keyVaultObjectName - the keyVaultObjectName value to set.
      Returns:
      the SecretReference 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<SecretReference>
      Throws:
      IOException
    • fromJson

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