Class UsernamePasswordCredentials
java.lang.Object
com.azure.resourcemanager.deviceregistry.models.UsernamePasswordCredentials
The credentials for authentication mode UsernamePassword.
-
Constructor Summary
ConstructorDescriptionCreates an instance of UsernamePasswordCredentials class. -
Method Summary
Modifier and TypeMethodDescriptionGet the passwordReference property: A reference to secret containing the password.Get the usernameReference property: A reference to secret containing the username.void
validate()
Validates the instance.withPasswordReference
(String passwordReference) Set the passwordReference property: A reference to secret containing the password.withUsernameReference
(String usernameReference) Set the usernameReference property: A reference to secret containing the username.
-
Constructor Details
-
UsernamePasswordCredentials
public UsernamePasswordCredentials()Creates an instance of UsernamePasswordCredentials class.
-
-
Method Details
-
usernameReference
Get the usernameReference property: A reference to secret containing the username.- Returns:
- the usernameReference value.
-
withUsernameReference
Set the usernameReference property: A reference to secret containing the username.- Parameters:
usernameReference
- the usernameReference value to set.- Returns:
- the UsernamePasswordCredentials object itself.
-
passwordReference
Get the passwordReference property: A reference to secret containing the password.- Returns:
- the passwordReference value.
-
withPasswordReference
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.
-