
    3                         d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlm	Z	 ddl
mZ dd	l
mZ ej                   G d
 dej                               Zy)z Command to describe credentials.    )absolute_import)division)unicode_literalsN)base)
exceptions)creds)storec                   &    e Zd ZdZed        Zd Zy)DescribezDescribes credentials.

  Returns internal details about specified credentials.

  ## EXAMPLES

  To describe existing credentials, run:

            $ {command} ACCOUNT_NAME
  c                 *    | j                  dd       y)zAdds args for this command.account_namezName of the account to describe)helpN)add_argument)parsers    lib/surface/auth/describe.pyArgszDescribe.Args+   s     .  0    c                 h   t        j                  |j                  d      }|s.t        j                  dj                  |j                              t        j                  |      r*t        j                  |      }t        j                  |      S t        j                  |j                               S )NT)use_google_authz/The credentials for account [{0}] do not exist.)r	   Loadr   r   CredentialsNotFoundformatr   IsGoogleAuthCredentialsSerializeCredsGoogleAuthjsonloadsto_json)selfargs
credential	json_creds       r   RunzDescribe.Run2   s    D--tDJ**
;6$##$& & $$Z000<iZZ	""::j((*++r   N)__name__
__module____qualname____doc__staticmethodr   r"    r   r   r   r      s     	 0 0
,r   r   )r&   
__future__r   r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.authr   googlecloudsdk.core.credentialsr   r	   HiddenDescribeCommandr   r(   r   r   <module>r/      sG     ' &  '  ( 6 1 1 ,t## , ,r   