+
    =l jT  ã                   ó  € ^ RI Ht ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHtHtHtHt  ! R R	]]4      tR
 R ltR R lt]! RR]RR7      tRRRRRRR]R]P*                  R3]P,                  R3]P.                  R3.RRRR /tR# )!é    )Úsecret_manager)Ú
exceptions)ÚAPIEndpoint)ÚAdditionalInfo)ÚUAConfig)ÚUAContractClient)Ú
DataObjectÚFieldÚIntDataValueÚStringDataValuec            	       ó†   a € ] tR t^t o ]! R]RR7      ]! R]RR7      ]! R]RR7      ]! R]R	R7      .tV 3R
 lR ltRt	V t
R# )ÚMagicAttachInitiateResultÚ	user_codezACode the user will see in the UI when confirming the Magic Attach)ÚdocÚtokenzgMagic Token that can be used in either `u.pro.attach.magic.revoke.v1`_ or `u.pro.attach.magic.wait.v1`_Úexpiresz0Timestamp of the Magic Attach process expirationÚ
expires_inz/Seconds before the Magic Attach process expiresc                ó2   <€ V ^8„  d   QhRS[ RS[ RS[ RS[/# )é   r   r   r   r   )ÚstrÚint)ÚformatÚ__classdict__s   "€ÚM/usr/lib/python3/dist-packages/uaclient/api/u/pro/attach/magic/initiate/v1.pyÚ__annotate__Ú&MagicAttachInitiateResult.__annotate__.   s3   ø€ ÷ 
%ñ 
%áð
%ñ ð
%ñ ð	
%ñ
 ñ
%ó    c                ó6   € Wn         W n        W0n        W@n        R # ©N©r   r   r   r   )Úselfr   r   r   r   s   &&&&&r   Ú__init__Ú"MagicAttachInitiateResult.__init__.   s   € ð #ŒØŒ
ØŒØ$Žr   )r   r   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r
   r   r   Úfieldsr"   Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      sd   ø‡ € áØØðô		
ñ 	ØØð1ô		
ñ 	ØØØBô	
ñ
 	ØØØAô	
ð/€F÷<
%ö 
%r   r   c                ó$   € V ^8„  d   QhR\         /# )r   Úreturn)r   )r   s   "r   r   r   ;   s   € ÷ !ñ !Ô+ñ !r   c                  ó(   € \        \        4       4      # r   )Ú	_initiater   © r   r   Úinitiater0   ;   s   € Ü”X“ZÓ Ð r   c                ó0   € V ^8„  d   QhR\         R\        /# )r   Úcfgr,   )r   r   )r   s   "r   r   r   ?   s   € ÷ ñ ”8ð Ô 9ñ r   c           	     ó8  € \        V 4      pVP                  4       p\        P                  P	                  VR,          4       \        P                  P	                  VR,          4       \        VR,          VR,          VR,          \        VR,          4      R7      # )z�
This endpoint initiates the Magic Attach flow, retrieving the User Code to
confirm the operation and the Token used to proceed.
r   ÚuserCoder   Ú	expiresInr    )r   Únew_magic_attach_tokenr   ÚsecretsÚ
add_secretr   r   )r2   ÚcontractÚinitiate_resps   &  r   r.   r.   ?   s€   € ô
   Ó$€HØ×3Ñ3Ó5€MÜ×Ñ×%Ñ% m°GÕ&<Ô=Ü×Ñ×%Ñ% m°JÕ&?Ô@Ü$Ø 
Õ+Ø˜GÕ$Ø˜iÕ(Ü�} [Õ1Ó2ô	ð r   Úv1ÚMagicAttachInitiateN)ÚversionÚnameÚfnÚoptions_clsÚintroduced_inz27.11Úrequires_networkTÚexample_pythonzW
from uaclient.api.u.pro.attach.magic.initiate.v1 import initiate

result = initiate()
Úresult_classr   zARaised if it is not possible to connect to the contracts service.zLRaised if there is an unexpected error in the contracts service interaction.zHRaised if the Magic Attach service is busy or unavailable at the moment.Úexample_cliz&pro api u.pro.attach.magic.initiate.v1Úexample_jsonz„
{
    "user_code":"<UI_code>",
    "token":"<magic_token>",
    "expires": "<yyyy-MM-dd>T<HH:mm:ss>.<TZ>",
    "expires_in": 600
}
)Úuaclientr   Úuaclient.apir   Úuaclient.api.apir   Úuaclient.api.data_typesr   Úuaclient.configr   Úuaclient.contractr   Úuaclient.data_typesr	   r
   r   r   r   r0   r.   ÚendpointÚConnectivityErrorÚContractAPIErrorÚMagicAttachUnavailableÚ_docr/   r   r   Ú<module>rS      sË   ðÝ #Ý #Ý (Ý 2Ý $Ý .÷ó ô)% 
¨Nô )%õX!õñ" ØØ	ØØô	€ð �WØ˜Øð ð
 Ð-Øà×(Ñ(ðð	
ð ×'Ñ'ð(ð	
ð ×-Ñ-ðð	
ðð. Ð;Øð ðC)‚r   