class CollaborationInsightsData
A data class representing collaboration insights data for SharePoint tenant administration, containing information about collaborative users and the last report date.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/collaboration/insights_data.py
11 - 26
simple
Purpose
This class serves as a data transfer object (DTO) for SharePoint collaboration insights within the Office365 SDK. It encapsulates collaboration metrics including a collection of collaborative users and the timestamp of the last report generation. The class inherits from ClientValue, making it compatible with the Office365 REST API client infrastructure for serialization and deserialization of data exchanged with SharePoint tenant administration endpoints.
Source Code
class CollaborationInsightsData(ClientValue):
def __init__(self, last_report_date=None, collaborative_users=None):
"""
:param str last_report_date:
:param list[CollaborativeUsers] collaborative_users:
"""
self.collaborativeUsers = ClientValueCollection(
CollaborativeUsers, collaborative_users
)
self.lastReportDate = last_report_date
@property
def entity_type_name(self):
return (
"Microsoft.SharePoint.Administration.TenantAdmin.CollaborationInsightsData"
)
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
last_report_date: A string representing the date when the collaboration insights report was last generated. Expected format is typically ISO 8601 date string (e.g., '2024-01-15T10:30:00Z'). Can be None if no report has been generated yet.
collaborative_users: A list of CollaborativeUsers objects containing information about users who have collaborated. Each item represents a user's collaboration metrics. Can be None or an empty list if no collaborative users data is available.
Return Value
Instantiation returns a CollaborationInsightsData object with two main attributes: 'collaborativeUsers' (a ClientValueCollection containing CollaborativeUsers objects) and 'lastReportDate' (a string). The entity_type_name property returns the fully qualified type name used by SharePoint's REST API for this entity type.
Class Interface
Methods
__init__(self, last_report_date=None, collaborative_users=None)
Purpose: Initializes a new instance of CollaborationInsightsData with optional last report date and collaborative users collection
Parameters:
last_report_date: Optional string representing the date of the last collaboration insights reportcollaborative_users: Optional list of CollaborativeUsers objects representing users with collaboration data
Returns: None (constructor)
@property entity_type_name(self) -> str
property
Purpose: Returns the fully qualified entity type name used by SharePoint's REST API to identify this data type
Returns: String containing 'Microsoft.SharePoint.Administration.TenantAdmin.CollaborationInsightsData'
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
collaborativeUsers |
ClientValueCollection[CollaborativeUsers] | A collection of CollaborativeUsers objects representing users who have collaborated, wrapped in a ClientValueCollection for enhanced collection operations | instance |
lastReportDate |
str | A string representing the date and time when the collaboration insights report was last generated, typically in ISO 8601 format | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
from office365.runtime.client_value_collection import ClientValueCollection
from office365.sharepoint.administration.tenant_admin.collaborative_users import CollaborativeUsers
Usage Example
from office365.sharepoint.administration.tenant_admin.collaboration_insights_data import CollaborationInsightsData
from office365.sharepoint.administration.tenant_admin.collaborative_users import CollaborativeUsers
# Create a collaborative user
user1 = CollaborativeUsers()
# Instantiate with data
insights = CollaborationInsightsData(
last_report_date='2024-01-15T10:30:00Z',
collaborative_users=[user1]
)
# Access attributes
print(insights.lastReportDate)
print(len(insights.collaborativeUsers))
print(insights.entity_type_name)
# Create empty instance
empty_insights = CollaborationInsightsData()
print(empty_insights.lastReportDate) # None
print(len(empty_insights.collaborativeUsers)) # 0
Best Practices
- This class is primarily used as a data container and should not contain business logic
- Instantiate with appropriate data types: last_report_date as string, collaborative_users as list
- The collaborativeUsers attribute is automatically wrapped in a ClientValueCollection, providing collection-specific functionality
- Do not modify the entity_type_name property as it's used internally by the Office365 SDK for API communication
- This class is typically instantiated by the Office365 SDK when deserializing API responses, but can be manually created for testing or data manipulation
- The class inherits from ClientValue, which provides serialization capabilities for REST API communication
- When passing collaborative_users, ensure each item is a CollaborativeUsers instance or compatible object
- The lastReportDate should be in ISO 8601 format for consistency with SharePoint API expectations
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class CollaborationInsightsOverview 89.9% similar
-
class CollaborativeUsers 70.9% similar
-
class OneDriveSiteSharingInsights 70.3% similar
-
class TopFilesSharingInsights 67.9% similar
-
class AuditData 67.0% similar