
    	                     b    S r SSKJr  SSKJr  SSKJr  SSKJr  SS jrSS jr " S	 S
\	5      r
g)z+Utilities for Cloud Monitoring Snoozes API.    )absolute_import)division)unicode_literals)apisc                 .    [         R                  " SSU S9$ )N
monitoringv3no_http)r   GetClientInstancer
   s    0lib/googlecloudsdk/api_lib/monitoring/snoozes.pyr   r      s    			dG	DD    Nc                 @    U =(       d
    [        5       n U R                  $ N)r   MESSAGES_MODULE)clients    r   GetMessagesModuler      s    (&(&			r   c                   8    \ rS rSrSrS	S jrS rS rS
S jrSr	g)SnoozeClient!   z@Client for the Snooze service in the Stackdriver Monitoring API.Nc                     U=(       d
    [        5       U l        U=(       d    [        U5      U l        U R                  R                  U l        g r   )r   r   r   messagesprojects_snoozes_service)selfr   r   s      r   __init__SnoozeClient.__init__$   s5    /-/DK9 1& 9DMKK00DMr   c                     U R                   R                  UR                  5       US9nU R                  R	                  U5      $ )zCreates a Stackdriver snooze.)parentsnooze)r   &MonitoringProjectsSnoozesCreateRequestRelativeNamer   Create)r   project_refr    reqs       r   r#   SnoozeClient.Create)   sA    
--
>
>'') ? C ==$$r   c                     U R                   R                  UR                  5       S9nU R                  R	                  U5      $ )zGets an Monitoring Snooze.)name)r   #MonitoringProjectsSnoozesGetRequestr"   r   Get)r   
snooze_refrequests      r   r*   SnoozeClient.Get0   s=    mm??$$& @ (G==W%%r   c                     U R                   R                  UR                  5       UUS9nU R                  R	                  U5      $ )a  Updates a Monitoring Snooze.

If fields is not specified, then the snooze is replaced entirely. If
fields are specified, then only the fields are replaced.

Args:
  snooze_ref: resources.Resource, Resource reference to the snooze to be
      updated.
  snooze: Snooze, The snooze message to be sent with the request.
  fields: str, Comma separated list of field masks.
Returns:
  Snooze, The updated Snooze.
)r(   r    
updateMask)r   %MonitoringProjectsSnoozesPatchRequestr"   r   Patch)r   r+   r    fieldsr,   s        r   UpdateSnoozeClient.Update6   sG     mmAA$$& B G ==w''r   )r   r   r   )NNr   )
__name__
__module____qualname____firstlineno____doc__r   r#   r*   r3   __static_attributes__ r   r   r   r   !   s    H1
%&(r   r   )Fr   )r9   
__future__r   r   r   googlecloudsdk.api_lib.utilr   r   r   objectr   r;   r   r   <module>r?      s-    2 &  ' ,E 
'(6 '(r   