
    &
                     X    S r SSKJr  SSKJr  SrSr " S S\R                  5      rS r	g	)
z8Base classes for shared code between Cloud Run commands.    )base)connection_contextz;labels.'run.googleapis.com/supportsPzs':alias='supportsPzs'zFmetadata.labels.'run.googleapis.com/satisfiesPzs':alias='satisfiesPzs'c                   P    \ rS rSrSrSrSr\S 5       r\S 5       r	\S 5       r
Srg)List   z/Base class for `run [resources] list` commands.Nc                    U R                   nU(       d.   UR                  n[        R
                  " U R                  U5      nSR                  UR                  S5      [        USS5      5      $ ! [         a    UR                  n Nef = f)a"  Get uri for resource.

This is a @classmethod because this method is called by
googlecloudsdk.calliope.display_info.DisplayInfo outside of a List instance.

Args:
  resource: a googlecloudsdk.command_lib.run.k8s_object.KubernetesObject
    object

Returns:
  uri: str of the resource's uri
z{}/{}/	self_link )
complete_api_endpoint
locationIdAttributeErrorregionr   DeriveRegionalEndpointpartial_api_endpointformatrstripgetattr)clsresourcecomplete_endpointr   s       .lib/googlecloudsdk/command_lib/run/commands.py_GetResourceUriList._GetResourceUri,   s     11!$$ -CC

"
"F,>>  %wxb'IK K	  !!s   A. .BBc                     Xl         g N)r   )r   r   s     r   SetCompleteApiEndpointList.SetCompleteApiEndpointE   s     5    c                     Xl         g r   )r   )r   r   s     r   SetPartialApiEndpointList.SetPartialApiEndpointI   s    3r    )__name__
__module____qualname____firstlineno____doc__r   r   classmethodr   r   r!   __static_attributes__r#   r   r   r   r      sQ    7 
 K K0 6 6 4 4r   r   c                     [        U S S9$ )z(Return the list_response sorted by name.c                     U R                   $ r   )name)xs    r   <lambda>SortByName.<locals>.<lambda>P   s    QVVr   )key)sorted)list_responses    r   
SortByNamer4   N   s    	#3	44r   N)
r(   googlecloudsdk.callioper   googlecloudsdk.command_lib.runr   SUPPORTS_PZS_ALIASSATISFIES_PZS_ALIASListCommandr   r4   r#   r   r   <module>r:      s@    ? ) = B  M 
-44 -4`5r   