
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  \R                  " SS	5      rS
 rSS jrSS jrS rg)z4Common arguments for `gcloud source repos` commands.    )absolute_import)division)unicode_literals)arg_parsers)resource_args)concept_parsersz"[A-Za-z0-9_][-._A-Za-z0-9/]{0,127}ztrepostory name may contain between 1 and 128 (inclusive) letters, digits, hyphens, periods, underscores and slashes.c                 H    U R                  SSSS9  U R                  SSSS9  g)z8Add pushblock enabled/disabled flags to the given group.z--enable-pushblock
store_truezEnable PushBlock for all repositories under current project.
PushBlock allows repository owners to block git push transactions containing
private key data.)actionhelpz--disable-pushblockzDisable PushBlock for all repositories under current project.
PushBlock allows repository owners to block git push transactions containing
private key data.N)add_argument)groups    .lib/googlecloudsdk/command_lib/source/flags.pyAddPushblockFlagsr      sB              c                     U R                  SSS/SS9  U R                  SSR                  U5      S9  U R                  S	S
S9  g)zDAdd message_format and service_account flags to the topic arg group.z--message-formatjsonprotobufz2The format of the message to publish to the topic.)choicesr   z--service-accounta>  Email address of the service account used for publishing Cloud Pub/Sub messages.
This service account needs to be in the same project as the {}. When added, the
caller needs to have iam.serviceAccounts.actAs permission on this service
account. If unspecified, it defaults to the Compute Engine default service
account.)r   --topic-projectzPCloud project for the topic. If not set, the currently set project will be
used.N)r   format)r   resource_names     r   AddOptionalTopicFlagsr   3   sk    z"6  7 
 F=!  # 	  
r   c           	      d   U R                  SSS9nUR                  SSS9n[        R                  " [        R
                  " SSU5      [        R
                  " SSU5      [        R
                  " S	S
U5      [        R                  " U5      /S/S/S/S.S9R                  U 5        [        U5        g)z5Add the arg groups for `source repos update` command.z<Manages Cloud Pub/Sub topics associated with the repository.T)required)mutexr   addz1The Cloud Pub/Sub topic to add to the repository.removez6The Cloud Pub/Sub topic to remove from the repository.update1The Cloud Pub/Sub topic to update in the project.r   z--add-topic.projectz--remove-topic.projectz--update-topic.projectcommand_level_fallthroughsN)		add_groupadd_argument_groupr   ConceptParserr   #CreateTopicResourcePresentationSpec"CreateRepoResourcePresentationSpecAddToParserr   )parserverbtopic_grouptopic_resource_groups       r   AddRepoUpdateArgsr.   K   s      D ! + %774 8 ! 

;
;H"$ 
;
;F"$ 
;
;K"$ 
:
:4
@ #4!4%6$7%6$7"	$ 
V	$r   c           	      r   U R                  SSS9n[        U5        UR                  S5      nUR                  SS9n[        R                  " [
        R                  " SSU5      [
        R                  " SSU5      [
        R                  " S	S
U5      /S/S/S/S.S9R                  U 5        [        US5        g)z?Add the arg groups for `source project-configs update` command.T)r   r   z>Manage Cloud Pub/Sub topics associated with the Cloud project.)r   r   z.The Cloud Pub/Sub topic to add to the project.r   z3The Cloud Pub/Sub topic to remove from the project.r   r    r   r!   r"   projectN)	r$   r   r%   r   r&   r   r'   r)   r   )r*   update_groupr,   r-   s       r   AddProjectConfigUpdateArgsr2   j   s    !!4t!<,L!&&FH+$77d7C

;
;E"$ 
;
;M"$ 
;
;K"$
 #4!4%6$7%6$7"	  
V	Y/r   N)repo)z	to update)__doc__
__future__r   r   r   googlecloudsdk.callioper   !googlecloudsdk.command_lib.sourcer   (googlecloudsdk.command_lib.util.conceptsr   RegexpValidatorREPO_NAME_VALIDATORr   r   r.   r2    r   r   <module>r<      sI    ; &  ' / ; D!11(12 (
0%>0r   