
                         j   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0r\R"                  \R$                  " \R&                  R(                  \R&                  R*                  \R&                  R,                  5       " S S\R.                  5      5       5       rg)zwList all instance operations.

Lists all instance operations that have been performed on the given
Cloud SQL instance.
    )absolute_import)division)unicode_literals)
list_pager)api_util)validate)base)flags)
propertiesEXAMPLESa          To list operations for instances with ID "prod-instance" , run:

          $ {command} --instance=prod-instance

        To list operations for instances with ID "prod-instance" that have 10 results, run:

          $ {command} --instance=prod-instance --limit=10

        To list operations for instances with ID "prod-instance" that have 10 results in a page, run:

          $ {command} --instance=prod-instance --page-size=10
        c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)List3   z?Lists all instance operations for the given Cloud SQL instance.c                     [         R                  " U 5        U R                  R                  [         R                  5        U R                  R                  S 5        g )N)r
   AddInstancedisplay_info	AddFormatOPERATION_FORMAT_BETAAddCacheUpdater)parsers    "lib/surface/sql/operations/list.pyArgs	List.Args;   s>    	f
!!%"="=>
''-    c                    [         R                  " [         R                  5      nUR                  nUR                  nUR
                  R                  UR                  S[        R                  R                  R                  R                  0SS9n[        R                  " UR                  5        [        R                   " UR"                  UR%                  UR                  UR                  S9UR&                  S9$ )a  Lists all instance operations that have been performed on an instance.

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

Returns:
  A dict object that has the list of operation resources if the command ran
  successfully.
projectzsql.instances)params
collection)r   instance)limit)r   	SqlClientAPI_VERSION_DEFAULT
sql_clientsql_messagesresource_parserParser   r   VALUEScorer   	GetOrFailr   ValidateInstanceNamer   YieldFromList
operationsSqlOperationsListRequestr    )selfargsclientr#   r$   instance_refs         r   RunList.RunA   s      < <=F""J&&L))//:,,1199CCD" 0 $L !!$--0##-- ((<3H3H 	. 	Jjj	 r    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r2   __static_attributes__r4   r   r   r   r   3   s$     H-. .
r   r   N)r9   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.sqlr   r   googlecloudsdk.callioper	   googlecloudsdk.command_lib.sqlr
   googlecloudsdk.corer   r:   DefaultUniverseOnlyReleaseTracksReleaseTrackGABETAALPHAListCommandr   r4   r   r   <module>rK      s    '  ' ' / / ( 0 * 	$ D%%(($*;*;*@*@%%++-$4 $- $r   