
                         J   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                  ej                  j                  ej                  j                         ej"                   G d	 d
ej$                                      Zy)z%`gcloud source repos update` command.    )absolute_import)division)unicode_literals)
sourcerepo)base)flags)utilc                   &    e Zd ZdZed        Zd Zy)Updatea/  Update the configuration of a Cloud Source Repository.

  ## EXAMPLES

  To associate a Cloud Pub/Sub topic to receive repository update notifications,
  run:

    $ {command} REPO_NAME \
        --add-topic=TOPIC_NAME \
        --service-account=SERVICE_ACCOUNT_EMAIL \
        --message-format=json
  c                 .    t        j                  |        y )N)r   AddRepoUpdateArgs)parsers    "lib/surface/source/repos/update.pyArgszUpdate.Args-   s    	F#    c                     t        j                         }|j                  j                  j	                         }|j                  |      }t        j                  ||      }|j                  |d      S )NpubsubConfigs)	r   SourceCONCEPTSrepoParseGetRepor	    ParseSourceRepoWithModifiedTopic	PatchRepo)selfargsclientrepo_refr   updated_repos         r   Runz
Update.Run1   s[     F}}!!'')H>>(#D88tDLL/::r   N)__name__
__module____qualname____doc__staticmethodr   r     r   r   r   r      s     
 $ $;r   r   N)r$   
__future__r   r   r   googlecloudsdk.api_lib.sourcer   googlecloudsdk.callioper   !googlecloudsdk.command_lib.sourcer   r	   ReleaseTracksReleaseTrackGABETAALPHADefaultUniverseOnlyCommandr   r&   r   r   <module>r2      s    , &  ' 4 ( 3 2 $++00$2C2C2I2I ;T\\ ; ;r   