🔍 Code Extractor

class PopularTenantQuery

Maturity: 24

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.

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

    A client value class representing tenant-level custom query suggestions for SharePoint Search, inheriting from ClientValue base class.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/tenant_custom_query_suggestions.py
  • class SearchQuery 69.8% similar

    Represents a search query object that encapsulates search terms and optional query templates for SharePoint/Office365 search operations.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/search/query.py
  • class QueryPropertyValue 65.6% similar

    A class representing a typed property value container for SharePoint Client Search Query operations, where only one property type should be set at a time based on the QueryPropertyValueTypeIndex.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/property_value.py
  • class QueryContext 65.5% similar

    QueryContext is a data container class that encapsulates query context properties for Microsoft Office Server Search REST API operations.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/query/context.py
  • class AuditSearchRequestStatus 65.4% similar

    A client value class representing the status of an audit search request in SharePoint Tenant Administration.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/audit/search_request_status.py
← Back to Browse