Class WorkspaceConnectionUsernamePassword
java.lang.Object
com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUsernamePassword
- All Implemented Interfaces:
com.azure.json.JsonSerializable<WorkspaceConnectionUsernamePassword>
public final class WorkspaceConnectionUsernamePassword
extends Object
implements com.azure.json.JsonSerializable<WorkspaceConnectionUsernamePassword>
The WorkspaceConnectionUsernamePassword model.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of WorkspaceConnectionUsernamePassword class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of WorkspaceConnectionUsernamePassword from the JsonReader.password()Get the password property: The password property.Get the securityToken property: Optional, required by connections like SalesForce for extra security in addition to UsernamePassword.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) username()Get the username property: The username property.voidvalidate()Validates the instance.withPassword(String password) Set the password property: The password property.withSecurityToken(String securityToken) Set the securityToken property: Optional, required by connections like SalesForce for extra security in addition to UsernamePassword.withUsername(String username) Set the username property: The username property.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
WorkspaceConnectionUsernamePassword
public WorkspaceConnectionUsernamePassword()Creates an instance of WorkspaceConnectionUsernamePassword class.
-
-
Method Details
-
username
Get the username property: The username property.- Returns:
- the username value.
-
withUsername
Set the username property: The username property.- Parameters:
username- the username value to set.- Returns:
- the WorkspaceConnectionUsernamePassword object itself.
-
password
Get the password property: The password property.- Returns:
- the password value.
-
withPassword
Set the password property: The password property.- Parameters:
password- the password value to set.- Returns:
- the WorkspaceConnectionUsernamePassword object itself.
-
securityToken
Get the securityToken property: Optional, required by connections like SalesForce for extra security in addition to UsernamePassword.- Returns:
- the securityToken value.
-
withSecurityToken
Set the securityToken property: Optional, required by connections like SalesForce for extra security in addition to UsernamePassword.- Parameters:
securityToken- the securityToken value to set.- Returns:
- the WorkspaceConnectionUsernamePassword object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<WorkspaceConnectionUsernamePassword>- Throws:
IOException
-
fromJson
public static WorkspaceConnectionUsernamePassword fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of WorkspaceConnectionUsernamePassword from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of WorkspaceConnectionUsernamePassword 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 WorkspaceConnectionUsernamePassword.
-