
    &                     8   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddl	mZ dd	l	mZ dd
lmZ ddlmZ d Zd Zd Z ej(                  ej*                  j,                  ej*                  j.                         G d dej0                               Zy)z5Command to list Tensorboard time series in Vertex AI.    )absolute_import)division)unicode_literals)client)base)	constants)endpoint_util)flags)concept_parsers)	resourcesc                     t         j                  j                  | j                  t        j
                  t        j                  t        j                           }|j                         S )N)api_version)	r   REGISTRYParseRelativeNamenamer   "TENSORBOARD_TIME_SERIES_COLLECTIONAI_PLATFORM_API_VERSIONBETA_VERSIONSelfLink)tensorboard_runrefs     .lib/surface/ai/tensorboard_time_series/list.py_GetUriBetar      sR    ,,2233I4J4JK 	- 	M# 
    c                     t         j                  j                  dt        j                         dd      j                  |        y )Nz--tensorboard-run-idzTo list Tensorboard time seriesT)required)r   ConceptParserForResourcer
   GetTensorboardRunResourceSpecAddToParserparsers    r   _AddArgsr#   &   s<    ++))+'	 ,  ![(r   c                 X   | j                   j                  j                         }|j                         d   }t	        j
                  ||      5  t        j                  |      j                  || j                  | j                  | j                        cd d d        S # 1 sw Y   y xY w)NlocationsId)versionregion)r&   )tensorboard_run_reflimit	page_sizesort_by)CONCEPTStensorboard_run_idParseAsDictr	   AiplatformEndpointOverridesr   TensorboardTimeSeriesClientListr)   r*   r+   )argsr&   r(   r'   s       r   _Runr4   .   s    88>>@%%'6&00f&--g>CC/jj..	 D & & &s   AB  B)c                   .    e Zd ZdZddiZed        Zd Zy)ListBetazSList the Tensorboard time series of the given project, region, and Tensorboard run.EXAMPLESa:            To list Tensorboard Time Series in Tensorboard `12345`, Tensorboard Experiment `my-tensorboard-experiment`, and Tensorboard Run `my-tensorboard-run`:

              $ {command} --tensorboard-id=12345 --tensorboard-experiment-id=my-tensorboard-experiment --tensorboard-run-id=my-tensorboard-run
          c                 X    t        |        | j                  j                  t               y N)r#   display_info
AddUriFuncr   r!   s    r   ArgszListBeta.ArgsG   s    V
"";/r   c                 6    t        |t        j                        S r9   )r4   r   r   )selfr3   s     r   RunzListBeta.RunL   s    i,,--r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr<   r?    r   r   r6   r6   :   s/    [ - 0 0.r   r6   N)rC   
__future__r   r   r   1googlecloudsdk.api_lib.ai.tensorboard_time_seriesr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   r	   r
   (googlecloudsdk.command_lib.util.conceptsr   googlecloudsdk.corer   r   r#   r4   ReleaseTracksReleaseTrackBETAALPHAListCommandr6   rF   r   r   <module>rR      s    < &  ' D ( 3 7 / D ))	 D%%**D,=,=,C,CD.t . E.r   