
                            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	  \	R                  \	R                  " \	R                  R                  \	R                  R                  5       " S S	\	R                  5      5       5       rg
)z0Command for listing health aggregation policies.    )absolute_import)division)unicode_literals)base_classes)lister)basec                   x    \ rS rSrSrSr\S 5       rS rS r	\
S 5       r\
S 5       r\
S	 5       r\
S
 5       rSrg)List   z!List health aggregation policies.Nc                 f    [         R                  " U 5        U R                  R                  S5        g )Na  
                                  table(
                                      name:label=NAME,
                                      region.basename():label=REGION,
                                      healthyPercentThreshold:label=HEALTHY_PERCENT_THRESHOLD,
                                      minHealthyThreshold:label=MIN_HEALTHY_THRESHOLD,
                                      policyType:label=POLICY_TYPE
                                  )
                                  )r   AddRegionsArgdisplay_info	AddFormat)parsers    7lib/surface/compute/health_aggregation_policies/list.pyArgs	List.Args!   s)    
 
!! #& '    c                     g)z4Override the default collection from the base class.N selfs    r   
CollectionList.Collection.   s    r   c                 l   [         R                  " U R                  5       5      nUR                  nUR                  U l        [
        R                  " XR                  5      n[
        R                  " UUR                  R                  UR                  R                  S9n[
        R                  " XE5      $ )N)regional_serviceaggregation_service)r   ComputeApiHolderReleaseTrackclientmessagesr   ParseMultiScopeFlags	resourcesMultiScopeListerapitools_clientregionHealthAggregationPoliciesInvoke)r   argsholderr    request_datalist_implementations         r   RunList.Run2   s    **4+<+<+>?F]]FOODM..t5E5EFL 11//OO"22RR ==;;r   c                 .    U R                   R                  $ )Ncomputer&   r   s    r   serviceList.serviceA   s    <<777r   c                     g)Nr&   r   r   s    r   resource_typeList.resource_typeE   s    ,r   c                 .    U R                   R                  $ )z,The service used to list regional resources.r/   r   s    r   r   List.regional_serviceI        <<777r   c                 .    U R                   R                  $ )z5The service used to get aggregated list of resources.r/   r   s    r   r   List.aggregation_serviceN   r8   r   )r!   )__name__
__module____qualname____firstlineno____doc__r!   staticmethodr   r   r,   propertyr1   r4   r   r   __static_attributes__r   r   r   r
   r
      sx     *(
' 
'< 8 8 - - 8 8 8 8r   r
   N)r?   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   DefaultUniverseOnlyReleaseTracksr   ALPHABETAListCommandr
   r   r   r   <module>rK      sq    7 &  ' 7 1 ( D%%++T->->-C-CD584 58 E 58r   