class SPMachineLearningHub
A class named SPMachineLearningHub
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/contentcenter/machinelearning/hub.py
21 - 117
moderate
Purpose
No detailed description available
Source Code
class SPMachineLearningHub(Entity):
def get_by_content_type_id(self, content_type_id):
"""
:param str content_type_id:
"""
return_type = SyntexModelsLandingInfo(self.context)
payload = {"contentTypeId": content_type_id}
qry = ServiceOperationQuery(
self, "GetByContentTypeId", None, payload, None, return_type
)
self.context.add_query(qry)
return return_type
def get_models(
self,
list_id=None,
model_types=None,
publication_types=None,
include_management_not_allowed_models=None,
):
"""
:param str list_id:
:param int model_types:
:param int publication_types:
:param bool include_management_not_allowed_models:
"""
return_type = SPMachineLearningModelCollection(self.context)
payload = {
"listId": list_id,
"modelTypes": model_types,
"publicationTypes": publication_types,
"includeManagementNotAllowedModels": include_management_not_allowed_models,
}
qry = ServiceOperationQuery(self, "GetModels", None, payload, None, return_type)
self.context.add_query(qry)
return return_type
def get_retention_labels(self):
return_type = ClientResult(self.context, ClientValueCollection(ComplianceTag))
qry = ServiceOperationQuery(
self, "GetRetentionLabels", None, None, None, return_type
)
self.context.add_query(qry)
return return_type
def get_property(self, name, default_value=None):
if default_value is None:
property_mapping = {
"MachineLearningEnabled": self.machine_learning_enabled,
}
default_value = property_mapping.get(name, None)
return super(SPMachineLearningHub, self).get_property(name, default_value)
@property
def is_default_content_center(self):
"""
:rtype: bool
"""
return self.properties.get("IsDefaultContentCenter", None)
@property
def machine_learning_capture_enabled(self):
"""
:rtype: bool
"""
return self.properties.get("MachineLearningCaptureEnabled", None)
@property
def machine_learning_enabled(self):
return self.properties.get(
"MachineLearningEnabled",
SPMachineLearningEnabled(
self.context, ResourcePath("MachineLearningEnabled", self.resource_path)
),
)
@property
def models(self):
return self.properties.get(
"Models",
SPMachineLearningModelCollection(
self.context, ResourcePath("Models", self.resource_path)
),
)
@property
def samples(self):
return self.properties.get(
"Samples",
SPMachineLearningSampleCollection(
self.context, ResourcePath("Samples", self.resource_path)
),
)
@property
def entity_type_name(self):
return "Microsoft.Office.Server.ContentCenter.SPMachineLearningHub"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
Entity | - |
Parameter Details
bases: Parameter of type Entity
Return Value
Returns unspecified type
Class Interface
Methods
get_by_content_type_id(self, content_type_id)
Purpose: :param str content_type_id:
Parameters:
content_type_id: Parameter
Returns: None
get_models(self, list_id, model_types, publication_types, include_management_not_allowed_models)
Purpose: :param str list_id: :param int model_types: :param int publication_types: :param bool include_management_not_allowed_models:
Parameters:
list_id: Parametermodel_types: Parameterpublication_types: Parameterinclude_management_not_allowed_models: Parameter
Returns: None
get_retention_labels(self)
Purpose: Retrieves retention labels
Returns: None
get_property(self, name, default_value)
Purpose: Retrieves property
Parameters:
name: Parameterdefault_value: Parameter
Returns: None
is_default_content_center(self)
property
Purpose: :rtype: bool
Returns: None
machine_learning_capture_enabled(self)
property
Purpose: :rtype: bool
Returns: None
machine_learning_enabled(self)
property
Purpose: Performs machine learning enabled
Returns: None
models(self)
property
Purpose: Performs models
Returns: None
samples(self)
property
Purpose: Performs samples
Returns: None
entity_type_name(self)
property
Purpose: Performs entity type name
Returns: None
Required Imports
from office365.runtime.client_result import ClientResult
from office365.runtime.client_value_collection import ClientValueCollection
from office365.runtime.paths.resource_path import ResourcePath
from office365.runtime.queries.service_operation import ServiceOperationQuery
from office365.sharepoint.compliance.tag import ComplianceTag
Usage Example
# Example usage:
# result = SPMachineLearningHub(bases)
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class SPHSite 59.5% similar
-
class SPMachineLearningModel 57.3% similar
-
class SPMachineLearningSample 56.0% similar
-
class SPMachineLearningModelCollection 55.7% similar
-
class SPMachineLearningSampleEntityData 55.4% similar