+
    niS1                        R t ^ RIt^ RIt^ RIHtHt ^ RIt^ RIt^ RI	t^ RI
t^ RIt^ RIt]P                  P                  0t]P                  P                   ]P                  P"                  ]P                  P$                  0tR t]P*                   ! R R]P,                  4      4       t ! R R4      t]P2                  P2                   ! R R	]4      4       tR# )
z)DNS nodes.  A node is a set of rdatasets.N)AnyDictc                 l    W9   ;'       g*    V\         P                  P                  8H  ;'       d    W 9   # N)dns	rdatatypeRRSIG)rdtypesrdtypecoverss   &&&bC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO\maestro-backend\venv\Lib\site-packages\dns/node.py_matches_type_or_its_signaturer   +   s-    UU3==+>+>!>!T!T6CTU    c                   h   a  ] tR t^/t o Rt^ t^t^t]V 3R lR l4       t	]V 3R lR l4       t
RtV tR# )NodeKindzRdatasets in nodesc                z   < V ^8  d   QhRS[ P                  P                  RS[ P                  P                  RR/# )   r
   r   returnr   )r   r   	RdataType)format__classdict__s   "r   __annotate__NodeKind.__annotate__8   s9     $ $]],,$69mm6M6M$	$r   c                    \        \        W4      '       d   \        P                  # \        \        W4      '       d   \        P
                  # \        P                  # r   )r   _cname_typesr   CNAME_neutral_typesNEUTRALREGULAR)clsr
   r   s   &&&r   classifyNodeKind.classify7   s@     *,GG>>!+NFKK######r   c                L   < V ^8  d   QhRS[ P                  P                  RR/# )r   rdatasetr   r   r   r#   Rdataset)r   r   s   "r   r   r   C   s%     > >)>)> >: >r   c                N    V P                  VP                  VP                  4      # r   )r    r
   r   )r   r#   s   &&r   classify_rdatasetNodeKind.classify_rdatasetB   s    ||HOOX__==r    N)__name__
__module____qualname____firstlineno____doc__r   r   r   classmethodr    r'   __static_attributes____classdictcell__r   s   @r   r   r   /   s=     GGE$ $ > >r   r   c                   `  a  ] tR t^Gt o RtR.tR tV 3R lR ltR tR t	R t
R	 tR
 tR t]P                  P                   R3V 3R lR llt]P                  P                   R3V 3R lR llt]P                  P                   3V 3R lR lltV 3R lR ltV 3R lR ltV 3R lR ltRtV tR# )Nodea  A Node is a set of rdatasets.

A node is either a CNAME node or an "other data" node.  A CNAME
node contains only CNAME, KEY, NSEC, and NSEC3 rdatasets along with their
covering RRSIG rdatasets.  An "other data" node contains any
rdataset other than a CNAME or RRSIG(CNAME) rdataset.  When
changes are made to a node, the CNAME or "other data" state is
always consistent with the update, i.e. the most recent change
wins.  For example, if you have a node which contains a CNAME
rdataset, and then add an MX rdataset to it, then the CNAME
rdataset will be deleted.  Likewise if you have a node containing
an MX rdataset and add a CNAME rdataset, the MX rdataset will be
deleted.
	rdatasetsc                    . V n         R # r   r5   selfs   &r   __init__Node.__init__Y   s	    r   c                j   < V ^8  d   QhRS[ P                  P                  RS[S[S[3,          RS[/# )r   namekwr   )r   r=   Namer   strr   )r   r   s   "r   r   Node.__annotate__]   s2     ! !CHHMM !c3h !C !r   c                   \         P                  ! 4       pV P                   FH  p\        V4      ^ 8  g   K  VP	                  VP
                  ! V3/ VB 4       VP	                  R4       KJ  	  VP                  4       RR # )zConvert a node to text format.

Each rdataset at the node is printed.  Any keyword arguments
to this method are passed on to the rdataset's to_text() method.

*name*, a ``dns.name.Name``, the owner name of the
rdatasets.

Returns a ``str``.


N)ioStringIOr5   lenwriteto_textgetvalue)r9   r=   r>   srdss   &&,  r   rI   Node.to_text]   sb     KKM>>C3x!|D/B/0 " zz|CR  r   c                F    R \        \        V 4      4      ,           R,           # )z
<DNS node >)r@   idr8   s   &r   __repr__Node.__repr__q   s    c"T(m+c11r   c                    V P                    F  pW!P                   9  g   K   R # 	  VP                    F  pW P                   9  g   K   R # 	  R# )FTr7   )r9   otherrds   && r   __eq__Node.__eq__t   sA     ..B( ! //B' " r   c                .    V P                  V4      '       * # r   )rV   )r9   rT   s   &&r   __ne__Node.__ne__   s    ;;u%%%r   c                ,    \        V P                  4      # r   )rG   r5   r8   s   &r   __len__Node.__len__   s    4>>""r   c                ,    \        V P                  4      # r   )iterr5   r8   s   &r   __iter__Node.__iter__   s    DNN##r   c                0   \        V P                  4      ^ 8  d   \        P                  V4      pV\        P                  8X  dM   V P                   Uu. uF/  p\        P                  V4      \        P
                  8w  g   K-  VNK1  	  upV n        M`V\        P
                  8X  dL   V P                   Uu. uF/  p\        P                  V4      \        P                  8w  g   K-  VNK1  	  upV n        V P                  P                  V4       R# u upi u upi )aV  Append rdataset to the node with special handling for CNAME and
other data conditions.

Specifically, if the rdataset being appended has ``NodeKind.CNAME``,
then all rdatasets other than KEY, NSEC, NSEC3, and their covering
RRSIGs are deleted.  If the rdataset being appended has
``NodeKind.REGULAR`` then CNAME and RRSIG(CNAME) are deleted.
N)rG   r5   r   r'   r   r   append)r9   r#   kindrL   s   &&  r   _append_rdatasetNode._append_rdataset   s     t~~"--h7Dx~~%  $~~"-11#6(:J:JJ C-"
 )))  $~~"-11#6(..H C-" 	h'""s   *DD4*D#DFc          
         < V ^8  d   QhRS[ P                  P                  RS[ P                  P                  RS[ P                  P                  RS[RS[ P                  P                  /# r   rdclassr
   r   creater   r   
rdataclass
RdataClassr   r   boolr#   r%   )r   r   s   "r   r   rA      se     ' '**' ''' ''	'
 ' 
		'r   c                    V P                    F  pVP                  WV4      '       g   K  Vu # 	  V'       g   \        h\        P                  P                  WV4      pV P                  V4       V# )a  Find an rdataset matching the specified properties in the
current node.

*rdclass*, a ``dns.rdataclass.RdataClass``, the class of the rdataset.

*rdtype*, a ``dns.rdatatype.RdataType``, the type of the rdataset.

*covers*, a ``dns.rdatatype.RdataType``, the covered type.
Usually this value is ``dns.rdatatype.NONE``, but if the
rdtype is ``dns.rdatatype.SIG`` or ``dns.rdatatype.RRSIG``,
then the covers value will be the rdata type the SIG/RRSIG
covers.  The library treats the SIG and RRSIG types as if they
were a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).
This makes RRSIGs much easier to work with than if RRSIGs
covering different rdata types were aggregated into a single
RRSIG rdataset.

*create*, a ``bool``.  If True, create the rdataset if it is not found.

Raises ``KeyError`` if an rdataset of the desired type and class does
not exist and *create* is not ``True``.

Returns a ``dns.rdataset.Rdataset``.
)r5   matchKeyErrorr   r#   r%   re   r9   ri   r
   r   rj   rL   s   &&&&& r   find_rdatasetNode.find_rdataset   s\    @ >>Cyy&11
 " Nll##GV<c"
r   c                   < V ^8  d   QhRS[ P                  P                  RS[ P                  P                  RS[ P                  P                  RS[RS[ P                  P                  R,          /# r   ri   r
   r   rj   r   Nrk   )r   r   s   "r   r   rA      sj     # #**# ''# ''	#
 # 
			%#r   c                T     V P                  WW44      pV#   \         d    Rp T# i ; i)ag  Get an rdataset matching the specified properties in the
current node.

None is returned if an rdataset of the specified type and
class does not exist and *create* is not ``True``.

*rdclass*, an ``int``, the class of the rdataset.

*rdtype*, an ``int``, the type of the rdataset.

*covers*, an ``int``, the covered type.  Usually this value is
dns.rdatatype.NONE, but if the rdtype is dns.rdatatype.SIG or
dns.rdatatype.RRSIG, then the covers value will be the rdata
type the SIG/RRSIG covers.  The library treats the SIG and RRSIG
types as if they were a family of
types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).  This makes RRSIGs much
easier to work with than if RRSIGs covering different rdata
types were aggregated into a single RRSIG rdataset.

*create*, a ``bool``.  If True, create the rdataset if it is not found.

Returns a ``dns.rdataset.Rdataset`` or ``None``.
N)rs   rq   rr   s   &&&&& r   get_rdatasetNode.get_rdataset   s;    >	$$WfEC 
  	C
	s    ''c                   < V ^8  d   QhRS[ P                  P                  RS[ P                  P                  RS[ P                  P                  RR/# r   ri   r
   r   r   Nr   rl   rm   r   r   )r   r   s   "r   r   rA      sQ     ' '**' ''' ''	'
 
'r   c                l    V P                  WV4      pVe   V P                  P                  V4       R# R# )a  Delete the rdataset matching the specified properties in the
current node.

If a matching rdataset does not exist, it is not an error.

*rdclass*, an ``int``, the class of the rdataset.

*rdtype*, an ``int``, the type of the rdataset.

*covers*, an ``int``, the covered type.
N)rx   r5   remove)r9   ri   r
   r   rL   s   &&&& r   delete_rdatasetNode.delete_rdataset   s2    $ 8?NN!!#& r   c                L   < V ^8  d   QhRS[ P                  P                  RR/# r   replacementr   Nr$   )r   r   s   "r   r   rA   	  s%     + +CLL,A,A +d +r   c                h   \        V\        P                  P                  4      '       g   \	        R4      h\        V\        P
                  P                  4      '       d   VP                  4       pV P                  VP                  VP                  VP                  4       V P                  V4       R# )a  Replace an rdataset.

It is not an error if there is no rdataset matching *replacement*.

Ownership of the *replacement* object is transferred to the node;
in other words, this method does not store a copy of *replacement*
at the node, it stores *replacement* itself.

*replacement*, a ``dns.rdataset.Rdataset``.

Raises ``ValueError`` if *replacement* is not a
``dns.rdataset.Rdataset``.
zreplacement is not an rdatasetN)
isinstancer   r#   r%   
ValueErrorrrsetRRsetto_rdatasetr   ri   r
   r   re   r9   r   s   &&r   replace_rdatasetNode.replace_rdataset	  s     +s||'<'<===>>k399??33 &113K!3!3[5G5G	
 	k*r   c                    < V ^8  d   QhRS[ /# r   r   )r   )r   r   s   "r   r   rA   #  s        (  r   c                    V P                    FF  p\        P                  VP                  VP                  4      pV\        P
                  8w  g   KD  Vu # 	  \        P
                  # )a  Classify a node.

A node which contains a CNAME or RRSIG(CNAME) is a
``NodeKind.CNAME`` node.

A node which contains only "neutral" types, i.e. types allowed to
co-exist with a CNAME, is a ``NodeKind.NEUTRAL`` node.  The neutral
types are NSEC, NSEC3, KEY, and their associated RRSIGS.  An empty node
is also considered neutral.

A node which contains some rdataset which is not a CNAME, RRSIG(CNAME),
or a neutral type is a a ``NodeKind.REGULAR`` node.  Regular nodes are
also commonly referred to as "other data".
)r5   r   r    r
   r   r   )r9   r#   rd   s   &  r   r    Node.classify#  sM     H$$X__hooFDx''' ' r   c                    < V ^8  d   QhRS[ /# r   rn   )r   r   s   "r   r   rA   8  s      d r   c                    R # )Fr)   r8   s   &r   is_immutableNode.is_immutable8  s    r   r7   N)r*   r+   r,   r-   r.   	__slots__r:   rI   rQ   rV   rY   r\   r`   re   r   r   NONErs   rx   r   r   r    r   r0   r1   r2   s   @r   r4   r4   G   s      I! !(2
&#$(@ +.--*<*<' 'Z +.--*<*<# #R +.--*<*<	' ',+ +4   * r   r4   c                   &  a a ] tR tRt oV 3R lt]P                  P                  R3V3R lV 3R lllt]P                  P                  R3V3R lV 3R lllt	]P                  P                  3V3R lR	 llt
V3R
 lR ltV3R lR ltRtVtV ;t# )ImmutableNodei<  c                   < \         SV `  4        \        VP                   Uu. uF"  p\        P
                  P                  V4      NK$  	  up4      V n        R # u upi r   )superr:   tupler5   r   r#   ImmutableRdataset)r9   noderL   	__class__s   && r   r:   ImmutableNode.__init__>  sB    <@NNKNSS\\++C0NK
Ks   (AFc          
         < V ^8  d   QhRS[ P                  P                  RS[ P                  P                  RS[ P                  P                  RS[RS[ P                  P                  /# rh   rk   )r   r   s   "r   r   ImmutableNode.__annotate__D  sl     	E 	E**	E ''	E ''		E
 	E 
			Er   c                L   < V'       d   \        R 4      h\        SV `	  WVR4      # 	immutableF)	TypeErrorr   rs   r9   ri   r
   r   rj   r   s   &&&&&r   rs   ImmutableNode.find_rdatasetD  s'     K((w$WfeDDr   c                   < V ^8  d   QhRS[ P                  P                  RS[ P                  P                  RS[ P                  P                  RS[RS[ P                  P                  R,          /# rv   rk   )r   r   s   "r   r   r   O  sq     	D 	D**	D ''	D ''		D
 	D 
			%	Dr   c                L   < V'       d   \        R 4      h\        SV `	  WVR4      # r   )r   r   rx   r   s   &&&&&r   rx   ImmutableNode.get_rdatasetO  s'     K((w#GVUCCr   c                   < V ^8  d   QhRS[ P                  P                  RS[ P                  P                  RS[ P                  P                  RR/# r{   r|   )r   r   s   "r   r   r   Z  sQ     % %**% ''% ''	%
 
%r   c                    \        R 4      hr   r   )r9   ri   r
   r   s   &&&&r   r   ImmutableNode.delete_rdatasetZ  s     $$r   c                L   < V ^8  d   QhRS[ P                  P                  RR/# r   r$   )r   r   s   "r   r   r   b  s%     % %CLL,A,A %d %r   c                    \        R 4      hr   r   r   s   &&r   r   ImmutableNode.replace_rdatasetb  s    $$r   c                    < V ^8  d   QhRS[ /# r   r   )r   r   s   "r   r   r   e  s      d r   c                    R # )Tr)   r8   s   &r   r   ImmutableNode.is_immutablee  s    r   r7   )r*   r+   r,   r-   r:   r   r   r   rs   rx   r   r   r   r0   r1   __classcell__)r   r   s   @@r   r   r   <  sx     
 +.--*<*<	E 	E +.--*<*<	D 	D +.--*<*<	% %% %  r   r   )r.   enumrE   typingr   r   dns.immutabler   dns.namedns.rdataclassdns.rdatasetdns.rdatatype	dns.rrsetr   r   r   NSECNSEC3KEYr   r   uniqueEnumr   r4   r   r   r)   r   r   <module>r      s   $ 0  	        MM MMMMMMV >tyy > >.r rj )D ) )r   