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

#pragma once

#include "pybase.h"

#if __has_include("py.Windows.Foundation.Collections.h")
#include "py.Windows.Foundation.Collections.h"
#endif

#include <winrt/Windows.Foundation.Collections.h>

#include <winrt/Windows.Foundation.h>

namespace py::proj::Windows::Foundation
{
    struct IAsyncActionWithProgress
    {
        virtual ~IAsyncActionWithProgress() {};
        virtual winrt::Windows::Foundation::IUnknown const& get_unknown() noexcept = 0;
        virtual PyObject* Cancel(PyObject*) noexcept = 0;
        virtual PyObject* Close(PyObject*) noexcept = 0;
        virtual PyObject* GetResults(PyObject*) noexcept = 0;
        virtual PyObject* get_Progress() noexcept = 0;
        virtual int put_Progress(PyObject*) noexcept = 0;
        virtual PyObject* get_Completed() noexcept = 0;
        virtual int put_Completed(PyObject*) noexcept = 0;
        virtual PyObject* get_ErrorCode() noexcept = 0;
        virtual PyObject* get_Id() noexcept = 0;
        virtual PyObject* get_Status() noexcept = 0;
        virtual PyObject* dunder_await() noexcept = 0;
    };

    struct IAsyncOperationWithProgress
    {
        virtual ~IAsyncOperationWithProgress() {};
        virtual winrt::Windows::Foundation::IUnknown const& get_unknown() noexcept = 0;
        virtual PyObject* Cancel(PyObject*) noexcept = 0;
        virtual PyObject* Close(PyObject*) noexcept = 0;
        virtual PyObject* GetResults(PyObject*) noexcept = 0;
        virtual PyObject* get_Progress() noexcept = 0;
        virtual int put_Progress(PyObject*) noexcept = 0;
        virtual PyObject* get_Completed() noexcept = 0;
        virtual int put_Completed(PyObject*) noexcept = 0;
        virtual PyObject* get_ErrorCode() noexcept = 0;
        virtual PyObject* get_Id() noexcept = 0;
        virtual PyObject* get_Status() noexcept = 0;
        virtual PyObject* dunder_await() noexcept = 0;
    };

    struct IAsyncOperation
    {
        virtual ~IAsyncOperation() {};
        virtual winrt::Windows::Foundation::IUnknown const& get_unknown() noexcept = 0;
        virtual PyObject* Cancel(PyObject*) noexcept = 0;
        virtual PyObject* Close(PyObject*) noexcept = 0;
        virtual PyObject* GetResults(PyObject*) noexcept = 0;
        virtual PyObject* get_Completed() noexcept = 0;
        virtual int put_Completed(PyObject*) noexcept = 0;
        virtual PyObject* get_ErrorCode() noexcept = 0;
        virtual PyObject* get_Id() noexcept = 0;
        virtual PyObject* get_Status() noexcept = 0;
        virtual PyObject* dunder_await() noexcept = 0;
    };

    struct IReferenceArray
    {
        virtual ~IReferenceArray() {};
        virtual winrt::Windows::Foundation::IUnknown const& get_unknown() noexcept = 0;
        virtual PyObject* GetBoolean(PyObject*) noexcept = 0;
        virtual PyObject* GetBooleanArray(PyObject*) noexcept = 0;
        virtual PyObject* GetChar16(PyObject*) noexcept = 0;
        virtual PyObject* GetChar16Array(PyObject*) noexcept = 0;
        virtual PyObject* GetDateTime(PyObject*) noexcept = 0;
        virtual PyObject* GetDateTimeArray(PyObject*) noexcept = 0;
        virtual PyObject* GetDouble(PyObject*) noexcept = 0;
        virtual PyObject* GetDoubleArray(PyObject*) noexcept = 0;
        virtual PyObject* GetGuid(PyObject*) noexcept = 0;
        virtual PyObject* GetGuidArray(PyObject*) noexcept = 0;
        virtual PyObject* GetInspectableArray(PyObject*) noexcept = 0;
        virtual PyObject* GetInt16(PyObject*) noexcept = 0;
        virtual PyObject* GetInt16Array(PyObject*) noexcept = 0;
        virtual PyObject* GetInt32(PyObject*) noexcept = 0;
        virtual PyObject* GetInt32Array(PyObject*) noexcept = 0;
        virtual PyObject* GetInt64(PyObject*) noexcept = 0;
        virtual PyObject* GetInt64Array(PyObject*) noexcept = 0;
        virtual PyObject* GetPoint(PyObject*) noexcept = 0;
        virtual PyObject* GetPointArray(PyObject*) noexcept = 0;
        virtual PyObject* GetRect(PyObject*) noexcept = 0;
        virtual PyObject* GetRectArray(PyObject*) noexcept = 0;
        virtual PyObject* GetSingle(PyObject*) noexcept = 0;
        virtual PyObject* GetSingleArray(PyObject*) noexcept = 0;
        virtual PyObject* GetSize(PyObject*) noexcept = 0;
        virtual PyObject* GetSizeArray(PyObject*) noexcept = 0;
        virtual PyObject* GetString(PyObject*) noexcept = 0;
        virtual PyObject* GetStringArray(PyObject*) noexcept = 0;
        virtual PyObject* GetTimeSpan(PyObject*) noexcept = 0;
        virtual PyObject* GetTimeSpanArray(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt16(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt16Array(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt32(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt32Array(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt64(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt64Array(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt8(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt8Array(PyObject*) noexcept = 0;
        virtual PyObject* get_Value() noexcept = 0;
        virtual PyObject* get_IsNumericScalar() noexcept = 0;
        virtual PyObject* get_Type() noexcept = 0;
    };

    struct IReference
    {
        virtual ~IReference() {};
        virtual winrt::Windows::Foundation::IUnknown const& get_unknown() noexcept = 0;
        virtual PyObject* GetBoolean(PyObject*) noexcept = 0;
        virtual PyObject* GetBooleanArray(PyObject*) noexcept = 0;
        virtual PyObject* GetChar16(PyObject*) noexcept = 0;
        virtual PyObject* GetChar16Array(PyObject*) noexcept = 0;
        virtual PyObject* GetDateTime(PyObject*) noexcept = 0;
        virtual PyObject* GetDateTimeArray(PyObject*) noexcept = 0;
        virtual PyObject* GetDouble(PyObject*) noexcept = 0;
        virtual PyObject* GetDoubleArray(PyObject*) noexcept = 0;
        virtual PyObject* GetGuid(PyObject*) noexcept = 0;
        virtual PyObject* GetGuidArray(PyObject*) noexcept = 0;
        virtual PyObject* GetInspectableArray(PyObject*) noexcept = 0;
        virtual PyObject* GetInt16(PyObject*) noexcept = 0;
        virtual PyObject* GetInt16Array(PyObject*) noexcept = 0;
        virtual PyObject* GetInt32(PyObject*) noexcept = 0;
        virtual PyObject* GetInt32Array(PyObject*) noexcept = 0;
        virtual PyObject* GetInt64(PyObject*) noexcept = 0;
        virtual PyObject* GetInt64Array(PyObject*) noexcept = 0;
        virtual PyObject* GetPoint(PyObject*) noexcept = 0;
        virtual PyObject* GetPointArray(PyObject*) noexcept = 0;
        virtual PyObject* GetRect(PyObject*) noexcept = 0;
        virtual PyObject* GetRectArray(PyObject*) noexcept = 0;
        virtual PyObject* GetSingle(PyObject*) noexcept = 0;
        virtual PyObject* GetSingleArray(PyObject*) noexcept = 0;
        virtual PyObject* GetSize(PyObject*) noexcept = 0;
        virtual PyObject* GetSizeArray(PyObject*) noexcept = 0;
        virtual PyObject* GetString(PyObject*) noexcept = 0;
        virtual PyObject* GetStringArray(PyObject*) noexcept = 0;
        virtual PyObject* GetTimeSpan(PyObject*) noexcept = 0;
        virtual PyObject* GetTimeSpanArray(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt16(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt16Array(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt32(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt32Array(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt64(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt64Array(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt8(PyObject*) noexcept = 0;
        virtual PyObject* GetUInt8Array(PyObject*) noexcept = 0;
        virtual PyObject* get_Value() noexcept = 0;
        virtual PyObject* get_IsNumericScalar() noexcept = 0;
        virtual PyObject* get_Type() noexcept = 0;
    };
}

namespace py::impl::Windows::Foundation
{
    struct AsyncActionCompletedHandler
    {
        static winrt::Windows::Foundation::AsyncActionCompletedHandler get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)](auto param0, auto param1)
            {
                winrt::handle_type<py::gil_state_traits> gil_state{ PyGILState_Ensure() };

                py::pyobj_handle py_param0{ py::convert(param0) };
                py::pyobj_handle py_param1{ py::convert(param1) };

                py::pyobj_handle args{ PyTuple_Pack(2, py_param0.get(), py_param1.get()) };

                if (!args) {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }

                py::pyobj_handle return_value{ PyObject_CallObject(delegate.callable(), args.get()) };

                if (!return_value)
                {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }
            };
        };
    };

    template <typename TProgress>
    struct AsyncActionProgressHandler
    {
        static winrt::Windows::Foundation::AsyncActionProgressHandler<TProgress> get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)](auto param0, auto param1)
            {
                winrt::handle_type<py::gil_state_traits> gil_state{ PyGILState_Ensure() };

                py::pyobj_handle py_param0{ py::convert(param0) };
                py::pyobj_handle py_param1{ py::convert(param1) };

                py::pyobj_handle args{ PyTuple_Pack(2, py_param0.get(), py_param1.get()) };

                if (!args) {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }

                py::pyobj_handle return_value{ PyObject_CallObject(delegate.callable(), args.get()) };

                if (!return_value)
                {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }
            };
        };
    };

    template <typename TProgress>
    struct AsyncActionWithProgressCompletedHandler
    {
        static winrt::Windows::Foundation::AsyncActionWithProgressCompletedHandler<TProgress> get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)](auto param0, auto param1)
            {
                winrt::handle_type<py::gil_state_traits> gil_state{ PyGILState_Ensure() };

                py::pyobj_handle py_param0{ py::convert(param0) };
                py::pyobj_handle py_param1{ py::convert(param1) };

                py::pyobj_handle args{ PyTuple_Pack(2, py_param0.get(), py_param1.get()) };

                if (!args) {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }

                py::pyobj_handle return_value{ PyObject_CallObject(delegate.callable(), args.get()) };

                if (!return_value)
                {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }
            };
        };
    };

    template <typename TResult>
    struct AsyncOperationCompletedHandler
    {
        static winrt::Windows::Foundation::AsyncOperationCompletedHandler<TResult> get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)](auto param0, auto param1)
            {
                winrt::handle_type<py::gil_state_traits> gil_state{ PyGILState_Ensure() };

                py::pyobj_handle py_param0{ py::convert(param0) };
                py::pyobj_handle py_param1{ py::convert(param1) };

                py::pyobj_handle args{ PyTuple_Pack(2, py_param0.get(), py_param1.get()) };

                if (!args) {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }

                py::pyobj_handle return_value{ PyObject_CallObject(delegate.callable(), args.get()) };

                if (!return_value)
                {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }
            };
        };
    };

    template <typename TResult, typename TProgress>
    struct AsyncOperationProgressHandler
    {
        static winrt::Windows::Foundation::AsyncOperationProgressHandler<TResult, TProgress> get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)](auto param0, auto param1)
            {
                winrt::handle_type<py::gil_state_traits> gil_state{ PyGILState_Ensure() };

                py::pyobj_handle py_param0{ py::convert(param0) };
                py::pyobj_handle py_param1{ py::convert(param1) };

                py::pyobj_handle args{ PyTuple_Pack(2, py_param0.get(), py_param1.get()) };

                if (!args) {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }

                py::pyobj_handle return_value{ PyObject_CallObject(delegate.callable(), args.get()) };

                if (!return_value)
                {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }
            };
        };
    };

    template <typename TResult, typename TProgress>
    struct AsyncOperationWithProgressCompletedHandler
    {
        static winrt::Windows::Foundation::AsyncOperationWithProgressCompletedHandler<TResult, TProgress> get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)](auto param0, auto param1)
            {
                winrt::handle_type<py::gil_state_traits> gil_state{ PyGILState_Ensure() };

                py::pyobj_handle py_param0{ py::convert(param0) };
                py::pyobj_handle py_param1{ py::convert(param1) };

                py::pyobj_handle args{ PyTuple_Pack(2, py_param0.get(), py_param1.get()) };

                if (!args) {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }

                py::pyobj_handle return_value{ PyObject_CallObject(delegate.callable(), args.get()) };

                if (!return_value)
                {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }
            };
        };
    };

    struct DeferralCompletedHandler
    {
        static winrt::Windows::Foundation::DeferralCompletedHandler get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)]()
            {
                winrt::handle_type<py::gil_state_traits> gil_state{ PyGILState_Ensure() };

                py::pyobj_handle args{ nullptr };
                py::pyobj_handle return_value{ PyObject_CallObject(delegate.callable(), args.get()) };

                if (!return_value)
                {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }
            };
        };
    };

    template <typename T>
    struct EventHandler
    {
        static winrt::Windows::Foundation::EventHandler<T> get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)](auto param0, auto param1)
            {
                winrt::handle_type<py::gil_state_traits> gil_state{ PyGILState_Ensure() };

                py::pyobj_handle py_param0{ py::convert(param0) };
                py::pyobj_handle py_param1{ py::convert(param1) };

                py::pyobj_handle args{ PyTuple_Pack(2, py_param0.get(), py_param1.get()) };

                if (!args) {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }

                py::pyobj_handle return_value{ PyObject_CallObject(delegate.callable(), args.get()) };

                if (!return_value)
                {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }
            };
        };
    };

    template <typename TSender, typename TResult>
    struct TypedEventHandler
    {
        static winrt::Windows::Foundation::TypedEventHandler<TSender, TResult> get(PyObject* callable)
        {
            py::delegate_callable _delegate{ callable };

            return [delegate = std::move(_delegate)](auto param0, auto param1)
            {
                winrt::handle_type<py::gil_state_traits> gil_state{ PyGILState_Ensure() };

                py::pyobj_handle py_param0{ py::convert(param0) };
                py::pyobj_handle py_param1{ py::convert(param1) };

                py::pyobj_handle args{ PyTuple_Pack(2, py_param0.get(), py_param1.get()) };

                if (!args) {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }

                py::pyobj_handle return_value{ PyObject_CallObject(delegate.callable(), args.get()) };

                if (!return_value)
                {
                    PyErr_WriteUnraisable(delegate.callable());
                    throw winrt::hresult_error();
                }
            };
        };
    };

    template<typename TProgress>
    struct IAsyncActionWithProgress : public py::proj::Windows::Foundation::IAsyncActionWithProgress
    {
        IAsyncActionWithProgress(winrt::Windows::Foundation::IAsyncActionWithProgress<TProgress> o) : _obj(o) {}
        winrt::Windows::Foundation::IUnknown const& get_unknown() noexcept override { return _obj; }
        PyObject* Cancel(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IAsyncInfo", L"Cancel", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    _obj.Cancel();
                    Py_RETURN_NONE;
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* Close(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IAsyncInfo", L"Close", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    _obj.Close();
                    Py_RETURN_NONE;
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetResults(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IAsyncActionWithProgress`1", L"GetResults", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    _obj.GetResults();
                    Py_RETURN_NONE;
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* get_Progress() noexcept override
        {
            try
            {
                return py::convert(_obj.Progress());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        int put_Progress(PyObject* arg) noexcept override
        {
            if (arg == nullptr)
            {
                PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
                return -1;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::AsyncActionProgressHandler<TProgress>>(arg);

                _obj.Progress(param0);
                return 0;
            }
            catch (...)
            {
                py::to_PyErr();
                return -1;
            }
        }
        PyObject* get_Completed() noexcept override
        {
            try
            {
                return py::convert(_obj.Completed());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        int put_Completed(PyObject* arg) noexcept override
        {
            if (arg == nullptr)
            {
                PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
                return -1;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::AsyncActionWithProgressCompletedHandler<TProgress>>(arg);

                _obj.Completed(param0);
                return 0;
            }
            catch (...)
            {
                py::to_PyErr();
                return -1;
            }
        }
        PyObject* get_ErrorCode() noexcept override
        {
            try
            {
                return py::convert(_obj.ErrorCode());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* get_Id() noexcept override
        {
            try
            {
                return py::convert(_obj.Id());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* get_Status() noexcept override
        {
            try
            {
                return py::convert(_obj.Status());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* dunder_await() noexcept override { return py::dunder_await(_obj); }

        winrt::Windows::Foundation::IAsyncActionWithProgress<TProgress> _obj{ nullptr };
    };

    template<typename TResult, typename TProgress>
    struct IAsyncOperationWithProgress : public py::proj::Windows::Foundation::IAsyncOperationWithProgress
    {
        IAsyncOperationWithProgress(winrt::Windows::Foundation::IAsyncOperationWithProgress<TResult, TProgress> o) : _obj(o) {}
        winrt::Windows::Foundation::IUnknown const& get_unknown() noexcept override { return _obj; }
        PyObject* Cancel(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IAsyncInfo", L"Cancel", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    _obj.Cancel();
                    Py_RETURN_NONE;
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* Close(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IAsyncInfo", L"Close", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    _obj.Close();
                    Py_RETURN_NONE;
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetResults(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IAsyncOperationWithProgress`2", L"GetResults", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetResults());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* get_Progress() noexcept override
        {
            try
            {
                return py::convert(_obj.Progress());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        int put_Progress(PyObject* arg) noexcept override
        {
            if (arg == nullptr)
            {
                PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
                return -1;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::AsyncOperationProgressHandler<TResult, TProgress>>(arg);

                _obj.Progress(param0);
                return 0;
            }
            catch (...)
            {
                py::to_PyErr();
                return -1;
            }
        }
        PyObject* get_Completed() noexcept override
        {
            try
            {
                return py::convert(_obj.Completed());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        int put_Completed(PyObject* arg) noexcept override
        {
            if (arg == nullptr)
            {
                PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
                return -1;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::AsyncOperationWithProgressCompletedHandler<TResult, TProgress>>(arg);

                _obj.Completed(param0);
                return 0;
            }
            catch (...)
            {
                py::to_PyErr();
                return -1;
            }
        }
        PyObject* get_ErrorCode() noexcept override
        {
            try
            {
                return py::convert(_obj.ErrorCode());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* get_Id() noexcept override
        {
            try
            {
                return py::convert(_obj.Id());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* get_Status() noexcept override
        {
            try
            {
                return py::convert(_obj.Status());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* dunder_await() noexcept override { return py::dunder_await(_obj); }

        winrt::Windows::Foundation::IAsyncOperationWithProgress<TResult, TProgress> _obj{ nullptr };
    };

    template<typename TResult>
    struct IAsyncOperation : public py::proj::Windows::Foundation::IAsyncOperation
    {
        IAsyncOperation(winrt::Windows::Foundation::IAsyncOperation<TResult> o) : _obj(o) {}
        winrt::Windows::Foundation::IUnknown const& get_unknown() noexcept override { return _obj; }
        PyObject* Cancel(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IAsyncInfo", L"Cancel", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    _obj.Cancel();
                    Py_RETURN_NONE;
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* Close(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IAsyncInfo", L"Close", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    _obj.Close();
                    Py_RETURN_NONE;
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetResults(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IAsyncOperation`1", L"GetResults", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetResults());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* get_Completed() noexcept override
        {
            try
            {
                return py::convert(_obj.Completed());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        int put_Completed(PyObject* arg) noexcept override
        {
            if (arg == nullptr)
            {
                PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
                return -1;
            }

            try
            {
                auto param0 = py::convert_to<winrt::Windows::Foundation::AsyncOperationCompletedHandler<TResult>>(arg);

                _obj.Completed(param0);
                return 0;
            }
            catch (...)
            {
                py::to_PyErr();
                return -1;
            }
        }
        PyObject* get_ErrorCode() noexcept override
        {
            try
            {
                return py::convert(_obj.ErrorCode());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* get_Id() noexcept override
        {
            try
            {
                return py::convert(_obj.Id());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* get_Status() noexcept override
        {
            try
            {
                return py::convert(_obj.Status());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* dunder_await() noexcept override { return py::dunder_await(_obj); }

        winrt::Windows::Foundation::IAsyncOperation<TResult> _obj{ nullptr };
    };

    template<typename T>
    struct IReferenceArray : public py::proj::Windows::Foundation::IReferenceArray
    {
        IReferenceArray(winrt::Windows::Foundation::IReferenceArray<T> o) : _obj(o) {}
        winrt::Windows::Foundation::IUnknown const& get_unknown() noexcept override { return _obj; }
        PyObject* GetBoolean(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetBoolean", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetBoolean());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetBooleanArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetBooleanArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<bool> param0 { };

                    _obj.GetBooleanArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetChar16(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetChar16", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetChar16());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetChar16Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetChar16Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<char16_t> param0 { };

                    _obj.GetChar16Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetDateTime(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetDateTime", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetDateTime());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetDateTimeArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetDateTimeArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::DateTime> param0 { };

                    _obj.GetDateTimeArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetDouble(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetDouble", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetDouble());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetDoubleArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetDoubleArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<double> param0 { };

                    _obj.GetDoubleArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetGuid(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetGuid", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetGuid());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetGuidArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetGuidArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::guid> param0 { };

                    _obj.GetGuidArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInspectableArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInspectableArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::IInspectable> param0 { };

                    _obj.GetInspectableArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt16(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt16", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetInt16());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt16Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt16Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<int16_t> param0 { };

                    _obj.GetInt16Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt32(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt32", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetInt32());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt32Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt32Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<int32_t> param0 { };

                    _obj.GetInt32Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt64(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt64", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetInt64());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt64Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt64Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<int64_t> param0 { };

                    _obj.GetInt64Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetPoint(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetPoint", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetPoint());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetPointArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetPointArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::Point> param0 { };

                    _obj.GetPointArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetRect(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetRect", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetRect());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetRectArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetRectArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::Rect> param0 { };

                    _obj.GetRectArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetSingle(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetSingle", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetSingle());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetSingleArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetSingleArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<float> param0 { };

                    _obj.GetSingleArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetSize(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetSize", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetSize());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetSizeArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetSizeArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::Size> param0 { };

                    _obj.GetSizeArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetString(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetString", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetString());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetStringArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetStringArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::hstring> param0 { };

                    _obj.GetStringArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetTimeSpan(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetTimeSpan", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetTimeSpan());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetTimeSpanArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetTimeSpanArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::TimeSpan> param0 { };

                    _obj.GetTimeSpanArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt16(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt16", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetUInt16());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt16Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt16Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<uint16_t> param0 { };

                    _obj.GetUInt16Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt32(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt32", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetUInt32());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt32Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt32Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<uint32_t> param0 { };

                    _obj.GetUInt32Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt64(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt64", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetUInt64());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt64Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt64Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<uint64_t> param0 { };

                    _obj.GetUInt64Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt8(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt8", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetUInt8());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt8Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt8Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<uint8_t> param0 { };

                    _obj.GetUInt8Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* get_Value() noexcept override
        {
            try
            {
                return py::convert(_obj.Value());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* get_IsNumericScalar() noexcept override
        {
            try
            {
                return py::convert(_obj.IsNumericScalar());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* get_Type() noexcept override
        {
            try
            {
                return py::convert(_obj.Type());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }

        winrt::Windows::Foundation::IReferenceArray<T> _obj{ nullptr };
    };

    template<typename T>
    struct IReference : public py::proj::Windows::Foundation::IReference
    {
        IReference(winrt::Windows::Foundation::IReference<T> o) : _obj(o) {}
        winrt::Windows::Foundation::IUnknown const& get_unknown() noexcept override { return _obj; }
        PyObject* GetBoolean(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetBoolean", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetBoolean());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetBooleanArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetBooleanArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<bool> param0 { };

                    _obj.GetBooleanArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetChar16(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetChar16", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetChar16());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetChar16Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetChar16Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<char16_t> param0 { };

                    _obj.GetChar16Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetDateTime(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetDateTime", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetDateTime());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetDateTimeArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetDateTimeArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::DateTime> param0 { };

                    _obj.GetDateTimeArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetDouble(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetDouble", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetDouble());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetDoubleArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetDoubleArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<double> param0 { };

                    _obj.GetDoubleArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetGuid(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetGuid", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetGuid());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetGuidArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetGuidArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::guid> param0 { };

                    _obj.GetGuidArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInspectableArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInspectableArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::IInspectable> param0 { };

                    _obj.GetInspectableArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt16(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt16", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetInt16());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt16Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt16Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<int16_t> param0 { };

                    _obj.GetInt16Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt32(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt32", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetInt32());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt32Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt32Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<int32_t> param0 { };

                    _obj.GetInt32Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt64(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt64", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetInt64());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetInt64Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetInt64Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<int64_t> param0 { };

                    _obj.GetInt64Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetPoint(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetPoint", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetPoint());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetPointArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetPointArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::Point> param0 { };

                    _obj.GetPointArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetRect(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetRect", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetRect());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetRectArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetRectArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::Rect> param0 { };

                    _obj.GetRectArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetSingle(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetSingle", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetSingle());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetSingleArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetSingleArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<float> param0 { };

                    _obj.GetSingleArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetSize(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetSize", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetSize());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetSizeArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetSizeArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::Size> param0 { };

                    _obj.GetSizeArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetString(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetString", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetString());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetStringArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetStringArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::hstring> param0 { };

                    _obj.GetStringArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetTimeSpan(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetTimeSpan", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetTimeSpan());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetTimeSpanArray(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetTimeSpanArray", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<winrt::Windows::Foundation::TimeSpan> param0 { };

                    _obj.GetTimeSpanArray(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt16(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt16", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetUInt16());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt16Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt16Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<uint16_t> param0 { };

                    _obj.GetUInt16Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt32(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt32", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetUInt32());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt32Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt32Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<uint32_t> param0 { };

                    _obj.GetUInt32Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt64(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt64", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetUInt64());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt64Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt64Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<uint64_t> param0 { };

                    _obj.GetUInt64Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt8(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt8", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    return py::convert(_obj.GetUInt8());
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* GetUInt8Array(PyObject* args) noexcept override
        {
            auto arg_count = PyTuple_Size(args);

            if (arg_count == 0)
            {
                if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IPropertyValue", L"GetUInt8Array", 0))
                {
                    py::set_arg_count_version_error(0);
                    return nullptr;
                }

                try
                {
                    winrt::com_array<uint8_t> param0 { };

                    _obj.GetUInt8Array(param0);

                    py::pyobj_handle out0{ py::convert(param0) };
                    if (!out0)
                    {
                        return nullptr;
                    }
                    return out0.detach();
                }
                catch (...)
                {
                    py::to_PyErr();
                    return nullptr;
                }
            }
            else
            {
                py::set_invalid_arg_count_error(arg_count);
                return nullptr;
            }
        }
        PyObject* get_Value() noexcept override
        {
            try
            {
                return py::convert(_obj.Value());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* get_IsNumericScalar() noexcept override
        {
            try
            {
                return py::convert(_obj.IsNumericScalar());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        PyObject* get_Type() noexcept override
        {
            try
            {
                return py::convert(_obj.Type());
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }

        winrt::Windows::Foundation::IReference<T> _obj{ nullptr };
    };
}

namespace py::wrapper::Windows::Foundation
{
    using Deferral = py::winrt_wrapper<winrt::Windows::Foundation::Deferral>;
    using GuidHelper = py::winrt_wrapper<winrt::Windows::Foundation::GuidHelper>;
    using MemoryBuffer = py::winrt_wrapper<winrt::Windows::Foundation::MemoryBuffer>;
    using PropertyValue = py::winrt_wrapper<winrt::Windows::Foundation::PropertyValue>;
    using Uri = py::winrt_wrapper<winrt::Windows::Foundation::Uri>;
    using WwwFormUrlDecoder = py::winrt_wrapper<winrt::Windows::Foundation::WwwFormUrlDecoder>;
    using WwwFormUrlDecoderEntry = py::winrt_wrapper<winrt::Windows::Foundation::WwwFormUrlDecoderEntry>;
    using IAsyncAction = py::winrt_wrapper<winrt::Windows::Foundation::IAsyncAction>;
    using IAsyncActionWithProgress = py::winrt_pinterface_wrapper<py::proj::Windows::Foundation::IAsyncActionWithProgress>;
    using IAsyncInfo = py::winrt_wrapper<winrt::Windows::Foundation::IAsyncInfo>;
    using IAsyncOperationWithProgress = py::winrt_pinterface_wrapper<py::proj::Windows::Foundation::IAsyncOperationWithProgress>;
    using IAsyncOperation = py::winrt_pinterface_wrapper<py::proj::Windows::Foundation::IAsyncOperation>;
    using IClosable = py::winrt_wrapper<winrt::Windows::Foundation::IClosable>;
    using IGetActivationFactory = py::winrt_wrapper<winrt::Windows::Foundation::IGetActivationFactory>;
    using IMemoryBuffer = py::winrt_wrapper<winrt::Windows::Foundation::IMemoryBuffer>;
    using IMemoryBufferReference = py::winrt_wrapper<winrt::Windows::Foundation::IMemoryBufferReference>;
    using IPropertyValue = py::winrt_wrapper<winrt::Windows::Foundation::IPropertyValue>;
    using IReferenceArray = py::winrt_pinterface_wrapper<py::proj::Windows::Foundation::IReferenceArray>;
    using IReference = py::winrt_pinterface_wrapper<py::proj::Windows::Foundation::IReference>;
    using IStringable = py::winrt_wrapper<winrt::Windows::Foundation::IStringable>;
    using IWwwFormUrlDecoderEntry = py::winrt_wrapper<winrt::Windows::Foundation::IWwwFormUrlDecoderEntry>;
    using EventRegistrationToken = py::winrt_struct_wrapper<winrt::event_token>;
    using HResult = py::winrt_struct_wrapper<winrt::hresult>;
    using Point = py::winrt_struct_wrapper<winrt::Windows::Foundation::Point>;
    using Rect = py::winrt_struct_wrapper<winrt::Windows::Foundation::Rect>;
    using Size = py::winrt_struct_wrapper<winrt::Windows::Foundation::Size>;
}

namespace py
{
    template<>
    inline constexpr const char* buffer_format<winrt::Windows::Foundation::AsyncStatus> = "i";

    template<>
    inline constexpr const char* buffer_format<winrt::Windows::Foundation::PropertyType> = "i";

    template<>
    inline constexpr const char* buffer_format<winrt::event_token> = "T{q:value:}";

    template<>
    inline constexpr const char* buffer_format<winrt::hresult> = "T{i:value:}";

    template<>
    inline constexpr const char* buffer_format<winrt::Windows::Foundation::Point> = "T{f:x:f:y:}";

    template<>
    inline constexpr const char* buffer_format<winrt::Windows::Foundation::Rect> = "T{f:x:f:y:f:width:f:height:}";

    template<>
    inline constexpr const char* buffer_format<winrt::Windows::Foundation::Size> = "T{f:width:f:height:}";


    template<>
    struct py_type<winrt::Windows::Foundation::AsyncStatus>
    {
        static PyObject* get_python_type() noexcept;
    };

    template<>
    struct py_type<winrt::Windows::Foundation::PropertyType>
    {
        static PyObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::Deferral>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::GuidHelper>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::MemoryBuffer>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::PropertyValue>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::Uri>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::WwwFormUrlDecoder>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::WwwFormUrlDecoderEntry>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::IAsyncAction>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<py::proj::Windows::Foundation::IAsyncActionWithProgress>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::IAsyncInfo>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<py::proj::Windows::Foundation::IAsyncOperationWithProgress>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<py::proj::Windows::Foundation::IAsyncOperation>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::IClosable>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::IGetActivationFactory>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::IMemoryBuffer>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::IMemoryBufferReference>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::IPropertyValue>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<py::proj::Windows::Foundation::IReferenceArray>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<py::proj::Windows::Foundation::IReference>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::IStringable>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::IWwwFormUrlDecoderEntry>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::event_token>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::hresult>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::Point>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::Rect>
    {
        static PyTypeObject* get_python_type() noexcept;
    };

    template<>
    struct winrt_type<winrt::Windows::Foundation::Size>
    {
        static PyTypeObject* get_python_type() noexcept;
    };
    template <typename TProgress>
    struct pinterface_python_type<winrt::Windows::Foundation::IAsyncActionWithProgress<TProgress>>
    {
        using abstract = py::proj::Windows::Foundation::IAsyncActionWithProgress;
        using concrete = py::impl::Windows::Foundation::IAsyncActionWithProgress<TProgress>;
    };

    template <typename TResult, typename TProgress>
    struct pinterface_python_type<winrt::Windows::Foundation::IAsyncOperationWithProgress<TResult, TProgress>>
    {
        using abstract = py::proj::Windows::Foundation::IAsyncOperationWithProgress;
        using concrete = py::impl::Windows::Foundation::IAsyncOperationWithProgress<TResult, TProgress>;
    };

    template <typename TResult>
    struct pinterface_python_type<winrt::Windows::Foundation::IAsyncOperation<TResult>>
    {
        using abstract = py::proj::Windows::Foundation::IAsyncOperation;
        using concrete = py::impl::Windows::Foundation::IAsyncOperation<TResult>;
    };

    template <typename T>
    struct pinterface_python_type<winrt::Windows::Foundation::IReferenceArray<T>>
    {
        using abstract = py::proj::Windows::Foundation::IReferenceArray;
        using concrete = py::impl::Windows::Foundation::IReferenceArray<T>;
    };

    template <typename T>
    struct pinterface_python_type<winrt::Windows::Foundation::IReference<T>>
    {
        using abstract = py::proj::Windows::Foundation::IReference;
        using concrete = py::impl::Windows::Foundation::IReference<T>;
    };

    template <>
    struct delegate_python_type<winrt::Windows::Foundation::AsyncActionCompletedHandler>
    {
        using type = py::impl::Windows::Foundation::AsyncActionCompletedHandler;
    };

    template <typename TProgress>
    struct delegate_python_type<winrt::Windows::Foundation::AsyncActionProgressHandler<TProgress>>
    {
        using type = py::impl::Windows::Foundation::AsyncActionProgressHandler<TProgress>;
    };

    template <typename TProgress>
    struct delegate_python_type<winrt::Windows::Foundation::AsyncActionWithProgressCompletedHandler<TProgress>>
    {
        using type = py::impl::Windows::Foundation::AsyncActionWithProgressCompletedHandler<TProgress>;
    };

    template <typename TResult>
    struct delegate_python_type<winrt::Windows::Foundation::AsyncOperationCompletedHandler<TResult>>
    {
        using type = py::impl::Windows::Foundation::AsyncOperationCompletedHandler<TResult>;
    };

    template <typename TResult, typename TProgress>
    struct delegate_python_type<winrt::Windows::Foundation::AsyncOperationProgressHandler<TResult, TProgress>>
    {
        using type = py::impl::Windows::Foundation::AsyncOperationProgressHandler<TResult, TProgress>;
    };

    template <typename TResult, typename TProgress>
    struct delegate_python_type<winrt::Windows::Foundation::AsyncOperationWithProgressCompletedHandler<TResult, TProgress>>
    {
        using type = py::impl::Windows::Foundation::AsyncOperationWithProgressCompletedHandler<TResult, TProgress>;
    };

    template <>
    struct delegate_python_type<winrt::Windows::Foundation::DeferralCompletedHandler>
    {
        using type = py::impl::Windows::Foundation::DeferralCompletedHandler;
    };

    template <typename T>
    struct delegate_python_type<winrt::Windows::Foundation::EventHandler<T>>
    {
        using type = py::impl::Windows::Foundation::EventHandler<T>;
    };

    template <typename TSender, typename TResult>
    struct delegate_python_type<winrt::Windows::Foundation::TypedEventHandler<TSender, TResult>>
    {
        using type = py::impl::Windows::Foundation::TypedEventHandler<TSender, TResult>;
    };

    template<>
    struct converter<winrt::hresult>
    {
        static PyObject* convert(winrt::hresult instance) noexcept;
        static winrt::hresult convert_to(PyObject* obj);
    };

    template<>
    struct converter<winrt::Windows::Foundation::Point>
    {
        static PyObject* convert(winrt::Windows::Foundation::Point instance) noexcept;
        static winrt::Windows::Foundation::Point convert_to(PyObject* obj);
    };

    template<>
    struct converter<winrt::Windows::Foundation::Rect>
    {
        static PyObject* convert(winrt::Windows::Foundation::Rect instance) noexcept;
        static winrt::Windows::Foundation::Rect convert_to(PyObject* obj);
    };

    template<>
    struct converter<winrt::Windows::Foundation::Size>
    {
        static PyObject* convert(winrt::Windows::Foundation::Size instance) noexcept;
        static winrt::Windows::Foundation::Size convert_to(PyObject* obj);
    };

}
