
                             d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlm	Z
  G d d	ej                        Zdd
Z	 ddZd Zdej                   ddfdZddZd Zd Zd Zy)z<Flags and helpers for the compute network policies commands.    )absolute_import)division)unicode_literalsN)
completers)flagsc                        e Zd Z fdZ xZS )NetworkPoliciesCompleterc                 2    t        t        | 
  dddd| y )Ncompute.regionNetworkPoliciesz#compute network-policies list --uri)
collectionlist_command )superr	   __init__)selfkwargs	__class__s     @lib/googlecloudsdk/command_lib/compute/network_policies/flags.pyr   z!NetworkPoliciesCompleter.__init__   s(    	
"D2 2:     )__name__
__module____qualname__r   __classcell__)r   s   @r   r	   r	      s     r   r	   c                 b    t        j                  ddt        || ddj                  |      d      S )NNETWORK_POLICYnetwork policynetwork policiesz"name of the network policy to {0}.r   )nameresource_name	completerpluralrequiredcustom_plural
short_helpregional_collection)compute_flagsResourceArgumentr	   formatr"   r!   	operations      r   NetworkPolicyArgumentr+   %   s8    		'	'$(&5<<YG9	
 	r   c           
      B    t        j                  dd|| dd| dd      S )Nz--network-policyr   r   z Network Policy ID with which to z association.r   )r   r   r!   r"   r#   r$   r%   )r&   r'   r)   s      r    NetworkPolicyAssociationArgumentr-   2   s5     
	'	'$&3I;mL9
 r   c                 *    | j                  dd       y)z/Adds the arguments for network policy creation.--description8An optional, textual description for the network policy.helpNadd_argumentparsers    r   AddArgNetworkPolicyCreationr7   @       E  r   r6   returnc                 *    | j                  dd       y)z-Adds the arguments for network policy update.r/   r0   r1   Nr3   r5   s    r   AddArgsUpdateNetworkPolicyr;   H   r8   r   c           	      V    t        j                  ddt        j                  d|d|       S )N	--networknetworkFzcompute.networks)r   r   r    r!   r"   global_collectionr$   )r&   r'   compute_completersNetworksCompleter)r$   r"   s     r   NetworkArgumentForOtherResourcerB   P   s0    		'	'"44*
 r   c                 R    | j                  dd       | j                  ddd       y)	z;Adds the arguments for network policy association creation.--namez[      Name of the new association. If not specified, the name will be
      auto-generated.r1   r=   Tz:Name of the network with which the association is created.r"   r2   Nr3   r5   s    r   AddArgsCreateAssociationrF   \   s;       	G  r   c                 ,    | j                  ddd       y)z:Adds the arguments for network policy association removal.rD   Tz"Name of the association to remove.rE   Nr3   r5   s    r   AddArgsRemoveAssociationrH   k   s    /  r   c                 ,    | j                  ddd       y)z>Adds the arguments for network policy association description.rD   Tz$Name of the association to describe.rE   Nr3   r5   s    r   AddArgsDescribeAssociationrJ   t   s    1  r   )FFN)T)__doc__
__future__r   r   r   argparse"googlecloudsdk.command_lib.computer   r@   r   r&   ListCommandCompleterr	   r+   r-   r7   ArgumentParserr;   rB   rF   rH   rJ   r   r   r   <module>rQ      sq    C &  '  O E1FF 
 -1x'>'> 4 	r   