Class AuthenticationMethodLdapProperties

java.lang.Object
com.azure.resourcemanager.cosmos.models.AuthenticationMethodLdapProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<AuthenticationMethodLdapProperties>

public final class AuthenticationMethodLdapProperties extends Object implements com.azure.json.JsonSerializable<AuthenticationMethodLdapProperties>
Ldap authentication method properties. This feature is in preview.
  • Constructor Details

    • AuthenticationMethodLdapProperties

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

    • serverHostname

      public String serverHostname()
      Get the serverHostname property: Hostname of the LDAP server.
      Returns:
      the serverHostname value.
    • withServerHostname

      public AuthenticationMethodLdapProperties withServerHostname(String serverHostname)
      Set the serverHostname property: Hostname of the LDAP server.
      Parameters:
      serverHostname - the serverHostname value to set.
      Returns:
      the AuthenticationMethodLdapProperties object itself.
    • serverPort

      public Integer serverPort()
      Get the serverPort property: Port of the LDAP server.
      Returns:
      the serverPort value.
    • withServerPort

      public AuthenticationMethodLdapProperties withServerPort(Integer serverPort)
      Set the serverPort property: Port of the LDAP server.
      Parameters:
      serverPort - the serverPort value to set.
      Returns:
      the AuthenticationMethodLdapProperties object itself.
    • serviceUserDistinguishedName

      public String serviceUserDistinguishedName()
      Get the serviceUserDistinguishedName property: Distinguished name of the look up user account, who can look up user details on authentication.
      Returns:
      the serviceUserDistinguishedName value.
    • withServiceUserDistinguishedName

      public AuthenticationMethodLdapProperties withServiceUserDistinguishedName(String serviceUserDistinguishedName)
      Set the serviceUserDistinguishedName property: Distinguished name of the look up user account, who can look up user details on authentication.
      Parameters:
      serviceUserDistinguishedName - the serviceUserDistinguishedName value to set.
      Returns:
      the AuthenticationMethodLdapProperties object itself.
    • serviceUserPassword

      public String serviceUserPassword()
      Get the serviceUserPassword property: Password of the look up user.
      Returns:
      the serviceUserPassword value.
    • withServiceUserPassword

      public AuthenticationMethodLdapProperties withServiceUserPassword(String serviceUserPassword)
      Set the serviceUserPassword property: Password of the look up user.
      Parameters:
      serviceUserPassword - the serviceUserPassword value to set.
      Returns:
      the AuthenticationMethodLdapProperties object itself.
    • searchBaseDistinguishedName

      public String searchBaseDistinguishedName()
      Get the searchBaseDistinguishedName property: Distinguished name of the object to start the recursive search of users from.
      Returns:
      the searchBaseDistinguishedName value.
    • withSearchBaseDistinguishedName

      public AuthenticationMethodLdapProperties withSearchBaseDistinguishedName(String searchBaseDistinguishedName)
      Set the searchBaseDistinguishedName property: Distinguished name of the object to start the recursive search of users from.
      Parameters:
      searchBaseDistinguishedName - the searchBaseDistinguishedName value to set.
      Returns:
      the AuthenticationMethodLdapProperties object itself.
    • searchFilterTemplate

      public String searchFilterTemplate()
      Get the searchFilterTemplate property: Template to use for searching. Defaults to (cn=%s) where %s will be replaced by the username used to login.
      Returns:
      the searchFilterTemplate value.
    • withSearchFilterTemplate

      public AuthenticationMethodLdapProperties withSearchFilterTemplate(String searchFilterTemplate)
      Set the searchFilterTemplate property: Template to use for searching. Defaults to (cn=%s) where %s will be replaced by the username used to login.
      Parameters:
      searchFilterTemplate - the searchFilterTemplate value to set.
      Returns:
      the AuthenticationMethodLdapProperties object itself.
    • serverCertificates

      public List<Certificate> serverCertificates()
      Get the serverCertificates property: The serverCertificates property.
      Returns:
      the serverCertificates value.
    • withServerCertificates

      public AuthenticationMethodLdapProperties withServerCertificates(List<Certificate> serverCertificates)
      Set the serverCertificates property: The serverCertificates property.
      Parameters:
      serverCertificates - the serverCertificates value to set.
      Returns:
      the AuthenticationMethodLdapProperties object itself.
    • connectionTimeoutInMs

      public Integer connectionTimeoutInMs()
      Get the connectionTimeoutInMs property: Timeout for connecting to the LDAP server in miliseconds. The default is 5000 ms.
      Returns:
      the connectionTimeoutInMs value.
    • withConnectionTimeoutInMs

      public AuthenticationMethodLdapProperties withConnectionTimeoutInMs(Integer connectionTimeoutInMs)
      Set the connectionTimeoutInMs property: Timeout for connecting to the LDAP server in miliseconds. The default is 5000 ms.
      Parameters:
      connectionTimeoutInMs - the connectionTimeoutInMs value to set.
      Returns:
      the AuthenticationMethodLdapProperties 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<AuthenticationMethodLdapProperties>
      Throws:
      IOException
    • fromJson

      public static AuthenticationMethodLdapProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AuthenticationMethodLdapProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AuthenticationMethodLdapProperties 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 AuthenticationMethodLdapProperties.