# Path: swf/core.py
# class ConnectedSWFObject(object):
#     """Authenticated object interface
# 
#     Provides the instance attributes:
# 
#     - `region`: name of the AWS region
#     - `connection`: to the SWF endpoint (`boto.swf.layer1.Layer1` object):
# 
#     """
#     __slots__ = [
#         'region',
#         'connection'
#     ]
# 
#     def __init__(self, *args, **kwargs):
#         settings_ = {key: SETTINGS.get(key, kwargs.get(key)) for key in
#                      ('aws_access_key_id',
#                       'aws_secret_access_key')}
# 
#         self.region = (SETTINGS.get('region') or
#                        kwargs.get('region') or
#                        boto.swf.layer1.Layer1.DefaultRegionName)
# 
#         self.connection = (kwargs.pop('connection', None) or
#                            boto.swf.connect_to_region(self.region, **settings_))
#         if self.connection is None:
#             raise ValueError('invalid region: {}'.format(self.region))
# 
# Path: swf/exceptions.py
# class DoesNotExistError(SWFError):
#     pass


from collections import namedtuple, OrderedDict
from swf.core import ConnectedSWFObject
from swf.exceptions import DoesNotExistError
        self.container.update(self._process_input(input))

    def merge(self, model_diff):
        """Merges another ModelDiff instance into the current one"""
        self.container.update(model_diff.container)

    def differing_fields(self):
        """Returns the name of fields differing from upstream"""
        return self.container.keys()

    def as_list(self):
        """Outputs models differences as a list of
        swf.models.base.Difference namedtuple
        """
        return [
            Difference(k, v[0], v[1]) for k, v
            in self.container.iteritems()
        ]


class BaseModel(ConnectedSWFObject):
    __slots__ = [
        'exists',
        'is_synced',
        'changes',
    ]

    def _diff(self):
        """Checks for differences between current model instance
        and upstream version"""

# Path: swf/core.py
# class ConnectedSWFObject(object):
#     """Authenticated object interface
# 
#     Provides the instance attributes:
# 
#     - `region`: name of the AWS region
#     - `connection`: to the SWF endpoint (`boto.swf.layer1.Layer1` object):
# 
#     """
#     __slots__ = [
#         'region',
#         'connection'
#     ]
# 
#     def __init__(self, *args, **kwargs):
#         settings_ = {key: SETTINGS.get(key, kwargs.get(key)) for key in
#                      ('aws_access_key_id',
#                       'aws_secret_access_key')}
# 
#         self.region = (SETTINGS.get('region') or
#                        kwargs.get('region') or
#                        boto.swf.layer1.Layer1.DefaultRegionName)
# 
#         self.connection = (kwargs.pop('connection', None) or
#                            boto.swf.connect_to_region(self.region, **settings_))
#         if self.connection is None:
#             raise ValueError('invalid region: {}'.format(self.region))
# 
# Path: swf/exceptions.py
# class DoesNotExistError(SWFError):
#     pass


# Path: swf/models/base.py
from collections import namedtuple, OrderedDict
from swf.core import ConnectedSWFObject
from swf.exceptions import DoesNotExistError

        self.container.update(self._process_input(input))

    def merge(self, model_diff):
        """Merges another ModelDiff instance into the current one"""
        self.container.update(model_diff.container)

    def differing_fields(self):
        """Returns the name of fields differing from upstream"""
        return self.container.keys()

    def as_list(self):
        """Outputs models differences as a list of
        swf.models.base.Difference namedtuple
        """
        return [
            Difference(k, v[0], v[1]) for k, v
            in self.container.iteritems()
        ]


class BaseModel(ConnectedSWFObject):
    __slots__ = [
        'exists',
        'is_synced',
        'changes',
    ]

    def _diff(self):
        """Checks for differences between current model instance
        and upstream version"""

        raise NotImplementedError