// Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
// --------- Warning: This is a build system generated file. ----------
//
#pragma once

#include <omni/core/ITypeFactory.h>
#include <omni/python/PyBind.h>
#include <omni/python/PyString.h>
#include <omni/python/PyVec.h>

#include <sstream>

auto bindIBundleFactory(py::module& m)
{
    // hack around pybind11 issues with C++17
    //   - https://github.com/pybind/pybind11/issues/2234
    //   - https://github.com/pybind/pybind11/issues/2666
    //   - https://github.com/pybind/pybind11/issues/2856
    py::class_<omni::core::Generated<omni::graph::core::IBundleFactory_abi>,
               omni::core::ObjectPtr<omni::core::Generated<omni::graph::core::IBundleFactory_abi>>, omni::core::IObject>
        clsParent(m, "_IBundleFactory");
    py::class_<omni::graph::core::IBundleFactory, omni::core::Generated<omni::graph::core::IBundleFactory_abi>,
               omni::core::ObjectPtr<omni::graph::core::IBundleFactory>, omni::core::IObject>
        cls(m, "IBundleFactory");
    cls.def(py::init(
        [](const omni::core::ObjectPtr<omni::core::IObject>& obj)
        {
            auto tmp = omni::core::cast<omni::graph::core::IBundleFactory>(obj.get());
            if (!tmp)
            {
                throw std::runtime_error("invalid type conversion");
            }
            return tmp;
        }));
    cls.def(py::init(
        []()
        {
            auto tmp = omni::core::createType<omni::graph::core::IBundleFactory>();
            if (!tmp)
            {
                throw std::runtime_error("unable to create omni::graph::core::IBundleFactory instantiation");
            }
            return tmp;
        }));
    return omni::python::PyBind<omni::graph::core::IBundleFactory>::bind(cls);
}
