
                             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 r
S r\R                  \R                  " \R                  R                  5       " S	 S
\R                   5      5       5       rg)'List operations for the Private CA API.    )
operations)resource_utils)base)concepts)concept_parsersc                 `    U R                  S5      (       a  gU R                  S5      (       a  gg)NerrorFAILUREdoneSUCCESSRUNNING)get)ops    (lib/surface/privateca/operations/list.py_GetOperationStatusr      s%    VVG__VVF^^	    c            	      r    [         R                  " SS[         R                  " SSS9[         R                  S9$ )Nzprivateca.projects.locationslocationz#The location to list operations in.)name	help_text)resource_namelocationsId
projectsId)r   ResourceSpec ResourceParameterAttributeConfig DEFAULT_PROJECT_ATTRIBUTE_CONFIG r   r   _GetLocationResourceSpecr   !   s:    			$;;9 ::
 r   c                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
List-   r   z          Returns completed, failed, and pending operations on the Private CA
          API in a given location or across all locations.aD            To list all operations:

          $ {command}

          To list all operations in a given location:

          $ {command} --location=us-west1

          To filter for a specific end time in a given location:

          $ {command} --location=us-west1 --filter="metadata.endTime>=2025-09-25T16:00:00Z"
          )DESCRIPTIONEXAMPLESc                    [         R                  R                  S[        5       SSS9R	                  U 5        U R
                  R                  S5        U R
                  R                  S[        05        U R
                  R                  [        R                  " S5      5        [        R                  R                  U S5        g )	Nz
--locationzcThe location to list operations in. If not specified, operations from all locations will be listed.F)requiredz~table(name.segment(-1):label=ID, name.segment(-3):label=LOCATION, metadata.createTime:label=START_TIME, status():label=STATUS)statusz'privateca.projects.locations.operationsd   )r   ConceptParserForResourcer   AddToParserdisplay_info	AddFormatAddTransformsr   
AddUriFuncr   MakeGetUriFuncr   PAGE_SIZE_FLAG
SetDefault)parsers    r   Args	List.ArgsE   s    !!-- "	- .  k&
!!	H %%x1D&EF
""%%5	

 	""63/r   c                     SnUR                  S5      (       a.  UR                  R                  R                  5       R                  n[
        R                  " UUR                  UR                  UR                  S9$ )zRuns the command.-r   )r   list_filterlimit	page_size)
IsSpecifiedCONCEPTSr   Parser   r   ListOperationsfilterr9   r:   )selfargslocation_ids      r   RunList.RunZ   sc    K
##MM**002>>k $$KKjj..	" "r   r   N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr4   rC   __static_attributes__r   r   r   r!   r!   -   s1     0>	-& 0 0("r   r!   N)rI    googlecloudsdk.api_lib.privatecar   r   googlecloudsdk.callioper    googlecloudsdk.calliope.conceptsr   (googlecloudsdk.command_lib.util.conceptsr   r   r   DefaultUniverseOnlyReleaseTracksReleaseTrackGAListCommandr!   r   r   r   <module>rV      sk    . 8 ; ( 5 D	 D%%(()7"4 7" * 7"r   