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 Details

    • WorkspaceConnectionUsernamePassword

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

    • username

      public String username()
      Get the username property: The username property.
      Returns:
      the username value.
    • withUsername

      public WorkspaceConnectionUsernamePassword withUsername(String username)
      Set the username property: The username property.
      Parameters:
      username - the username value to set.
      Returns:
      the WorkspaceConnectionUsernamePassword object itself.
    • password

      public String password()
      Get the password property: The password property.
      Returns:
      the password value.
    • withPassword

      public WorkspaceConnectionUsernamePassword withPassword(String password)
      Set the password property: The password property.
      Parameters:
      password - the password value to set.
      Returns:
      the WorkspaceConnectionUsernamePassword object itself.
    • securityToken

      public String securityToken()
      Get the securityToken property: Optional, required by connections like SalesForce for extra security in addition to UsernamePassword.
      Returns:
      the securityToken value.
    • withSecurityToken

      public WorkspaceConnectionUsernamePassword withSecurityToken(String securityToken)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.