class TranslationNotificationRecipientSetRequest
A request class that encapsulates a collection of translation notification recipients for SharePoint translation operations.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/translation/notification_recipient_set_request.py
8 - 12
simple
Purpose
This class serves as a data transfer object (DTO) for specifying notification recipients when requesting translation operations in SharePoint. It inherits from ClientValue, making it serializable for client-server communication. The class wraps a collection of TranslationNotificationRecipient objects, allowing multiple recipients to be specified for translation notifications.
Source Code
class TranslationNotificationRecipientSetRequest(ClientValue):
def __init__(self, notification_recipients=None):
self.NotificationRecipients = ClientValueCollection(
TranslationNotificationRecipientCollection, notification_recipients
)
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
notification_recipients: Optional parameter that accepts an initial collection of notification recipients. Can be None (default), a list of TranslationNotificationRecipient objects, or another iterable containing recipient data. When provided, these recipients are wrapped in a ClientValueCollection for proper serialization and management.
Return Value
Instantiation returns a TranslationNotificationRecipientSetRequest object with a NotificationRecipients attribute containing a ClientValueCollection of TranslationNotificationRecipientCollection type. This object can be used in SharePoint translation API calls to specify who should receive notifications.
Class Interface
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
NotificationRecipients |
ClientValueCollection[TranslationNotificationRecipientCollection] | A collection that holds TranslationNotificationRecipient objects representing the users or email addresses that should receive notifications about translation operations. This collection can be modified after instantiation using standard collection methods. | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
from office365.runtime.client_value_collection import ClientValueCollection
from office365.sharepoint.translation.notification_recipient import TranslationNotificationRecipientCollection
Usage Example
from office365.sharepoint.translation.notification_recipient_set_request import TranslationNotificationRecipientSetRequest
from office365.sharepoint.translation.notification_recipient import TranslationNotificationRecipient
# Create individual recipients
recipient1 = TranslationNotificationRecipient(email='user1@example.com')
recipient2 = TranslationNotificationRecipient(email='user2@example.com')
# Create request with recipients
request = TranslationNotificationRecipientSetRequest(
notification_recipients=[recipient1, recipient2]
)
# Or create empty and add later
request = TranslationNotificationRecipientSetRequest()
request.NotificationRecipients.add(recipient1)
# Use in SharePoint translation API call
# translation_job.set_notification_recipients(request)
Best Practices
- Always ensure notification_recipients parameter contains valid TranslationNotificationRecipient objects if provided
- The class is immutable after construction except for modifications to the NotificationRecipients collection
- Use this class as part of SharePoint translation workflow, not as a standalone component
- The NotificationRecipients attribute is a ClientValueCollection, which provides collection management methods like add(), remove(), and clear()
- This class inherits from ClientValue, making it automatically serializable for SharePoint API calls
- Pass None or an empty list to notification_recipients if no initial recipients are needed
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class TranslationNotificationRecipientCollection 83.5% similar
-
class TranslationNotificationRecipient 81.0% similar
-
class TranslationNotificationRecipientUsers 78.5% similar
-
class TranslationStatusSetRequest 76.0% similar
-
class RequestedTranslation 70.6% similar