
    
                     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 Uptime API.    )absolute_import)division)unicode_literals)apisc                 .    [         R                  " SSU S9$ )N
monitoringv3no_http)r   GetClientInstancer
   s    /lib/googlecloudsdk/api_lib/monitoring/uptime.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)UptimeClient!   zFClient for the Uptime Check 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_uptimeCheckConfigs_service)selfr   r   s      r   __init__UptimeClient.__init__$   s5    /-/DK9 1& 9DMKK;;DMr   c                     U R                   R                  UR                  5       S9nU R                  R	                  U5      $ )z Gets a Stackdriver uptime check.)name)r   .MonitoringProjectsUptimeCheckConfigsGetRequestRelativeNamer   Get)r   uptime_check_refrequests      r   r"   UptimeClient.Get)   s?    mmJJ**, K G ==W%%r   c                     U R                   R                  UR                  5       US9nU R                  R	                  U5      $ )z#Creates a Stackdriver uptime check.)parentuptimeCheckConfig)r   1MonitoringProjectsUptimeCheckConfigsCreateRequestr!   r   Create)r   project_refuptime_checkreqs       r   r*   UptimeClient.Create0   sB    
--
I
I'')& J C ==$$r   c                     U R                   R                  UR                  5       UUS9nU R                  R	                  U5      $ )a  Updates a Stackdriver uptime check.

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

Args:
  uptime_check_ref: resources.Resource, Resource reference to the
    uptime_check to be updated.
  uptime_check: Uptime Check, The uptime_check message to be sent with the
    request.
  fields: str, Comma separated list of field masks.

Returns:
  Uptime Check, The updated Uptime Check.
)r   r(   
updateMask)r   0MonitoringProjectsUptimeCheckConfigsPatchRequestr!   r   Patch)r   r#   r,   fieldsr$   s        r   UpdateUptimeClient.Update8   sG      mmLL**,& M G
 ==w''r   )r   r   r   )NNr   )
__name__
__module____qualname____firstlineno____doc__r   r"   r*   r4   __static_attributes__ r   r   r   r   !   s    N<
&%(r   r   )Fr   )r:   
__future__r   r   r   googlecloudsdk.api_lib.utilr   r   r   objectr   r<   r   r   <module>r@      s-    1 &  ' ,E 
,(6 ,(r   