class AttendeeAvailability
A data class representing the availability status of an attendee for a calendar event in Microsoft Outlook.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/calendar/attendees/availability.py
5 - 15
simple
Purpose
This class encapsulates information about an attendee's availability for calendar events. It combines attendee details (email, type, requirement status) with their availability status (free, busy, tentative, etc.). It inherits from ClientValue, making it suitable for serialization and transmission in Office 365 API requests. This class is typically used when checking or displaying attendee availability for meeting scheduling in Outlook calendar operations.
Source Code
class AttendeeAvailability(ClientValue):
"""The availability of an attendees."""
def __init__(self, attendee=AttendeeBase(), availability=None):
"""
:param AttendeeBase attendee: The email address and type of attendee - whether it's a person or a resource,
and whether required or optional if it's a person.
:param str availability: The availability status of the attendee.
"""
self.attendee = attendee
self.availability = availability
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
attendee: An AttendeeBase object containing the attendee's email address, type (person or resource), and whether they are required or optional. Defaults to an empty AttendeeBase() instance if not provided. This parameter identifies who the availability information is for.
availability: A string representing the availability status of the attendee. Common values include 'free', 'busy', 'tentative', 'workingElsewhere', 'oof' (out of office), or 'unknown'. Defaults to None if not specified. This indicates the attendee's calendar status at a particular time.
Return Value
Instantiation returns an AttendeeAvailability object that holds attendee information and their availability status. The object has two accessible attributes: 'attendee' (AttendeeBase) and 'availability' (str or None). This object can be used in Office 365 API calls or serialized as part of calendar-related requests.
Class Interface
Methods
__init__(attendee=AttendeeBase(), availability=None)
Purpose: Initializes an AttendeeAvailability instance with attendee details and availability status
Parameters:
attendee: AttendeeBase object containing attendee information (email, type, requirement status). Defaults to empty AttendeeBase()availability: String representing the availability status (e.g., 'free', 'busy', 'tentative'). Defaults to None
Returns: None (constructor)
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
attendee |
AttendeeBase | The attendee object containing email address, type (person/resource), and requirement status (required/optional) | instance |
availability |
str or None | The availability status of the attendee (e.g., 'free', 'busy', 'tentative', 'workingElsewhere', 'oof', 'unknown') | instance |
Dependencies
office365
Required Imports
from office365.outlook.calendar.attendees.base import AttendeeBase
from office365.outlook.calendar.attendees.availability import AttendeeAvailability
Usage Example
from office365.outlook.calendar.attendees.base import AttendeeBase
from office365.outlook.calendar.attendees.availability import AttendeeAvailability
# Create an attendee
attendee = AttendeeBase()
attendee.email_address = 'john.doe@example.com'
attendee.type = 'required'
# Create availability information
availability_info = AttendeeAvailability(
attendee=attendee,
availability='busy'
)
# Access the properties
print(f"Attendee: {availability_info.attendee.email_address}")
print(f"Status: {availability_info.availability}")
# Create with defaults
default_availability = AttendeeAvailability()
default_availability.availability = 'free'
Best Practices
- Always provide a valid AttendeeBase object when creating an AttendeeAvailability instance to ensure proper attendee identification
- Use standard availability status strings ('free', 'busy', 'tentative', 'workingElsewhere', 'oof', 'unknown') for consistency with Office 365 API
- This class is a data container and does not perform validation; ensure data is validated before instantiation
- Since it inherits from ClientValue, this object is designed for serialization and should be used in conjunction with Office 365 API client methods
- The default AttendeeBase() instance may not be useful; explicitly provide attendee details for meaningful availability tracking
- This class is immutable by convention; avoid modifying attributes after creation unless necessary for your use case
- When used in API requests, the Office 365 SDK will handle serialization automatically
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class Attendee 72.5% similar
-
class ScheduleInformation 71.8% similar
-
class ScheduleItem 69.8% similar
-
class AttendeeBase 69.7% similar
-
class Event 65.5% similar