
    ;                     n    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\R                  5      r
g	)
zservices list command.    )absolute_import)division)unicode_literals)scm)basec                   >    \ rS rSrSr\S 5       rS r\S 5       rSr	g)List   a  List service quota metrics for a consumer.

This command lists the service quota metrics for a consumer. The supported
consumers can be projects, folders, or organizations.

## EXAMPLES

To list the quota metrics for service 'example.googleapis.com' and consumer
'projects/12321', run:

  $ {command} --service=example.googleapis.com --consumer=projects/12321

To list the quota metrics for service 'example.googleapis.com' and consumer
'projects/hello-world', run:

  $ {command} --service=example.googleapis.com --consumer=projects/helloworld

To list the quota metrics for service 'example.googleapis.com' and consumer
'folders/12345', run:

  $ {command} --service=example.googleapis.com --consumer=folders/12345

To list the quota metrics for service 'example.googleapis.com' and consumer
'organizations/54321', run:

  $ {command} --service=example.googleapis.com --consumer=folders/54321
c                 L    U R                  SSSSS9  U R                  SSSSS9  g	)
zArgs is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use to add arguments that go on
    the command line after this command. Positional arguments are allowed.
z	--serviceTSERVICEz The service to list metrics for.)requiredmetavarhelpz
--consumerCONSUMERz!The consumer to list metrics for.N)add_argument)parsers    #lib/surface/endpoints/quota/list.pyArgs	List.Args6   sD     /	  1 0	  2    c                     [         R                  " UR                  UR                  UR                  UR
                  5      nU Vs/ s H  o0R                  U5      PM     sn$ s  snf )zRun command.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
    with.

Returns:
  The list of quota metrics for the service and consumer.
)r   ListQuotaMetricsserviceconsumer	page_sizelimitdelete_resource_name)selfargsmetricsms       r   RunList.RunJ   sN     ""4<<#'::/G29:'Q%%a(':::s   A#c                 p    U R                  S5        U R                   H  nUR                  S5        M     U $ )zDelete the name fields from metric message.

Args:
  metric: The quota metric message.

Returns:
  The updated metric message.
name)resetconsumerQuotaLimits)metricls     r   r   List.delete_resource_nameX   s0     LL''ggfo (Mr    N)
__name__
__module____qualname____firstlineno____doc__staticmethodr   r"   r   __static_attributes__r+   r   r   r	   r	      s4    8 2 2&;  r   r	   N)r0   
__future__r   r   r   googlecloudsdk.api_lib.servicesr   googlecloudsdk.callioper   ListCommandr	   r+   r   r   <module>r7      s-     &  ' / (L4 Lr   