
    *
                     D   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
dZ e
j                  e
j                  j                   e
j                  j"                  e
j                  j$                         G d de
j&                               Zee_        y)z''notebooks instances diagnose' command.    )absolute_import)division)unicode_literals)	instances)util)base)flagsz6
        Request for diagnose notebook instances.
    a  
    To diagnose an instance, run:

        $ {command} example-instance --location=us-west1-b --gcs-bucket=gs://example-bucket

    To diagnose an instance with a relative path:

        $ {command} example-instance --location=us-west1-b --gcs-bucket=gs://example-bucket --relative-path=logs

    To diagnose an instance, with packet capture:

        $ {command} example-instance --location=us-west1-b --gcs-bucket=gs://example-bucket --enable-packet-capture
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)DiagnosezRequest for diagnose instances.c                 v    t        j                  | j                               }t        j                  ||       y)z Register flags for this command.N)r   ApiVersionSelectorReleaseTrackr	   AddDiagnoseInstanceFlags)clsparserapi_versions      +lib/surface/notebooks/instances/diagnose.pyArgszDiagnose.Args5   s-     ))#*:*:*<=K	"";7    c                 <   | j                         }t        j                  |      }t        j                  |      }|j                  }|j                  t        j                  ||            }t        j                  ||||t        j                  j                        S )z9This is what gets called when the user runs this command.)operation_type)r   r   	GetClientGetMessagesprojects_locations_instancesr   instance_utilCreateInstanceDiagnoseRequest	HandleLROOperationTypeUPDATE)selfargsrelease_trackclientmessagesinstance_service	operations          r   RunzDiagnose.Run;   s    %%'M^^M*F.H:: ))33D(CEI""$2299; ;r   N)__name__
__module____qualname____doc__classmethodr   r)    r   r   r   r   0   s     (8 8
;r   r   N)r-   
__future__r   r   r    googlecloudsdk.api_lib.notebooksr   r   r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.notebooksr	   DETAILED_HELPReleaseTracksr   ALPHABETAGACommandr   detailed_helpr/   r   r   <module>r;      s    . &  ' G 1 ( 6		, D%%++T->->-C-C%%((*;t|| ;*;2 ' r   