
    T                     ^    d Z ddlmZ ddlmZ ddlmZ ddlmZ ddZddZ G d	 d
e	      Z
y)z6API Client for Cloud Monitoring Notification Channels.    )absolute_import)division)unicode_literals)apisc                 2    t        j                  dd|       S )N
monitoringv3no_http)r   GetClientInstancer
   s    1lib/googlecloudsdk/api_lib/monitoring/channels.pyr   r      s    			dG	DD    Nc                 6    | xs
 t               } | j                  S N)r   MESSAGES_MODULE)clients    r   GetMessagesModuler      s    (&(&			r   c                   ,    e Zd ZdZddZd Zd ZddZy)	NotificationChannelsClientzAClient for Notification Channels service in the Cloud Monitoring.Nc                     |xs
 t               | _        |xs t        |      | _        | j                  j                  | _        y r   )r   r   r   messagesprojects_notificationChannels_service)selfr   r   s      r   __init__z#NotificationChannelsClient.__init__$   s5    /-/DK9 1& 9DMKK==DMr   c                     | j                   j                  |j                         |      }| j                  j	                  |      S )z#Creates an Monitoring Alert Policy.)namenotificationChannel)r   3MonitoringProjectsNotificationChannelsCreateRequestRelativeNamer   Create)r   project_refchannelreqs       r   r!   z!NotificationChannelsClient.Create)   sB    
--
K
K%%'# L %C ==$$r   c                     | j                   j                  |j                               }| j                  j	                  |      S )N)r   )r   0MonitoringProjectsNotificationChannelsGetRequestr    r   Get)r   channel_refr$   s      r   r'   zNotificationChannelsClient.Get0   s=    
--
H
H%%' I )C==S!!r   c                     | j                   j                  |j                         ||      }| j                  j	                  |      S )N)r   r   
updateMask)r   2MonitoringProjectsNotificationChannelsPatchRequestr    r   Patch)r   r(   r#   fieldsr$   s        r   Updatez!NotificationChannelsClient.Update5   sE    
--
J
J%%'# K C ==s##r   )NNr   )__name__
__module____qualname____doc__r   r!   r'   r.    r   r   r   r   !   s    I>
%"
$r   r   )Fr   )r2   
__future__r   r   r   googlecloudsdk.api_lib.utilr   r   r   objectr   r3   r   r   <module>r7      s-    = &  ' ,E 
$ $r   