# Path: mapmyfitness/constants.py
# PUBLIC = 3
# 
# PRIVATE = 0
# 
# FRIENDS = 1
# 
# Path: mapmyfitness/exceptions.py
# class ValidatorException(Exception):
#     """There was an error creating the validator."""


from ..constants import PUBLIC, PRIVATE, FRIENDS
from ..exceptions import ValidatorException


class BaseValidator(object):
    privacy_options = (PUBLIC, PRIVATE, FRIENDS)

    def type_or_types_to_str(self, type_or_types):
        def repr_to_str(repr):
            return repr.split(" '")[1].split("'>")[0]
        if isinstance(type_or_types, (list, tuple)):
            types = []
            for repr in type_or_types:
                types.append(repr_to_str(str(repr)))
            return ' or '.join(types)
        else:
            return repr_to_str(str(type_or_types))

    def __init__(self, create_obj=None, search_kwargs=None):

# Path: mapmyfitness/constants.py
# PUBLIC = 3
# 
# PRIVATE = 0
# 
# FRIENDS = 1
# 
# Path: mapmyfitness/exceptions.py
# class ValidatorException(Exception):
#     """There was an error creating the validator."""


# Path: mapmyfitness/validators/base.py
from ..constants import PUBLIC, PRIVATE, FRIENDS
from ..exceptions import ValidatorException



class BaseValidator(object):
    privacy_options = (PUBLIC, PRIVATE, FRIENDS)

    def type_or_types_to_str(self, type_or_types):
        def repr_to_str(repr):
            return repr.split(" '")[1].split("'>")[0]
        if isinstance(type_or_types, (list, tuple)):
            types = []
            for repr in type_or_types:
                types.append(repr_to_str(str(repr)))
            return ' or '.join(types)
        else:
            return repr_to_str(str(type_or_types))

    def __init__(self, create_obj=None, search_kwargs=None):

        if create_obj is None and search_kwargs is None: