o
    ,ÂifA  ã                   @   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
 G dd„ deƒZd	S )
é    )Údatetime)ÚOptional)ÚIdentitySet)ÚEntity)ÚItemReference)ÚResourcePathc                       sÂ   e Zd ZdZedd„ ƒZedd„ ƒZedd„ ƒZedd	„ ƒZed
d„ ƒZ	edd„ ƒZ
edd„ ƒZedd„ ƒZejdd„ ƒZedd„ ƒZejdd„ ƒZedd„ ƒZedd„ ƒZd‡ fdd„	Z‡  ZS )ÚBaseItemzƒThe baseItem resource is an abstract resource that contains a auth set of properties shared among several
    other resources typesc                 C   ó   | j  dd¡S )zETag for the item.ÚeTagN©Ú
propertiesÚget©Úself© r   úL/var/www/html/corbot_env/lib/python3.10/site-packages/office365/base_item.pyÚetag   ó   zBaseItem.etagc                 C   ó   | j  dtƒ ¡S )zDIdentity of the user, device, or application which created the item.Ú	createdBy©r   r   r   r   r   r   r   Ú
created_by   ó   zBaseItem.created_byc                 C   ó*   ddl m} | j d|| jtd| jƒƒ¡S )z)Identity of the user who created the itemr   ©ÚUserÚcreatedByUser©Úoffice365.directory.users.userr   r   r   Úcontextr   Úresource_path©r   r   r   r   r   Úcreated_by_user   ó
   þzBaseItem.created_by_userc                 C   r   )zKIdentity of the user, device, and application which last modified the item.ÚlastModifiedByr   r   r   r   r   Úlast_modified_by$   r   zBaseItem.last_modified_byc                 C   r   )z0Identity of the user who last modified the item.r   r   ÚlastModifiedByUserr   r!   r   r   r   Úlast_modified_by_user*   r#   zBaseItem.last_modified_by_userc                 C   ó   | j  dtj¡S )z$Gets date and time of item creation.ÚcreatedDateTime©r   r   r   Úminr   r   r   r   Úcreated_datetime4   r   zBaseItem.created_datetimec                 C   r(   )z.Gets date and time the item was last modified.ÚlastModifiedDateTimer*   r   r   r   r   Úlast_modified_datetime:   r   zBaseItem.last_modified_datetimec                 C   r	   )zGets the name of the item.ÚnameNr   r   r   r   r   r/   @   r   zBaseItem.namec                 C   s   |   d|¡ dS )zSets the name of the item.r/   N©Úset_property©r   Úvaluer   r   r   r/   F   r   c                 C   r	   )z0Provides a user-visible description of the item.ÚdescriptionNr   r   r   r   r   r4   L   r   zBaseItem.descriptionc                 C   s   |   d|¡ d S )Nr4   r0   r2   r   r   r   r4   R   s   c                 C   r	   )z-URL that displays the resource in the browserÚwebUrlNr   r   r   r   r   Úweb_urlW   r   zBaseItem.web_urlc                 C   r   )z-Parent information, if the item has a parent.ÚparentReference)r   Ú
setdefaultr   r   r   r   r   Úparent_reference]   r   zBaseItem.parent_referenceNc                    sH   |d u r| j | j| j| j| j| j| jdœ}| |d ¡}tt	| ƒ 
||¡S )N)r   r   r)   r-   r$   r&   r7   )r   r"   r,   r.   r%   r'   r9   r   Úsuperr   Úget_property)r   r/   Údefault_valueÚproperty_mapping©Ú	__class__r   r   r;   c   s   ù	zBaseItem.get_property)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r   r"   r%   r'   r,   r.   r/   Úsetterr4   r6   r9   r;   Ú__classcell__r   r   r>   r   r   
   s:    


	

	







r   N)r   Útypingr   Ú,office365.directory.permissions.identity_setr   Úoffice365.entityr   Ú+office365.onedrive.listitems.item_referencer   Ú%office365.runtime.paths.resource_pathr   r   r   r   r   r   Ú<module>   s    