U
    4Je`                     @   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eee ee ddd	Zd
d Z	dd Z
dd Zdd Zeee dddZeee dddZeed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   s"   || _ || _|d krd}|| _d S N r   selfr   r
   r    r   P/tmp/pip-unpacked-wheel-7_167w8m/mysql/opentelemetry/sdk/util/instrumentation.py__init__   s
    zInstrumentationInfo.__init__c                 C   s(   t | j d| j d| j d| j dS N(z, )type__name__r   r   r	   r   r   r   r   __repr__*   s    &zInstrumentationInfo.__repr__c                 C   s   t | j| j| jfS Nhashr   r   r	   r   r   r   r   __hash__/   s    zInstrumentationInfo.__hash__c                 C   s0   t |t | k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 | k	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   s   | j S r   r	   r   r   r   r   r   B   s    zInstrumentationInfo.schema_urlc                 C   s   | j S r   r   r   r   r   r   r
   F   s    zInstrumentationInfo.versionc                 C   s   | j S r   r   r   r   r   r   r   J   s    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eee ee ddddZeddd	Ze	dd
dZ
eedddZeedddZeee dddZeee dddZeedddZded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   N)r   r
   r   r(   c                 C   s"   || _ || _|d krd}|| _d S r   r   r   r   r   r   r   Y   s
    zInstrumentationScope.__init__r'   c                 C   s(   t | j d| j d| j d| j dS r   r   r   r   r   r   r   e   s    &zInstrumentationScope.__repr__c                 C   s   t | j| j| jfS r   r   r   r   r   r   r!   j   s    zInstrumentationScope.__hash__)r#   r(   c                 C   s.   t |tstS | j| j| jf|j|j|jfkS r   
isinstancer2   r%   r   r   r	   r"   r   r   r   r$   m   s    
zInstrumentationScope.__eq__c                 C   s.   t |tstS | j| j| jf|j|j|jfk S r   r3   r"   r   r   r   r&   v   s    
zInstrumentationScope.__lt__c                 C   s   | j S r   r)   r   r   r   r   r      s    zInstrumentationScope.schema_urlc                 C   s   | j S r   r*   r   r   r   r   r
      s    zInstrumentationScope.versionc                 C   s   | j S r   r+   r   r   r   r   r      s    zInstrumentationScope.name   c                 C   s   t | j| j| jd|dS )Nr   )indent)r   r   r   r	   )r   r6   r   r   r   to_json   s    zInstrumentationScope.to_json)NN)r5   )r   r,   r-   r.   r/   r0   r   r   r   intr!   objectboolr$   r&   r1   r   r
   r   r7   r   r   r   r   r2   O   s*     		r2   N)jsonr   typingr   r   r   r2   r   r   r   r   <module>   s   ;