Skip to main content

Module models

Module models 

Source
Expand description

Wire types for the Microsoft Graph dataSecurityAndGovernance processContent API.

Field names and nesting mirror Python’s agent_framework_purview._models (which in turn mirrors the Graph API’s OData shape: @odata.type discriminators, camelCase field names). Only the subset this port’s processContent call actually sends/receives is modeled — the full Python module additionally defines protectionScopes/contentActivities request/response types for the two other Graph endpoints this port intentionally does not call (see the crate docs’ “Scope” section).

Structs§

ActivityMetadata
ActivityMetadata: wraps an Activity for contentToProcess.
ContentToProcess
microsoft.graph.contentToProcess: the full bundle of content + activity/device/app metadata sent to processContent.
DeviceMetadata
microsoft.graph.deviceMetadata.
DlpActionInfo
One policy action returned by processContent. A response is a block verdict when any entry has action == BlockAccess or restriction_action == Block — see ProcessContentResponse::should_block.
IntegratedAppMetadata
microsoft.graph.integratedAppMetadata: the calling application’s identity (name/version), independent of where it’s deployed (see PolicyLocation for that).
OperatingSystemSpecifications
microsoft.graph.operatingSystemSpecifications, nested under DeviceMetadata. This port always sends "Unknown"/"Unknown", matching Python’s _map_messages (which hardcodes the same values — device introspection is out of scope for both).
PolicyLocation
A policy location (@odata.type + value), e.g. microsoft.graph.policyLocationApplication. Mirrors Python’s PolicyLocation; see crate::settings::PurviewAppLocation::to_policy_location for how the crate’s public PurviewLocationType enum maps to the @odata.type string.
ProcessContentRequest
The processContent request body. Mirrors Python’s ProcessContentRequest; scope_identifier (sent as an If-None-Match header, not a body field, and only meaningful after a protectionScopes/compute precheck this port doesn’t perform) and process_inline (ditto — derived from that same precheck’s execution mode) are intentionally not modeled. See the crate docs’ “Scope” section.
ProcessContentResponse
The processContent response body. Mirrors Python’s ProcessContentResponse.
ProcessConversationMetadata
microsoft.graph.processConversationMetadata: one message’s content plus identity metadata. ContentToProcess::content_entries carries a list of these, though this port’s ContentProcessor only ever sends one per processContent call (mirrors Python’s _map_messages, which builds one whole ProcessContentRequest — with a single-element content_entries — per Message, not one batched request for all of them).
ProcessingError
One entry of processingErrors on a processContent response.
ProtectedAppMetadata
microsoft.graph.protectedAppMetadata: the app’s identity plus where it’s running, for policy location matching.
PurviewTextContent
microsoft.graph.textContent: the message text being evaluated.

Enums§

Activity
High-level activity type describing what’s being done with content. Mirrors Python’s Activity enum. Only UploadText is ever sent by this port’s middleware — see the crate docs for why both the prompt and response checks use it (faithfully mirroring the Python reference, which does the same, DownloadText notwithstanding).
DlpAction
blockAccess vs. anything else. Mirrors Python’s DlpAction.
ProtectionScopeState
Whether a protection scope’s applicability has changed since it was last computed/cached. This port doesn’t cache (see the crate docs), so this is informational only — surfaced for callers who want it, not acted on internally.
RestrictionAction
block vs. anything else. Mirrors Python’s RestrictionAction.