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

public final class AuthCredential extends Object implements com.azure.json.JsonSerializable<AuthCredential>
Authentication credential stored for an upstream.
  • Constructor Details

    • AuthCredential

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

    • name

      public CredentialName name()
      Get the name property: The name of the credential.
      Returns:
      the name value.
    • withName

      public AuthCredential withName(CredentialName name)
      Set the name property: The name of the credential.
      Parameters:
      name - the name value to set.
      Returns:
      the AuthCredential object itself.
    • usernameSecretIdentifier

      public String usernameSecretIdentifier()
      Get the usernameSecretIdentifier property: KeyVault Secret URI for accessing the username.
      Returns:
      the usernameSecretIdentifier value.
    • withUsernameSecretIdentifier

      public AuthCredential withUsernameSecretIdentifier(String usernameSecretIdentifier)
      Set the usernameSecretIdentifier property: KeyVault Secret URI for accessing the username.
      Parameters:
      usernameSecretIdentifier - the usernameSecretIdentifier value to set.
      Returns:
      the AuthCredential object itself.
    • passwordSecretIdentifier

      public String passwordSecretIdentifier()
      Get the passwordSecretIdentifier property: KeyVault Secret URI for accessing the password.
      Returns:
      the passwordSecretIdentifier value.
    • withPasswordSecretIdentifier

      public AuthCredential withPasswordSecretIdentifier(String passwordSecretIdentifier)
      Set the passwordSecretIdentifier property: KeyVault Secret URI for accessing the password.
      Parameters:
      passwordSecretIdentifier - the passwordSecretIdentifier value to set.
      Returns:
      the AuthCredential object itself.
    • credentialHealth

      public CredentialHealth credentialHealth()
      Get the credentialHealth property: This provides data pertaining to the health of the auth credential.
      Returns:
      the credentialHealth value.
    • 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<AuthCredential>
      Throws:
      IOException
    • fromJson

      public static AuthCredential fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AuthCredential from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AuthCredential if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the AuthCredential.