
    g#                        S r SSKJrJr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\	R                  R                  5      r    SS\\	R                   R"                  \4   S\S\\	R(                  R*                  \4   S	\\	R,                  R.                  \4   S
\\   S\\	R                   R0                     S\\	R                   R"                     S\S\\	R                   R"                     S\4S jjrS\\	R                   R"                  \4   S\S\\	R(                  R*                  \4   S	\\	R,                  R.                  \4   S
\S\4S jr SS\\	R                   R"                  \4   S\S\\	R8                  R:                     S\\	R                   R0                     S\4
S jjrS\\	R                   R"                  \4   S\S\S\4S jrg)z)DNS RRsets (an RRset is a named rdataset)    )Any
CollectionDictOptionalUnion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                     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\4U 4S jjjr  SS\\R                  R                     S\S\\\4   S\4U 4S jjjr  SS\S\\R                  R6                     S\\R                  R                     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         B/home/matz/Project1/venv/lib/python3.13/site-packages/dns/rrset.pyr   RRset.__init__(   s     	&1	     c                 h   > [         TU ]  5       nU R                  Ul        U R                  Ul        U$ N)r   _cloner   r   )r   objr   s     r   r   RRset._clone6   s*    gn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__S   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   r7   RRset.__eq__V   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   )r4   r%   r   Name
full_matchr   match)r   r:   r;   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_matcho   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   rD   rE   rF   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   rI   rJ   rD   rF   r   s        r   rL   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%   r5   from_rdata_listttllistr0   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-   r1   r7   r   boolr@   r?   r   r)   r'   CompressTypeintrL   r5   r6   rR   __static_attributes____classcell__)r   s   @r   r
   r
      s    $I +.--*<*<8<!hhmm! **! ''	!
 ''! 3>>445! !
.%23 2# 2$ 2. 9=hhmm ** ''	
 '' 3>>445 
 * +/
'
 
 38n	

 

 
: 59*.	

 388001
 '	

 38n
 

 
*BS\\22 B Br   r
   r   rP   r   r   text_rdatas
idna_codecrD   rE   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rc   )r4   r)   r%   r   	from_textr(   r[   maker&   r\   r
   
update_ttlrdatar   r   add)r   rP   r   r   rb   rc   rD   rE   rd   rtrds               r   from_text_listro      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.
)ro   r   r   r)   )r   rP   r   r   rb   s        r   rg   rg      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.

Nrf   r   zrdata list must not be empty)r4   r)   r%   r   rg   len
ValueErrorr
   r   r   ri   rk   )r   rP   rq   rc   rl   rn   s         r   rO   rO      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.
)rO   r   r   r%   rj   Rdata)r   rP   rq   s      r   
from_rdatarw     s%     4d:ciioo+F&OPPr   )NNTNr   ) rX   typingr   r   r   r   r   r   dns.namer%   dns.rdataclassdns.rdatasetdns.rendererr5   r6   r
   r   r>   r)   r_   r(   r[   r&   r\   	IDNACodecr]   ro   rg   rj   rv   rO   rw    r   r   <module>r      s(  $ 0 ? ?    ZBCLL!! ZBF 04&*-1(
s"
#(	( 3>>,,c12( #--))3./	(
 C( ++,( SXX]]#( ( CHHMM*( (V
s"
#	 3>>,,c12 #--))3./	
  , 04	
s"
#	 syy' ++,	
 @QU388==#-. QS Q3 Q5 Qr   