Class UserAuthentication

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

public final class UserAuthentication extends Object
Definition of the client authentication mechanism to the server.
  • Constructor Details

    • UserAuthentication

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

    • mode

      public UserAuthenticationMode mode()
      Get the mode property: Defines the mode to authenticate the user of the client at the server.
      Returns:
      the mode value.
    • withMode

      Set the mode property: Defines the mode to authenticate the user of the client at the server.
      Parameters:
      mode - the mode value to set.
      Returns:
      the UserAuthentication object itself.
    • usernamePasswordCredentials

      public UsernamePasswordCredentials usernamePasswordCredentials()
      Get the usernamePasswordCredentials property: Defines the username and password references when UsernamePassword user authentication mode is selected.
      Returns:
      the usernamePasswordCredentials value.
    • withUsernamePasswordCredentials

      public UserAuthentication withUsernamePasswordCredentials(UsernamePasswordCredentials usernamePasswordCredentials)
      Set the usernamePasswordCredentials property: Defines the username and password references when UsernamePassword user authentication mode is selected.
      Parameters:
      usernamePasswordCredentials - the usernamePasswordCredentials value to set.
      Returns:
      the UserAuthentication object itself.
    • x509Credentials

      public X509Credentials x509Credentials()
      Get the x509Credentials property: Defines the certificate reference when Certificate user authentication mode is selected.
      Returns:
      the x509Credentials value.
    • withX509Credentials

      public UserAuthentication withX509Credentials(X509Credentials x509Credentials)
      Set the x509Credentials property: Defines the certificate reference when Certificate user authentication mode is selected.
      Parameters:
      x509Credentials - the x509Credentials value to set.
      Returns:
      the UserAuthentication object itself.
    • validate

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