
    l                         S r SSKJr  SSKJr  SSKJr  SSK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  \R                    " S S\R"                  5      5       rg)z&Command to create a new investigation.    )absolute_import)division)unicode_literalsN)args)util)arg_parsers)base)timesc                   .    \ rS rSrSr\S 5       rS rSrg)Create   a@  Update an existing investigation.

Shows metadata for the investigation after updating.

This command can fail for the following reasons:
* The investigation ID doesn't exist.
* The active account does not have permission to update the investigation.
* The investigation is currently running.

## EXAMPLES

The following command updates title, text description, resources, and start
time of the existing investigation with the name`example-foo-bar-1`:

  $ {command} example-foo-bar-1 --title="Example Investigation" \
      --issue="I have a problem" --start-time=2025-07-10
c                    [         R                  " U SSSS9  U R                  R                  S5        U R	                  SSSS9  U R                  SS	9nUR	                  S
S[        R                  SS9  UR	                  SSSSS9  U R                  SS	9nUR	                  SS[        R                  SS9  UR	                  SSSSS9  U R                  SS	9nUR	                  SSSS9  UR	                  SSSSS9  U R                  SS	9nUR	                  SSS[        R                  " 5       SS9  UR	                  SSSSS9  g )Nz	to updateTF)verbrequiredallow_no_idz(value(investigation_markdown_detailed())z--issuezBA description of the issue you are investigating, or an error log.)r   help)	sort_argsz--start-timez<The estimated start time of the issue you are investigating.)r   typer   z--clear-start-time
store_truez*Clear the start time of the investigation.)r   actionr   z
--end-timez:The estimated end time of the issue you are investigating.z--clear-end-timez(Clear the end time of the investigation.z--titlez1The desired title of the resulting investigation.z--clear-titlez%Clear the title of the investigation.z--resourcesRESOURCEz1A list of resources relevant to the investigation)r   metavarr   r   z--clear-resourcesz)Clear the resources of the investigation.)
gca_argsAddInvestigationResourceArgdisplay_info	AddFormatadd_argumentadd_mutually_exclusive_groupr
   ParseDateTimer   ArgList)parserstart_time_groupend_time_grouptitle_groupresources_groups        8lib/surface/gemini/cloud_assist/investigations/update.pyArgsCreate.Args3   s   (([4U !!"LM
P	   ::U:K!!  K	 "  !!9	 "  8858IN  I	    7	    555FK@  
 4	   99E9JO    "@ !    8	 !     c                    UR                   R                  R                  5       n[        R                  " UUR
                  (       a  SOUR                  UR                  UR                  (       a  [        R                  R                  OUR                  UR                  (       a  [        R                  R                  OUR                  UR                  (       a  / OUR                   5      n[        R"                  " UR$                  5      $ )N )CONCEPTSinvestigationParsegca_utilUpdateInvestigationclear_titletitleissueclear_start_timedatetimemin
start_timeclear_end_timemaxend_timeclear_resources	resources RunInvestigationRevisionBlockingrevision)selfr   investigation_refupdated_investigations       r&   Run
Create.Runy   s    3399;$88DJJ

!%!6!6DOO!%!4!4$--"" 44&& r)    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr'   rB   __static_attributes__rD   r)   r&   r   r      s#    $ C CJr)   r   )rI   
__future__r   r   r   r5   *googlecloudsdk.api_lib.gemini_cloud_assistr   r   r   r/   googlecloudsdk.callioper   r	   googlecloudsdk.core.utilr
   DefaultUniverseOnlyCommandr   rD   r)   r&   <module>rR      sM     - &  '  G G / ( * eT\\ e er)   