'Constructor. Either conn or bus_name is required; object_path
is also required.
:Parameters:
`conn` : dbus.connection.Connection or None
The connection on which to export this object.
If None, use the Bus associated with the given ``bus_name``.
If there is no ``bus_name`` either, the object is not
initially available on any Connection.
For backwards compatibility, if an instance of
dbus.service.BusName is passed as the first parameter,
this is equivalent to passing its associated Bus as
``conn``, and passing the BusName itself as ``bus_name``.
`object_path` : str or None
A D-Bus object path at which to make this Object available
immediately. If this is not None, a `conn` or `bus_name` must
also be provided.
`bus_name` : dbus.service.BusName or None
Represents a well-known name claimed by this process. A
reference to the BusName object will be held by this
Object, preventing the name from being released during this
Object\'s lifetime (unless it\'s released manually).'

def __init__(self, conn=None, object_path=None, bus_name=None):

    if (object_path is not None):
        validate_object_path(object_path)
    if isinstance(conn, BusName):
        bus_name = conn
        conn = bus_name.get_bus()
    elif (conn is None):
        if (bus_name is not None):
            conn = bus_name.get_bus()
    self._object_path = None
    self._connection = None
    self._locations = []
    self._locations_lock = threading.Lock()
    self._fallback = False
    self._name = bus_name
    if ((conn is None) and (object_path is not None)):
        raise TypeError('If    object_path    is    given,    either    conn    or    bus_name    is    required')
    if ((conn is not None) and (object_path is not None)):
        self.add_to_connection(conn, object_path)
