class DlpClassificationResult
A class representing the result of a DLP (Data Loss Prevention) classification operation in SharePoint's compliance policy system.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/compliance/dlp_classification_result.py
4 - 7
simple
Purpose
DlpClassificationResult is a data transfer object that encapsulates the results of DLP classification operations within SharePoint's compliance policy framework. It inherits from ClientValue, which is part of the Office365 REST API client library, and provides a standardized way to represent DLP classification data when communicating with SharePoint services. The class primarily serves as a type identifier for serialization/deserialization of DLP classification results in API responses.
Source Code
class DlpClassificationResult(ClientValue):
@property
def entity_type_name(self):
return "SP.CompliancePolicy.DlpClassificationResult"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
__init__: The constructor parameters are inherited from ClientValue base class. Typically accepts keyword arguments that map to properties of the SharePoint DLP classification result entity.
Return Value
Instantiation returns a DlpClassificationResult object that can be used to represent DLP classification data. The entity_type_name property returns the string 'SP.CompliancePolicy.DlpClassificationResult', which identifies this object type in SharePoint's REST API.
Class Interface
Methods
@property entity_type_name(self) -> str
property
Purpose: Returns the SharePoint entity type name for DLP classification results, used for API serialization and type identification
Returns: String 'SP.CompliancePolicy.DlpClassificationResult' representing the SharePoint entity type
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
entity_type_name |
str | Read-only property that returns the SharePoint entity type identifier for DLP classification results | instance |
Dependencies
office365-rest-python-client
Required Imports
from office365.runtime.client_value import ClientValue
from office365.sharepoint.compliancepolicy.dlp_classification_result import DlpClassificationResult
Usage Example
from office365.runtime.client_value import ClientValue
from office365.sharepoint.compliancepolicy.dlp_classification_result import DlpClassificationResult
# Typically instantiated by the Office365 library when deserializing API responses
# Direct instantiation example:
result = DlpClassificationResult()
# Access the entity type name (used internally by the library)
entity_type = result.entity_type_name
print(entity_type) # Output: SP.CompliancePolicy.DlpClassificationResult
# In practice, you would receive this object from SharePoint API calls
# Example in context of a SharePoint client operation:
# ctx = ClientContext(site_url).with_credentials(credentials)
# dlp_results = ctx.web.get_dlp_classification_results()
# ctx.execute_query()
# for result in dlp_results:
# print(result.entity_type_name)
Best Practices
- This class is typically instantiated automatically by the Office365 REST client library during API response deserialization, not manually by users
- The entity_type_name property is used internally by the serialization framework to identify the SharePoint entity type
- Do not modify the entity_type_name property as it must match the SharePoint REST API entity type exactly
- This class serves as a data container and should be treated as immutable once populated by the API
- Ensure proper authentication and permissions are configured in the parent ClientContext before attempting to retrieve DLP classification results
- This class is part of a larger Office365 client library ecosystem and should be used in conjunction with ClientContext and related classes
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class PageDiagnosticsResult 64.9% similar
-
class PromotedResultsOperationsResult 64.2% similar
-
class SiteHealthResult 64.1% similar
-
class DlpPolicyTip 64.0% similar
-
class PersonalResultSuggestion 62.5% similar