
    '                     ~    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rS rS	 r " S
 S\R                  5      rg)z;Serves the survey and logs the response to clearcut tables.    )concord_util)base)survey)log)
console_ioGeneralSurveyc                    U R                   n [        R                  " U5      nU[        R                  R
                  R                  R                  :X  a$  [        R                  R
                  R                  $ U[        R                  R
                  R                  R                  :X  a$  [        R                  R
                  R                  $ U R                  U5      (       a  U$ U R                  nM  )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2F//==CCC]]++999	6==11==CC	C]]++777			v	&	&m44j 	    c                     [         R                  " SS9nU(       a  [        R                  " U 5        g[        R
                  R                  S5        g)z,Sends response to concord's clearcut tables.z#Do you want to submit your response)prompt_stringzYour response is not recorded.N)r   PromptContinuer   LogSurveyAnswersr   errPrint)survey_instancesends     r   LogResponser!   ,   s7    		"	"9
;$	!!/2GGMM23r   c                   .    \ rS rSrSr\S 5       rS rSrg)r   6   zInvoke 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                     g )N )parsers    r   ArgsSurvey.ArgsD   s    r   c                    [         R                  " 5       nUR                  5         [        [	        U5      5      n[        US5       GH3  u  pESR                  XC5      n[        R                  R                  U5        UR                  5         [        R                  R                  S5        UR                  5         [        U5      nU[         R                  R                  R                   :X  a!  [        R                  R                  S5          g U[         R                  R                  R"                  :X  a1  [        R                  R                  SR                  U5      5        GM"  UR%                  U5        GM6     ['        U5        g )N   z
Question {} of {}:

zExited the surveyzSkipped question {})r   r   PrintWelcomeMsglenlist	enumerateformatr   r   r   PrintQuestionwritePrintInstructionr   r   r   r   r   AnswerQuestionr!   )selfargsr   num_of_questionsindexr   progress_msgr   s           r   Run
Survey.RunH   s   **,O##%401$_a8-44UMl	ggmmL!	ggmmD&&(#H-f	6==11==	=)*V]]33AAA+2259:f% 9  r   r%   N)	__name__
__module____qualname____firstlineno____doc__staticmethodr'   r:   __static_attributes__r%   r   r   r   r   6   s      	 	!r   r   N)r@   googlecloudsdk.api_lib.surveyr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.surveyr   googlecloudsdk.corer   googlecloudsdk.core.consoler   
_SURVEY_IDr   r!   Commandr   r%   r   r   <module>rJ      s=    B 7 ( 4 # 2 
54%!T\\ %!r   