class ParticipantInfo
A data class that stores additional properties about a participant's identity, specifically their country code location information.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/communications/calls/participant_info.py
4 - 12
simple
Purpose
ParticipantInfo is a value object that encapsulates metadata about a participant in a call or communication session. It inherits from ClientValue, making it suitable for serialization and transmission in client-server communications. The primary use case is to track the geographical location (country) of participants at the start of a call, which can be useful for analytics, compliance, routing, or localization purposes.
Source Code
class ParticipantInfo(ClientValue):
"""Contains additional properties about the participant identity"""
def __init__(self, country_code=None):
"""
:param str country_code: The ISO 3166-1 Alpha-2 country code of the participant's best estimated physical
location at the start of the call.
"""
self.countryCode = country_code
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
country_code: Optional string parameter representing the ISO 3166-1 Alpha-2 country code (e.g., 'US', 'GB', 'DE') of the participant's estimated physical location at the start of the call. This should be a two-letter uppercase country code following the ISO 3166-1 Alpha-2 standard. Can be None if the location is unknown or not determined.
Return Value
Instantiation returns a ParticipantInfo object with the countryCode attribute set to the provided value or None. The class inherits from ClientValue, which likely provides serialization capabilities for client-server communication. No methods return values as this is primarily a data container class.
Class Interface
Methods
__init__(self, country_code=None) -> None
Purpose: Initializes a new ParticipantInfo instance with optional country code information
Parameters:
country_code: Optional string representing the ISO 3166-1 Alpha-2 country code of the participant's estimated physical location at call start. Defaults to None if not provided.
Returns: None - this is a constructor that initializes the instance
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
countryCode |
str or None | Stores the ISO 3166-1 Alpha-2 country code representing the participant's best estimated physical location at the start of the call. Can be None if location is unknown. | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
Usage Example
from office365.runtime.client_value import ClientValue
class ParticipantInfo(ClientValue):
def __init__(self, country_code=None):
self.countryCode = country_code
# Create a participant with a known country code
participant_us = ParticipantInfo(country_code='US')
print(participant_us.countryCode) # Output: US
# Create a participant with unknown location
participant_unknown = ParticipantInfo()
print(participant_unknown.countryCode) # Output: None
# Create a participant from UK
participant_uk = ParticipantInfo(country_code='GB')
print(participant_uk.countryCode) # Output: GB
Best Practices
- Always use valid ISO 3166-1 Alpha-2 country codes (two-letter uppercase format) when providing the country_code parameter
- This class is immutable by design - set the country_code during instantiation rather than modifying it later
- The country_code represents the participant's location at the START of the call, not their current location
- Handle None values appropriately as the country_code may be unknown or undetermined
- Since this inherits from ClientValue, it is designed for serialization - ensure any modifications maintain serialization compatibility
- Use this class as a value object - create new instances rather than modifying existing ones to maintain immutability principles
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class MeetingParticipantInfo 76.4% similar
-
class InvitationParticipantInfo 65.8% similar
-
class LocaleInfo 64.5% similar
-
class MeetingInfo 59.7% similar
-
class MeetingParticipants 59.3% similar