
    [                         S r SSKJr  SSKJr  SSKJr  S rS rS rS r	S	 r
S
 rS rS rS rS rS rS rSS jrS r  SS jrS rS rS rS rSS jrg)z4Shared resource flags for Cloud Monitoring commands.    )concepts)concept_parsers)presentation_specsc                  ,    [         R                  " SSS9$ )NalertzName of the alert.name	help_textr    ResourceParameterAttributeConfig     :lib/googlecloudsdk/command_lib/monitoring/resource_args.pyAlertAttributeConfigr      s    		2	22
 r   c                  ,    [         R                  " SSS9$ )NpolicyzName of the alerting policy.r   r   r   r   r   AlertPolicyAttributeConfigr      s    		2	2.
0 0r   c                  ,    [         R                  " SSS9$ )N	conditionz&Name of the alerting policy condition.r   r   r   r   r   ConditionAttributeConfigr   #   s    		2	28
: :r   c                  ,    [         R                  " SSS9$ )Nnotification_channelsz!Name of the Notification Channel.r   r   r   r   r   "NotificationChannelAttributeConfigr   )   s    		2	2"3
5 5r   c                  ,    [         R                  " SSS9$ )NsnoozezName of the snooze.r   r   r   r   r   SnoozeAttributeConfigr   /   s    		2	2%
' 'r   c                  ,    [         R                  " SSS9$ )Ncheck_idz.Name of the uptime check or synthetic monitor.r   r   r   r   r   UptimeCheckAttributeConfigr   5   s    		2	2@
B Br   c                  \    [         R                  " SS[        5       [         R                  S9$ )Nzmonitoring.projects.alertsAlert)resource_namealertsId
projectsId)r   ResourceSpecr    DEFAULT_PROJECT_ATTRIBUTE_CONFIGr   r   r   GetAlertResourceSpecr'   ;   s*    			"#%::	
 r   c                  \    [         R                  " SS[        5       [         R                  S9$ )Nz!monitoring.projects.alertPolicieszAlert Policy)r"   alertPoliciesIdr$   )r   r%   r   r&   r   r   r   GetAlertPolicyResourceSpecr*   D   s*    			)"02::	
< <r   c                  n    [         R                  " SS[        5       [        5       [         R                  S9$ )Nz,monitoring.projects.alertPolicies.conditionsr   )r"   conditionsIdr)   r$   )r   r%   r   r   r&   r   r   r   GetConditionResourceSpecr-   L   s0    			4+-02::
< <r   c                  \    [         R                  " SS[        5       [         R                  S9$ )Nz(monitoring.projects.notificationChannelszNotification Channel)r"   notificationChannelsIdr$   )r   r%   r   r&   r   r   r   "GetNotificationChannelResourceSpecr0   U   s*    			0*?A::	
< <r   c                  \    [         R                  " SS[        5       [         R                  S9$ )Nzmonitoring.projects.snoozesSnooze)r"   	snoozesIdr$   )r   r%   r   r&   r   r   r   GetSnoozeResourceSpecr4   ]   s*    			#%'::	
< <r   c                  \    [         R                  " SS[        5       [         R                  S9$ )Nz&monitoring.projects.uptimeCheckConfigsz!uptime check or synthetic monitor)r"   uptimeCheckConfigsIdr$   )r   r%   r   r&   r   r   r   GetUptimeCheckResourceSpecr7   e   s*    			.757::	
< <r   c                 b    U(       a  SnOSnSU -   n[         R                  " U[        5       USS9$ )Nalert_policyz--policyzName of the Alert Policy Trequired)r   ResourcePresentationSpecr*   )verb
positionalr	   r
   s       r   CreateAlertPolicyResourceArgr?   m   s;    DD)D0)		4	4
 "	
 r   c                 d    SR                  U 5      n[        R                  " S[        5       USSS9$ )Nz The name of the Condition to {}.r   TF)r;   prefixes)formatr   r<   r-   )r=   r
   s     r   CreateConditionResourceArgrC   {   s7    077=)		4	4 
 r   c                 ^    U(       a  SnOSn[         R                  " U [        5       XA-   UUS9$ )a  Create a resource argument for a Cloud Monitoring Notification Channel.

Args:
  arg_name: str, the name for the arg.
  extra_help: str, the extra_help to describe the resource. This should start
    with the verb, such as 'to update', that is acting on the resource.
  required: bool, if the arg is required.
  plural: bool, if True, use a resource argument that returns a list.

Returns:
  the PresentationSpec for the resource argument.
z+Names of one or more Notification Channels z!Name of the Notification Channel )r;   plural)r   r<   r0   )arg_name
extra_helpr;   rE   	help_stems        r   $CreateNotificationChannelResourceArgrI      s9     =I3I		4	4(*
 r   c                 N    SnSU -   n[         R                  " U[        5       USS9$ )Nr   zName of the Snooze Tr:   )r   r<   r4   r=   r	   r
   s      r   CreateSnoozeResourceArgrL      s3    	$#d*)		4	4
	
 r   c                 N    SnSU -   n[         R                  " U[        5       USS9$ )Nr   z.Name of the uptime check or synthetic monitor Tr:   )r   r<   r7   rK   s      r   CreateUptimeResourceArgrN      s3    	$>E)		4	4
 "	
 r   c                 N    [         R                  " U5      R                  U 5        g)zrAdd resource arguments.

Args:
  parser: the parser for the command.
  resources: a list of resource args to add.
N)r   ConceptParserAddToParser)parser	resourcess     r   AddResourceArgsrT      s     	*66v>r   c                      S $ )Nc                     U R                   $ )N)r	   )xs    r   <lambda>)GetAlertResourceUriFunc.<locals>.<lambda>   s    166r   r   r   r   r   GetAlertResourceUriFuncrZ      s    	r   c                     [         R                  " [        R                  " S[        R
                  " SS[        R                  S9SU-   US9/5      R                  U 5        g)zAdd a resource argument for a Google Cloud Platform Console project.

Args:
  parser: argparse.ArgumentParser, the parser for the command.
  help_text: str, the help text for the arg.
  required: bool, if the arg is required.
z	--projectzcloudresourcemanager.projectsproject)r"   	projectIdzProject r:   N)r   rP   r   r<   r   r%   r&   rQ   )rR   r
   r;   s      r   AddProjectResourceArgr^      s^     11



-% AA
 y
 	!  [r   N)T)TF)__doc__ googlecloudsdk.calliope.conceptsr   (googlecloudsdk.command_lib.util.conceptsr   r   r   r   r   r   r   r   r'   r*   r-   r0   r4   r7   r?   rC   rI   rL   rN   rT   rZ   r^   r   r   r   <module>rb      s    ; 6 D G0:5'B<<<<< IM056?r   