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

#include "pybase.h"
#include "py.Windows.ApplicationModel.Appointments.AppointmentsProvider.h"


namespace py::cpp::Windows::ApplicationModel::Appointments::AppointmentsProvider
{
    struct module_state
    {
        PyTypeObject* type_AddAppointmentOperation;
        PyTypeObject* type_AppointmentsProviderLaunchActionVerbs;
        PyTypeObject* type_RemoveAppointmentOperation;
        PyTypeObject* type_ReplaceAppointmentOperation;
    };

    // ----- AddAppointmentOperation class --------------------
    static constexpr const char* const type_name_AddAppointmentOperation = "AddAppointmentOperation";

    static PyObject* _new_AddAppointmentOperation(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_AddAppointmentOperation);
        return nullptr;
    }

    static void _dealloc_AddAppointmentOperation(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* AddAppointmentOperation_DismissUI(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AddAppointmentOperation", L"DismissUI", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.DismissUI();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AddAppointmentOperation_ReportCanceled(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AddAppointmentOperation", L"ReportCanceled", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.ReportCanceled();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AddAppointmentOperation_ReportCompleted(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AddAppointmentOperation", L"ReportCompleted", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);

                self->obj.ReportCompleted(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AddAppointmentOperation_ReportError(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AddAppointmentOperation", L"ReportError", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);

                self->obj.ReportError(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* AddAppointmentOperation_get_AppointmentInformation(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AddAppointmentOperation", L"AppointmentInformation"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* AddAppointmentOperation_get_SourcePackageFamilyName(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AddAppointmentOperation", L"SourcePackageFamilyName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_AddAppointmentOperation(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_AddAppointmentOperation(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::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AddAppointmentOperation[] = {
        { "dismiss_u_i", reinterpret_cast<PyCFunction>(AddAppointmentOperation_DismissUI), METH_VARARGS, nullptr },
        { "report_canceled", reinterpret_cast<PyCFunction>(AddAppointmentOperation_ReportCanceled), METH_VARARGS, nullptr },
        { "report_completed", reinterpret_cast<PyCFunction>(AddAppointmentOperation_ReportCompleted), METH_VARARGS, nullptr },
        { "report_error", reinterpret_cast<PyCFunction>(AddAppointmentOperation_ReportError), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_AddAppointmentOperation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_AddAppointmentOperation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_AddAppointmentOperation[] = {
        { "appointment_information", reinterpret_cast<getter>(AddAppointmentOperation_get_AppointmentInformation), nullptr, nullptr, nullptr },
        { "source_package_family_name", reinterpret_cast<getter>(AddAppointmentOperation_get_SourcePackageFamilyName), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_AddAppointmentOperation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AddAppointmentOperation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AddAppointmentOperation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AddAppointmentOperation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AddAppointmentOperation) },
        { },
    };

    static PyType_Spec type_spec_AddAppointmentOperation =
    {
        "_winsdk_Windows_ApplicationModel_Appointments_AppointmentsProvider.AddAppointmentOperation",
        sizeof(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AddAppointmentOperation
    };

    // ----- AppointmentsProviderLaunchActionVerbs class --------------------
    static constexpr const char* const type_name_AppointmentsProviderLaunchActionVerbs = "AppointmentsProviderLaunchActionVerbs";

    static PyObject* _new_AppointmentsProviderLaunchActionVerbs(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_AppointmentsProviderLaunchActionVerbs);
        return nullptr;
    }

    static PyObject* AppointmentsProviderLaunchActionVerbs_get_AddAppointment(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AppointmentsProviderLaunchActionVerbs", L"AddAppointment"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AppointmentsProviderLaunchActionVerbs::AddAppointment());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppointmentsProviderLaunchActionVerbs_get_RemoveAppointment(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AppointmentsProviderLaunchActionVerbs", L"RemoveAppointment"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AppointmentsProviderLaunchActionVerbs::RemoveAppointment());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppointmentsProviderLaunchActionVerbs_get_ReplaceAppointment(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AppointmentsProviderLaunchActionVerbs", L"ReplaceAppointment"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AppointmentsProviderLaunchActionVerbs::ReplaceAppointment());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppointmentsProviderLaunchActionVerbs_get_ShowTimeFrame(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AppointmentsProviderLaunchActionVerbs", L"ShowTimeFrame"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AppointmentsProviderLaunchActionVerbs::ShowTimeFrame());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* AppointmentsProviderLaunchActionVerbs_get_ShowAppointmentDetails(PyObject* /*unused*/, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.AppointmentsProviderLaunchActionVerbs", L"ShowAppointmentDetails"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

        try
        {
            return py::convert(winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AppointmentsProviderLaunchActionVerbs::ShowAppointmentDetails());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_AppointmentsProviderLaunchActionVerbs[] = {
        { }
    };

    static PyGetSetDef _getset_AppointmentsProviderLaunchActionVerbs[] = {
        { }
    };

    static PyType_Slot _type_slots_AppointmentsProviderLaunchActionVerbs[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_AppointmentsProviderLaunchActionVerbs) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_AppointmentsProviderLaunchActionVerbs) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_AppointmentsProviderLaunchActionVerbs) },
        { },
    };

    static PyType_Spec type_spec_AppointmentsProviderLaunchActionVerbs =
    {
        "_winsdk_Windows_ApplicationModel_Appointments_AppointmentsProvider.AppointmentsProviderLaunchActionVerbs",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_AppointmentsProviderLaunchActionVerbs
    };

    static PyGetSetDef getset_AppointmentsProviderLaunchActionVerbs_Meta[] = {
        { "add_appointment", reinterpret_cast<getter>(AppointmentsProviderLaunchActionVerbs_get_AddAppointment), nullptr, nullptr, nullptr },
        { "remove_appointment", reinterpret_cast<getter>(AppointmentsProviderLaunchActionVerbs_get_RemoveAppointment), nullptr, nullptr, nullptr },
        { "replace_appointment", reinterpret_cast<getter>(AppointmentsProviderLaunchActionVerbs_get_ReplaceAppointment), nullptr, nullptr, nullptr },
        { "show_time_frame", reinterpret_cast<getter>(AppointmentsProviderLaunchActionVerbs_get_ShowTimeFrame), nullptr, nullptr, nullptr },
        { "show_appointment_details", reinterpret_cast<getter>(AppointmentsProviderLaunchActionVerbs_get_ShowAppointmentDetails), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot type_slots_AppointmentsProviderLaunchActionVerbs_Meta[] = 
    {
        { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
        { Py_tp_getset, reinterpret_cast<void*>(getset_AppointmentsProviderLaunchActionVerbs_Meta) },
        { }
    };

    static PyType_Spec type_spec_AppointmentsProviderLaunchActionVerbs_Meta =
    {
        "_winsdk_Windows_ApplicationModel_Appointments_AppointmentsProvider.AppointmentsProviderLaunchActionVerbs_Meta",
        static_cast<int>(PyType_Type.tp_basicsize),
        static_cast<int>(PyType_Type.tp_itemsize),
        Py_TPFLAGS_DEFAULT,
        type_slots_AppointmentsProviderLaunchActionVerbs_Meta
    };

    // ----- RemoveAppointmentOperation class --------------------
    static constexpr const char* const type_name_RemoveAppointmentOperation = "RemoveAppointmentOperation";

    static PyObject* _new_RemoveAppointmentOperation(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_RemoveAppointmentOperation);
        return nullptr;
    }

    static void _dealloc_RemoveAppointmentOperation(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* RemoveAppointmentOperation_DismissUI(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.RemoveAppointmentOperation", L"DismissUI", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.DismissUI();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* RemoveAppointmentOperation_ReportCanceled(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.RemoveAppointmentOperation", L"ReportCanceled", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.ReportCanceled();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* RemoveAppointmentOperation_ReportCompleted(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.RemoveAppointmentOperation", L"ReportCompleted", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.ReportCompleted();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* RemoveAppointmentOperation_ReportError(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.RemoveAppointmentOperation", L"ReportError", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);

                self->obj.ReportError(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* RemoveAppointmentOperation_get_AppointmentId(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.RemoveAppointmentOperation", L"AppointmentId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* RemoveAppointmentOperation_get_InstanceStartDate(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.RemoveAppointmentOperation", L"InstanceStartDate"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* RemoveAppointmentOperation_get_SourcePackageFamilyName(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.RemoveAppointmentOperation", L"SourcePackageFamilyName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_RemoveAppointmentOperation(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_RemoveAppointmentOperation(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::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_RemoveAppointmentOperation[] = {
        { "dismiss_u_i", reinterpret_cast<PyCFunction>(RemoveAppointmentOperation_DismissUI), METH_VARARGS, nullptr },
        { "report_canceled", reinterpret_cast<PyCFunction>(RemoveAppointmentOperation_ReportCanceled), METH_VARARGS, nullptr },
        { "report_completed", reinterpret_cast<PyCFunction>(RemoveAppointmentOperation_ReportCompleted), METH_VARARGS, nullptr },
        { "report_error", reinterpret_cast<PyCFunction>(RemoveAppointmentOperation_ReportError), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_RemoveAppointmentOperation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_RemoveAppointmentOperation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_RemoveAppointmentOperation[] = {
        { "appointment_id", reinterpret_cast<getter>(RemoveAppointmentOperation_get_AppointmentId), nullptr, nullptr, nullptr },
        { "instance_start_date", reinterpret_cast<getter>(RemoveAppointmentOperation_get_InstanceStartDate), nullptr, nullptr, nullptr },
        { "source_package_family_name", reinterpret_cast<getter>(RemoveAppointmentOperation_get_SourcePackageFamilyName), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_RemoveAppointmentOperation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_RemoveAppointmentOperation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_RemoveAppointmentOperation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_RemoveAppointmentOperation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_RemoveAppointmentOperation) },
        { },
    };

    static PyType_Spec type_spec_RemoveAppointmentOperation =
    {
        "_winsdk_Windows_ApplicationModel_Appointments_AppointmentsProvider.RemoveAppointmentOperation",
        sizeof(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_RemoveAppointmentOperation
    };

    // ----- ReplaceAppointmentOperation class --------------------
    static constexpr const char* const type_name_ReplaceAppointmentOperation = "ReplaceAppointmentOperation";

    static PyObject* _new_ReplaceAppointmentOperation(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
    {
        py::set_invalid_activation_error(type_name_ReplaceAppointmentOperation);
        return nullptr;
    }

    static void _dealloc_ReplaceAppointmentOperation(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation* self) noexcept
    {
        auto tp = Py_TYPE(self);

        if (PyType_IS_GC(tp))
        {
            PyObject_GC_UnTrack(self);
        }

        std::destroy_at(&self->obj);
        tp->tp_free(self);
        Py_DECREF(tp);
    }

    static PyObject* ReplaceAppointmentOperation_DismissUI(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.ReplaceAppointmentOperation", L"DismissUI", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.DismissUI();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ReplaceAppointmentOperation_ReportCanceled(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 0)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.ReplaceAppointmentOperation", L"ReportCanceled", 0))
            {
                py::set_arg_count_version_error(0);
                return nullptr;
            }

            try
            {
                self->obj.ReportCanceled();
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ReplaceAppointmentOperation_ReportCompleted(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.ReplaceAppointmentOperation", L"ReportCompleted", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);

                self->obj.ReportCompleted(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ReplaceAppointmentOperation_ReportError(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation* self, PyObject* args) noexcept
    {
        auto arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.ReplaceAppointmentOperation", L"ReportError", 1))
            {
                py::set_arg_count_version_error(1);
                return nullptr;
            }

            try
            {
                auto param0 = py::convert_to<winrt::hstring>(args, 0);

                self->obj.ReportError(param0);
                Py_RETURN_NONE;
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* ReplaceAppointmentOperation_get_AppointmentId(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.ReplaceAppointmentOperation", L"AppointmentId"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ReplaceAppointmentOperation_get_AppointmentInformation(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.ReplaceAppointmentOperation", L"AppointmentInformation"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ReplaceAppointmentOperation_get_InstanceStartDate(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.ReplaceAppointmentOperation", L"InstanceStartDate"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* ReplaceAppointmentOperation_get_SourcePackageFamilyName(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation* self, void* /*unused*/) noexcept
    {
        if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Appointments.AppointmentsProvider.ReplaceAppointmentOperation", L"SourcePackageFamilyName"))
        {
            PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
            return nullptr;
        }

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

    static PyObject* _assign_array_ReplaceAppointmentOperation(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation>>();
        if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
        {
            return nullptr;
        }
        Py_RETURN_NONE;
    }

    static PyObject* _from_ReplaceAppointmentOperation(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::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_ReplaceAppointmentOperation[] = {
        { "dismiss_u_i", reinterpret_cast<PyCFunction>(ReplaceAppointmentOperation_DismissUI), METH_VARARGS, nullptr },
        { "report_canceled", reinterpret_cast<PyCFunction>(ReplaceAppointmentOperation_ReportCanceled), METH_VARARGS, nullptr },
        { "report_completed", reinterpret_cast<PyCFunction>(ReplaceAppointmentOperation_ReportCompleted), METH_VARARGS, nullptr },
        { "report_error", reinterpret_cast<PyCFunction>(ReplaceAppointmentOperation_ReportError), METH_VARARGS, nullptr },
        { "_assign_array_", _assign_array_ReplaceAppointmentOperation, METH_O | METH_STATIC, nullptr },
        { "_from", reinterpret_cast<PyCFunction>(_from_ReplaceAppointmentOperation), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_ReplaceAppointmentOperation[] = {
        { "appointment_id", reinterpret_cast<getter>(ReplaceAppointmentOperation_get_AppointmentId), nullptr, nullptr, nullptr },
        { "appointment_information", reinterpret_cast<getter>(ReplaceAppointmentOperation_get_AppointmentInformation), nullptr, nullptr, nullptr },
        { "instance_start_date", reinterpret_cast<getter>(ReplaceAppointmentOperation_get_InstanceStartDate), nullptr, nullptr, nullptr },
        { "source_package_family_name", reinterpret_cast<getter>(ReplaceAppointmentOperation_get_SourcePackageFamilyName), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_ReplaceAppointmentOperation[] = 
    {
        { Py_tp_new, reinterpret_cast<void*>(_new_ReplaceAppointmentOperation) },
        { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ReplaceAppointmentOperation) },
        { Py_tp_methods, reinterpret_cast<void*>(_methods_ReplaceAppointmentOperation) },
        { Py_tp_getset, reinterpret_cast<void*>(_getset_ReplaceAppointmentOperation) },
        { },
    };

    static PyType_Spec type_spec_ReplaceAppointmentOperation =
    {
        "_winsdk_Windows_ApplicationModel_Appointments_AppointmentsProvider.ReplaceAppointmentOperation",
        sizeof(py::wrapper::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_ReplaceAppointmentOperation
    };

    // ----- Windows.ApplicationModel.Appointments.AppointmentsProvider Initialization --------------------
    PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::Appointments::AppointmentsProvider");

    static PyMethodDef module_methods[] = {
        {}};


    static int module_traverse(PyObject* module, visitproc visit, void* arg) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));

        if (!state)
        {
            return 0;
        }

        Py_VISIT(state->type_AddAppointmentOperation);
        Py_VISIT(state->type_AppointmentsProviderLaunchActionVerbs);
        Py_VISIT(state->type_RemoveAppointmentOperation);
        Py_VISIT(state->type_ReplaceAppointmentOperation);

        return 0;
    }

    static int module_clear(PyObject* module) noexcept
    {
        auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));

        if (!state)
        {
            return 0;
        }

        Py_CLEAR(state->type_AddAppointmentOperation);
        Py_CLEAR(state->type_AppointmentsProviderLaunchActionVerbs);
        Py_CLEAR(state->type_RemoveAppointmentOperation);
        Py_CLEAR(state->type_ReplaceAppointmentOperation);

        return 0;
    }


    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winsdk_Windows_ApplicationModel_Appointments_AppointmentsProvider",
           module_doc,
           sizeof(module_state),
           module_methods,
           nullptr,
           module_traverse,
           module_clear,
           nullptr};

} // py::cpp::Windows::ApplicationModel::Appointments::AppointmentsProvider

PyMODINIT_FUNC PyInit__winsdk_Windows_ApplicationModel_Appointments_AppointmentsProvider(void) noexcept
{
    using namespace py::cpp::Windows::ApplicationModel::Appointments::AppointmentsProvider;

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

    if (!module)
    {
        return nullptr;
    }

    auto object_type = py::get_python_type<py::Object>();
    if (!object_type)
    {
        return nullptr;
    }

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

    if (!bases)
    {
        return nullptr;
    }

    py::pyobj_handle collections_abc_module{PyImport_ImportModule("collections.abc")};

    if (!collections_abc_module)
    {
        return nullptr;
    }

    py::pyobj_handle sequence_type{PyObject_GetAttrString(collections_abc_module.get(), "Sequence")};

    if (!sequence_type)
    {
        return nullptr;
    }

    py::pyobj_handle sequence_bases{PyTuple_Pack(2, object_type, sequence_type.get())};

    if (!sequence_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_sequence_type{PyObject_GetAttrString(collections_abc_module.get(), "MutableSequence")};

    if (!mutable_sequence_type)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_sequence_bases{PyTuple_Pack(2, object_type, mutable_sequence_type.get())};

    if (!mutable_sequence_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mapping_type{PyObject_GetAttrString(collections_abc_module.get(), "Mapping")};

    if (!mapping_type)
    {
        return nullptr;
    }

    py::pyobj_handle mapping_bases{PyTuple_Pack(2, object_type, mapping_type.get())};

    if (!mapping_bases)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_mapping_type{PyObject_GetAttrString(collections_abc_module.get(), "MutableMapping")};

    if (!mutable_mapping_type)
    {
        return nullptr;
    }

    py::pyobj_handle mutable_mapping_bases{PyTuple_Pack(2, object_type, mutable_mapping_type.get())};

    if (!mutable_mapping_bases)
    {
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module.get()));
    assert(state);

    state->type_AddAppointmentOperation = py::register_python_type(module.get(), type_name_AddAppointmentOperation, &type_spec_AddAppointmentOperation, bases.get(), nullptr);
    if (!state->type_AddAppointmentOperation)
    {
        return nullptr;
    }

    py::pyobj_handle type_AppointmentsProviderLaunchActionVerbs_Meta{PyType_FromSpec(&type_spec_AppointmentsProviderLaunchActionVerbs_Meta)};
    if (!type_AppointmentsProviderLaunchActionVerbs_Meta)
    {
        return nullptr;
    }

    state->type_AppointmentsProviderLaunchActionVerbs = py::register_python_type(module.get(), type_name_AppointmentsProviderLaunchActionVerbs, &type_spec_AppointmentsProviderLaunchActionVerbs, nullptr, reinterpret_cast<PyTypeObject*>(type_AppointmentsProviderLaunchActionVerbs_Meta.get()));
    if (!state->type_AppointmentsProviderLaunchActionVerbs)
    {
        return nullptr;
    }

    state->type_RemoveAppointmentOperation = py::register_python_type(module.get(), type_name_RemoveAppointmentOperation, &type_spec_RemoveAppointmentOperation, bases.get(), nullptr);
    if (!state->type_RemoveAppointmentOperation)
    {
        return nullptr;
    }

    state->type_ReplaceAppointmentOperation = py::register_python_type(module.get(), type_name_ReplaceAppointmentOperation, &type_spec_ReplaceAppointmentOperation, bases.get(), nullptr);
    if (!state->type_ReplaceAppointmentOperation)
    {
        return nullptr;
    }


    return module.detach();
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Appointments::AppointmentsProvider;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Appointments::AppointmentsProvider");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_AddAppointmentOperation;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AddAppointmentOperation is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AppointmentsProviderLaunchActionVerbs>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Appointments::AppointmentsProvider;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Appointments::AppointmentsProvider");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_AppointmentsProviderLaunchActionVerbs;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::AppointmentsProviderLaunchActionVerbs is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Appointments::AppointmentsProvider;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Appointments::AppointmentsProvider");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_RemoveAppointmentOperation;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::RemoveAppointmentOperation is not registered");
        return nullptr;
    }

    return python_type;
}

PyTypeObject* py::winrt_type<winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation>::get_python_type() noexcept {
    using namespace py::cpp::Windows::ApplicationModel::Appointments::AppointmentsProvider;

    PyObject* module = PyState_FindModule(&module_def);

    if (!module) {
        PyErr_SetString(PyExc_RuntimeError, "could not find module for Windows::ApplicationModel::Appointments::AppointmentsProvider");
        return nullptr;
    }

    auto state = reinterpret_cast<module_state*>(PyModule_GetState(module));
    assert(state);

    auto python_type = state->type_ReplaceAppointmentOperation;

    if (!python_type) {
        PyErr_SetString(PyExc_RuntimeError, "type winrt::Windows::ApplicationModel::Appointments::AppointmentsProvider::ReplaceAppointmentOperation is not registered");
        return nullptr;
    }

    return python_type;
}
