
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SS	KJr   " S
 S\	R                  5      rS rS rS rS rS rS rS r  SS jr  SS jr  SS jrg)z-Shared resource flags for Cloud DNS commands.    )absolute_import)division)unicode_literals)concepts)deps)
completers)concept_parsers)
propertiesc                   (   ^  \ rS rSrU 4S jrSrU =r$ )PolicyCompleter   c                 8   > [         [        U ]
  " SSUSSS.UD6  g )Ndns.policiesz,alpha dns policies list --format=value(name)T)
collectionapi_versionlist_commandparse_output )superr   __init__)selfr   kwargs	__class__s      3lib/googlecloudsdk/command_lib/dns/resource_args.pyr   PolicyCompleter.__init__   s-    	/4) !C	
     r   )__name__
__module____qualname____firstlineno__r   __static_attributes____classcell__)r   s   @r   r   r      s     r   r   c                 <    [         R                  " S[        U S9SS9$ )Npolicyr   z%The Cloud DNS policy name {resource}.)name	completer	help_text)r    ResourceParameterAttributeConfigr   r%   s    r   PolicyAttributeConfigr*   (   s#    		2	2K87
9 9r   c                  ,    [         R                  " SSS9$ )Nzresponse-policyz.The Cloud DNS response policy name {resource}.r&   r(   r   r)   r   r   r   ResponsePolicyAttributeConfigr.   /   s    		2	2@
B Br   c                  ,    [         R                  " SSS9$ )Nresponse-policy-rulez3The Cloud DNS response policy rule name {resource}.r,   r-   r   r   r   !ResponsePolicyRuleAttributeConfigr1   5   s    		2	2!E
G Gr   c                      [         R                  " SS[        R                  " [        R
                  R                  R                  5      /S9$ )Nprojectz%The Cloud project for the {resource}.)r&   r(   fallthroughs)r   r)   r   PropertyFallthroughr
   VALUEScorer3   r   r   r   ProjectAttributeConfigr8   ;   s@    		2	27,,Z->->-C-C-K-KLM
O Or   c           	      P    [         R                  " SU S[        U S9[        5       S9$ )Nr   r$   r%   )r   resource_namer$   r3   )r   ResourceSpecr*   r8   r%   s    r   GetPolicyResourceSpecr<   B   s,    			"{;$&
( (r   c                 R    [         R                  " SU S[        5       [        5       S9$ )Nzdns.responsePoliciesresponse_policy)r   r:   responsePolicyr3   )r   r;   r.   r8   r%   s    r   GetResponsePolicyResourceSpecr@   K   s*    			%24$&
( (r   c           	      d    [         R                  " SU S[        5       [        5       [	        5       S9$ )Nzdns.responsePolicyRulesresponse_policy_rule)r   r:   r?   responsePolicyRuler3   )r   r;   r.   r1   r8   r%   s    r   GetResponsePolicyRuleSpecrD   T   s0    			*24:<$&
( (r   c                     U(       a  SnOSn[         R                  R                  U[        U5      SR	                  U5      US9R                  U 5        g)au  Add a resource argument for a Cloud DNS Policy.

Args:
  parser: the parser for the command.
  verb: str, the verb to describe the resource, such as 'to update'.
  api_version: str, the version of the API to use.
  positional: bool, if True, means that the policy name is a positional rather
    than a flag.
  required: bool, if True, means that the arg will be required.
r$   z--policyzThe policy {}.requiredN)r	   ConceptParserForResourcer<   formatAddToParserparserverbr   
positionalrG   r&   s         r   AddPolicyResourceArgrP   ^   sR     DD++
K(d#	 ,  %V,r   c                     U(       a  SnOSn[         R                  R                  U[        U5      SR	                  U5      US9R                  U 5        g)a~  Add a resource argument for a Cloud DNS Response Policy.

Args:
  parser: the parser for the command.
  verb: str, the verb to describe the resource, such as 'to update'.
  api_version: str, the version of the API to use.
  positional: bool, if True, means that the policy name is a positional rather
    than a flag.
  required: bool, if True, means that the arg will be required.
response_policiesz--response_policieszThe response policy {}.rF   N)r	   rH   rI   r@   rJ   rK   rL   s         r   AddResponsePolicyResourceArgrS   x   sR     D D++
#K0&&t,	 ,  %V,r   c                     U(       a  SnOSn[         R                  R                  U[        U5      SR	                  U5      SS0US9R                  U 5        g)az  Add a resource argument for a Cloud DNS Policy Rule.

Args:
  parser: the parser for the command.
  verb: str, the verb to describe the resource, such as 'to update'.
  api_version: str, the version of the API to use.
  positional: bool, if True, means that the policy name is a positional rather
    than a flag.
  required: bool, if True, means that the arg will be required.
rB   z--response_policy_rulezThe response policy rule {}.r0   )flag_name_overridesrG   N)r	   rH   rI   rD   rJ   rK   rL   s         r   AddResponsePolicyRuleArgrV      s[     !D#D++
,$++D113IJ , 
 %V,r   N)TT)__doc__
__future__r   r   r    googlecloudsdk.calliope.conceptsr   r   googlecloudsdk.command_lib.utilr   (googlecloudsdk.command_lib.util.conceptsr	   googlecloudsdk.corer
   ListCommandCompleterr   r*   r.   r1   r8   r<   r@   rD   rP   rS   rV   r   r   r   <module>r^      s     4 &  ' 5 1 6 D *j55 9BGO((( %)"&	-: -1*.	-: )-&*	-r   