api.v1.serializers.mailbox_serializers.MailboxWithDaemonSerializer module¶
Module with the MailboxWithDaemonsSerializer serializer class.
- class api.v1.serializers.mailbox_serializers.MailboxWithDaemonSerializer.MailboxWithDaemonSerializer(*args, **kwargs)[source]¶
Bases:
BaseMailboxSerializerThe standard serializer for a
core.models.Daemon.Includes a nested serializer for the
core.models.Daemon.Daemon.daemonsrelated field.- _declared_fields = {'daemons': BaseDaemonSerializer(many=True, read_only=True): id = BigIntegerField(label='ID', read_only=True) interval = IntervalScheduleSerializer(): id = IntegerField(label='ID', read_only=True) every = IntegerField(help_text='Number of interval periods to wait before running the task again', label='Number of Periods', max_value=2147483647, min_value=1) period = ChoiceField(choices=[('days', 'Days'), ('hours', 'Hours'), ('minutes', 'Minutes'), ('seconds', 'Seconds'), ('microseconds', 'Microseconds')], help_text='The type of period between task runs (Example: days)', label='Interval Period') celery_task = PeriodicTaskSerializer(read_only=True): enabled = BooleanField(help_text='Set to False to disable the schedule', read_only=True) last_run_at = DateTimeField(allow_null=True, help_text='Datetime that the schedule last triggered the task to run. Reset to None if enabled is set to False.', label='Last Run Datetime', read_only=True) total_run_count = IntegerField(help_text='Running count of how many times the schedule has triggered the task', label='Total Run Count', read_only=True) is_healthy = BooleanField(allow_null=True, label='Health status', read_only=True) last_error = CharField(read_only=True, style={'base_template': 'textarea.html'}) last_error_occurred_at = DateTimeField(allow_null=True, label='Time of last error occurrence', read_only=True) created = DateTimeField(label='Time of creation', read_only=True) updated = DateTimeField(label='Time of last update', read_only=True) uuid = UUIDField(label='UUID', read_only=True) fetching_criterion = ChoiceField(choices=[('DAILY', 'All emails received the last DAY'), ('WEEKLY', 'All emails received the last WEEK'), ('MONTHLY', 'All emails received the last MONTH'), ('ANNUALLY', 'All emails received the last YEAR'), ('RECENT', 'All RECENT emails'), ('UNSEEN', 'All UNSEEN emails'), ('SEEN', 'All SEEN emails'), ('ALL', 'All emails'), ('NEW', 'All RECENT and UNSEEN emails'), ('OLD', 'All emails that are not RECENT'), ('FLAGGED', 'FLAGGED emails'), ('UNFLAGGED', 'All emails that are not FLAGGED'), ('DRAFT', 'All email DRAFTs'), ('UNDRAFT', 'All emails that are not DRAFTs'), ('ANSWERED', 'All ANSWERED emails'), ('UNANSWERED', 'All UNANSWERED emails'), ('DELETED', 'All DELETED emails'), ('UNDELETED', 'All UNDELETED emails'), ('KEYWORD {}', 'All emails with the given KEYWORD'), ('UNKEYWORD {}', 'All emails without the given KEYWORD'), ('LARGER {}', 'All emails LARGER than the given size'), ('SMALLER {}', 'All emails SMALLER than the given size'), ('SUBJECT {}', 'All emails with SUBJECT containing the given text'), ('BODY {}', 'All emails with BODY containing the given text'), ('FROM {}', 'All emails sent FROM the given address'), ('SENTSINCE {}', 'All emails SENT SINCE the given date')], default=EmailFetchingCriterionChoices.ALL, help_text='The selection criterion for emails to archive.') fetching_criterion_arg = CharField(allow_blank=True, help_text='Additional value for the selection criterion.', label='Filter value', max_length=255, required=False) mailbox = PrimaryKeyRelatedField(queryset=Mailbox.objects.all(), required=True)}¶
- daemons¶
The emails are serialized by
api.v1.serializers.BaseDaemonSerializer.