# 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 _oboe
else:
    import _oboe

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__)


OBOE_DEBUG_DISABLED = _oboe.OBOE_DEBUG_DISABLED
OBOE_DEBUG_FATAL = _oboe.OBOE_DEBUG_FATAL
OBOE_DEBUG_ERROR = _oboe.OBOE_DEBUG_ERROR
OBOE_DEBUG_WARNING = _oboe.OBOE_DEBUG_WARNING
OBOE_DEBUG_INFO = _oboe.OBOE_DEBUG_INFO
OBOE_DEBUG_LOW = _oboe.OBOE_DEBUG_LOW
OBOE_DEBUG_MEDIUM = _oboe.OBOE_DEBUG_MEDIUM
OBOE_DEBUG_HIGH = _oboe.OBOE_DEBUG_HIGH
OBOE_MODULE_ALL = _oboe.OBOE_MODULE_ALL
OBOE_MODULE_UNDEF = _oboe.OBOE_MODULE_UNDEF
OBOE_MODULE_LIBOBOE = _oboe.OBOE_MODULE_LIBOBOE
OBOE_MODULE_SETTINGS = _oboe.OBOE_MODULE_SETTINGS
OBOE_MODULE_REPORTER_FILE = _oboe.OBOE_MODULE_REPORTER_FILE
OBOE_MODULE_REPORTER_UDP = _oboe.OBOE_MODULE_REPORTER_UDP
OBOE_MODULE_REPORTER_SSL = _oboe.OBOE_MODULE_REPORTER_SSL
OBOE_MODULE_REPORTER_LAMBDA = _oboe.OBOE_MODULE_REPORTER_LAMBDA
OBOE_MODULE_APACHE = _oboe.OBOE_MODULE_APACHE
OBOE_MODULE_NGINX = _oboe.OBOE_MODULE_NGINX
OBOE_MODULE_PHP = _oboe.OBOE_MODULE_PHP
OBOE_MODULE_DOTNET = _oboe.OBOE_MODULE_DOTNET
OBOE_MODULE_RUBY = _oboe.OBOE_MODULE_RUBY
class Metadata(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, md):
        _oboe.Metadata_swiginit(self, _oboe.new_Metadata(md))
    __swig_destroy__ = _oboe.delete_Metadata

    def createEvent(self):
        return _oboe.Metadata_createEvent(self)

    def copy(self):
        return _oboe.Metadata_copy(self)

    def isValid(self):
        return _oboe.Metadata_isValid(self)

    def isSampled(self):
        return _oboe.Metadata_isSampled(self)

    @staticmethod
    def makeRandom(sampled=True):
        return _oboe.Metadata_makeRandom(sampled)

    @staticmethod
    def fromString(s):
        return _oboe.Metadata_fromString(s)

    def metadata(self):
        return _oboe.Metadata_metadata(self)

    def toString(self):
        return _oboe.Metadata_toString(self)

# Register Metadata in _oboe:
_oboe.Metadata_swigregister(Metadata)

def Metadata_makeRandom(sampled=True):
    return _oboe.Metadata_makeRandom(sampled)

def Metadata_fromString(s):
    return _oboe.Metadata_fromString(s)

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

    @staticmethod
    def setTracingMode(newMode):
        return _oboe.Context_setTracingMode(newMode)

    @staticmethod
    def setTriggerMode(newMode):
        return _oboe.Context_setTriggerMode(newMode)

    @staticmethod
    def setDefaultSampleRate(newRate):
        return _oboe.Context_setDefaultSampleRate(newRate)

    @staticmethod
    def getDecisions(*args):
        return _oboe.Context_getDecisions(*args)

    @staticmethod
    def get():
        return _oboe.Context_get()

    @staticmethod
    def toString():
        return _oboe.Context_toString()

    @staticmethod
    def set(md):
        return _oboe.Context_set(md)

    @staticmethod
    def fromString(s):
        return _oboe.Context_fromString(s)

    @staticmethod
    def copy():
        return _oboe.Context_copy()

    @staticmethod
    def setSampledFlag():
        return _oboe.Context_setSampledFlag()

    @staticmethod
    def clear():
        return _oboe.Context_clear()

    @staticmethod
    def isValid():
        return _oboe.Context_isValid()

    @staticmethod
    def isSampled():
        return _oboe.Context_isSampled()

    @staticmethod
    def validateTransformServiceName(service_key):
        return _oboe.Context_validateTransformServiceName(service_key)

    @staticmethod
    def shutdown():
        return _oboe.Context_shutdown()

    @staticmethod
    def isReady(timeout):
        return _oboe.Context_isReady(timeout)

    @staticmethod
    def isLambda():
        return _oboe.Context_isLambda()

    @staticmethod
    def startTrace():
        return _oboe.Context_startTrace()

    @staticmethod
    def createEntry(md, timestamp, parent_md=None):
        return _oboe.Context_createEntry(md, timestamp, parent_md)

    @staticmethod
    def createEvent(*args):
        return _oboe.Context_createEvent(*args)

    @staticmethod
    def createExit(timestamp):
        return _oboe.Context_createExit(timestamp)

    def __init__(self):
        _oboe.Context_swiginit(self, _oboe.new_Context())
    __swig_destroy__ = _oboe.delete_Context

# Register Context in _oboe:
_oboe.Context_swigregister(Context)

def Context_setTracingMode(newMode):
    return _oboe.Context_setTracingMode(newMode)

def Context_setTriggerMode(newMode):
    return _oboe.Context_setTriggerMode(newMode)

def Context_setDefaultSampleRate(newRate):
    return _oboe.Context_setDefaultSampleRate(newRate)

def Context_getDecisions(*args):
    return _oboe.Context_getDecisions(*args)

def Context_get():
    return _oboe.Context_get()

def Context_toString():
    return _oboe.Context_toString()

def Context_set(md):
    return _oboe.Context_set(md)

def Context_fromString(s):
    return _oboe.Context_fromString(s)

def Context_copy():
    return _oboe.Context_copy()

def Context_setSampledFlag():
    return _oboe.Context_setSampledFlag()

def Context_clear():
    return _oboe.Context_clear()

def Context_isValid():
    return _oboe.Context_isValid()

def Context_isSampled():
    return _oboe.Context_isSampled()

def Context_validateTransformServiceName(service_key):
    return _oboe.Context_validateTransformServiceName(service_key)

def Context_shutdown():
    return _oboe.Context_shutdown()

def Context_isReady(timeout):
    return _oboe.Context_isReady(timeout)

def Context_isLambda():
    return _oboe.Context_isLambda()

def Context_startTrace():
    return _oboe.Context_startTrace()

def Context_createEntry(md, timestamp, parent_md=None):
    return _oboe.Context_createEntry(md, timestamp, parent_md)

def Context_createEvent(*args):
    return _oboe.Context_createEvent(*args)

def Context_createExit(timestamp):
    return _oboe.Context_createExit(timestamp)

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

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr
    __swig_destroy__ = _oboe.delete_Event

    def addInfo(self, *args):
        return _oboe.Event_addInfo(self, *args)

    def addEdge(self, md):
        return _oboe.Event_addEdge(self, md)

    def addContextOpId(self, md):
        return _oboe.Event_addContextOpId(self, md)

    def addHostname(self):
        return _oboe.Event_addHostname(self)

    def getMetadata(self):
        return _oboe.Event_getMetadata(self)

    def metadataString(self):
        return _oboe.Event_metadataString(self)

    def opIdString(self):
        return _oboe.Event_opIdString(self)

    def send(self, with_system_timestamp=True):
        return _oboe.Event_send(self, with_system_timestamp)

    def sendProfiling(self):
        return _oboe.Event_sendProfiling(self)

    def addSpanRef(self, md):
        return _oboe.Event_addSpanRef(self, md)

    def addProfileEdge(self, id):
        return _oboe.Event_addProfileEdge(self, id)

    @staticmethod
    def startTrace(md):
        return _oboe.Event_startTrace(md)

# Register Event in _oboe:
_oboe.Event_swigregister(Event)

def Event_startTrace(md):
    return _oboe.Event_startTrace(md)

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

    @staticmethod
    def createSpan(transaction, domain, duration, has_error, service_name=None):
        return _oboe.Span_createSpan(transaction, domain, duration, has_error, service_name)

    @staticmethod
    def createHttpSpan(transaction, url, domain, duration, status, method, has_error, service_name=None):
        return _oboe.Span_createHttpSpan(transaction, url, domain, duration, status, method, has_error, service_name)

    def __init__(self):
        _oboe.Span_swiginit(self, _oboe.new_Span())
    __swig_destroy__ = _oboe.delete_Span

# Register Span in _oboe:
_oboe.Span_swigregister(Span)

def Span_createSpan(transaction, domain, duration, has_error, service_name=None):
    return _oboe.Span_createSpan(transaction, domain, duration, has_error, service_name)

def Span_createHttpSpan(transaction, url, domain, duration, status, method, has_error, service_name=None):
    return _oboe.Span_createHttpSpan(transaction, url, domain, duration, status, method, has_error, service_name)

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

    def __init__(self, count):
        _oboe.MetricTags_swiginit(self, _oboe.new_MetricTags(count))
    __swig_destroy__ = _oboe.delete_MetricTags

    def add(self, index, k, v):
        return _oboe.MetricTags_add(self, index, k, v)

    def get(self):
        return _oboe.MetricTags_get(self)

# Register MetricTags in _oboe:
_oboe.MetricTags_swigregister(MetricTags)

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

    @staticmethod
    def summary(name, value, count, host_tag, service_name, tags, tags_count):
        return _oboe.CustomMetrics_summary(name, value, count, host_tag, service_name, tags, tags_count)

    @staticmethod
    def increment(name, count, host_tag, service_name, tags, tags_count):
        return _oboe.CustomMetrics_increment(name, count, host_tag, service_name, tags, tags_count)

    def __init__(self):
        _oboe.CustomMetrics_swiginit(self, _oboe.new_CustomMetrics())
    __swig_destroy__ = _oboe.delete_CustomMetrics

# Register CustomMetrics in _oboe:
_oboe.CustomMetrics_swigregister(CustomMetrics)

def CustomMetrics_summary(name, value, count, host_tag, service_name, tags, tags_count):
    return _oboe.CustomMetrics_summary(name, value, count, host_tag, service_name, tags, tags_count)

def CustomMetrics_increment(name, count, host_tag, service_name, tags, tags_count):
    return _oboe.CustomMetrics_increment(name, count, host_tag, service_name, tags, tags_count)

class Reporter(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    init_status = property(_oboe.Reporter_init_status_get, _oboe.Reporter_init_status_set)

    def __init__(self, hostname_alias, log_level, log_file_path, max_transactions, max_flush_wait_time, events_flush_interval, max_request_size_bytes, reporter, host, service_key, trusted_path, buffer_size, trace_metrics, histogram_precision, token_bucket_capacity, token_bucket_rate, file_single, ec2_metadata_timeout, grpc_proxy, stdout_clear_nonblocking, is_grpc_clean_hack_enabled, w3c_trace_format, metric_format):
        _oboe.Reporter_swiginit(self, _oboe.new_Reporter(hostname_alias, log_level, log_file_path, max_transactions, max_flush_wait_time, events_flush_interval, max_request_size_bytes, reporter, host, service_key, trusted_path, buffer_size, trace_metrics, histogram_precision, token_bucket_capacity, token_bucket_rate, file_single, ec2_metadata_timeout, grpc_proxy, stdout_clear_nonblocking, is_grpc_clean_hack_enabled, w3c_trace_format, metric_format))
    __swig_destroy__ = _oboe.delete_Reporter

    def sendReport(self, *args):
        return _oboe.Reporter_sendReport(self, *args)

    def sendStatus(self, *args):
        return _oboe.Reporter_sendStatus(self, *args)

    def flush(self):
        return _oboe.Reporter_flush(self)

    def getType(self):
        return _oboe.Reporter_getType(self)

# Register Reporter in _oboe:
_oboe.Reporter_swigregister(Reporter)

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

    @staticmethod
    def checkVersion(version, revision):
        return _oboe.Config_checkVersion(version, revision)

    @staticmethod
    def getVersionString():
        return _oboe.Config_getVersionString()

    def __init__(self):
        _oboe.Config_swiginit(self, _oboe.new_Config())
    __swig_destroy__ = _oboe.delete_Config

# Register Config in _oboe:
_oboe.Config_swigregister(Config)

def Config_checkVersion(version, revision):
    return _oboe.Config_checkVersion(version, revision)

def Config_getVersionString():
    return _oboe.Config_getVersionString()



