
    
                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
   " S S	\R                  5      r " S
 S5      rSrSrS rg)a  Stub implementation of SVCB and HTTPS records.

This module can be removed after updating to dnspython 2.x, which has built-in
support for these types.  (dnspython 2.x only supports Python 3, but this
codebase requires support for Python 2, so it is still using dnspython 1.x.)
    )absolute_import)division)unicode_literals)rdata)Name)	Tokenizerc                   J   ^  \ rS rSrSrU 4S jrSS jr\SS j5       rSr	U =r
$ )	_StubSVCB    zStub implementation of SVCB RDATA.

Wire format support is not needed here, so only trivial storage of the
presentation format is implemented.
c                 P   > [         [        U ]  X5        X0l        X@l        XPl        g N)superr
   __init__	_priority_target_params)selfrdclassrdtypeprioritytargetparams	__class__s         +lib/googlecloudsdk/api_lib/dns/svcb_stub.pyr   _StubSVCB.__init__(   s!    	)T#G4NLL    c                     SU R                   -  U R                  R                  X5      R                  5       /U R                  -   nSR                  U5      $ )Nz%d )r   r   choose_relativityto_textr   join)r   origin
relativizekwargstokenss        r   r    _StubSVCB.to_text/   sO    t~~&&v:BBD 	F 88Fr   c                    UR                  5       nUR                  U5      R                  XE5      n/ n UR                  5       R	                  5       n	U	R                  5       (       a  OUR                  U	R                  5        MQ  U " XXgU5      $ r   )
get_uint16get_namer   getunescapeis_eol_or_eofappendvalue)
clsr   r   tokr"   r#   r   r   r   tokens
             r   	from_text_StubSVCB.from_text6   s}     ~~H\\&!33FGFF
ggi  "e					mmEKK 	  w&99r   )r   r   r   )NT)__name__
__module____qualname____firstlineno____doc__r   r    classmethodr2   __static_attributes____classcell__)r   s   @r   r
   r
       s&     : :r   r
   c                        \ rS rSrSr\r\rSrg)_FakeModuleE   zzFake module corresponding to dns.rdtypes.IN.SVCB.

This is needed due to the calling convention of rdata.register_type().
 N)	r4   r5   r6   r7   r8   r
   SVCBHTTPSr:   r?   r   r   r=   r=   E   s    
 
$
%r   r=   @   A   c                       [         R                  " [        [        S5        [         R                  " [        [        S5        g ! [         R
                   a     g f = f)Nr@   rA   )r   register_typer=   r@   rA   RdatatypeExistsr?   r   r   registerrG   S   sE    		T62	UG4			 	 		s   A A AAN)r8   
__future__r   r   r   dnsr   dns.namer   dns.tokenizerr   Rdatar
   r=   r@   rA   rG   r?   r   r   <module>rM      sJ     '  '   #": ":J  

	r   