
                             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
KJr  SSKJr  SSS.r\
R*                   " S S\
R,                  5      5       rg)z%Command for listing backend services.    )absolute_import)division)unicode_literals)
list_pager)base_classes)base)
exceptions)scope)flags)
propertiesa=          *{command}* retrieves the list of backend service resources in the
        specified project for which you have compute.backendService.get
        and compute.backendService.use permissions. This command is useful
        when you're creating load balancers in a Shared VPC environment
        and you want to use [cross-project service
        referencing](https://cloud.google.com/load-balancing/docs/https#cross-project).
        You can use this command to find out which backend
        services in other projects are available to you for referencing.
        z        To list all global backend services in a project, run:

          $ {command} --global

        To list all backend services in a region, run:

          $ {command} --region=REGION
        )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)
ListUsable4   zList usable backend services.c                     [         R                  R                  U 5        U R                  R	                  [         R
                  5        g )N)r   0GLOBAL_REGIONAL_BACKEND_SERVICE_NOT_REQUIRED_ARGAddArgumentdisplay_info	AddFormatDEFAULT_BETA_LIST_FORMAT)parsers    3lib/surface/compute/backend_services/list_usable.pyArgsListUsable.Args:   s0    	::FFvN
!!%"@"@A    c           	      D   [         R                  " U R                  5       5      nUR                  nUR                  R                  n[
        R                  R                  R                  U5      u  pVU(       d  [        R                  " S5      eUR                  [        R                  R                  :X  aU  UR                  [         R"                  R$                  R&                  R)                  SS9S9nUR*                  R,                  nO}UR                  [        R                  R.                  :X  aU  UR1                  U[         R"                  R$                  R&                  R)                  SS9S9nUR*                  R2                  n[4        R6                  " WWSSSS	S
9$ )Nz.Either --global or --region must be specified.T)required)project)regionr   r   
maxResultsi  items)methodbatch_size_attribute
batch_sizefield)r   ComputeApiHolderReleaseTrackclientmessagesr   r   scopesSpecifiedByArgscompute_exceptionsArgumentError
scope_enumcompute_scope	ScopeEnumGLOBAL'ComputeBackendServicesListUsableRequestr   VALUEScorer   Getapitools_clientbackendServicesREGION-ComputeRegionBackendServicesListUsableRequestregionBackendServicesr   YieldFromList)	selfargsholderr)   r*   resource_scopescope_valuerequestapitoolss	            r   RunListUsable.Run?   sj   **4+<+<+>?F]]F}}%%H 	>>EEUU	
  N ,,
:    M$;$;$B$BB@@##((0044d4C A g ''77h		"	"m&=&=&D&D	DFF##((0044d4C G g ''==h##) r    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpstaticmethodr   rD   __static_attributes__rF   r   r   r   r   4   s#    % -B B#r   r   N)rK   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   r-   r
   r0   3googlecloudsdk.command_lib.compute.backend_servicesr   googlecloudsdk.corer   rL   UniverseCompatibleListCommandr   rF   r   r   <module>rY      s`    , &  ' ' 7 ( O E E *	. -!! - -r   