
                             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 rS rSS jrS rS rS rS rS rS rS rg)z?Shared resource flags for `gcloud container attached` commands.    )absolute_import)division)unicode_literals)concepts)deps)concept_parsers)
properties)	resourcesc                  ,    [         R                  " SSS9$ )Nclusterzcluster of the {resource}.name	help_textr    ResourceParameterAttributeConfig     Blib/googlecloudsdk/command_lib/container/attached/resource_args.pyAttachedClusterAttributeConfigr      s    		2	2 <
 r   c                      [         R                  " SS[        R                  " [        R
                  R                  R                  5      /S9$ )z.Gets Google Cloud location resource attribute.locationz)Google Cloud location for the {resource}.)r   r   fallthroughs)r   r   r   PropertyFallthroughr	   VALUEScontainer_attachedr   r   r   r   LocationAttributeConfigr   "   sC    		2	2;

"
"22;;
 r   c                  n    [         R                  " SS[        5       [        5       [         R                  S9$ )N1gkemulticloud.projects.locations.attachedClustersr   )resource_nameattachedClustersIdlocationsId
projectsId)r   ResourceSpecr   r    DEFAULT_PROJECT_ATTRIBUTE_CONFIGr   r   r   GetAttachedClusterResourceSpecr%   /   s0    			979)+::
 r   c                  \    [         R                  " SS[        5       [         R                  S9$ )Nz gkemulticloud.projects.locationsr   r   r!   r"   r   r#   r   r$   r   r   r   GetLocationResourceSpecr)   9   s*    			()+::	
 r   c                  \    [         R                  " SS[        5       [         R                  S9$ )N+gkemulticloud.projects.locations.operations	operationr'   r(   r   r   r   GetOperationResourceSpecr-   B   s*    			3)+::	
 r   c                     U(       a  SOSn[         R                  R                  U[        5       SR	                  U5      SS9R                  U 5        g)zAdds a resource argument for an Attached cluster.

Args:
  parser: The argparse parser to add the resource arg to.
  verb: str, the verb to describe the resource, such as 'to update'.
  positional: bool, whether the argument is positional or not.
r   z	--clusterzcluster {}.TrequiredN)r   ConceptParserForResourcer%   formatAddToParser)parserverb
positionalr   s       r   AddAttachedClusterResourceArgr8   K   sL     !k$++
$&4 	 , 
 Kr   c                     [         R                  R                  S[        5       SR	                  U5      SS9R                  U 5        g)zAdds a resource argument for Google Cloud location.

Args:
  parser: The argparse parser to add the resource arg to.
  verb: str, the verb to describe the resource, such as 'to update'.
z
--locationzGoogle Cloud location {}.Tr/   N)r   r1   r2   r)   r3   r4   r5   r6   s     r   AddLocationResourceArgr;   \   sC     ++!((.	 , 
 Kr   c                     [         R                  R                  U R                  R                  R                  5       R                  5       SS9$ )Nr   
collection)r
   REGISTRYParseRelativeNameCONCEPTSr   ParseRelativeNameargss    r   ParseAttachedClusterResourceArgrF   k   sB    				-	-
mm!!#002D 
. 
 r   c                  ,    [         R                  " SSS9$ )Nfleet_membershipzxattached cluster membership of the {resource}, in the form of projects/PROJECT/locations/global/memberships/MEMBERSHIP. r   r   r   r   r   FleetMembershipAttributeConfigrI   r   s    		2	2H
 r   c                  n    [         R                  " SS[        5       [        5       [         R                  S9$ )Nz%gkehub.projects.locations.membershipsrH   )r   r!   membershipsIdr"   )r   r#   r   rI   r$   r   r   r   GetFleetMembershipResourceSpecrL   |   s0    			-&)+24::
 r   c                     [         R                  R                  S[        5       SSSS0S9R	                  U 5        U R                  SS9  g	)
zpAdds a resource argument for Fleet Membership.

Args:
  parser: The argparse parser to add the resource arg to.
z--fleet-membershipzdMembership of the registered cluster. Membership can be the membership ID or the full resource name.Tr   z--fleet-membership-location)r0   flag_name_overridesglobal)fleet_membership_locationN)r   r1   r2   rL   r4   set_defaults)r5   s    r   AddFleetMembershipResourceArgrR      sV     ++$&'
3 , 	 K9r   c                     [         R                  R                  S[        5       SR	                  U5      SS9R                  U 5        g)zAdds a resource argument for operation on Attached clusters.

Args:
  parser: The argparse parser to add the resource arg to.
  verb: str, the verb to describe the resource, such as 'to update'.
operation_idzoperation {}.Tr/   N)r   r1   r2   r-   r3   r4   r:   s     r   AddOperationResourceArgrU      sC     ++ T"	 , 
 Kr   c                     [         R                  R                  U R                  R                  R                  5       R                  5       SS9$ )Nr+   r=   )r
   r?   r@   rA   rT   rB   rC   rD   s    r   ParseOperationResourceArgrW      sB    				-	-
mm  &&(557> 
. 
 r   N)T)__doc__
__future__r   r   r    googlecloudsdk.calliope.conceptsr   r   (googlecloudsdk.command_lib.util.conceptsr   googlecloudsdk.corer	   r
   r   r   r%   r)   r-   r8   r;   rF   rI   rL   rR   rU   rW   r   r   r   <module>r]      sd    F &  ' 5 1 D * )
":(r   