coarnotify.patterns.announce_service_result =========================================== .. py:module:: coarnotify.patterns.announce_service_result .. autoapi-nested-parse:: Pattern to represent the Announce Service Result notification https://coar-notify.net/specification/1.0.0/announce-resource/ Classes ------- .. autoapisummary:: coarnotify.patterns.announce_service_result.AnnounceServiceResult coarnotify.patterns.announce_service_result.AnnounceServiceResultContext coarnotify.patterns.announce_service_result.AnnounceServiceResultItem coarnotify.patterns.announce_service_result.AnnounceServiceResultObject Module Contents --------------- .. py:class:: AnnounceServiceResult(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyPattern` Class to represent the Announce Service Result Pattern .. py:method:: validate() -> bool Extends the base validation to make `context` required :return: ``True`` if valid, otherwise raises :py:class:`coarnotify.exceptions.ValidationError` .. py:attribute:: TYPE Announce Service Result type, the ActivityStreams Announce type .. py:property:: context :type: Union[AnnounceServiceResultContext, None] Custom getter to retrieve the context property as an AnnounceServiceResultContext :return: AnnounceSericeResultCOntext .. py:property:: object :type: Union[AnnounceServiceResultObject, None] Custom getter to retrieve the object property as an AnnounceServiceResultObject :return: AnnounceServiceResultObject .. py:class:: AnnounceServiceResultContext(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyObject` Custom object class for Announce Service Result to provide the custom item getter .. py:property:: item :type: Union[AnnounceServiceResultItem, None] Custom getter to retrieve the item property as an AnnounceServiceResultItem :return: .. py:class:: AnnounceServiceResultItem(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyItem` Custom item class for Announce Service Result to apply the custom validation .. py:method:: validate() -> bool Beyond the base validation, apply the following: * Make type required and avlid * Make the ``mediaType`` required :return: ``True`` if validation passes, else raise a ``ValidationError`` .. py:class:: AnnounceServiceResultObject(stream: Union[coarnotify.core.activitystreams2.ActivityStream, dict] = None, validate_stream_on_construct=True, validate_properties=True, validators=None, validation_context=None, properties_by_reference=True) Bases: :py:obj:`coarnotify.core.notify.NotifyObject` Custom object class for Announce Service Result to apply the custom validation .. py:method:: validate() -> bool Extend the base validation to include the following constraints: * The object type is required and must validate :return: ``True`` if validation passes, else raise a ``ValidationError``