
                             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
 rS rS r    SS jr      SS jrSS jrg)z4Shared resource flags for Network Security commands.    )absolute_import)division)unicode_literals)base)concepts)deps)concept_parsers)presentation_specsc                  ,    [         R                  " SSS9$ )Nserver_tls_policyz+ID of the server TLS policy for {resource}.)name	help_text)r    ResourceParameterAttributeConfig     @lib/googlecloudsdk/command_lib/network_security/resource_args.py_ServerTlsPolicyAttributeConfigr      s    		2	2=
 r   c                     / nU (       a%  UR                  [        R                  " S5      5        UR                  [        R                  " S S5      5        [        R
                  " SSUS9$ )Nz--regionc                      g)Nglobalr   r   r   r   <lambda>*_LocationAttributeConfig.<locals>.<lambda>)   s    (r   z%default value of location is [global]locationz&The Cloud location for the {resource}.)r   r   fallthroughs)appendr   ArgFallthroughFallthroughr   r   )region_fallthroughr   s     r   _LocationAttributeConfigr   #   sc    ,++J78

C
 
	2	28
 r   c           	      r    [         R                  " SS[        5       [        U 5      [         R                  SS9$ )Nz4networksecurity.projects.locations.serverTlsPoliciesr   F)resource_nameserverTlsPoliciesIdlocationsId
projectsIddisable_auto_completers)r   ResourceSpecr   r    DEFAULT_PROJECT_ATTRIBUTE_CONFIG)r   s    r   _GetServerTlsPolicyResourceSpecr(   3   s6    			<'9;*+=>::#
 r   Nc           
      n    SS0n[         R                  " U [        U5      SR                  X5      UUUUS9$ )a  Returns ResourcePresentationSpec for server TLS policy resource.

Args:
  flag: str, the flag name.
  noun: str, the resource.
  verb: str, the verb to describe the resource, such as 'to update'.
  required: bool, if False, means that map ID is optional.
  plural: bool.
  group: args group.
  region_fallthrough: bool, True if the command has a region flag that should
    be used as a fallthrough for the server TLS policy location.

Returns:
  presentation_specs.ResourcePresentationSpec.
r    z{} {}.)requiredpluralgroupflag_name_overrides)r
   ResourcePresentationSpecr(   format)flagnounverbr+   r,   r-   r   flag_overridess           r   +_GetServerTlsPolicyResourcePresentationSpecr5   >   sE    2 #.		4	4
%&89ood!(
 r   c                 N    [         R                  " [        SU-   XX4XV5      /5      $ )aA  Creates a resource argument for a Server TLS policy.

Args:
  verb: str, the verb to describe the resource, such as 'to update'.
  noun: str, the resource; default: 'The server TLS policy'.
  name: str, the name of the flag.
  required: bool, if True the flag is required.
  plural: bool, if True the flag is a list.
  group: args group.
  region_fallthrough: bool, True if the command has a region flag that should
    be used as a fallthrough for the server TLS policy location.

Returns:
  ServerTlsPolicyResourceArg: ConceptParser, holder for Server TLS policy
  argument.
--)r	   ConceptParserr5   )r3   r2   r   r+   r,   r-   r   s          r   GetServerTlsPolicyResourceArgr9   c   s1    2 
	&	&1
+t8U( 
 r   c                 8    [         R                  " SU -   SSSSS9$ )zReturns the flag for clearing the Server TLS policy.

Args:
  name: str, the name of the flag; default: 'clear-server-tls-policy'.
r7   
store_trueFz4      Removes any attached Server TLS policy.
      )actiondefaultr+   help)r   Argument)r   s    r   $GetClearServerTLSPolicyForHttpsProxyr@      s*     

Tk

 r   )FFNF)zThe server TLS policyzserver-tls-policyFFNF)zclear-server-tls-policy)__doc__
__future__r   r   r   googlecloudsdk.callioper    googlecloudsdk.calliope.conceptsr   r   (googlecloudsdk.command_lib.util.conceptsr	   r
   r   r   r(   r5   r9   r@   r   r   r   <module>rF      sd    ; &  ' ( 5 1 D G  
"N 
!	
@r   