
                             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  G d	 d
ej                        Zy)z3Command to show details for a specified Batch task.    )absolute_import)division)unicode_literals)
exceptions)tasks)base)resource_argsc                   &    e Zd ZdZed        Zd Zy)Describea  Show details of a task.

  This command can fail for the following reasons:
  * The task specified does not exist.
  * The active account does not have permission to access the given task.

  ## EXAMPLES

  To print details of the task with name
  `projects/foo/locations/us-central1/jobs/bar/taskGroups/group0/tasks/0`, run:

    $ {command}
    projects/foo/locations/us-central1/jobs/bar/taskGroups/group0/tasks/0
  c                 .    t        j                  |        y )N)r	   AddTaskResourceArgs)parsers    #lib/surface/batch/tasks/describe.pyArgszDescribe.Args-   s    %%f-    c                    | j                         }t        j                  |      }|j                  j                  j                         }	 |j                  |      S # t        j                  $ r}t        j                  |d      d }~ww xY w)Nz+Could not fetch resource: {status_message}.)error_format)ReleaseTrackr   TasksClientCONCEPTStaskParseGetapitools_exceptionsHttpNotFoundErrorr   HttpException)selfargsrelease_trackclienttask_refes         r   RunzDescribe.Run1   s    %%'M}-F}}!!'')HIZZ!!00 I$$
GI IIs   A B/BBN)__name__
__module____qualname____doc__staticmethodr   r#    r   r   r   r      s!     . .	Ir   r   N)r'   
__future__r   r   r   apitools.base.pyr   r   googlecloudsdk.api_lib.batchr   googlecloudsdk.api_lib.utilgooglecloudsdk.callioper    googlecloudsdk.command_lib.batchr	   DescribeCommandr   r)   r   r   <module>r1      s6     : &  ' > . 2 ( :It## Ir   