class PopularTenantQuery
A client value class representing a popular tenant query in Microsoft SharePoint Search API, used to interact with SharePoint's search query functionality for popular tenant-level queries.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/popular_tenant_query.py
4 - 7
simple
Purpose
This class serves as a data transfer object (DTO) for SharePoint's Popular Tenant Query functionality. It inherits from ClientValue, which is part of the Office365 REST API Python client library, and provides the entity type name required for proper serialization and communication with SharePoint's search query services. The class is used to represent and transmit popular tenant query data when interacting with SharePoint's search API.
Source Code
class PopularTenantQuery(ClientValue):
@property
def entity_type_name(self):
return "Microsoft.SharePoint.Client.Search.Query.PopularTenantQuery"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
__init__: Inherits constructor from ClientValue base class. The base class constructor typically accepts keyword arguments that map to the entity's properties as defined by the SharePoint API schema.
Return Value
Instantiation returns a PopularTenantQuery object that can be used to interact with SharePoint's search query API. The entity_type_name property returns a string 'Microsoft.SharePoint.Client.Search.Query.PopularTenantQuery' which identifies this object type to the SharePoint REST API.
Class Interface
Methods
@property entity_type_name(self) -> str
property
Purpose: Returns the fully qualified entity type name used by SharePoint's REST API to identify this object type during serialization and deserialization
Returns: String value 'Microsoft.SharePoint.Client.Search.Query.PopularTenantQuery' 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 this class | instance |
Dependencies
office365-runtime
Required Imports
from office365.runtime.client_value import ClientValue
Usage Example
from office365.runtime.client_value import ClientValue
from office365.sharepoint.client_search.query.popular_tenant_query import PopularTenantQuery
# Instantiate a PopularTenantQuery object
popular_query = PopularTenantQuery()
# Access the entity type name (used internally by the API client)
entity_type = popular_query.entity_type_name
print(entity_type) # Output: Microsoft.SharePoint.Client.Search.Query.PopularTenantQuery
# Typically used within SharePoint search context
# The object would be passed to search API methods or serialized for REST calls
Best Practices
- This class is primarily used internally by the Office365 Python client library for type identification and serialization
- Do not modify the entity_type_name property as it must match the exact SharePoint API entity type
- Instantiate this class when working with SharePoint search queries at the tenant level
- This class follows the ClientValue pattern used throughout the office365-rest-python-client library for representing SharePoint entities
- The class is typically not instantiated directly by end users but rather created and managed by higher-level search API methods
- Ensure proper authentication context is established before using objects of this class in API calls
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class TenantCustomQuerySuggestions 73.4% similar
-
class SearchQuery 69.8% similar
-
class QueryPropertyValue 65.6% similar
-
class QueryContext 65.5% similar
-
class AuditSearchRequestStatus 65.4% similar