🔍 Code Extractor

class DlpClassificationResult

Maturity: 24

A class representing the result of a DLP (Data Loss Prevention) classification operation in SharePoint's compliance policy system.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/compliance/dlp_classification_result.py
Lines:
4 - 7
Complexity:
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

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class PageDiagnosticsResult 64.9% similar

    A client value class representing diagnostic results for SharePoint Publishing pages, inheriting from ClientValue to provide serialization capabilities for SharePoint API interactions.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/publishing/diagnostics/page_result.py
  • class PromotedResultsOperationsResult 64.2% similar

    A data class representing the result of a REST API call to retrieve promoted search results from SharePoint/Office 365.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/promoted_results_operations_result.py
  • class SiteHealthResult 64.1% similar

    A data class representing the result of running a SharePoint site collection health rule, containing the rule's message, help link, and identifier.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/sitehealth/result.py
  • class DlpPolicyTip 64.0% similar

    A class representing Data Loss Protection (DLP) policy information for SharePoint items, providing details about policy restrictions, compliance, and matched conditions.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/policy/dlp_policy_tip.py
  • class PersonalResultSuggestion 62.5% similar

    A data class representing a personal search result suggestion from SharePoint Search, containing metadata about suggested results including title, URL, and best bet status.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/personal_result_suggestion.py
← Back to Browse