text: # coding: utf-8
  
  """
      Domain Group API V1
  
      Provides public access to Domain's microservices  # noqa: E501
  
      OpenAPI spec version: v1
      
      Generated by: https://github.com/swagger-api/swagger-codegen.git
  """
  
  
  from __future__ import absolute_import
  
  import re  # noqa: F401
  
  # python 2 and python 3 compatibility library
  import six
  
  from domainClient.api_client import ApiClient
  
  
  class AddressLocatorsApi(object):
      """NOTE: This class is auto generated by the swagger code generator program.
  
      Do not edit the class manually.
      Ref: https://github.com/swagger-api/swagger-codegen
      """
  
      def __init__(self, api_client=None):
          if api_client is None:
              api_client = ApiClient()
          self.api_client = api_client
  
      def address_locators_get(self, search_level, **kwargs):  # noqa: E501
          """Retrieves matching ids for use in other services.  # noqa: E501
  
          Use this endpoint to retrieve IDs that may be used to query information from other endpoints.    For example use `id` of the `Suburb` level to query [`demographics`](/docs/endpoints/demographics/demographics_get)  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.address_locators_get(search_level, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str search_level: Requested search level. Valid values are: `Address`, and `Suburb` (required)
          :param str unit_number: Unit number
          :param str street_number: Street number
          :param str street_name: Street name
          :param str street_type: Street type
          :param str suburb: Suburb
          :param str state: State
          :param str postcode: Postcode
          :return: list[DomainAPMServiceV3ModelAPMAPIModelsTokenisedSearchV3AddressDataModel]
                   If the method is called asynchronously,
                   returns the request thread.
          """
          kwargs['_return_http_data_only'] = True
          if kwargs.get('async_req'):
              return self.address_locators_get_with_http_info(search_level, **kwargs)  # noqa: E501
          else:
              (data) = self.address_locators_get_with_http_info(search_level, **kwargs)  # noqa: E501
              return data
  
      def address_locators_get_with_http_info(self, search_level, **kwargs):  # noqa: E501
          """Retrieves matching ids for use in other services.  # noqa: E501
  
          Use this endpoint to retrieve IDs that may be used to query information from other endpoints.    For example use `id` of the `Suburb` level to query [`demographics`](/docs/endpoints/demographics/demographics_get)  # noqa: E501
          This method makes a synchronous HTTP request by default. To make an
          asynchronous HTTP request, please pass async_req=True
          >>> thread = api.address_locators_get_with_http_info(search_level, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param str search_level: Requested search level. Valid values are: `Address`, and `Suburb` (required)
          :param str unit_number: Unit number
          :param str street_number: Street number
          :param str street_name: Street name
          :param str street_type: Street type
          :param str suburb: Suburb
          :param str state: State
          :param str postcode: Postcode
          :return: list[DomainAPMServiceV3ModelAPMAPIModelsTokenisedSearchV3AddressDataModel]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['search_level', 'unit_number', 'street_number', 'street_name', 'street_type', 'suburb', 'state', 'postcode']  # noqa: E501
          all_params.append('async_req')
          all_params.append('_return_http_data_only')
          all_params.append('_preload_content')
          all_params.append('_request_timeout')
  
          params = locals()
          for key, val in six.iteritems(params['kwargs']):
              if key not in all_params:
                  raise TypeError(
                      "Got an unexpected keyword argument '%s'"
                      " to method address_locators_get" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'search_level' is set
          if ('search_level' not in params or
                  params['search_level'] is None):
              raise ValueError("Missing the required parameter `search_level` when calling `address_locators_get`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
          if 'search_level' in params:
              query_params.append(('searchLevel', params['search_level']))  # noqa: E501
          if 'unit_number' in params:
              query_params.append(('unitNumber', params['unit_number']))  # noqa: E501
          if 'street_number' in params:
              query_params.append(('streetNumber', params['street_number']))  # noqa: E501
          if 'street_name' in params:
              query_params.append(('streetName', params['street_name']))  # noqa: E501
          if 'street_type' in params:
              query_params.append(('streetType', params['street_type']))  # noqa: E501
          if 'suburb' in params:
              query_params.append(('suburb', params['suburb']))  # noqa: E501
          if 'state' in params:
              query_params.append(('state', params['state']))  # noqa: E501
          if 'postcode' in params:
              query_params.append(('postcode', params['postcode']))  # noqa: E501
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          # HTTP header `Accept`
          header_params['Accept'] = self.api_client.select_header_accept(
              ['application/json', 'text/json', 'text/html', 'application/xml', 'text/xml'])  # noqa: E501
  
          # Authentication setting
          auth_settings = ['oauth2']  # noqa: E501
  
          return self.api_client.call_api(
              '/v1/addressLocators', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[DomainAPMServiceV3ModelAPMAPIModelsTokenisedSearchV3AddressDataModel]',  # noqa: E501
              auth_settings=auth_settings,
              async_req=params.get('async_req'),
              _return_http_data_only=params.get('_return_http_data_only'),
              _preload_content=params.get('_preload_content', True),
              _request_timeout=params.get('_request_timeout'),
              collection_formats=collection_formats)
  