class MachineLearningSampleMeta
A metadata class representing machine learning sample metadata in SharePoint, inheriting from ClientValue to provide entity type information for SharePoint API interactions.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/contentcenter/machinelearning/samples/meta.py
4 - 7
simple
Purpose
This class serves as a data model for machine learning sample metadata within the Office 365 SharePoint framework. It extends ClientValue to provide proper serialization and type identification for SharePoint REST API operations. The primary responsibility is to identify itself as a 'SP.MachineLearningSampleMeta' entity type when communicating with SharePoint services, enabling proper handling of machine learning sample metadata in SharePoint operations.
Source Code
class MachineLearningSampleMeta(ClientValue):
@property
def entity_type_name(self):
return "SP.MachineLearningSampleMeta"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
bases: Inherits from ClientValue, which provides base functionality for client-side value objects in the Office 365 SDK. This inheritance enables proper serialization, deserialization, and type handling for SharePoint API communications.
Return Value
Instantiation returns a MachineLearningSampleMeta object that can be used to represent machine learning sample metadata in SharePoint operations. The entity_type_name property returns the string 'SP.MachineLearningSampleMeta', which identifies the SharePoint entity type for API operations.
Class Interface
Methods
@property entity_type_name(self) -> str
property
Purpose: Returns the SharePoint entity type name for this metadata class, used by the Office 365 SDK to properly identify and serialize the object in API communications
Returns: A string constant 'SP.MachineLearningSampleMeta' that identifies this entity type in SharePoint
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
entity_type_name |
str | Read-only property that returns the SharePoint entity type identifier 'SP.MachineLearningSampleMeta' | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
from office365.sharepoint.machinelearning.sample_meta import MachineLearningSampleMeta
Usage Example
from office365.runtime.client_value import ClientValue
from office365.sharepoint.machinelearning.sample_meta import MachineLearningSampleMeta
# Instantiate the metadata object
sample_meta = MachineLearningSampleMeta()
# Access the entity type name (used internally by SharePoint API)
entity_type = sample_meta.entity_type_name
print(entity_type) # Output: 'SP.MachineLearningSampleMeta'
# Typically used within SharePoint context operations
# The object would be passed to SharePoint API methods that handle ML sample metadata
Best Practices
- This class is primarily used internally by the Office 365 SDK for type identification in SharePoint API calls
- Do not modify the entity_type_name property as it must match the SharePoint server-side entity type
- Instantiate this class when working with machine learning sample metadata in SharePoint contexts
- The class follows the ClientValue pattern for SharePoint entity representation
- Typically used in conjunction with SharePoint context objects and API methods that handle ML samples
- This is a lightweight metadata class with no state management or side effects
- No specific initialization parameters are required; the class uses default ClientValue initialization
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class SPMachineLearningSample 78.0% similar
-
class SPMachineLearningSampleEntityData 77.3% similar
-
class SPMachineLearningModel 71.7% similar
-
class SPMachineLearningSampleCollection 71.6% similar
-
class SPMachineLearningModelEntityData 71.2% similar