HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //usr/lib/google-cloud-sdk/lib/surface/__pycache__/unlock.cpython-312.pyc
�

������dZddlmZddlmZddlmZddlZddlZddlZddlm	Z	ddl
mZddlZdZ
Gd	�d
e�Ze	j e	j"e	j$j&�Gd�de	j(���Zy)
�9Unlock secrets and surprises coming soon to Google Cloud.�)�absolute_import)�division)�unicode_literalsN)�base)�encodingz=https://gcloud-unlock-api-gsaaz6raqa-uc.a.run.app/api/unlock/c��eZdZy)�
SurpriseErrorN)�__name__�
__module__�__qualname__���lib/surface/unlock.pyr
r
!s��rr
c�&�eZdZdZed��Zd�Zy)�EnableAlpharc�*�|jdd��y)N�SURPRISEz"ID of the surprise to be unlocked.)�help)�add_argument)�parsers r�ArgszEnableAlpha.Args*s��
���
�)M��Nrc�@�tjj�}tjd��}|j
|j}}tjtjdd�}|jgi||||d�d�}	tjt|��}|j�|j!�j#dd	�}	t%|	�y#tj&j($r }
t+d
j-|
����d}
~
wwxYw)N)�P�)�fallback�TERM�unknown)�istty�width�height�term)�args�options�terminfo)�json�content�z
{http_err})�http_err)�sys�stdout�isatty�shutil�get_terminal_size�columns�linesr�GetEncodedValue�os�environr�requests�post�_UNLOCK_URL�raise_for_statusr&�get�print�
exceptions�	HTTPErrorr
�format)�selfr#r�sizer r!�
terminal_type�unlock_request�response�response_contentr)s           r�RunzEnableAlpha.Run.s����J�J����E��#�#�X�6�D��L�L�$�*�*�6�E��,�,�R�Z�Z���K�M���������!�	
�	�N�	B����{��@�h����!�"����,�,�Y��;���������(�(�B��,�-�-�x�-�@�A�A��B�s�	AC � D�=D�DN)rrr
�__doc__�staticmethodrrCrrrrr%s"��B��O��O�Brr)rD�
__future__rrrr2r-r*�googlecloudsdk.callioper�googlecloudsdk.core.utilrr4r6�	Exceptionr
�Hidden�
ReleaseTracks�ReleaseTrack�GA�
SilentCommandrrrr�<module>rOs��� @�&��'�	�
�
�(�-��M���I���������D�%�%�(�(�)�"B�$�$�$�"B�*�
�"Br