# Path: aiohttp_json_api/common.py
# class Event(Flag):
#     """Request event enumeration."""
# 
#     GET = auto()
#     POST = auto()
#     PATCH = auto()
#     DELETE = auto()
#     NEVER = auto()
#     ALWAYS = GET | POST | PATCH | DELETE
#     CREATE = POST
#     UPDATE = PATCH
# 
# class Step(Enum):
#     """Marshalling step enumeration."""
# 
#     BEFORE_DESERIALIZATION = auto()
#     AFTER_DESERIALIZATION = auto()
#     BEFORE_SERIALIZATION = auto()
#     AFTER_SERIALIZATION = auto()


import functools
from enum import Enum
from ..common import Event, Step
    return tag_processor(Tag.GET, None, field_key=field_key)


def sets(field_key):
    """
    Decorator for marking the setter of a field::

        class Article(BaseSchema):

            title = String()

            @sets("title")
            def update_title(self, article, title, sp):
                article.set_title(title)
                return None

    A field can have at most **one** updater.

    :arg str field_key:
        The key of the field.
    """
    return tag_processor(Tag.SET, None, field_key=field_key)


#: Alias for :func:`sets`.
updates = sets


def validates(field_key,
              step: Step = Step.AFTER_DESERIALIZATION,

# Path: aiohttp_json_api/common.py
# class Event(Flag):
#     """Request event enumeration."""
# 
#     GET = auto()
#     POST = auto()
#     PATCH = auto()
#     DELETE = auto()
#     NEVER = auto()
#     ALWAYS = GET | POST | PATCH | DELETE
#     CREATE = POST
#     UPDATE = PATCH
# 
# class Step(Enum):
#     """Marshalling step enumeration."""
# 
#     BEFORE_DESERIALIZATION = auto()
#     AFTER_DESERIALIZATION = auto()
#     BEFORE_SERIALIZATION = auto()
#     AFTER_SERIALIZATION = auto()


# Path: aiohttp_json_api/fields/decorators.py
import functools
from enum import Enum
from ..common import Event, Step

    return tag_processor(Tag.GET, None, field_key=field_key)


def sets(field_key):
    """
    Decorator for marking the setter of a field::

        class Article(BaseSchema):

            title = String()

            @sets("title")
            def update_title(self, article, title, sp):
                article.set_title(title)
                return None

    A field can have at most **one** updater.

    :arg str field_key:
        The key of the field.
    """
    return tag_processor(Tag.SET, None, field_key=field_key)


#: Alias for :func:`sets`.
updates = sets


def validates(field_key,
              step: Step = Step.AFTER_DESERIALIZATION,

              on: Event = Event.ALWAYS):