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__/survey.cpython-312.pyc
�

������dZddlmZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZdd	l
mZd
Zd�Zd�ZGd
�dej$�Zy)z;Serves the survey and logs the response to clearcut tables.�)�absolute_import)�division)�unicode_literals)�concord_util)�base)�survey)�log)�
console_io�
GeneralSurveyc���|j}	tj|�}|tjj
jjk(r$tjj
jS|tjj
jjk(r$tjj
jS|j|�r|S|j}��)z,Prompts user for the answer to the question.)�instructionr
�PromptResponser�Survey�ControlOperation�
SKIP_QUESTION�value�EXIT_SURVEY�AcceptAnswer�instruction_on_rejection)�question�
prompt_msg�answers   �lib/surface/survey.py�_GetAnswerToQuestionr s����#�#�*��
�
&�
&�z�
2�F�
����/�/�=�=�C�C�C�
�]�]�
+�
+�
9�
9�9�	�6�=�=�1�1�=�=�C�C�	C�
�]�]�
+�
+�
7�
7�7�	�	�	�v�	&�
�m��4�4�j�	
�c��tjd��}|rtj|�ytj
j
d�y)z,Sends response to concord's clearcut tables.z#Do you want to submit your response)�
prompt_stringzYour response is not recorded.N)r
�PromptContinuer�LogSurveyAnswersr	�err�Print)�survey_instance�sends  r�LogResponser$/s7��	�	"�	"�9�
;�$�	��!�!�/�2��G�G�M�M�2�3rc�&�eZdZdZed��Zd�Zy)rz�Invoke a customer satisfaction survey for Google Cloud CLI.

  To permanently disable the survey prompt, run:

     $ gcloud config set survey/disable_prompts True

  ## EXAMPLES

  To launch the survey, run:

    $ {command}
  c��y)N�)�parsers r�ArgszSurvey.ArgsGs��rc��tj�}|j�tt	|��}t|d�D�]1\}}dj
||�}tjj|�|j�tjjd�|j�t|�}|tjjj k(r!tjjd�y|tjjj"k(r0tjjdj
|����!|j%|���4t'|�y)N�z
Question {} of {}:
�
zExited the surveyzSkipped question {})rr�PrintWelcomeMsg�len�list�	enumerate�formatr	r r!�
PrintQuestion�write�PrintInstructionrrrrr�AnswerQuestionr$)�self�argsr"�num_of_questions�indexr�progress_msgrs        r�Runz
Survey.RunKs���*�*�,�O��#�#�%��4��0�1��$�_�a�8���x�-�4�4�U�<L�M�l�	�g�g�m�m�L�!�����	�g�g�m�m�D���&�&�(�#�H�-�f�	�6�=�=�1�1�=�=�	=����
�
�)�*���V�]�]�3�3�A�A�A����
�
�+�2�2�5�9�:�����f�%�9��� rN)�__name__�
__module__�__qualname__�__doc__�staticmethodr)r;r'rrrr9s ����	��	�!rrN)r?�
__future__rrr�googlecloudsdk.api_lib.surveyr�googlecloudsdk.callioper�!googlecloudsdk.command_lib.surveyr�googlecloudsdk.corer	�googlecloudsdk.core.consoler
�
_SURVEY_IDrr$�Commandrr'rr�<module>rIsF��B�&��'�7�(�4�#�2��
�5�4�%!�T�\�\�%!r