Ë
    RPfÒ#  ã                   ó”  — d Z ddlmZmZmZmZmZmZ ddlZ	ddl
Z	ddlZ	ddlZ	 G d„ de	j                  j                  «      Z	 	 	 	 ddee	j                   j"                  ef   dedee	j(                  j*                  ef   d	ee	j,                  j.                  ef   d
ee   dee	j                   j0                     dee	j                   j"                     dedee	j                   j"                     defd„Zdee	j                   j"                  ef   dedee	j(                  j*                  ef   d	ee	j,                  j.                  ef   d
edefd„Z	 ddee	j                   j"                  ef   dedee	j8                  j:                     dee	j                   j0                     def
d„Zdee	j                   j"                  ef   dededefd„Zy)z)DNS RRsets (an RRset is a named rdataset)é    )ÚAnyÚ
CollectionÚDictÚOptionalÚUnionÚcastNc                   ó„  ‡ — e Zd ZdZddgZej                  j                  dfdej                  j                  dej                  j                  dej                  j                  dej                  j                  deej                  j                     f
ˆ fd„Zˆ fd	„Zd
„ Zd„ Zˆ fd„Zdededefˆ fd„Z	 ddej                  j                  dej                  j                  dej                  j                  dej                  j                  deej                  j                     defˆ fd„Z	 	 ddeej                  j                     dedeeef   defˆ fd„Z	 	 ddedeej                  j4                     deej                  j                     deeef   def
ˆ fd„Zdej:                  j<                  fd„Zˆ xZ S )ÚRRseta6  A DNS RRset (named rdataset).

    RRset inherits from Rdataset, and RRsets can be treated as
    Rdatasets in most cases.  There are, however, a few notable
    exceptions.  RRsets have different to_wire() and to_text() method
    arguments, reflecting the fact that RRsets always have an owner
    name.
    ÚnameÚdeletingNÚrdclassÚrdtypeÚcoversc                 óD   •— t         ‰| �  |||«       || _        || _        y)zCreate a new RRset.N)ÚsuperÚ__init__r   r   ©Úselfr   r   r   r   r   Ú	__class__s         €úC/var/www/fastapitest/venv/lib/python3.12/site-packages/dns/rrset.pyr   zRRset.__init__(   s$   ø€ ô 	‰Ñ˜ &¨&Ô1ØˆŒ	Ø ˆ�ó    c                 óh   •— t         ‰| �  «       }| j                  |_        | j                  |_        |S ©N)r   Ú_cloner   r   )r   Úobjr   s     €r   r   zRRset._clone6   s*   ø€ Ü‰g‰nÓˆØ—9‘9ˆŒØ—}‘}ˆŒØˆ
r   c                 ó  — | j                   dk(  rd}n/dt        j                  j                  | j                   «      z   dz   }| j                  �-dt        j
                  j                  | j                  «      z   }nd}dt        | j                  «      z   dz   t        j
                  j                  | j                  «      z   dz   t        j                  j                  | j                  «      z   |z   |z   dz   | j                  «       z   d	z   S )
Nr   Ú ú(ú)z delete=z<DNS ú z RRset: ú>)r   ÚdnsÚ	rdatatypeÚto_textr   Ú
rdataclassÚstrr   r   r   Ú_rdata_repr)r   ÚctextÚdtexts      r   Ú__repr__zRRset.__repr__<   s   € Ø�;‰;˜!ÒØ‰Eàœ#Ÿ-™-×/Ñ/°·±Ó<Ñ<¸sÑBˆEØ�=‰=Ð$Ø¤§¡×!7Ñ!7¸¿¹Ó!FÑF‰EàˆEàÜ�$—)‘)‹nñàñô �n‰n×$Ñ$ T§\¡\Ó2ñ3ð ñ	ô
 �m‰m×#Ñ# D§K¡KÓ0ñ1ð ñð ñð ñð ×ÑÓ ñ	!ð ñ
ð	
r   c                 ó"   — | j                  «       S r   )r$   ©r   s    r   Ú__str__zRRset.__str__S   s   € Ø�|‰|‹~Ðr   c                 óÀ   •— t        |t        «      r| j                  |j                  k7  r&yt        |t        j                  j
                  «      syt        ‰| �  |«      S )NF)Ú
isinstancer
   r   r"   ÚrdatasetÚRdatasetr   Ú__eq__)r   Úotherr   s     €r   r2   zRRset.__eq__V   sF   ø€ Ü�eœUÔ#Ø�y‰y˜EŸJ™JÒ&ØÜ˜E¤3§<¡<×#8Ñ#8Ô9ØÜ‰w‰~˜eÓ$Ð$r   ÚargsÚkwargsÚreturnc                 ó”   •— t        |d   t        j                  j                  «      r | j                  |i |¤ŽS t        ‰| �  |i |¤ŽS )aÐ  Does this rrset match the specified attributes?

        Behaves as :py:func:`full_match()` if the first argument is a
        ``dns.name.Name``, and as :py:func:`dns.rdataset.Rdataset.match()`
        otherwise.

        (This behavior fixes a design mistake where the signature of this
        method became incompatible with that of its superclass.  The fix
        makes RRsets matchable as Rdatasets while preserving backwards
        compatibility.)
        r   )r/   r"   r   ÚNameÚ
full_matchr   Úmatch)r   r4   r5   r   s      €r   r:   zRRset.match^   sE   ø€ ô �d˜1‘gœsŸx™xŸ}™}Ô-Ø"�4—?‘? DÐ3¨FÑ3Ð3ä‘7‘= $Ð1¨&Ñ1Ð1r   c                 óh   •— t         ‰| �  |||«      sy| j                  |k7  s| j                  |k7  ryy)ztReturns ``True`` if this rrset matches the specified name, class,
        type, covers, and deletion state.
        FT)r   r:   r   r   r   s         €r   r9   zRRset.full_matcho   s5   ø€ ô ‰w‰}˜W f¨fÔ5ØØ�9‰9˜Ò §¡°Ò 9ØØr   ÚoriginÚ
relativizeÚkwc                 óR   •— t        ‰| �  | j                  ||| j                  fi |¤ŽS )aï  Convert the RRset into DNS zone file format.

        See ``dns.name.Name.choose_relativity`` for more information
        on how *origin* and *relativize* determine the way names
        are emitted.

        Any additional keyword arguments are passed on to the rdata
        ``to_text()`` method.

        *origin*, a ``dns.name.Name`` or ``None``, the origin for relative
        names.

        *relativize*, a ``bool``.  If ``True``, names will be relativized
        to *origin*.
        )r   r$   r   r   )r   r<   r=   r>   r   s       €r   r$   zRRset.to_text‚   s/   ø€ ô, ‰w‰Ø�I‰I�v˜z¨4¯=©=ñ
Ø<>ñ
ð 	
r   ÚfileÚcompressc                 óT   •— t        ‰| �  | j                  |||| j                  fi |¤ŽS )zÖConvert the RRset to wire format.

        All keyword arguments are passed to ``dns.rdataset.to_wire()``; see
        that function for details.

        Returns an ``int``, the number of records emitted.
        )r   Úto_wirer   r   )r   r@   rA   r<   r>   r   s        €r   rC   zRRset.to_wireœ   s1   ø€ ô ‰w‰Ø�I‰I�t˜X v¨t¯}©}ñ
Ø@Bñ
ð 	
r   c                 óh   — t         j                  j                  | j                  t	        | «      «      S )zYConvert an RRset into an Rdataset.

        Returns a ``dns.rdataset.Rdataset``.
        )r"   r0   Úfrom_rdata_listÚttlÚlistr,   s    r   Úto_rdatasetzRRset.to_rdataset±   s#   € ô
 �|‰|×+Ñ+¨D¯H©H´d¸4³jÓAÐAr   r   )NT)NN)!Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r"   r#   ÚNONEr   r8   r%   Ú
RdataClassÚ	RdataTyper   r   r   r*   r-   r2   r   Úboolr:   r9   r   r&   r$   ÚCompressTypeÚintrC   r0   r1   rH   Ú__classcell__)r   s   @r   r
   r
      sø  ø„ ñð ˜Ð$€Ið +.¯-©-×*<Ñ*<Ø8<ñ!à�h‰h�m‰mð!ð —‘×*Ñ*ð!ð —‘×'Ñ'ð	!ð
 —‘×'Ñ'ð!ð ˜3Ÿ>™>×4Ñ4Ñ5õ!ôò
ò.ô%ð2˜3ð 2¨#ð 2°$õ 2ð. 9=ñà�h‰h�m‰mðð —‘×*Ñ*ðð —‘×'Ñ'ð	ð
 —‘×'Ñ'ðð ˜3Ÿ>™>×4Ñ4Ñ5ðð 
õð* +/Øñ
à˜Ÿ™Ÿ™Ñ'ð
ð ð
ð �3˜�8‰nð	
ð
 
õ
ð: 59Ø*.ñ	
àð
ð ˜3Ÿ8™8×0Ñ0Ñ1ð
ð ˜Ÿ™Ÿ™Ñ'ð	
ð
 �3˜�8‰nð
ð 
õ
ð*B˜SŸ\™\×2Ñ2÷ Br   r
   r   rF   r   r   Útext_rdatasÚ
idna_codecr<   r=   Úrelativize_tor6   c	           
      óì  — t        | t        «      r"t        j                  j	                  | d|¬«      } t        j
                  j                  j                  |«      }t        j                  j                  j                  |«      }t        | ||«      }	|	j                  |«       |D ]L  }
t        j                  j	                  |	j                  |	j                  |
||||«      }|	j                  |«       ŒN |	S )ay  Create an RRset with the specified name, TTL, class, and type, and with
    the specified list of rdatas in text format.

    *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA
    encoder/decoder to use; if ``None``, the default IDNA 2003
    encoder/decoder is used.

    *origin*, a ``dns.name.Name`` (or ``None``), the
    origin to use for relative names.

    *relativize*, a ``bool``.  If true, name will be relativized.

    *relativize_to*, a ``dns.name.Name`` (or ``None``), the origin to use
    when relativizing names.  If not set, the *origin* value will be used.

    Returns a ``dns.rrset.RRset`` object.
    N©rV   )r/   r&   r"   r   Ú	from_textr%   rO   Úmaker#   rP   r
   Ú
update_ttlÚrdatar   r   Úadd)r   rF   r   r   rU   rV   r<   r=   rW   ÚrÚtÚrds               r   Úfrom_text_listrb   ¹   sÅ   € ô: �$œÔÜ�x‰x×!Ñ! $¨¸Ð!ÓDˆÜ�n‰n×'Ñ'×,Ñ,¨WÓ5€GÜ�]‰]×$Ñ$×)Ñ)¨&Ó1€FÜˆd�G˜VÓ$€AØ‡L�L�ÔØò ˆÜ�Y‰Y× Ñ Ø�I‰I�q—x‘x  F¨J¸Àzó
ˆð 	
�‰ˆb�	ð	ð
 €Hr   c           
      óJ   — t        | |||t        t        t           |«      «      S )zŸCreate an RRset with the specified name, TTL, class, and type and with
    the specified rdatas in text format.

    Returns a ``dns.rrset.RRset`` object.
    )rb   r   r   r&   )r   rF   r   r   rU   s        r   rZ   rZ   ä   s'   € ô Øˆc�7˜F¤D¬´C©¸+Ó$Fóð r   Úrdatasc                 ó@  — t        | t        «      r"t        j                  j	                  | d|¬«      } t        |«      dk(  rt        d«      ‚d}|D ]G  }|€2t        | |j                  |j                  «      }|j                  |«       |j                  |«       ŒI |€J ‚|S )a/  Create an RRset with the specified name and TTL, and with
    the specified list of rdata objects.

    *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA
    encoder/decoder to use; if ``None``, the default IDNA 2003
    encoder/decoder is used.

    Returns a ``dns.rrset.RRset`` object.

    NrY   r   zrdata list must not be empty)r/   r&   r"   r   rZ   ÚlenÚ
ValueErrorr
   r   r   r\   r^   )r   rF   rd   rV   r_   ra   s         r   rE   rE   ö   s˜   € ô" �$œÔÜ�x‰x×!Ñ! $¨¸Ð!ÓDˆä
ˆ6ƒ{�aÒÜÐ7Ó8Ð8Ø€AØò ˆØˆ9Ü�d˜BŸJ™J¨¯	©	Ó2ˆAØ�L‰L˜ÔØ	�‰ˆb�	ð	ð
 ˆ=Ðˆ=Ø€Hr   c                 ón   — t        | |t        t        t        j                  j
                     |«      «      S )zŠCreate an RRset with the specified name and TTL, and with
    the specified rdata objects.

    Returns a ``dns.rrset.RRset`` object.
    )rE   r   r   r"   r]   ÚRdata)r   rF   rd   s      r   Ú
from_rdatarj     s'   € ô ˜4 ¤d¬:´c·i±i·o±oÑ+FÈÓ&OÓPÐPr   )NNTNr   ) rL   Útypingr   r   r   r   r   r   Údns.namer"   Údns.rdataclassÚdns.rdatasetÚdns.rendererr0   r1   r
   r   r8   r&   rS   r%   rO   r#   rP   Ú	IDNACodecrQ   rb   rZ   r]   ri   rE   rj   © r   r   ú<module>rr      s(  ðñ$ 0ç ?× ?ã Û Û Û ôZBˆC�L‰L×!Ñ!ô ZBðF 04Ø&*ØØ-1ñ(Ø
�—‘—‘˜sÐ"Ñ
#ð(à	ð(ð �3—>‘>×,Ñ,¨cÐ1Ñ2ð(ð �#—-‘-×)Ñ)¨3Ð.Ñ/ð	(ð
 ˜C‘ð(ð ˜Ÿ™×+Ñ+Ñ,ð(ð �S—X‘X—]‘]Ñ#ð(ð ð(ð ˜CŸH™HŸM™MÑ*ð(ð ó(ðVØ
�—‘—‘˜sÐ"Ñ
#ðà	ðð �3—>‘>×,Ñ,¨cÐ1Ñ2ðð �#—-‘-×)Ñ)¨3Ð.Ñ/ð	ð
 ðð óð, 04ñ	Ø
�—‘—‘˜sÐ"Ñ
#ðà	ðð �s—y‘y—‘Ñ'ðð ˜Ÿ™×+Ñ+Ñ,ð	ð
 óð@Q�U˜3Ÿ8™8Ÿ=™=¨#Ð-Ñ.ð Q°Sð QÀ3ð QÈ5ô Qr   