🔍 Code Extractor

class MessageRuleActions

Maturity: 33

Represents the set of actions that are available to a rule.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/mail/messages/rules/actions.py
Lines:
7 - 51
Complexity:
moderate

Purpose

Represents the set of actions that are available to a rule.

Source Code

class MessageRuleActions(ClientValue):
    """Represents the set of actions that are available to a rule."""

    def __init__(
        self,
        assign_categories=None,
        copy_to_folder=None,
        delete=None,
        forward_as_attachment_to=None,
        forward_to=None,
        mark_as_read=None,
        mark_importance=None,
        move_to_folder=None,
        permanent_delete=None,
        redirect_to=None,
        stop_processing_rules=None,
    ):
        """
        :param list[str] assign_categories: A list of categories to be assigned to a message.
        :param str copy_to_folder: The ID of a folder that a message is to be copied to.
        :param bool delete: Indicates whether a message should be moved to the Deleted Items folder.
        :param list[Recipient] forward_as_attachment_to: The email addresses of the recipients to which a message
            should be forwarded as an attachment.
        :param list[Recipient] forward_to: The email addresses of the recipients to which a message should be forwarded.
        :param bool mark_as_read: Indicates whether a message should be marked as read.
        :param str mark_importance: Sets the importance of the message, which can be: low, normal, high.
        :param str move_to_folder: The ID of the folder that a message will be moved to.
        :param bool permanent_delete: Indicates whether a message should be permanently deleted and not saved to the
            Deleted Items folder.
        :param list[Recipient] redirect_to: The email addresses to which a message should be redirected.
        :param bool stop_processing_rules: Indicates whether subsequent rules should be evaluated.
        """
        self.assignCategories = StringCollection(assign_categories)
        self.copyToFolder = copy_to_folder
        self.delete = delete
        self.forwardAsAttachmentTo = ClientValueCollection(
            Recipient, forward_as_attachment_to
        )
        self.forwardTo = ClientValueCollection(Recipient, forward_to)
        self.markAsRead = mark_as_read
        self.markImportance = mark_importance
        self.moveToFolder = move_to_folder
        self.permanentDelete = permanent_delete
        self.redirectTo = ClientValueCollection(Recipient, redirect_to)
        self.stopProcessingRules = stop_processing_rules

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

bases: Parameter of type ClientValue

Return Value

Returns unspecified type

Class Interface

Methods

__init__(self, assign_categories, copy_to_folder, delete, forward_as_attachment_to, forward_to, mark_as_read, mark_importance, move_to_folder, permanent_delete, redirect_to, stop_processing_rules)

Purpose: :param list[str] assign_categories: A list of categories to be assigned to a message. :param str copy_to_folder: The ID of a folder that a message is to be copied to. :param bool delete: Indicates whether a message should be moved to the Deleted Items folder. :param list[Recipient] forward_as_attachment_to: The email addresses of the recipients to which a message should be forwarded as an attachment. :param list[Recipient] forward_to: The email addresses of the recipients to which a message should be forwarded. :param bool mark_as_read: Indicates whether a message should be marked as read. :param str mark_importance: Sets the importance of the message, which can be: low, normal, high. :param str move_to_folder: The ID of the folder that a message will be moved to. :param bool permanent_delete: Indicates whether a message should be permanently deleted and not saved to the Deleted Items folder. :param list[Recipient] redirect_to: The email addresses to which a message should be redirected. :param bool stop_processing_rules: Indicates whether subsequent rules should be evaluated.

Parameters:

  • assign_categories: Parameter
  • copy_to_folder: Parameter
  • delete: Parameter
  • forward_as_attachment_to: Parameter
  • forward_to: Parameter
  • mark_as_read: Parameter
  • mark_importance: Parameter
  • move_to_folder: Parameter
  • permanent_delete: Parameter
  • redirect_to: Parameter
  • stop_processing_rules: Parameter

Returns: None

Required Imports

from office365.outlook.mail.recipient import Recipient
from office365.runtime.client_value import ClientValue
from office365.runtime.client_value_collection import ClientValueCollection
from office365.runtime.types.collections import StringCollection

Usage Example

# Example usage:
# result = MessageRuleActions(bases)

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class MessageRule 58.5% similar

    A class representing an Outlook message rule that defines conditions, actions, and exceptions for automatically processing incoming messages in a user's Inbox.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/mail/messages/rules/rule.py
  • class MessageRulePredicates 48.4% similar

    A data class representing conditions and exceptions for email message rules in Microsoft Outlook, inheriting from ClientValue.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/mail/messages/rules/predicates.py
  • class UnifiedRolePermission 45.6% similar

    A data class representing a collection of allowed and excluded resource actions with optional conditions for permission enforcement in a unified role-based access control system.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/rolemanagement/unified_role_permission.py
  • class ProvisioningAction 42.9% similar

    An empty class definition named ProvisioningAction with no implemented methods or attributes.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/audit/provisioning/action.py
  • class Message 42.8% similar

    Represents an email message in a Microsoft Outlook mailbox folder, providing methods for message operations like sending, replying, forwarding, and managing attachments.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/mail/messages/message.py
← Back to Browse