def ActiveDirectoryConfig(sql_messages, domain=None):
  """Generates the Active Directory configuration for the instance.

  Args:
    sql_messages: module, The messages module that should be used.
    domain: string, the Active Directory domain value.

  Returns:
    sql_messages.SqlActiveDirectoryConfig object.
  """
  config = sql_messages.SqlActiveDirectoryConfig(domain=domain)
  return config