🔍 Code Extractor

class CallOptions

Maturity: 47

A data class that encapsulates optional configuration features for Microsoft Teams/Office 365 call functionality, specifically controlling bot visibility after escalation and content sharing notifications.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/communications/calls/options.py
Lines:
4 - 20
Complexity:
simple

Purpose

CallOptions serves as a configuration container for call-related features in Office 365/Microsoft Teams integrations. It inherits from ClientValue (a base class for client-side value objects) and provides two optional boolean flags: one to control whether a bot should be hidden after a call is escalated to a human agent, and another to enable/disable content sharing notifications during calls. This class is typically used when configuring or initiating calls through the Office 365 SDK.

Source Code

class CallOptions(ClientValue):
    """Represents an abstract base class that contains the optional features for a call."""

    def __init__(
        self,
        hide_bot_after_escalation=None,
        is_content_sharing_notification_enabled=None,
    ):
        """
        :param bool hide_bot_after_escalation: Indicates whether to hide the app after the call is escalated.
        :param bool is_content_sharing_notification_enabled: Indicates whether content sharing notifications should be
           enabled for the call.
        """
        self.hideBotAfterEscalation = hide_bot_after_escalation
        self.isContentSharingNotificationEnabled = (
            is_content_sharing_notification_enabled
        )

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

hide_bot_after_escalation: Optional boolean flag that determines whether the bot interface should be hidden from the call UI after the call has been escalated to a human agent. When set to True, the bot will be hidden post-escalation; when False or None, the bot remains visible. Default is None.

is_content_sharing_notification_enabled: Optional boolean flag that controls whether notifications should be displayed when content sharing occurs during the call. When set to True, users will receive notifications about content sharing activities; when False or None, these notifications are suppressed. Default is None.

Return Value

Instantiation returns a CallOptions object with two instance attributes (hideBotAfterEscalation and isContentSharingNotificationEnabled) set according to the provided parameters. The object can be used as a configuration parameter for call-related operations in the Office 365 SDK.

Class Interface

Methods

__init__(self, hide_bot_after_escalation=None, is_content_sharing_notification_enabled=None)

Purpose: Initializes a CallOptions instance with optional configuration flags for call behavior

Parameters:

  • hide_bot_after_escalation: Optional boolean to control bot visibility after call escalation (default: None)
  • is_content_sharing_notification_enabled: Optional boolean to enable/disable content sharing notifications (default: None)

Returns: None (constructor)

Attributes

Name Type Description Scope
hideBotAfterEscalation bool or None Stores whether the bot should be hidden after call escalation. Maps to the hide_bot_after_escalation constructor parameter using camelCase naming convention. instance
isContentSharingNotificationEnabled bool or None Stores whether content sharing notifications should be enabled for the call. Maps to the is_content_sharing_notification_enabled constructor parameter using camelCase naming convention. instance

Dependencies

  • office365

Required Imports

from office365.runtime.client_value import ClientValue

Usage Example

from office365.runtime.client_value import ClientValue

# Create CallOptions with both features enabled
call_options = CallOptions(
    hide_bot_after_escalation=True,
    is_content_sharing_notification_enabled=True
)

# Create CallOptions with only bot hiding enabled
call_options_minimal = CallOptions(
    hide_bot_after_escalation=True
)

# Create CallOptions with default values (all None)
call_options_default = CallOptions()

# Access the attributes
print(call_options.hideBotAfterEscalation)  # True
print(call_options.isContentSharingNotificationEnabled)  # True

# Typically used when configuring a call
# call_manager.initiate_call(options=call_options)

Best Practices

  • This class is a simple data container with no methods beyond __init__, so instantiation is straightforward with no complex lifecycle management
  • Both parameters are optional; instantiate with only the features you need to configure, leaving others as None for default behavior
  • The class uses camelCase for internal attribute names (hideBotAfterEscalation, isContentSharingNotificationEnabled) to match Office 365 API conventions, while constructor parameters use snake_case following Python conventions
  • This class inherits from ClientValue, which likely provides serialization/deserialization capabilities for API communication
  • Instances are typically immutable after creation; if you need different options, create a new instance rather than modifying existing attributes
  • Use this class as part of a larger call configuration workflow in the Office 365 SDK, not as a standalone component
  • When both parameters are None, the class represents default call behavior without any special options enabled

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class SharePointOneDriveOptions 63.8% similar

    A data class that encapsulates search content options for SharePoint and OneDrive searches performed using application permissions.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/search/sharepoint_onedrive_options.py
  • class MoveCopyOptions 63.7% similar

    A configuration class that encapsulates options for move and copy operations in SharePoint, controlling behavior like conflict resolution, metadata preservation, and lock bypassing.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/utilities/move_copy_options.py
  • class FilePickerOptions 61.1% similar

    A configuration class for SharePoint file picker options that extends ClientValue to specify search settings and organizational asset repositories.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/publishing/file_picker_options.py
  • class BaseGptRequestOptions 61.0% similar

    BaseGptRequestOptions is a base class that inherits from ClientValue, serving as a foundation for GPT request configuration options in the Office365 library.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/gtp/base_request_options.py
  • class CallRoute 58.5% similar

    CallRoute is a data class that represents a call route type in the Office 365 API, inheriting from ClientValue to provide serialization capabilities.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/communications/calls/route.py
← Back to Browse