# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.3.1
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info

import amici
import datetime
import importlib.util
import os
import sysconfig
from pathlib import Path

ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
_model_dirac_py = amici._module_from_path(
    'model_dirac_py._model_dirac_py' if __package__ or '.' in __name__
    else '_model_dirac_py',
    Path(__file__).parent / f'_model_dirac_py{ext_suffix}',
)

def _get_import_time():
    return _model_dirac_py._get_import_time()

t_imported = _get_import_time()
t_modified = os.path.getmtime(__file__)
if t_imported < t_modified:
    t_imp_str = datetime.datetime.fromtimestamp(t_imported).isoformat()
    t_mod_str = datetime.datetime.fromtimestamp(t_modified).isoformat()
    module_path = Path(__file__).resolve()
    raise RuntimeError(
        f'Cannot import extension for model_dirac_py from '
        f'{module_path}, because an extension in the same location '
        f'has already been imported, but the file was modified on '
        f'disk. \nImported at {t_imp_str}\nModified at {t_mod_str}.\n'
        'Import the module with a different name or restart the '
        'Python kernel.'
    )


try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)



# the model-package __init__.py module (will be set during import)
_model_module = None



import amici

def _get_import_time():
    return _model_dirac_py._get_import_time()

def get_model():
    val = _model_dirac_py.get_model()

    if '.' in __name__:
        val.module = _model_module


    return val

