
    _?i#                        S r SSKJrJrJrJr  SSKrSSKrSSK	rSSK
rSSKrSSKr " S S\R                  R                  5      r    SS\R                   R"                  \-  S\S\R(                  R*                  \-  S	\R,                  R.                  \-  S
\\   S\R                   R0                  S-  S\R                   R"                  S-  S\S\R                   R"                  S-  S\4S jjrS\R                   R"                  \-  S\S\R(                  R*                  \-  S	\R,                  R.                  \-  S
\S\4S jr SS\R                   R"                  \-  S\S\\R8                  R:                     S\R                   R0                  S-  S\4
S jjrS\R                   R"                  \-  S\S\S\4S jrg)z)DNS RRsets (an RRset is a named rdataset)    )Any
CollectionDictcastNc                     ^  \ rS rSrSrSS/r\R                  R                  S4S\R                  R                  S\R                  R                  S\R                  R                  S\R                  R                  S\R                  R                  S-  4
U 4S	 jjjrU 4S
 jrS rS rU 4S jrS\S\S\4U 4S jjr SS\R                  R                  S\R                  R                  S\R                  R                  S\R                  R                  S\R                  R                  S-  S\4U 4S jjjr  SS\R                  R                  S-  S\S\\\4   S\4U 4S jjjr  SS\S\R                  R4                  S-  S\R                  R                  S-  S\\\4   S\4
U 4S jjjrS\R:                  R<                  4S jrSr U =r!$ )RRset   a  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                 >   > [         TU ]  X#U5        Xl        XPl        g)zCreate a new RRset.N)super__init__r
   r   selfr
   r   r   r   r   	__class__s         M/var/www/html/livechat/backend/venv/lib/python3.13/site-packages/dns/rrset.pyr   RRset.__init__*   s     	&1	     c                    > [        [        [        TU ]  5       5      nU R                  Ul        U R
                  Ul        U$ N)r   r   r   _cloner
   r   )r   objr   s     r   r   RRset._clone8   s1    5%'.*+99}}
r   c                    U R                   S:X  a  SnO/S[        R                  R                  U R                   5      -   S-   nU R                  b-  S[        R
                  R                  U R                  5      -   nOSnS[        U R                  5      -   S-   [        R
                  R                  U R                  5      -   S-   [        R                  R                  U R                  5      -   U-   U-   S-   U R                  5       -   S	-   $ )
Nr    ()z delete=z<DNS  z RRset: >)r   dns	rdatatypeto_textr   
rdataclassstrr
   r   r   _rdata_repr)r   ctextdtexts      r   __repr__RRset.__repr__>   s    ;;!E#--//<<sBE==$!7!7!FFEE$))n nn$$T\\23 	
 mm##DKK01     	! 
	
r   c                 "    U R                  5       $ r   )r%   r   s    r   __str__RRset.__str__U   s    ||~r   c                    > [        U[        5      (       a  U R                  UR                  :w  a  gO*[        U[        R                  R
                  5      (       d  g[        TU ]  U5      $ )NF)
isinstancer   r
   r#   rdatasetRdatasetr   __eq__)r   otherr   s     r   r5   RRset.__eq__X   sQ    eU##yyEJJ& 'E3<<#8#899w~e$$r   argskwargsreturnc                    > [        US   [        R                  R                  5      (       a  U R                  " U0 UD6$ [
        TU ]  " U0 UD6$ )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   )r2   r#   r
   Name
full_matchr   match)r   r8   r9   r   s      r   r>   RRset.match`   sF     d1gsxx}}--??D3F337=$1&11r   c                 t   > [         TU ]  X#U5      (       d  gU R                  U:w  d  U R                  U:w  a  gg)zdReturns ``True`` if this rrset matches the specified name, class,
type, covers, and deletion state.
FT)r   r>   r
   r   r   s         r   r=   RRset.full_matchq   s6     w}Wf5599 9r   origin
relativizekwc                 R   > [         TU ]  " U R                  XU R                  40 UD6$ )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   rB   rC   rD   r   s       r   r%   RRset.to_text   s-    , wIIv4==
<>
 	
r   filecompressc                 R   > [         TU ]  " U R                  XX0R                  40 UD6$ )zConvert 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   rG   rH   rB   rD   r   s        r   rJ   RRset.to_wire   s-     wIItv}}
@B
 	
r   c                 h    [         R                  R                  U R                  [	        U 5      5      $ )zIConvert an RRset into an Rdataset.

Returns a ``dns.rdataset.Rdataset``.
)r#   r3   from_rdata_listttllistr.   s    r   to_rdatasetRRset.to_rdataset   s#    
 ||++DHHd4jAAr   )r   r
   r   )NT)NN)"__name__
__module____qualname____firstlineno____doc__	__slots__r#   r$   NONEr
   r<   r&   
RdataClass	RdataTyper   r   r+   r/   r5   r   boolr>   r=   r   r'   r%   CompressTypeintrJ   r3   r4   rP   __static_attributes____classcell__)r   s   @r   r   r      s    $I +.--*<*<59!hhmm! **! ''	!
 ''! ..++d2! !
.%23 2# 2$ 2. 6:hhmm ** ''	
 '' ..++d2 
 * (,
$
 
 38n	

 

 
: 26'+	

 ((''$.
 $	

 38n
 

 
*BS\\22 B Br   r   r
   rN   r   r   text_rdatas
idna_codecrB   rC   relativize_tor:   c	           
         [        U [        5      (       a  [        R                  R	                  U SUS9n [        R
                  R                  R                  U5      n[        R                  R                  R                  U5      n[        XU5      n	U	R                  U5        U HK  n
[        R                  R	                  U	R                  U	R                  XXxU5      nU	R                  U5        MM     U	$ )aM  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ra   )r2   r'   r#   r
   	from_textr&   rY   maker$   rZ   r   
update_ttlrdatar   r   add)r
   rN   r   r   r`   ra   rB   rC   rb   rtrds               r   from_text_listrm      s    : $xx!!$!Dnn'',,W5G]]$$))&1FdV$ALLYY  IIqxxJz
 	
b		 
 Hr   c           
      F    [        XX#[        [        [           U5      5      $ )zCreate an RRset with the specified name, TTL, class, and type and with
the specified rdatas in text format.

Returns a ``dns.rrset.RRset`` object.
)rm   r   r   r'   )r
   rN   r   r   r`   s        r   re   re      s#     7DC+$F r   rdatasc                 L   [        U [        5      (       a  [        R                  R	                  U SUS9n [        U5      S:X  a  [        S5      eSnU HH  nUc1  [        XR                  UR                  5      nUR                  U5        UR                  U5        MJ     Uc   eU$ )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.

Nrd   r   zrdata list must not be empty)r2   r'   r#   r
   re   len
ValueErrorr   r   r   rg   ri   )r
   rN   ro   ra   rj   rl   s         r   rM   rM      s    " $xx!!$!D
6{a788A9dJJ		2ALL	b		 
 ==Hr   c                 l    [        X[        [        [        R                  R
                     U5      5      $ )z~Create an RRset with the specified name and TTL, and with
the specified rdata objects.

Returns a ``dns.rrset.RRset`` object.
)rM   r   r   r#   rh   Rdata)r
   rN   ro   s      r   
from_rdataru     s%     4d:ciioo+F&OPPr   )NNTNr   ) rV   typingr   r   r   r   dns.namer#   	dns.rdatadns.rdataclassdns.rdatasetdns.rdatatypedns.rendererr3   r4   r   r
   r<   r'   r]   r&   rY   r$   rZ   	IDNACodecr[   rm   re   rh   rt   rM   ru    r   r   <module>r      s  $ 0 . .      ZBCLL!! ZBF -1#'*.(
((--#
(	( ^^&&,( MM##c)	(
 C( ""T)( HHMMD ( ( 88==4'( (V
((--#
	 ^^&&, MM##c)	
  , -1	
((--#
	 syy' ""T)	
 @QSXX]]S( Qs QS QU Qr   