Class UsernamePasswordCredentials

java.lang.Object
com.azure.resourcemanager.deviceregistry.models.UsernamePasswordCredentials

public final class UsernamePasswordCredentials extends Object
The credentials for authentication mode UsernamePassword.
  • Constructor Details

    • UsernamePasswordCredentials

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

    • usernameReference

      public String usernameReference()
      Get the usernameReference property: A reference to secret containing the username.
      Returns:
      the usernameReference value.
    • withUsernameReference

      public UsernamePasswordCredentials withUsernameReference(String usernameReference)
      Set the usernameReference property: A reference to secret containing the username.
      Parameters:
      usernameReference - the usernameReference value to set.
      Returns:
      the UsernamePasswordCredentials object itself.
    • passwordReference

      public String passwordReference()
      Get the passwordReference property: A reference to secret containing the password.
      Returns:
      the passwordReference value.
    • withPasswordReference

      public UsernamePasswordCredentials withPasswordReference(String passwordReference)
      Set the passwordReference property: A reference to secret containing the password.
      Parameters:
      passwordReference - the passwordReference value to set.
      Returns:
      the UsernamePasswordCredentials object itself.
    • validate

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