
                            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SKJr  SSKJr  S rS r\R,                  " \R.                  R0                  5       " S S\R2                  5      5       r\R,                  " \R.                  R6                  \R.                  R8                  5       " S S\R2                  5      5       rg)z#Vertex AI endpoints create command.    )encoding)
operations)client)base)	constants)endpoint_util)flags)operations_util)tensorboards_util)
validation)labels_util)logc                     [         R                  " U S5        [         R                  " S5      R                  U 5        [         R                  " S5      R                  U 5        [         R
                  " U S5        [        R                  " U 5        g )Nzto create a Tensorboardtensorboard)r	   AddRegionResourceArgGetDisplayNameArgAddToParserGetDescriptionArgAddKmsKeyResourceArgr   AddCreateLabelsFlagsparsers    %lib/surface/ai/tensorboards/create.py_AddArgsr       sc    V%>?-(44V<-(44V<V]3""6*    c                    [         R                  " U R                  5        U R                  R                  R                  5       nUR                  5       S   U l        [        R                  " XR                  S9   [        R                  " US9n[        R                  " 5       nUR                  X 5      n[        R                  " XE[         R"                  " UR$                  5      5      nUbM  [&        R(                  " U5      nSU;   a1  [*        R,                  R/                  SR1                  US   5      5        UsSSS5        $ ! , (       d  f       g= f)#Create a new Vertex AI Tensorboard.locationsId)region)versionNnamez"Created Vertex AI Tensorboard: {}.)r   ValidateDisplayNamedisplay_nameCONCEPTSr   ParseAsDictr   AiplatformEndpointOverridesr   TensorboardsClientr   OperationsClientCreater
   WaitForOpMayber   ParseTensorboardOperationr!   r   MessageToPyValuer   statusPrintformat)argsr    
region_reftensorboards_clientoperation_clientopresponse_msgresponses           r   _Runr8   (   s      !2!23}}##))+*!!#M2$+00M 33GD!224		#	#J	5B"1133BGG<>L **<8h	8	

199(6:JK	M NMMs   ;CE
Ec                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	CreateGa=   r   EXAMPLESm            To create a Tensorboard with the display name `my tensorboard`:

              $ {command} --display-name="my tensorboard"

          You may also provide a description:

              $ {command} --description="my description"

          You may also provide labels:

              $ {command} --labels="label1=value1" --labels="label2=value2"
          c                     [        U 5        g Nr   r   s    r   ArgsCreateGa.ArgsR   
    Vr   c                 6    [        U[        R                  5      $ r?   )r8   r   
GA_VERSIONselfr1   s     r   RunCreateGa.RunV   s    i**++r    N
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodrA   rH   __static_attributes__rJ   r   r   r:   r:   =   s/    + -"  ,r   r:   c                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	
CreateBetaZ   r   r<   r=   c                     [        U 5        g r?   r@   r   s    r   rA   CreateBeta.Argso   rC   r   c                 6    [        U[        R                  5      $ r?   )r8   r   BETA_VERSIONrF   s     r   rH   CreateBeta.Runs   s    i,,--r   rJ   NrK   rJ   r   r   rU   rU   Z   s/    + -"  .r   rU   N)rP   apitools.base.pyr   googlecloudsdk.api_lib.air   &googlecloudsdk.api_lib.ai.tensorboardsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   r   r	   r
   r   r   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   r   r8   ReleaseTracksReleaseTrackGACreateCommandr:   BETAALPHArU   rJ   r   r   <module>ri      s    * & 0 9 ( 3 7 / 9 ; 4 < #+* D%%((),t!! , *,8 D%%**D,=,=,C,CD.## . E.r   