
                            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  ej                  ej                   j"                         G d dej$                               Z ej                  ej                   j(                  ej                   j*                         G d de             Zy)z&Vertex AI operations describe command.    )absolute_import)division)unicode_literals)
operations)base)	constants)endpoint_util)flags)index_endpoints_util)indexes_utilc                   ,    e Zd ZdZed        Zd Zd Zy)
DescribeV1a  Gets detailed index information about the given operation id.

  ## EXAMPLES

  To describe an operation `123` of project `example` in region
  `us-central1`, run:

    $ {command} 123 --project=example --region=us-central1

  To describe an operation `123` belongs to parent index resource `456` of
  project `example` in region `us-central1`, run:

    $ {command} 123 --index=456 --project=example --region=us-central1

  To describe an operation `123` belongs to parent index endpoint resource `456`
  of project `example` in region `us-central1`, run:

    $ {command} 123 --index-endpoint=456 --project=example --region=us-central1
  c                     t        j                  |        t        j                  dd      j                  |        t        j                  dd      j                  |        y )NFzd     ID of the index. Applies to operations belongs to an index resource. Do not set otherwise.
    )requiredhelper_textzv     ID of the index endpoint. Applies to operations belongs to an index endpoint resource. Do not set otherwise.
    )r
   AddOperationResourceArgGetIndexIdArgAddToParserGetIndexEndpointIdArg)parsers    %lib/surface/ai/operations/describe.pyArgszDescribeV1.Args4   sT    	!!&)		 
V			 
V	    c                    |j                   j                  j                         }|j                         d   }|j                         d   }|j                         d   }|j                  #t        j                  |||j                  |      }n.|j                  "t        j                  |||j                  |      }t        j                  ||      5  t        j                  |      j                  |      cd d d        S # 1 sw Y   y xY w)N
projectsIdlocationsIdoperationsId)region)version)CONCEPTS	operationParseAsDictindexr   BuildIndexParentOperationindex_endpointr   BuildParentOperationr	   AiplatformEndpointOverridesr   OperationsClientGet)selfargsr   operation_ref
project_idr   operation_ids          r   _RunzDescribeV1._RunB   s     MM++113M%%'5J!!#M2F '').9Lzz"<<
fdjj,8m				(*??
fd11<Am		2	276	J((9==mL 
K	J	Js   %DD
c                 B    | j                  |t        j                        S N)r0   r   
GA_VERSIONr+   r,   s     r   RunzDescribeV1.RunT   s    99T9//00r   N)__name__
__module____qualname____doc__staticmethodr   r0   r5    r   r   r   r      s&    (  M$1r   r   c                       e Zd ZdZd Zy)DescribeV1Beta1a  Gets detailed index information about the given operation id.

  ## EXAMPLES

  To describe an operation `123` of project `example` in region
  `us-central1`, run:

    $ {command} 123 --project=example --region=us-central1

  To describe an operation `123` belongs to parent index resource `456` of
  project `example` in region `us-central1`, run:

    $ {command} 123 --index=456 --project=example --region=us-central1
  c                 B    | j                  |t        j                        S r2   )r0   r   BETA_VERSIONr4   s     r   r5   zDescribeV1Beta1.Runi   s    99T91122r   N)r6   r7   r8   r9   r5   r;   r   r   r=   r=   X   s    3r   r=   N)r9   
__future__r   r   r   googlecloudsdk.api_lib.air   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   r	   r
   r   r   ReleaseTracksReleaseTrackGADescribeCommandr   ALPHABETAr=   r;   r   r   <module>rJ      s    - &  ' 0 ( 3 7 / > 6 D%%(()61%% 61 *61r D%%++T->->-C-CD3j 3 E3r   