
    	                     *   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	d
Z ej                  ej                  j                  ej                  j                  ej                  j                          G d dej"                               Zy)z#services api-keys describe command.    )absolute_import)division)unicode_literals)apikeys)base)common_flagsDescribe an API key's metadata.a          To describe an API key using Key:

          $ {command} 1234
                OR
          $ {command} projects/myproject/locations/global/keys/1234

        To describe an API key with key and project:

          $ {command} 1234 --project=myproject

        To describe an API key with key, project, and location:

            $ {command} 1234 --project=myproject --location=global
        )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)
DescribeGar	   c                 4    t        j                  | dd       y )Nzto describev2)parsersuffixapi_version)r   key_flag)r   s    )lib/surface/services/api_keys/describe.pyArgszDescribeGa.Args6   s    4P    c                    t        j                  | j                               }|j                  }|j                  j
                  j                         }|j                  |j                               }|j                  j                  |      S )zRun command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      The metadata of API key.
    )name)r   GetClientInstanceReleaseTrackMESSAGES_MODULECONCEPTSkeyParse&ApikeysProjectsLocationsKeysGetRequestRelativeNameprojects_locations_keysGet)selfargsclientmessageskey_refrequests         r   RunzDescribeGa.Run:   sx     &&t'8'8':;F%%Hmm%%'G==!!# > %G))--g66r   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r)    r   r   r   r   /   s%     (-Q Q7r   r   N)r-   
__future__r   r   r   googlecloudsdk.api_lib.servicesr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.servicesr   r.   ReleaseTracksr   ALPHABETAGADescribeCommandr   r1   r   r   <module>r;      s    * &  ' 3 ( < 	.		, D%%++T->->-C-C%%((*7%% 7*7r   