o
    ZhE                     @  s   d 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
 er)ddlmZ nzddlmZ W n	 ey:   Y nw G dd	 d	eZd
S )%Base class for Google Calendar tools.    )annotations)TYPE_CHECKING)BaseTool)Field)build_resource_service)Resourcec                   @  s2   e Zd ZU dZeedZded< ed
ddZ	d	S )CalendarBaseToolr   )default_factoryr   api_resourcereturn'CalendarBaseTool'c                 C  s
   | |dS )zCreate a tool from an api resource.

        Args:
            api_resource: The api resource to use.

        Returns:
            A tool.
        )Zservice )clsr   r   r   _/var/www/html/lang_env/lib/python3.10/site-packages/langchain_google_community/calendar/base.pyfrom_api_resource   s   

z"CalendarBaseTool.from_api_resourceN)r   r   r   r   )
__name__
__module____qualname____doc__r   r   r   __annotations__classmethodr   r   r   r   r   r	      s
   
 r	   N)r   
__future__r   typingr   Zlangchain_core.toolsr   Zpydanticr   Z)langchain_google_community.calendar.utilsr   Zgoogleapiclient.discoveryr   ImportErrorr	   r   r   r   r   <module>   s    