agency.models.mutation ====================== .. py:module:: agency.models.mutation Attributes ---------- .. autoapisummary:: agency.models.mutation._M agency.models.mutation._IdT_contra agency.models.mutation._NOT_FOUND agency.models.mutation.AGENCY_MUTATION_LABELS Classes ------- .. autoapisummary:: agency.models.mutation.Mutation agency.models.mutation.AgencyMutation agency.models.mutation.PersonMutation Module Contents --------------- .. py:data:: _M .. py:data:: _IdT_contra .. py:data:: _NOT_FOUND .. py:data:: AGENCY_MUTATION_LABELS .. py:class:: Mutation(session: sqlalchemy.orm.Session, target_id: _IdT_contra, ticket_id: uuid.UUID) Bases: :py:obj:`Generic`\ [\ :py:obj:`_M`\ , :py:obj:`_IdT_contra`\ ] Abstract base class for generic types. A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:: class Mapping(Generic[KT, VT]): def __getitem__(self, key: KT) -> VT: ... # Etc. This class can then be used as follows:: def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default .. py:attribute:: session .. py:attribute:: target_id .. py:attribute:: ticket_id .. py:property:: collection :type: agency.models.move.SupportsById[_M, _IdT_contra] :abstractmethod: .. py:property:: target :type: _M | None .. py:property:: ticket :type: onegov.ticket.Ticket | None .. py:property:: changes :type: dict[str, Any] .. py:property:: labels :type: dict[str, str] .. py:method:: apply(items: collections.abc.Iterable[str]) -> None .. py:class:: AgencyMutation(session: sqlalchemy.orm.Session, target_id: _IdT_contra, ticket_id: uuid.UUID) Bases: :py:obj:`Mutation`\ [\ :py:obj:`agency.models.agency.ExtendedAgency`\ , :py:obj:`int`\ ] Abstract base class for generic types. A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:: class Mapping(Generic[KT, VT]): def __getitem__(self, key: KT) -> VT: ... # Etc. This class can then be used as follows:: def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default .. py:property:: collection :type: onegov.agency.collections.ExtendedAgencyCollection .. py:property:: labels :type: dict[str, str] .. py:class:: PersonMutation(session: sqlalchemy.orm.Session, target_id: _IdT_contra, ticket_id: uuid.UUID) Bases: :py:obj:`Mutation`\ [\ :py:obj:`agency.models.person.ExtendedPerson`\ , :py:obj:`uuid.UUID`\ ] Abstract base class for generic types. A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:: class Mapping(Generic[KT, VT]): def __getitem__(self, key: KT) -> VT: ... # Etc. This class can then be used as follows:: def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default .. py:property:: collection :type: onegov.agency.collections.ExtendedPersonCollection .. py:property:: labels :type: dict[str, str]