
    
                     z    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SK
Jr   " S S	\R                  5      rg
)z+`gcloud monitoring snoozes cancel` command.    )snoozes)base)resource_args)util)log)timesc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Cancel   zCancels a snooze.a            Cancel a snooze.

          If the start time is in the future, then
          this command is equivalent to:

            * update --start-time="+PT1S" --end-time="+PT1S

          Otherwise, if the start time is past and the ending time is in the
          future, then this command is equivalent to:

            * update --end-time="+PT1S

          For information about the JSON/YAML format of a snooze:
          https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.snoozes
       aQ            To cancel a snooze, run:

            $ {command} MY-SNOOZE

          To cancel a snooze contained within a specific project, run:

            $ {command} MY-SNOOZE --project=MY-PROJECT

          To cancel a snooze with a fully qualified snooze ID, run:

            $ {command} projects/MY-PROJECT/snoozes/MY-SNOOZE
       )DESCRIPTIONEXAMPLESc                 ^    [         R                  " S5      /n[         R                  " X5        g )Nzto be canceled.)r   CreateSnoozeResourceArgAddResourceArgs)parser	resourcess     (lib/surface/monitoring/snoozes/cancel.pyArgsCancel.Args=   s)     	--.?@BI!!&4    c                    [         R                  " 5       nUR                  nUR                  R                  R                  5       nUR                  U5      n[        R                  " UR                  R                  5      n[        R                  " S5      nU[        R                  " 5       :  a  Un[        R                  " UUUUS9  UR                  XES 5      n[        R                   " UR"                  S5        U$ )Nz+PT1S)
start_timeend_timesnooze)r   SnoozeClientmessagesCONCEPTSr   ParseGetr   ParseDateTimeinterval	startTimeNowr   ModifySnoozeUpdater   UpdatedResourcename)	selfargsclientr   
snooze_refr   r   r   results	            r   Run
Cancel.RunC   s    !!#FH%%++-J ZZ
#F$$V__%>%>?J""7+HEIIKj	 ]]:t4FX.Mr    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r-   __static_attributes__r/   r   r   r
   r
      s0     #-@ 5 5
r   r
   N)r4   !googlecloudsdk.api_lib.monitoringr   googlecloudsdk.callioper   %googlecloudsdk.command_lib.monitoringr   r   googlecloudsdk.corer   googlecloudsdk.core.utilr   UpdateCommandr
   r/   r   r   <module>r>      s0    2 6 ( ? 6 # *?T ?r   