@classmethod
def parse(cls, value):
    """
        Parse model options from dictionary or object.

        :param value: Options
        :type value: dict or object
        """
    if not value:
        return cls()
    if type(value) is dict:
        return cls(value)
    options = {}
    for key in dir(value):
        if key.startswith('_'):
            continue
        options[key] = getattr(value, key)
    return cls(options)
