# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# 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
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _pywrapsat
else:
    import _pywrapsat

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 == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, 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__)


import weakref


import numbers

class SolutionCallback(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    __swig_destroy__ = _pywrapsat.delete_SolutionCallback

    def OnSolutionCallback(self) -> "void":
        return _pywrapsat.SolutionCallback_OnSolutionCallback(self)

    def NumBooleans(self) -> "int64_t":
        return _pywrapsat.SolutionCallback_NumBooleans(self)

    def NumBranches(self) -> "int64_t":
        return _pywrapsat.SolutionCallback_NumBranches(self)

    def NumConflicts(self) -> "int64_t":
        return _pywrapsat.SolutionCallback_NumConflicts(self)

    def NumBinaryPropagations(self) -> "int64_t":
        return _pywrapsat.SolutionCallback_NumBinaryPropagations(self)

    def NumIntegerPropagations(self) -> "int64_t":
        return _pywrapsat.SolutionCallback_NumIntegerPropagations(self)

    def WallTime(self) -> "double":
        return _pywrapsat.SolutionCallback_WallTime(self)

    def UserTime(self) -> "double":
        return _pywrapsat.SolutionCallback_UserTime(self)

    def ObjectiveValue(self) -> "double":
        return _pywrapsat.SolutionCallback_ObjectiveValue(self)

    def BestObjectiveBound(self) -> "double":
        return _pywrapsat.SolutionCallback_BestObjectiveBound(self)

    def SolutionIntegerValue(self, index: "int") -> "int64_t":
        return _pywrapsat.SolutionCallback_SolutionIntegerValue(self, index)

    def SolutionBooleanValue(self, index: "int") -> "bool":
        return _pywrapsat.SolutionCallback_SolutionBooleanValue(self, index)

    def StopSearch(self) -> "void":
        return _pywrapsat.SolutionCallback_StopSearch(self)

    def Response(self) -> "operations_research::sat::CpSolverResponse":
        return _pywrapsat.SolutionCallback_Response(self)

    def HasResponse(self) -> "bool":
        return _pywrapsat.SolutionCallback_HasResponse(self)

    def __init__(self):
        if self.__class__ == SolutionCallback:
            _self = None
        else:
            _self = self
        _pywrapsat.SolutionCallback_swiginit(self, _pywrapsat.new_SolutionCallback(_self, ))
    def __disown__(self):
        self.this.disown()
        _pywrapsat.disown_SolutionCallback(self)
        return weakref.proxy(self)

# Register SolutionCallback in _pywrapsat:
_pywrapsat.SolutionCallback_swigregister(SolutionCallback)

class SolveWrapper(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def SetParameters(self, parameters: "operations_research::sat::SatParameters const &") -> "void":
        return _pywrapsat.SolveWrapper_SetParameters(self, parameters)

    def AddSolutionCallback(self, callback: "SolutionCallback") -> "void":
        return _pywrapsat.SolveWrapper_AddSolutionCallback(self, callback)

    def ClearSolutionCallback(self, callback: "SolutionCallback") -> "void":
        return _pywrapsat.SolveWrapper_ClearSolutionCallback(self, callback)

    def AddLogCallback(self, log_callback: "std::function< void (std::string const &) >") -> "void":
        return _pywrapsat.SolveWrapper_AddLogCallback(self, log_callback)

    def Solve(self, model_proto: "operations_research::sat::CpModelProto const &") -> "operations_research::sat::CpSolverResponse":
        return _pywrapsat.SolveWrapper_Solve(self, model_proto)

    def StopSearch(self) -> "void":
        return _pywrapsat.SolveWrapper_StopSearch(self)

    def __init__(self):
        _pywrapsat.SolveWrapper_swiginit(self, _pywrapsat.new_SolveWrapper())
    __swig_destroy__ = _pywrapsat.delete_SolveWrapper

# Register SolveWrapper in _pywrapsat:
_pywrapsat.SolveWrapper_swigregister(SolveWrapper)

class CpSatHelper(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    @staticmethod
    def ModelStats(model_proto: "operations_research::sat::CpModelProto const &") -> "std::string":
        return _pywrapsat.CpSatHelper_ModelStats(model_proto)

    @staticmethod
    def SolverResponseStats(response: "operations_research::sat::CpSolverResponse const &") -> "std::string":
        return _pywrapsat.CpSatHelper_SolverResponseStats(response)

    @staticmethod
    def ValidateModel(model_proto: "operations_research::sat::CpModelProto const &") -> "std::string":
        return _pywrapsat.CpSatHelper_ValidateModel(model_proto)

    @staticmethod
    def VariableDomain(variable_proto: "operations_research::sat::IntegerVariableProto const &") -> "operations_research::Domain":
        return _pywrapsat.CpSatHelper_VariableDomain(variable_proto)

    @staticmethod
    def WriteModelToFile(model_proto: "operations_research::sat::CpModelProto const &", filename: "std::string const &") -> "bool":
        return _pywrapsat.CpSatHelper_WriteModelToFile(model_proto, filename)

    def __init__(self):
        _pywrapsat.CpSatHelper_swiginit(self, _pywrapsat.new_CpSatHelper())
    __swig_destroy__ = _pywrapsat.delete_CpSatHelper

# Register CpSatHelper in _pywrapsat:
_pywrapsat.CpSatHelper_swigregister(CpSatHelper)

def CpSatHelper_ModelStats(model_proto: "operations_research::sat::CpModelProto const &") -> "std::string":
    return _pywrapsat.CpSatHelper_ModelStats(model_proto)

def CpSatHelper_SolverResponseStats(response: "operations_research::sat::CpSolverResponse const &") -> "std::string":
    return _pywrapsat.CpSatHelper_SolverResponseStats(response)

def CpSatHelper_ValidateModel(model_proto: "operations_research::sat::CpModelProto const &") -> "std::string":
    return _pywrapsat.CpSatHelper_ValidateModel(model_proto)

def CpSatHelper_VariableDomain(variable_proto: "operations_research::sat::IntegerVariableProto const &") -> "operations_research::Domain":
    return _pywrapsat.CpSatHelper_VariableDomain(variable_proto)

def CpSatHelper_WriteModelToFile(model_proto: "operations_research::sat::CpModelProto const &", filename: "std::string const &") -> "bool":
    return _pywrapsat.CpSatHelper_WriteModelToFile(model_proto, filename)



