
                             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                   G d	 d
ej                               Zy)z/`gcloud source project-configs update` command.    )absolute_import)division)unicode_literals)project_configs)base)flags)utilc                   .    e Zd ZdZdZdZed        Zd Zy)Updatea  Update the Cloud Source Repositories configuration of the current project.

  ## EXAMPLES

  To enable PushBlock for all repositories under current project, run:

    $ {command} --enable-pushblock

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

    $ {command} --add-topic=TOPIC_NAME --service-account=SERVICE_ACCOUNT_EMAIL \
        --message-format=json
  enablePrivateKeyCheckpubsubConfigsc                 .    t        j                  |        y N)r   AddProjectConfigUpdateArgs)parsers    ,lib/surface/source/project_configs/update.pyArgszUpdate.Args/   s    	$$V,    c                 l   t        j                         }|j                  s|j                  r1t	        j
                  |      }|j                  || j                        S t	        j                  |      }|j                  |      }t	        j                  ||      }|j                  || j                        S r   )r   ProjectConfigenable_pushblockdisable_pushblockr	   ParseProjectConfigWithPushblockr   _ENABLE_KEY_UPDATE_MASKCreateProjectResourceGet#ParseProjectConfigWithModifiedTopic_PUBSUB_CONFIGS_UPDATE_MASK)selfargsclientupdated_project_configproject_refproject_configs         r   Runz
Update.Run3   s    **,F 6 6#CCDI]]143O3OPP,,T2KZZ,N!EEn==/99; ;r   N)	__name__
__module____qualname____doc__r   r   staticmethodr   r%    r   r   r   r      s,     4 /- -;r   r   N)r)   
__future__r   r   r   googlecloudsdk.api_lib.sourcer   googlecloudsdk.callioper   !googlecloudsdk.command_lib.sourcer   r	   DefaultUniverseOnlyCommandr   r+   r   r   <module>r2      sD    6 &  ' 9 ( 3 2 ";T\\ "; ";r   