o
    ,Âif  ã                   @   s€   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZ d dlmZ d dlmZ d d	lmZ G d
d„ deƒZdS )é    )ÚEntity)ÚEntityCollection)ÚOutlookCategory)Ú
LocaleInfo)ÚTimeZoneInformation)ÚClientResult)ÚClientValueCollection)ÚResourcePath)ÚFunctionQueryc                       s>   e Zd ZdZdd„ Zdd„ Zedd„ ƒZd‡ fd	d
„	Z‡  Z	S )ÚOutlookUserz4Represents the Outlook services available to a user.c                 C   ó.   t | jttƒƒ}t| dd|ƒ}| j |¡ |S )aQ  
        Get the list of locales and languages that are supported for the user, as configured on the user's
        mailbox server. When setting up an Outlook client, the user selects the preferred language from this supported
        list. You can subsequently get the preferred language by getting the user's mailbox settings.
        ÚsupportedLanguagesN)r   Úcontextr   r   r
   Ú	add_query©ÚselfÚreturn_typeÚqry© r   úO/var/www/html/corbot_env/lib/python3.10/site-packages/office365/outlook/user.pyÚsupported_languages   s   zOutlookUser.supported_languagesc                 C   r   )a:  
        Get the list of time zones that are supported for the user, as configured on the user's mailbox server.
        You can explicitly specify to have time zones returned in the Windows time zone format or
        Internet Assigned Numbers Authority (IANA) time zone (also known as Olson time zone) format.
        The Windows format is the default.
        When setting up an Outlook client, the user selects the preferred time zone from this supported list.
        You can subsequently get the preferred time zone by getting the user's mailbox settings.
        ÚsupportedTimeZonesN)r   r   r   r   r
   r   r   r   r   r   Úsupported_time_zones   s   	
ÿz OutlookUser.supported_time_zonesc              	   C   s    | j  dt| jttd| jƒƒ¡S )z*A list of categories defined for the user.ÚmasterCategories)Ú
propertiesÚgetr   r   r   r	   Úresource_path)r   r   r   r   Úmaster_categories*   s   
ýþzOutlookUser.master_categoriesNc                    s0   |d u rd| j i}| |d ¡}tt| ƒ ||¡S )Nr   )r   r   Úsuperr   Úget_property)r   ÚnameÚdefault_valueÚproperty_mapping©Ú	__class__r   r   r   7   s   
zOutlookUser.get_property)N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úpropertyr   r   Ú__classcell__r   r   r#   r   r      s    
r   N)Úoffice365.entityr   Úoffice365.entity_collectionr   Úoffice365.outlook.categoryr   Úoffice365.outlook.locale_infor   Ú&office365.outlook.timezone_informationr   Úoffice365.runtime.client_resultr   Ú)office365.runtime.client_value_collectionr   Ú%office365.runtime.paths.resource_pathr	   Ú"office365.runtime.queries.functionr
   r   r   r   r   r   Ú<module>   s    