
                             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  ej                  ej                  j                         G d	 d
ej                               Zy)zFCommand to print version information for Google Cloud CLI components.
    )absolute_import)division)unicode_literals)base)config)log)update_managerc                   L    e Zd ZdZddiZej                  Zed        Z	d Z
d Zy)Versionz:Print version information for Google Cloud CLI components.EXAMPLESz
          To print the version information for each installed Google Cloud CLI
          components and print a message if updates are available, run:

            $ {command}
          c                 :    | j                   j                  d       y )Nzflattened[no-pad,separator=" "])display_info	AddFormat)parsers    lib/surface/version.pyArgszVersion.Args,   s    
!!"CD    c                     t        j                         j                  r.t        j                         }t        |j                               }ni }t         j                  |d<   |S )NzGoogle Cloud SDK)r   Pathssdk_rootr	   UpdateManagerdictGetCurrentVersionsInformationCLOUD_SDK_VERSION)selfargsmanagerversionss       r   RunzVersion.Run0   sM    ||~,,.gg;;=>hh#)#;#;H Or   c                     t        j                         j                  rEt        j                         }|j                         r t        j                  j                  d       y y y )NzwUpdates are available for some Google Cloud CLI components.  To install them,
please run:
  $ gcloud components update
)	r   r   r   r	   r   UpdatesAvailabler   statuswrite)r   resources_were_displayedr   s      r   EpilogzVersion.Epilog:   sL    ||~,,.g		!	!	#

 " 	# 
$ r   N)__name__
__module____qualname____doc__detailed_helpr   SDK_TOOLS_CATEGORYcategorystaticmethodr   r   r%    r   r   r   r      sA    B  - $$(E E#r   r   N)r)   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.corer   r   googlecloudsdk.core.updaterr	   ReleaseTracksReleaseTrackGACommandr   r.   r   r   <module>r7      sY     '  ' ( & # 6 D%%(()$#dll $# *$#r   