o
    y                     @   s~   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
 ejeejjG d	d
 d
ejZdS )z'The super-group for the update manager.    )absolute_import)division)unicode_literalsN)base)config)logc                   @   s*   e Zd ZdZejZedd Zdd Z	dS )
Componentsa  List, install, update, or remove Google Cloud CLI components.

  The {command} command group lets you control which tools are installed
  in the Google Cloud CLI. It can be used to install, update and remove
  components of the Google Cloud CLI, ensuring a lean, up-to-date installation.

  {command} regularly checks whether updates are available for the
  tools you already have installed, and gives you the opportunity to upgrade to
  the latest version.

  Certain components have dependencies. {command} will install any dependencies,
  and during removal, any dependant components will be uninstalled
  automatically.

  ## EXAMPLES

  To see all available components:

    $ {command} list

  To install a component you don't have:

    $ {command} install COMPONENT

  To remove a component you no longer need:

    $ {command} remove COMPONENT

  To update all components you have to their latest version:

    $ {command} update

  To update all installed components to version 1.2.3:

    $ {command} update --version 1.2.3
  c                 C   sL   | j ddddd | j ddddd | j ddddd | j ddddd d	S )
z Sets args for gcloud components.z--sdk-root-overrideFTzTHIS ARGUMENT NEEDS HELP TEXT.)requiredhiddenhelpz--snapshot-url-overridez--operating-system-overridez--architecture-overrideN)add_argument)parser r   8/tmp/google-cloud-sdk/lib/surface/components/__init__.pyArgsG   s   



zComponents.Argsc                 C   s:   t   tj rtdtjj tdtjj d S d S )Nz-You are using alternate release channel: [%s]z.Snapshot URL for this release channel is: [%s])	r   DisableUserProjectQuotar   INSTALLATION_CONFIGIsAlternateReleaseChannelr   warningrelease_channelsnapshot_url)selfunused_tool_contextargsr   r   r   Filter_   s   
zComponents.FilterN)
__name__
__module____qualname____doc__r   SDK_TOOLS_CATEGORYcategorystaticmethodr   r   r   r   r   r   r      s    %
r   )r   
__future__r   r   r   argparsegooglecloudsdk.callioper   googlecloudsdk.corer   r   UniverseCompatibleReleaseTracksReleaseTrackGAGroupr   r   r   r   r   <module>   s   