Ë
    3ýj‘  ã                   óJ   — d dl mZ ddlmZ dddddd	d
ddddœ
Z G d„ d«      Zy)é   )Ú	nativestré   )Úlist_to_dictÚ
source_keyÚchunk_countÚmemory_usageÚtotal_samplesÚretention_msecsÚlast_timestampÚfirst_timestampÚmax_samples_per_chunkÚ
chunk_sizeÚduplicate_policy)
Ú	sourceKeyÚ
chunkCountÚmemoryUsageÚtotalSamplesÚretentionTimeÚlastTimestampÚfirstTimestampÚmaxSamplesPerChunkÚ	chunkSizeÚduplicatePolicyc                   óR   — e Zd ZdZg Zg ZdZdZdZdZ	dZ
dZdZdZdZdZd„ Zd„ Zd„ Zy)ÚTSInfozÜ
    Hold information and statistics on the time-series.
    Can be created using ``tsinfo`` command
    https://redis.io/docs/latest/commands/ts.info/

    Handles both RESP2 (flat list) and RESP3 (dict) responses.
    Nc                 ó€  — t        |t        «      r7|}|j                  d«      xs i | _        |j                  d«      xs i | _        ndt        t        t        t        |ddd…   «      |ddd…   «      «      }|j                  d«      | _        t        |j                  d«      «      | _        |j                  d«      | _	        |j                  d«      | _
        |j                  d«      | _        |j                  d	«      | _        |j                  d
«      | _        |j                  d«      | _        |j                  d«      | _        d|v r|d   | _        | j                   dz  | _        d|v r
|d   | _        d|v rE|d   | _        t        | j$                  t&        «      r | j$                  j)                  «       | _        yyy)a  
        Hold information and statistics on the time-series.

        The supported params that can be passed as args:

        rules:
            A list of compaction rules of the time series.
        sourceKey:
            Key name for source time series in case the current series
            is a target of a rule.
        chunkCount:
            Number of Memory Chunks used for the time series.
        memoryUsage:
            Total number of bytes allocated for the time series.
        totalSamples:
            Total number of samples in the time series.
        labels:
            A list of label-value pairs that represent the metadata
            labels of the time series.
        retentionTime:
            Retention time, in milliseconds, for the time series.
        lastTimestamp:
            Last timestamp present in the time series.
        firstTimestamp:
            First timestamp present in the time series.
        maxSamplesPerChunk:
            Deprecated.
        chunkSize:
            Amount of memory, in bytes, allocated for data.
        duplicatePolicy:
            Policy that will define handling of duplicate samples.

        Can read more about on
        https://redis.io/docs/latest/develop/data-types/timeseries/configuration/#duplicate_policy
        ÚrulesÚlabelsNr   r   r   r   r   r   r   r   r   r   é   r   r   )Ú
isinstanceÚdictÚgetr   r   ÚzipÚmapr   r   r   r   r   r	   r
   r   r   r   r   r   ÚbytesÚdecode)ÚselfÚargsÚresponses      úX/root/telegram-saas/.venv/lib/python3.12/site-packages/redis/commands/timeseries/info.pyÚ__init__zTSInfo.__init__,   sŽ  € ôH �dœDÔ!àˆHØ!Ÿ™ gÓ.Ò4°"ˆDŒJØ"Ÿ,™, xÓ0Ò6°BˆD�Kô œC¤¤I¨t±C°a°C©yÓ 9¸4ÀÀÀ1À¹:ÓFÓGˆHØ!Ÿ™ gÓ.ˆDŒJÜ& x§|¡|°HÓ'=Ó>ˆDŒKØ"Ÿ,™, {Ó3ˆŒØ#Ÿ<™<¨Ó5ˆÔØ$ŸL™L¨Ó7ˆÔØ%Ÿ\™\¨.Ó9ˆÔØ'Ÿ|™|¨OÓ<ˆÔØ&Ÿl™l¨?Ó;ˆÔØ'Ÿ|™|Ð,<Ó=ˆÔØ 8Ñ+Ø)1Ð2FÑ)GˆDÔ&à×*Ñ*¨RÑ/ð ŒOð ˜(Ñ"Ø& {Ñ3ˆDŒOØ Ñ(Ø$,Ð->Ñ$?ˆDÔ!Ü˜$×/Ñ/´Ô7Ø(,×(=Ñ(=×(DÑ(DÓ(F�Õ%ð 8ð )ó    c                 óD   — 	 | j                  |«      S # t        $ r Y y w xY w©N)Ú__getitem__ÚAttributeError©r'   Úitems     r*   r"   z
TSInfo.getm   s*   € ð	Ø×#Ñ# DÓ)Ð)øÜò 	Ùð	ús   ‚ “	žc                 óB   — t        | t        j                  ||«      «      S r.   )ÚgetattrÚ_FIELD_ALIASESr"   r1   s     r*   r/   zTSInfo.__getitem__s   s   € Ü�tœ^×/Ñ/°°dÓ;Ó<Ð<r,   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r	   r
   Úlast_time_stampÚfirst_time_stampr   r   r   r+   r"   r/   © r,   r*   r   r      sY   „ ñð €EØ€FØ€IØ€KØ€LØ€MØ€OØ€OØÐà ÐØ€JØÐò?GòBó=r,   r   N)Úhelpersr   Úutilsr   r5   r   r<   r,   r*   ú<module>r?      s>   ðÝ Ý ð ØØ!Ø#Ø&Ø%Ø'Ø1ØØ)ñ€÷_=ò _=r,   