Ë
    lQêjß  ã                   óT   — d dl mZmZmZmZ d dlmZ d dlZerd dlm	Z	  G d„ d«      Z
y)é    )ÚTYPE_CHECKINGÚOptionalÚDictÚAny)ÚUUIDN)Ú	ServerAPIc                   ó2  — e Zd ZdZdddededededed	eeeef      d
edefd„Z	e
defd„«       Ze
defd„«       Ze
defd„«       Ze
defd„«       Ze
defd„«       Ze
deeeef      fd„«       Zed	ee   deeef   fd„«       Zdefd„Zdedefd„Zdefd„Zy)ÚAttachedFunctionz/Represents a function attached to a collection.Úclientr   ÚidÚnameÚfunction_nameÚinput_collection_idÚoutput_collectionÚparamsÚtenantÚdatabasec
                 ó‚   — || _         || _        || _        || _        || _        || _        || _        || _        |	| _        y)a  Initialize an AttachedFunction.

        Args:
            client: The API client
            id: Unique identifier for this attached function
            name: Name of this attached function instance
            function_name: The function name (e.g., "record_counter", "statistics")
            input_collection_id: ID of the input collection
            output_collection: Name of the output collection
            params: Function-specific parameters
            tenant: The tenant name
            database: The database name
        N)	Ú_clientÚ_idÚ_nameÚ_function_nameÚ_input_collection_idÚ_output_collectionÚ_paramsÚ_tenantÚ	_database)
Úselfr   r   r   r   r   r   r   r   r   s
             úi/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/chromadb/api/models/AttachedFunction.pyÚ__init__zAttachedFunction.__init__   sF   € ð2 ˆŒØˆŒØˆŒ
Ø+ˆÔØ$7ˆÔ!Ø"3ˆÔØˆŒØˆŒØ!ˆ�ó    Úreturnc                 ó   — | j                   S )z0The unique identifier of this attached function.)r   ©r   s    r   r   zAttachedFunction.id/   s   € ð �x‰xˆr!   c                 ó   — | j                   S )z,The name of this attached function instance.)r   r$   s    r   r   zAttachedFunction.name4   s   € ð �z‰zÐr!   c                 ó   — | j                   S )zThe function name.)r   r$   s    r   r   zAttachedFunction.function_name9   s   € ð ×"Ñ"Ð"r!   c                 ó   — | j                   S )zThe ID of the input collection.)r   r$   s    r   r   z$AttachedFunction.input_collection_id>   s   € ð ×(Ñ(Ð(r!   c                 ó   — | j                   S )z"The name of the output collection.)r   r$   s    r   r   z"AttachedFunction.output_collectionC   s   € ð ×&Ñ&Ð&r!   c                 ó   — | j                   S )zThe function parameters.)r   r$   s    r   r   zAttachedFunction.paramsH   s   € ð �|‰|Ðr!   c                 óä   — | €i S t        | t        «      r.	 | rt        j                  | «      ni }t        |t        «      r|S i S t        | t        «      r| S i S # t        j
                  $ r i cY S w xY w)zuNormalize params to a consistent dict format.

        Handles None, empty strings, JSON strings, and dicts.
        )Ú
isinstanceÚstrÚjsonÚloadsÚdictÚJSONDecodeError)r   Úresults     r   Ú_normalize_paramsz"AttachedFunction._normalize_paramsM   su   € ð ˆ>ØˆIÜ�fœcÔ"ðÙ/5œŸ™ FÔ+¸2�Ü!+¨F´DÔ!9�vÐA¸rÐAô �fœdÔ#ØˆMØˆ	øô	 ×'Ñ'ò Ø’	ðús   –*A ÁA ÁA/Á.A/c                 óŠ   — d| j                   › d| j                  › d| j                  › d| j                  › d| j                  › d�S )NzAttachedFunction(id=z, name='z', function_name='z', input_collection_id=z, output_collection='z'))r   r   r   r   r   r$   s    r   Ú__repr__zAttachedFunction.__repr___   sW   € à" 4§8¡8 *¨H°T·Z±Z°Lð AØ"×1Ñ1Ð2ð 3#Ø#'×#<Ñ#<Ð"=ð >"Ø"&×"9Ñ"9Ð!:¸"ð>ð	
r!   Úotherc                 ó  — t        |t        «      sy| j                  | j                  «      }| j                  |j                  «      }| j                  |j                  k(  xr§ | j
                  |j
                  k(  xrŒ | j                  |j                  k(  xrq | j                  |j                  k(  xrV | j                  |j                  k(  xr; ||k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S )z2Compare two AttachedFunction objects for equality.F)r+   r
   r2   r   r   r   r   r   r   r   r   )r   r5   Úself_paramsÚother_paramss       r   Ú__eq__zAttachedFunction.__eq__g   sò   € ä˜%Ô!1Ô2Øð ×,Ñ,¨T¯\©\Ó:ˆØ×-Ñ-¨e¯m©mÓ<ˆð �H‰H˜Ÿ	™	Ñ!ò 2Ø—
‘
˜eŸk™kÑ)ò2à×#Ñ# u×';Ñ';Ñ;ò2ð ×)Ñ)¨U×-GÑ-GÑGò2ð ×'Ñ'¨5×+CÑ+CÑCò	2ð
 ˜|Ñ+ò2ð —‘ §¡Ñ-ò2ð —‘ %§/¡/Ñ1ð		
r!   c           
      ó6  — | j                  | j                  «      }|r"t        t        |j	                  «       «      «      nd}t        | j                  | j                  | j                  | j                  | j                  || j                  | j                  f«      S )z$Return hash of the AttachedFunction.© )r2   r   ÚtupleÚsortedÚitemsÚhashr   r   r   r   r   r   r   )r   Únormalized_paramsÚparams_tuples      r   Ú__hash__zAttachedFunction.__hash__{   s‡   € ð !×2Ñ2°4·<±<Ó@Ðá8IŒE”&Ð*×0Ñ0Ó2Ó3Ô4Èrð 	ô à—‘Ø—
‘
Ø×#Ñ#Ø×)Ñ)Ø×'Ñ'ØØ—‘Ø—‘ð	ó
ð 	
r!   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r,   r   r   r   r    Úpropertyr   r   r   r   r   r   Ústaticmethodr2   r4   ÚobjectÚboolr9   ÚintrB   r;   r!   r   r
   r
   	   sx  „ Ù9ð!"àð!"ð ð!"ð ð	!"ð
 ð!"ð "ð!"ð ð!"ð ˜˜c 3˜h™Ñ(ð!"ð ð!"ð ó!"ðF ð�Dò ó ðð ð�cò ó ðð ð#˜sò #ó ð#ð ð) Tò )ó ð)ð ð' 3ò 'ó ð'ð ð˜  c¨3 h¡Ñ0ò ó ðð ð (¨3¡-ð °D¸¸c¸±Nò ó ðð"
˜#ó 
ð
˜Fð 
 tó 
ð(
˜#ô 
r!   r
   )Útypingr   r   r   r   Úuuidr   r-   Úchromadb.apir   r
   r;   r!   r   ú<module>rO      s#   ðß 5Ó 5Ý Û áÝ&÷E
ò E
r!   