
    Ng                        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	 ddlmZ n# e$ r Y nw xY w G d d	e          Zd
S )Base class for Gmail tools.    )annotations)TYPE_CHECKING)BaseTool)Field)build_resource_service)Resourcec                  N    e Zd ZU dZ ee          Zded<   ed	d            Z	dS )
GmailBaseToolr   )default_factoryr	   api_resourcereturn'GmailBaseTool'c                     | |          S )zCreate a tool from an api resource.

        Args:
            api_resource: The api resource to use.

        Returns:
            A tool.
        )service )clsr   s     `/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/tools/gmail/base.pyfrom_api_resourcezGmailBaseTool.from_api_resource   s     s<((((    N)r   r	   r   r   )
__name__
__module____qualname____doc__r   r   r   __annotations__classmethodr   r   r   r   r   r      sY         %%"U3IJJJLJJJJ	) 	) 	) [	) 	) 	)r   r   N)r   
__future__r   typingr   langchain_core.toolsr   pydanticr   %langchain_community.tools.gmail.utilsr   googleapiclient.discoveryr	   ImportErrorr   r   r   r   <module>r$      s    ! ! " " " " " "             ) ) ) ) ) )       H H H H H H 22222226666666   ) ) ) ) )H ) ) ) ) )s   2 ::