
    5                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ d	 Zd
 Zd Zd Z	 ddej"                  fdZd Zy)z>Helpers for flags in commands for Anthos GKE On-Prem clusters.    )absolute_import)division)unicode_literals)parser_arguments)concepts)concept_parsers)	resourcesc                 D    t         j                  j                  | d      S )N%gkehub.projects.locations.memberships)
collection)r	   REGISTRYParseRelativeName)membership_names    ;lib/googlecloudsdk/command_lib/container/gkeonprem/flags.py!GetAdminClusterMembershipResourcer      s&    				-	-"I 
. 
     c                  0    t        j                  dd      S )Nadmin_cluster_membershipzuadmin cluster membership of the {resource}, in the form of projects/PROJECT/locations/global/memberships/MEMBERSHIP. name	help_textr    ResourceParameterAttributeConfig r   r   %AdminClusterMembershipAttributeConfigr   !   s    		2	2%H
 r   c                  0    t        j                  dd      S )z.Gets Google Cloud location resource attribute.locationz)Google Cloud location for the {resource}.r   r   r   r   r   LocationAttributeConfigr   +   s    		2	2;
 r   c                  r    t        j                  ddt               t               t         j                        S )Nr   r   )resource_namemembershipsIdlocationsId
projectsId)r   ResourceSpecr   r    DEFAULT_PROJECT_ATTRIBUTE_CONFIGr   r   r   %GetAdminClusterMembershipResourceSpecr&   3   s0    			-.9;)+::
 r   parserc                     |rdnd}t         j                  j                  |t               d|ddi      j	                  |        | j                  d       y	)
a  Adds a resource argument for a VMware admin cluster membership.

  Args:
    parser: The argparse parser to add the resource arg to.
    positional: bool, whether the argument is positional or not.
    required: bool, whether the argument is required or not.
  r   z--admin-cluster-membershipz_membership of the admin cluster. Membership can be the membership ID or the full resource name.r   z#--admin-cluster-membership-location)requiredflag_name_overridesglobal)!admin_cluster_membership_locationN)r   ConceptParserForResourcer&   AddToParserset_defaults)r'   
positionalr)   r   s       r   $AddAdminClusterMembershipResourceArgr2   =   sf     %/ 4P 
 ++
+-!
; , 	 KAr   c                 2    | j                  dddgd d       y )Nz--binauthz-evaluation-modeDISABLED PROJECT_SINGLETON_POLICY_ENFORCEz:Set Binary Authorization evaluation mode for this cluster.)choicesdefaulthelp)add_argument)r'   s    r   AddBinauthzEvaluationModer:   Z   s'    "=>G	  r   N)TT)__doc__
__future__r   r   r   googlecloudsdk.callioper    googlecloudsdk.calliope.conceptsr   (googlecloudsdk.command_lib.util.conceptsr   googlecloudsdk.corer	   r   r   r   r&   ArgumentInterceptorr2   r:   r   r   r   <module>rB      sU    E &  ' 4 5 D ) MQB00B:r   