
                         N    d Z ddlmZ ddlmZ ddlmZ ddlmZ  G d de      Zy)	z*Utilities for Cloud Monitoring Alerts API.    )absolute_import)division)unicode_literals)utilc                   &    e Zd ZdZddZd ZddZy)AlertsClientz?Client for the Alert service in the Stackdriver Monitoring API.Nc                     |xs t        j                         | _        |xs | j                  j                  | _        | j                  j
                  | _        y )N)r   GetClientInstanceclientMESSAGES_MODULEmessagesprojects_alerts_service)selfr   r   s      /lib/googlecloudsdk/api_lib/monitoring/alerts.py__init__zAlertsClient.__init__   s>    4D224DK; ; ;DMKK//DM    c                     | j                   j                  |j                               }| j                  j	                  |      S )zGets a Monitoring Alert.)name)r   "MonitoringProjectsAlertsGetRequestRelativeNamer   Get)r   	alert_refrequests      r   r   zAlertsClient.Get    s>    mm>>##% ? G ==W%%r   c                     | j                   j                  |j                         |||      }| j                  j	                  |      S )zLists Monitoring Alerts.)parentfilterorderBypageSize)r   #MonitoringProjectsAlertsListRequestr   r   List)r   project_refa_filterorder_by	page_sizer   s         r   r!   zAlertsClient.List'   sH    mm??'')	 @ G ==g&&r   )NN)NNN)__name__
__module____qualname____doc__r   r   r!    r   r   r   r      s    G0
&'r   r   N)	r)   
__future__r   r   r   !googlecloudsdk.api_lib.monitoringr   objectr   r*   r   r   <module>r.      s"    1 &  ' 2'6 'r   