o
    #f`                     @   sD   d dl mZ d dlmZ d dlmZ G dd dZG dd dZdS )	    )dumps)Optional)
deprecatedc                	   @   s   e Zd ZdZdZeddd		ddedee d	ee fd
dZdd Z	dd Z
dd Zdd Zedee fddZedee fddZedefddZdS )InstrumentationInfozImmutable information about an instrumentation library module.

    See `opentelemetry.trace.TracerProvider.get_tracer` for the meaning of these
    properties.
    _name_version_schema_urlz1.11.1z#You should use InstrumentationScope)versionreasonNnamer
   
schema_urlc                 C   "   || _ || _|d u rd}|| _d S N r   selfr   r
   r    r   b/home/ubuntu/dev/venv/lib/python3.10/site-packages/mysql/opentelemetry/sdk/util/instrumentation.py__init__   s
   
zInstrumentationInfo.__init__c                 C   (   t | j d| j d| j d| j dS N(z, )type__name__r   r   r	   r   r   r   r   __repr__*      &zInstrumentationInfo.__repr__c                 C      t | j| j| jfS Nhashr   r   r	   r   r   r   r   __hash__/      zInstrumentationInfo.__hash__c                 C   s0   t |t | u o| j| j| jf|j|j|jfkS r!   )r   r   r   r	   r   valuer   r   r   __eq__2   s   zInstrumentationInfo.__eq__c                 C   s4   t |t | ur
tS | j| j| jf|j|j|jfk S r!   )r   NotImplementedr   r   r	   r&   r   r   r   __lt__9   s   zInstrumentationInfo.__lt__returnc                 C      | j S r!   r	   r   r   r   r   r   B      zInstrumentationInfo.schema_urlc                 C   r,   r!   r   r   r   r   r   r
   F   r.   zInstrumentationInfo.versionc                 C   r,   r!   r   r   r   r   r   r   J   r.   zInstrumentationInfo.nameNN)r   
__module____qualname____doc__	__slots__r   strr   r   r   r$   r(   r*   propertyr   r
   r   r   r   r   r   r      s.    
	r   c                	   @   s   e Zd ZdZdZ		ddedee dee ddfdd	Zdefd
dZde	fddZ
dedefddZdedefddZedee fddZedee fddZedefddZddefddZdS )InstrumentationScopezA logical unit of the application code with which the emitted telemetry can be
    associated.

    See `opentelemetry.trace.TracerProvider.get_tracer` for the meaning of these
    properties.
    r   Nr   r
   r   r+   c                 C   r   r   r   r   r   r   r   r   Y   s
   
zInstrumentationScope.__init__c                 C   r   r   r   r   r   r   r   r   e   r   zInstrumentationScope.__repr__c                 C   r    r!   r"   r   r   r   r   r$   j   r%   zInstrumentationScope.__hash__r'   c                 C   s.   t |tstS | j| j| jf|j|j|jfkS r!   
isinstancer8   r)   r   r   r	   r&   r   r   r   r(   m      
zInstrumentationScope.__eq__c                 C   s.   t |tstS | j| j| jf|j|j|jfk S r!   r9   r&   r   r   r   r*   v   r;   zInstrumentationScope.__lt__c                 C   r,   r!   r-   r   r   r   r   r      r.   zInstrumentationScope.schema_urlc                 C   r,   r!   r/   r   r   r   r   r
      r.   zInstrumentationScope.versionc                 C   r,   r!   r0   r   r   r   r   r      r.   zInstrumentationScope.name   c                 C   s   t | j| j| jd|dS )N)r   r
   r   )indent)r   r   r   r	   )r   r=   r   r   r   to_json   s   zInstrumentationScope.to_jsonr1   )r<   )r   r2   r3   r4   r5   r6   r   r   r   intr$   objectboolr(   r*   r7   r   r
   r   r>   r   r   r   r   r8   O   s2    
		r8   N)jsonr   typingr   r   r   r8   r   r   r   r   <module>   s
   ;