def create_with_config(config):
        # type: (RecommendationConfig) -> RecommendationClient

        warnings.warn(
            "`%s.%s` is deprecated, use `%s.%s` instead."
            % (
                "RecommendationClient",
                "create_with_config",
                "PersonalizationClient",
                "create_with_config",
            ),
            DeprecationWarning,
        )

        requester = Requester()
        transporter = Transporter(requester, config)

        client = RecommendationClient(transporter, config)

        if is_async_available():
            from algoliasearch.recommendation_client_async import (
                RecommendationClientAsync,
            )
            from algoliasearch.http.transporter_async import TransporterAsync
            from algoliasearch.http.requester_async import RequesterAsync

            return RecommendationClientAsync(
                client, TransporterAsync(RequesterAsync(), config), config
            )

        return client
    def create_with_config(config):
        # type: (SearchConfig) -> SearchClient

        requester = Requester()
        transporter = Transporter(requester, config)

        client = SearchClient(transporter, config)

        if is_async_available():
            from algoliasearch.search_client_async import SearchClientAsync
            from algoliasearch.http.transporter_async import TransporterAsync
            from algoliasearch.http.requester_async import RequesterAsync

            return SearchClientAsync(
                client, TransporterAsync(RequesterAsync(), config), config)

        return client
    def create_with_config(config):
        # type: (RecommendationConfig) -> RecommendationClient

        requester = Requester()
        transporter = Transporter(requester, config)

        client = RecommendationClient(transporter, config)

        if is_async_available():
            from algoliasearch.recommendation_client_async import (
                RecommendationClientAsync, )
            from algoliasearch.http.transporter_async import TransporterAsync
            from algoliasearch.http.requester_async import RequesterAsync

            return RecommendationClientAsync(
                client, TransporterAsync(RequesterAsync(), config), config)

        return client
    def create_with_config(config):
        # type: (SearchConfig) -> SearchClient

        requester = Requester()
        transporter = Transporter(requester, config)

        client = SearchClient(transporter, config)

        if is_async_available():
            from algoliasearch.search_client_async import SearchClientAsync
            from algoliasearch.http.transporter_async import TransporterAsync
            from algoliasearch.http.requester_async import RequesterAsync

            return SearchClientAsync(
                client, TransporterAsync(RequesterAsync(), config), config
            )

        return client
    def create_with_config(config):
        # type: (InsightsConfig) -> InsightsClient

        requester = Requester()
        transporter = Transporter(requester, config)

        client = InsightsClient(transporter, config)

        if is_async_available():
            from algoliasearch.insights_client_async import InsightsClientAsync
            from algoliasearch.http.transporter_async import \
                TransporterAsync
            from algoliasearch.http.requester_async import RequesterAsync

            return InsightsClientAsync(
                client, TransporterAsync(RequesterAsync(), config), config)

        return client
    def create_with_config(config):
        # type: (InsightsConfig) -> InsightsClient

        requester = Requester()
        transporter = Transporter(requester, config)

        client = InsightsClient(transporter, config)

        if is_async_available():
            from algoliasearch.insights_client_async import InsightsClientAsync
            from algoliasearch.http.transporter_async import \
                TransporterAsync
            from algoliasearch.http.requester_async import RequesterAsync

            return InsightsClientAsync(
                client, TransporterAsync(RequesterAsync(), config), config
            )

        return client