
    i8                     8    d dl mZ d dlmZ  G d d          ZdS )    )Union)
Attributesc                       e Zd ZdZddeeef         deddfdZe	deeef         fd            Z
e	defd            Zd	edefd
ZdefdZdS )ObservationzA measurement observed in an asynchronous instrument

    Return/yield instances of this class from asynchronous instrument callbacks.

    Args:
        value: The float or int measured value
        attributes: The measurement's attributes
    Nvalue
attributesreturnc                 "    || _         || _        d S N)_value_attributes)selfr   r   s      k/var/www/cyber-strat/venv/lib/python3.11/site-packages/mysql/opentelemetry/metrics/_internal/observation.py__init__zObservation.__init__   s    %    c                     | j         S r   )r   r   s    r   r   zObservation.value"   s
    {r   c                     | j         S r   )r   r   s    r   r   zObservation.attributes&   s    r   otherc                 l    t          |t                    o| j        |j        k    o| j        |j        k    S r   )
isinstancer   r   r   )r   r   s     r   __eq__zObservation.__eq__*   s7    uk** 4
ek)45#33	
r   c                 (    d| j          d| j         dS )NzObservation(value=z, attributes=))r   r   r   s    r   __repr__zObservation.__repr__1   s    ODJOOT_OOOOr   r   )__name__
__module____qualname____doc__r   intfloatr   r   propertyr   r   objectboolr   strr    r   r   r   r      s         & &eCJ/ &Z &SW & & & & uUCZ(    X  J       X 
F 
t 
 
 
 
P# P P P P P Pr   r   N)typingr   mysql.opentelemetry.util.typesr   r   r&   r   r   <module>r)      sg          5 5 5 5 5 5P P P P P P P P P Pr   