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

#include "pybase.h"
#include "py.Windows.Perception.Spatial.Preview.h"

PyTypeObject* py::winrt_type<winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropFrameOfReferencePreview>::python_type;
PyTypeObject* py::winrt_type<winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropPreview>::python_type;

namespace py::cpp::Windows::Perception::Spatial::Preview
{
    // ----- SpatialGraphInteropFrameOfReferencePreview class --------------------
    constexpr const char* const _type_name_SpatialGraphInteropFrameOfReferencePreview = "SpatialGraphInteropFrameOfReferencePreview";

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

    static void _dealloc_SpatialGraphInteropFrameOfReferencePreview(py::wrapper::Windows::Perception::Spatial::Preview::SpatialGraphInteropFrameOfReferencePreview* self)
    {
        auto hash_value = std::hash<winrt::Windows::Foundation::IInspectable>{}(self->obj);
        py::wrapped_instance(hash_value, nullptr);
        self->obj = nullptr;
    }

    static PyObject* SpatialGraphInteropFrameOfReferencePreview_get_CoordinateSystem(py::wrapper::Windows::Perception::Spatial::Preview::SpatialGraphInteropFrameOfReferencePreview* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.CoordinateSystem());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* SpatialGraphInteropFrameOfReferencePreview_get_CoordinateSystemToNodeTransform(py::wrapper::Windows::Perception::Spatial::Preview::SpatialGraphInteropFrameOfReferencePreview* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.CoordinateSystemToNodeTransform());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* SpatialGraphInteropFrameOfReferencePreview_get_NodeId(py::wrapper::Windows::Perception::Spatial::Preview::SpatialGraphInteropFrameOfReferencePreview* self, void* /*unused*/) noexcept
    {
        try
        {
            return py::convert(self->obj.NodeId());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyObject* _from_SpatialGraphInteropFrameOfReferencePreview(PyObject* /*unused*/, PyObject* arg) noexcept
    {
        try
        {
            auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
            return py::convert(return_value.as<winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropFrameOfReferencePreview>());
        }
        catch (...)
        {
            py::to_PyErr();
            return nullptr;
        }
    }

    static PyMethodDef _methods_SpatialGraphInteropFrameOfReferencePreview[] = {
        { "_from", reinterpret_cast<PyCFunction>(_from_SpatialGraphInteropFrameOfReferencePreview), METH_O | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_SpatialGraphInteropFrameOfReferencePreview[] = {
        { "coordinate_system", reinterpret_cast<getter>(SpatialGraphInteropFrameOfReferencePreview_get_CoordinateSystem), nullptr, nullptr, nullptr },
        { "coordinate_system_to_node_transform", reinterpret_cast<getter>(SpatialGraphInteropFrameOfReferencePreview_get_CoordinateSystemToNodeTransform), nullptr, nullptr, nullptr },
        { "node_id", reinterpret_cast<getter>(SpatialGraphInteropFrameOfReferencePreview_get_NodeId), nullptr, nullptr, nullptr },
        { }
    };

    static PyType_Slot _type_slots_SpatialGraphInteropFrameOfReferencePreview[] = 
    {
        { Py_tp_new, _new_SpatialGraphInteropFrameOfReferencePreview },
        { Py_tp_dealloc, _dealloc_SpatialGraphInteropFrameOfReferencePreview },
        { Py_tp_methods, _methods_SpatialGraphInteropFrameOfReferencePreview },
        { Py_tp_getset, _getset_SpatialGraphInteropFrameOfReferencePreview },
        { },
    };

    static PyType_Spec _type_spec_SpatialGraphInteropFrameOfReferencePreview =
    {
        "_winsdk_Windows_Perception_Spatial_Preview.SpatialGraphInteropFrameOfReferencePreview",
        sizeof(py::wrapper::Windows::Perception::Spatial::Preview::SpatialGraphInteropFrameOfReferencePreview),
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SpatialGraphInteropFrameOfReferencePreview
    };

    // ----- SpatialGraphInteropPreview class --------------------
    constexpr const char* const _type_name_SpatialGraphInteropPreview = "SpatialGraphInteropPreview";

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

    static PyObject* SpatialGraphInteropPreview_CreateCoordinateSystemForNode(PyObject* /*unused*/, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::guid>(args, 0);

                return py::convert(winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropPreview::CreateCoordinateSystemForNode(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::guid>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 1);

                return py::convert(winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropPreview::CreateCoordinateSystemForNode(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            try
            {
                auto param0 = py::convert_to<winrt::guid>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::Numerics::quaternion>(args, 2);

                return py::convert(winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropPreview::CreateCoordinateSystemForNode(param0, param1, param2));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SpatialGraphInteropPreview_CreateLocatorForNode(PyObject* /*unused*/, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::guid>(args, 0);

                return py::convert(winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropPreview::CreateLocatorForNode(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyObject* SpatialGraphInteropPreview_TryCreateFrameOfReference(PyObject* /*unused*/, PyObject* args) noexcept
    {
        Py_ssize_t arg_count = PyTuple_Size(args);

        if (arg_count == 1)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Perception::Spatial::SpatialCoordinateSystem>(args, 0);

                return py::convert(winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropPreview::TryCreateFrameOfReference(param0));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 2)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Perception::Spatial::SpatialCoordinateSystem>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 1);

                return py::convert(winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropPreview::TryCreateFrameOfReference(param0, param1));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else if (arg_count == 3)
        {
            try
            {
                auto param0 = py::convert_to<winrt::Windows::Perception::Spatial::SpatialCoordinateSystem>(args, 0);
                auto param1 = py::convert_to<winrt::Windows::Foundation::Numerics::float3>(args, 1);
                auto param2 = py::convert_to<winrt::Windows::Foundation::Numerics::quaternion>(args, 2);

                return py::convert(winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropPreview::TryCreateFrameOfReference(param0, param1, param2));
            }
            catch (...)
            {
                py::to_PyErr();
                return nullptr;
            }
        }
        else
        {
            py::set_invalid_arg_count_error(arg_count);
            return nullptr;
        }
    }

    static PyMethodDef _methods_SpatialGraphInteropPreview[] = {
        { "create_coordinate_system_for_node", reinterpret_cast<PyCFunction>(SpatialGraphInteropPreview_CreateCoordinateSystemForNode), METH_VARARGS | METH_STATIC, nullptr },
        { "create_locator_for_node", reinterpret_cast<PyCFunction>(SpatialGraphInteropPreview_CreateLocatorForNode), METH_VARARGS | METH_STATIC, nullptr },
        { "try_create_frame_of_reference", reinterpret_cast<PyCFunction>(SpatialGraphInteropPreview_TryCreateFrameOfReference), METH_VARARGS | METH_STATIC, nullptr },
        { }
    };

    static PyGetSetDef _getset_SpatialGraphInteropPreview[] = {
        { }
    };

    static PyType_Slot _type_slots_SpatialGraphInteropPreview[] = 
    {
        { Py_tp_new, _new_SpatialGraphInteropPreview },
        { Py_tp_methods, _methods_SpatialGraphInteropPreview },
        { Py_tp_getset, _getset_SpatialGraphInteropPreview },
        { },
    };

    static PyType_Spec _type_spec_SpatialGraphInteropPreview =
    {
        "_winsdk_Windows_Perception_Spatial_Preview.SpatialGraphInteropPreview",
        0,
        0,
        Py_TPFLAGS_DEFAULT,
        _type_slots_SpatialGraphInteropPreview
    };

    // ----- Windows.Perception.Spatial.Preview Initialization --------------------
    static int module_exec(PyObject* module) noexcept
    {
        try
        {
            py::pyobj_handle bases { PyTuple_Pack(1, py::winrt_type<py::Object>::python_type) };

            py::winrt_type<winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropFrameOfReferencePreview>::python_type = py::register_python_type(module, _type_name_SpatialGraphInteropFrameOfReferencePreview, &_type_spec_SpatialGraphInteropFrameOfReferencePreview, bases.get());
            py::winrt_type<winrt::Windows::Perception::Spatial::Preview::SpatialGraphInteropPreview>::python_type = py::register_python_type(module, _type_name_SpatialGraphInteropPreview, &_type_spec_SpatialGraphInteropPreview, nullptr);

            return 0;
        }
        catch (...)
        {
            py::to_PyErr();
            return -1;
        }
    }

    static PyModuleDef_Slot module_slots[] = {{Py_mod_exec, module_exec}, {}};

    PyDoc_STRVAR(module_doc, "Windows.Perception.Spatial.Preview");

    static PyModuleDef module_def
        = {PyModuleDef_HEAD_INIT,
           "_winsdk_Windows_Perception_Spatial_Preview",
           module_doc,
           0,
           nullptr,
           module_slots,
           nullptr,
           nullptr,
           nullptr};
} // py::cpp::Windows::Perception::Spatial::Preview

PyMODINIT_FUNC
PyInit__winsdk_Windows_Perception_Spatial_Preview (void) noexcept
{
    return PyModuleDef_Init(&py::cpp::Windows::Perception::Spatial::Preview::module_def);
}
