// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2

#include "py.Windows.Services.Maps.LocalSearch.h"


namespace py::cpp::Windows::Services::Maps::LocalSearch
{
    // ----- LocalCategories class --------------------

    static PyObject* _new_LocalCategories(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalCategories>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalCategories>::type_name);
        return nullptr;
    }

    static PyObject* LocalCategories_get_All(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"All"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::All());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalCategories_get_BankAndCreditUnions(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"BankAndCreditUnions"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::BankAndCreditUnions());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalCategories_get_EatDrink(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"EatDrink"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::EatDrink());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalCategories_get_Hospitals(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"Hospitals"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::Hospitals());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalCategories_get_HotelsAndMotels(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"HotelsAndMotels"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::HotelsAndMotels());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalCategories_get_Parking(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"Parking"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::Parking());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalCategories_get_SeeDo(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"SeeDo"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::SeeDo());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalCategories_get_Shop(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalCategories", L"Shop"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalCategories::Shop());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_LocalCategories[] = {
        { }
    };

    static PyGetSetDef _getset_LocalCategories[] = {
        { }
    };

    static PyType_Slot _type_slots_LocalCategories[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LocalCategories) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalCategories) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalCategories) },
        { },
    };

    static PyType_Spec type_spec_LocalCategories =
    {
        "winrt._winrt_windows_services_maps_localsearch.LocalCategories",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LocalCategories
    };

    static PyGetSetDef getset_LocalCategories_Static[] = {
        { "all", reinterpret_cast<getter>(LocalCategories_get_All), nullptr, nullptr, nullptr },
        { "bank_and_credit_unions", reinterpret_cast<getter>(LocalCategories_get_BankAndCreditUnions), nullptr, nullptr, nullptr },
        { "eat_drink", reinterpret_cast<getter>(LocalCategories_get_EatDrink), nullptr, nullptr, nullptr },
        { "hospitals", reinterpret_cast<getter>(LocalCategories_get_Hospitals), nullptr, nullptr, nullptr },
        { "hotels_and_motels", reinterpret_cast<getter>(LocalCategories_get_HotelsAndMotels), nullptr, nullptr, nullptr },
        { "parking", reinterpret_cast<getter>(LocalCategories_get_Parking), nullptr, nullptr, nullptr },
        { "see_do", reinterpret_cast<getter>(LocalCategories_get_SeeDo), nullptr, nullptr, nullptr },
        { "shop", reinterpret_cast<getter>(LocalCategories_get_Shop), nullptr, nullptr, nullptr },
        { }
    };

    static PyMethodDef methods_LocalCategories_Static[] = {
        { }
    };

    static PyType_Slot type_slots_LocalCategories_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_LocalCategories_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_LocalCategories_Static) },
        { }
    };

    static PyType_Spec type_spec_LocalCategories_Static =
    {
        "winrt._winrt_windows_services_maps_localsearch.LocalCategories_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_LocalCategories_Static
    };

    // ----- LocalLocation class --------------------

    static PyObject* _new_LocalLocation(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalLocation>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalLocation>::type_name);
        return nullptr;
    }

    static void _dealloc_LocalLocation(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* LocalLocation_get_Address(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Address"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Address());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocation_get_DataAttribution(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"DataAttribution"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.DataAttribution());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocation_get_Description(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Description"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Description());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocation_get_DisplayName(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"DisplayName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.DisplayName());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocation_get_Identifier(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Identifier"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Identifier());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocation_get_PhoneNumber(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"PhoneNumber"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.PhoneNumber());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocation_get_Point(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Point"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Point());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocation_get_Category(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"Category"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Category());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocation_get_HoursOfOperation(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"HoursOfOperation"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.HoursOfOperation());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocation_get_RatingInfo(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocation", L"RatingInfo"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.RatingInfo());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_LocalLocation(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Services::Maps::LocalSearch::LocalLocation>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_LocalLocation(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Services::Maps::LocalSearch::LocalLocation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_LocalLocation[] = {
        { "_assign_array_", _assign_array_LocalLocation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_LocalLocation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_LocalLocation[] = {
        { "address", reinterpret_cast<getter>(LocalLocation_get_Address), nullptr, nullptr, nullptr },
        { "data_attribution", reinterpret_cast<getter>(LocalLocation_get_DataAttribution), nullptr, nullptr, nullptr },
        { "description", reinterpret_cast<getter>(LocalLocation_get_Description), nullptr, nullptr, nullptr },
        { "display_name", reinterpret_cast<getter>(LocalLocation_get_DisplayName), nullptr, nullptr, nullptr },
        { "identifier", reinterpret_cast<getter>(LocalLocation_get_Identifier), nullptr, nullptr, nullptr },
        { "phone_number", reinterpret_cast<getter>(LocalLocation_get_PhoneNumber), nullptr, nullptr, nullptr },
        { "point", reinterpret_cast<getter>(LocalLocation_get_Point), nullptr, nullptr, nullptr },
        { "category", reinterpret_cast<getter>(LocalLocation_get_Category), nullptr, nullptr, nullptr },
        { "hours_of_operation", reinterpret_cast<getter>(LocalLocation_get_HoursOfOperation), nullptr, nullptr, nullptr },
        { "rating_info", reinterpret_cast<getter>(LocalLocation_get_RatingInfo), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_LocalLocation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LocalLocation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LocalLocation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalLocation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalLocation) },
        { },
    };

    static PyType_Spec type_spec_LocalLocation =
    {
        "winrt._winrt_windows_services_maps_localsearch.LocalLocation",
        sizeof(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LocalLocation
    };

    // ----- LocalLocationFinder class --------------------

    static PyObject* _new_LocalLocationFinder(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalLocationFinder>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalLocationFinder>::type_name);
        return nullptr;
    }

    static PyObject* LocalLocationFinder_FindLocalLocationsAsync(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 4)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationFinder", L"FindLocalLocationsAsync", 4))
            {
                py::set_arg_count_version_error(4);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Devices::Geolocation::Geocircle>(args, 1);
                auto param2 = py::convert_to<winrt::hstring>(args, 2);
                auto param3 = py::convert_to<uint32_t>(args, 3);

                return py::convert(winrt::Windows::Services::Maps::LocalSearch::LocalLocationFinder::FindLocalLocationsAsync(param0, param1, param2, param3));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyMethodDef _methods_LocalLocationFinder[] = {
        { }
    };

    static PyGetSetDef _getset_LocalLocationFinder[] = {
        { }
    };

    static PyType_Slot _type_slots_LocalLocationFinder[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LocalLocationFinder) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalLocationFinder) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalLocationFinder) },
        { },
    };

    static PyType_Spec type_spec_LocalLocationFinder =
    {
        "winrt._winrt_windows_services_maps_localsearch.LocalLocationFinder",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LocalLocationFinder
    };

    static PyGetSetDef getset_LocalLocationFinder_Static[] = {
        { }
    };

    static PyMethodDef methods_LocalLocationFinder_Static[] = {
        { "find_local_locations_async", reinterpret_cast<PyCFunction>(LocalLocationFinder_FindLocalLocationsAsync), METH_VARARGS, nullptr },
        { }
    };

    static PyType_Slot type_slots_LocalLocationFinder_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_LocalLocationFinder_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_LocalLocationFinder_Static) },
        { }
    };

    static PyType_Spec type_spec_LocalLocationFinder_Static =
    {
        "winrt._winrt_windows_services_maps_localsearch.LocalLocationFinder_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_LocalLocationFinder_Static
    };

    // ----- LocalLocationFinderResult class --------------------

    static PyObject* _new_LocalLocationFinderResult(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult>::type_name);
        return nullptr;
    }

    static void _dealloc_LocalLocationFinderResult(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* LocalLocationFinderResult_get_LocalLocations(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationFinderResult", L"LocalLocations"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.LocalLocations());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocationFinderResult_get_Status(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationFinderResult", L"Status"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Status());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_LocalLocationFinderResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_LocalLocationFinderResult(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_LocalLocationFinderResult[] = {
        { "_assign_array_", _assign_array_LocalLocationFinderResult, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_LocalLocationFinderResult), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_LocalLocationFinderResult[] = {
        { "local_locations", reinterpret_cast<getter>(LocalLocationFinderResult_get_LocalLocations), nullptr, nullptr, nullptr },
        { "status", reinterpret_cast<getter>(LocalLocationFinderResult_get_Status), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_LocalLocationFinderResult[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LocalLocationFinderResult) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LocalLocationFinderResult) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalLocationFinderResult) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalLocationFinderResult) },
        { },
    };

    static PyType_Spec type_spec_LocalLocationFinderResult =
    {
        "winrt._winrt_windows_services_maps_localsearch.LocalLocationFinderResult",
        sizeof(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationFinderResult),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LocalLocationFinderResult
    };

    // ----- LocalLocationHoursOfOperationItem class --------------------

    static PyObject* _new_LocalLocationHoursOfOperationItem(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem>::type_name);
        return nullptr;
    }

    static void _dealloc_LocalLocationHoursOfOperationItem(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* LocalLocationHoursOfOperationItem_get_Day(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationHoursOfOperationItem", L"Day"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Day());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocationHoursOfOperationItem_get_Span(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationHoursOfOperationItem", L"Span"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Span());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocationHoursOfOperationItem_get_Start(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationHoursOfOperationItem", L"Start"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.Start());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_LocalLocationHoursOfOperationItem(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_LocalLocationHoursOfOperationItem(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_LocalLocationHoursOfOperationItem[] = {
        { "_assign_array_", _assign_array_LocalLocationHoursOfOperationItem, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_LocalLocationHoursOfOperationItem), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_LocalLocationHoursOfOperationItem[] = {
        { "day", reinterpret_cast<getter>(LocalLocationHoursOfOperationItem_get_Day), nullptr, nullptr, nullptr },
        { "span", reinterpret_cast<getter>(LocalLocationHoursOfOperationItem_get_Span), nullptr, nullptr, nullptr },
        { "start", reinterpret_cast<getter>(LocalLocationHoursOfOperationItem_get_Start), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_LocalLocationHoursOfOperationItem[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LocalLocationHoursOfOperationItem) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LocalLocationHoursOfOperationItem) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalLocationHoursOfOperationItem) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalLocationHoursOfOperationItem) },
        { },
    };

    static PyType_Spec type_spec_LocalLocationHoursOfOperationItem =
    {
        "winrt._winrt_windows_services_maps_localsearch.LocalLocationHoursOfOperationItem",
        sizeof(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationHoursOfOperationItem),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LocalLocationHoursOfOperationItem
    };

    // ----- LocalLocationRatingInfo class --------------------

    static PyObject* _new_LocalLocationRatingInfo(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo>::type_name);
        return nullptr;
    }

    static void _dealloc_LocalLocationRatingInfo(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo* self) noexcept
    {
        auto tp = Py_TYPE(self);
        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* LocalLocationRatingInfo_get_AggregateRating(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationRatingInfo", L"AggregateRating"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.AggregateRating());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocationRatingInfo_get_ProviderIdentifier(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationRatingInfo", L"ProviderIdentifier"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.ProviderIdentifier());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* LocalLocationRatingInfo_get_RatingCount(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Services.Maps.LocalSearch.LocalLocationRatingInfo", L"RatingCount"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(self->obj.RatingCount());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _assign_array_LocalLocationRatingInfo(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_LocalLocationRatingInfo(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_LocalLocationRatingInfo[] = {
        { "_assign_array_", _assign_array_LocalLocationRatingInfo, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_LocalLocationRatingInfo), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_LocalLocationRatingInfo[] = {
        { "aggregate_rating", reinterpret_cast<getter>(LocalLocationRatingInfo_get_AggregateRating), nullptr, nullptr, nullptr },
        { "provider_identifier", reinterpret_cast<getter>(LocalLocationRatingInfo_get_ProviderIdentifier), nullptr, nullptr, nullptr },
        { "rating_count", reinterpret_cast<getter>(LocalLocationRatingInfo_get_RatingCount), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_LocalLocationRatingInfo[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_LocalLocationRatingInfo) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LocalLocationRatingInfo) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_LocalLocationRatingInfo) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_LocalLocationRatingInfo) },
        { },
    };

    static PyType_Spec type_spec_LocalLocationRatingInfo =
    {
        "winrt._winrt_windows_services_maps_localsearch.LocalLocationRatingInfo",
        sizeof(py::wrapper::Windows::Services::Maps::LocalSearch::LocalLocationRatingInfo),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_LocalLocationRatingInfo
    };

    // ----- PlaceInfoHelper class --------------------

    static PyObject* _new_PlaceInfoHelper(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
    {
        static_assert(py::py_type<winrt::Windows::Services::Maps::LocalSearch::PlaceInfoHelper>::type_name);
        py::set_invalid_activation_error(py::py_type<winrt::Windows::Services::Maps::LocalSearch::PlaceInfoHelper>::type_name);
        return nullptr;
    }

    static PyObject* PlaceInfoHelper_CreateFromLocalLocation(PyObject* /*unused*/, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Services.Maps.LocalSearch.PlaceInfoHelper", L"CreateFromLocalLocation", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Services::Maps::LocalSearch::LocalLocation>(args, 0);

                return py::convert(winrt::Windows::Services::Maps::LocalSearch::PlaceInfoHelper::CreateFromLocalLocation(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyMethodDef _methods_PlaceInfoHelper[] = {
        { }
    };

    static PyGetSetDef _getset_PlaceInfoHelper[] = {
        { }
    };

    static PyType_Slot _type_slots_PlaceInfoHelper[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_PlaceInfoHelper) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_PlaceInfoHelper) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_PlaceInfoHelper) },
        { },
    };

    static PyType_Spec type_spec_PlaceInfoHelper =
    {
        "winrt._winrt_windows_services_maps_localsearch.PlaceInfoHelper",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_PlaceInfoHelper
    };

    static PyGetSetDef getset_PlaceInfoHelper_Static[] = {
        { }
    };

    static PyMethodDef methods_PlaceInfoHelper_Static[] = {
        { "create_from_local_location", reinterpret_cast<PyCFunction>(PlaceInfoHelper_CreateFromLocalLocation), METH_VARARGS, nullptr },
        { }
    };

    static PyType_Slot type_slots_PlaceInfoHelper_Static[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_PlaceInfoHelper_Static) },
        { Py_tp_methods, reinterpret_cast<void*>(methods_PlaceInfoHelper_Static) },
        { }
    };

    static PyType_Spec type_spec_PlaceInfoHelper_Static =
    {
        "winrt._winrt_windows_services_maps_localsearch.PlaceInfoHelper_Static",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_PlaceInfoHelper_Static
    };

    // ----- Windows.Services.Maps.LocalSearch Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::Services::Maps::LocalSearch");


    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winrt_windows_services_maps_localsearch",
           module_doc,
           0,
           nullptr,
           nullptr,
           nullptr,
           nullptr,
           nullptr};

} // py::cpp::Windows::Services::Maps::LocalSearch

PyMODINIT_FUNC PyInit__winrt_windows_services_maps_localsearch(void) noexcept
{
    using namespace py::cpp::Windows::Services::Maps::LocalSearch;

    if (py::import_winrt_runtime() == -1)
    {
        return nullptr;
    }

    py::pyobj_handle module{PyModule_Create(&module_def)};

    if (!module)
    {
        return nullptr;
    }

    auto object_type = py::get_object_type();
    if (!object_type)
    {
        return nullptr;
    }

    py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};

    if (!object_bases)
    {
        return nullptr;
    }

    py::pyobj_handle type_LocalCategories_Static{PyType_FromSpec(&type_spec_LocalCategories_Static)};
    if (!type_LocalCategories_Static)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_LocalCategories, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LocalCategories_Static.get())) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_LocalLocation, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    py::pyobj_handle type_LocalLocationFinder_Static{PyType_FromSpec(&type_spec_LocalLocationFinder_Static)};
    if (!type_LocalLocationFinder_Static)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_LocalLocationFinder, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LocalLocationFinder_Static.get())) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_LocalLocationFinderResult, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_LocalLocationHoursOfOperationItem, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_LocalLocationRatingInfo, object_bases.get(), nullptr) == -1)
    {
        return nullptr;
    }

    py::pyobj_handle type_PlaceInfoHelper_Static{PyType_FromSpec(&type_spec_PlaceInfoHelper_Static)};
    if (!type_PlaceInfoHelper_Static)
    {
        return nullptr;
    }

    if (py::register_python_type(module.get(), &type_spec_PlaceInfoHelper, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PlaceInfoHelper_Static.get())) == -1)
    {
        return nullptr;
    }


    return module.detach();
}
