# Path: smc/base/decorators.py
# class cached_property(object):
#     """
#     Use for caching a property value on the instance. If the
#     attribute is deleted, it will be recreated when called.
#     """
# 
#     def __init__(self, func):
#         self.func = func
#         #self.__doc__ = func.__doc__
# 
#     def __get__(self, obj, cls):
#         if obj is None:
#             return self
#         value = obj.__dict__[self.func.__name__] = self.func(obj)
#         return value
# 
# class classproperty(object):
#     """
#     Used for collection manager so objects can be accessed as a
#     class property and also from the instance
#     """
# 
#     def __init__(self, fget):
#         self.fget = fget
# 
#     def __get__(self, instance, owner_cls):
#         return self.fget(owner_cls)
# 
# Path: smc/api/exceptions.py
# class FetchElementFailed(SMCException):
#     """
#     Failure when fetching results
#     """
# 
# class InvalidSearchFilter(SMCException):
#     """
#     Thrown by collections when using invalid search sequences.
#     """
# 
# Path: smc/api/common.py
# def entry_point():
#     return _get_session().entry_points


import re
import copy
import smc.base.model
from itertools import islice
from smc.base.decorators import cached_property, classproperty
from smc.api.exceptions import FetchElementFailed, InvalidSearchFilter
from smc.api.common import entry_point
        """
        :rtype: Search
        """
        return self()
    
    def entry_point(self, entry_point):
        """
        Provide an entry point for element types to search.
        
        :param str entry_point: valid entry point. Use `~object_types()`
            to find all available entry points.
        """
        if len(entry_point.split(',')) == 1:
            self._params.update(
                href=self._resource.get(entry_point))
            return self
        else:
            self._params.update(
                filter_context=entry_point)
            return self

    def context_filter(self, context):
        """
        Provide a context filter to search.
        
        :param str context: Context filter by name
        """
        if context in CONTEXTS:
            self._params.update(filter_context=context)
            return self

# Path: smc/base/decorators.py
# class cached_property(object):
#     """
#     Use for caching a property value on the instance. If the
#     attribute is deleted, it will be recreated when called.
#     """
# 
#     def __init__(self, func):
#         self.func = func
#         #self.__doc__ = func.__doc__
# 
#     def __get__(self, obj, cls):
#         if obj is None:
#             return self
#         value = obj.__dict__[self.func.__name__] = self.func(obj)
#         return value
# 
# class classproperty(object):
#     """
#     Used for collection manager so objects can be accessed as a
#     class property and also from the instance
#     """
# 
#     def __init__(self, fget):
#         self.fget = fget
# 
#     def __get__(self, instance, owner_cls):
#         return self.fget(owner_cls)
# 
# Path: smc/api/exceptions.py
# class FetchElementFailed(SMCException):
#     """
#     Failure when fetching results
#     """
# 
# class InvalidSearchFilter(SMCException):
#     """
#     Thrown by collections when using invalid search sequences.
#     """
# 
# Path: smc/api/common.py
# def entry_point():
#     return _get_session().entry_points


# Path: smc/base/collection.py
import re
import copy
import smc.base.model
from itertools import islice
from smc.base.decorators import cached_property, classproperty
from smc.api.exceptions import FetchElementFailed, InvalidSearchFilter
from smc.api.common import entry_point

        """
        :rtype: Search
        """
        return self()
    
    def entry_point(self, entry_point):
        """
        Provide an entry point for element types to search.
        
        :param str entry_point: valid entry point. Use `~object_types()`
            to find all available entry points.
        """
        if len(entry_point.split(',')) == 1:
            self._params.update(
                href=self._resource.get(entry_point))
            return self
        else:
            self._params.update(
                filter_context=entry_point)
            return self

    def context_filter(self, context):
        """
        Provide a context filter to search.
        
        :param str context: Context filter by name
        """
        if context in CONTEXTS:
            self._params.update(filter_context=context)
            return self

        raise InvalidSearchFilter(