
    u                     2   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KJr  S rS r\R$                  " \R&                  R(                  \R&                  R*                  5       " S S\R,                  5      5       rg)z9Command to update a Tensorboard time series in Vertex AI.    )absolute_import)division)unicode_literals)client)base)	constants)endpoint_util)errors)flags)logc                 X   [         R                  " U S5        [         R                  " SSS9R                  U 5        [         R                  " S5      R                  U 5        [         R
                  " S5      R                  U 5        [         R                  " S5      R                  U 5        g )Nz	to updateztensorboard time seriesF)requiredztensorboard-time-series)r   #AddTensorboardTimeSeriesResourceArgGetDisplayNameArgAddToParserGetDescriptionArgGetPluginNameArgGetPluginDataArgparsers    0lib/surface/ai/tensorboard_time_series/update.py_AddArgsr      s}    ++FK@%11<V1D34@@H23??G23??G    c                 <  ^  T R                   R                  R                  5       nUR                  5       S   T l        [
        R                  " UT R                  S9    [        R                  " US9R                  UT 5      n[        R                  " UR                  SS9  UsSSS5        $ ! [        R                   aI    / SQn[        U 4S jU 5       5      (       d  e [        R                   R#                  S	5         SSS5        gf = f! , (       d  f       g= f)
5Update an existing Vertex AI Tensorboard time series.locationsId)region)versionz!Vertex AI Tensorboard time series)kindN)display_namedescriptionplugin_nameplugin_datac              3   F   >#    U  H  nTR                  U5      v   M     g 7fN)IsSpecified).0argargss     r   	<genexpr>_Run.<locals>.<genexpr>3   s!     H2G3!!#&&2Gs   !zNo update to perform.)CONCEPTStensorboard_time_seriesParseAsDictr   r	   AiplatformEndpointOverridesr   TensorboardTimeSeriesClientPatchr   UpdatedResourcenamer
   NoFieldsSpecifiedErroranystatusPrint)r)   r   tensorboard_time_series_refopavailable_update_argss   `    r   _Runr<   '   s     $ E E K K M+224]C$+00M--g>DD
%t-b 
"''(KL NM ((  H2GHHH	jj./ NM	 NMs1   D$B- D-AD
?D	D

D
Dc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	
UpdateBeta<   r   EXAMPLESa            To update a Tensorboard Time Series `123` in Tensorboard `12345`, Tensorboard Experiment `my-tensorboard-experiment`, Tensorboard Run `my-tensorboard-run`, region `us-central1`, and project `my-project`, with the display name `updated display name`:

              $ {command} projects/my-project/locations/us-central1/tensorboards/12345/experiments/my-tensorboard-experiment/runs/my-tensorboard-run/timeSeries/123 --display-name="updated display name"

          Or with flags:

              $ {command} 123 --tensorboard-id=12345 --tensorboard-experiment-id=my-tensorboard-experiment --tensorboard-run-id=my-tensorboard-run --display-name="updated display name"
          c                     [        U 5        g r%   )r   r   s    r   ArgsUpdateBeta.ArgsM   s
    Vr   c                 6    [        U[        R                  5      $ r%   )r<   r   BETA_VERSION)selfr)   s     r   RunUpdateBeta.RunQ   s    i,,--r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodrB   rG   __static_attributes__rI   r   r   r>   r>   <   s/    = -  .r   r>   N)rN   
__future__r   r   r   1googlecloudsdk.api_lib.ai.tensorboard_time_seriesr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   r	   r
   r   googlecloudsdk.corer   r   r<   ReleaseTracksReleaseTrackBETAALPHAUpdateCommandr>   rI   r   r   <module>r\      s{    @ &  ' D ( 3 7 0 / #H* D%%**D,=,=,C,CD.## . E.r   