
                             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
  ej                  ej                  j                  ej                  j                  ej                  j                         G d d	ej                                Zy
)z)services api-keys get-key-string command.    )absolute_import)division)unicode_literals)apikeys)base)common_flagsc                   &    e Zd ZdZed        Zd Zy)GetKeyStringaW  Get the key string of an API key.

  Get the key string of an API key

  ## EXAMPLES


    To get the key string of API key `1234`, run:

     $ {command} 1234

    To get the key string of API key `1234` in project
    `myproject` using the fully qualified API key name, run:

     $ {command} projects/myproject/locations/global/keys/1234
  c                 2    t        j                  | d       y )Nzto retrieve key string)parsersuffix)r   key_flag)r   s    /lib/surface/services/api_keys/get_key_string.pyArgszGetKeyString.Args/   s    0HI    c                     t        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:
      Key string.
    )name)
r   GetClientInstanceMESSAGES_MODULECONCEPTSkeyParse/ApikeysProjectsLocationsKeysGetKeyStringRequestRelativeNameprojects_locations_keysr
   )selfargsclientmessageskey_refrequests         r   RunzGetKeyString.Run3   sn     &&(F%%Hmm%%'GFF!!# G %G))66w??r   N)__name__
__module____qualname____doc__staticmethodr   r"    r   r   r
   r
      s#    " J J@r   r
   N)r&   
__future__r   r   r   googlecloudsdk.api_lib.servicesr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.servicesr   ReleaseTracksReleaseTrackALPHABETAGADescribeCommandr
   r(   r   r   <module>r3      sx    0 &  ' 3 ( < T..33T5F5F5I5I'@4'' '@'@r   