
    ]                     x    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 rS r	SS	 jr
S
 rS rS rS rS rg)z3Additional flags for data-catalog crawler commands.    )absolute_import)division)unicode_literals)arg_parsers)basec                      [        5       $ )N!AddCrawlerScopeAndSchedulingFlags     =lib/googlecloudsdk/command_lib/data_catalog/crawlers/flags.py*AddCrawlerScopeAndSchedulingFlagsForCreater      s    	*	,,r   c                      [        SS9$ )NT)
for_updater	   r   r   r   *AddCrawlerScopeAndSchedulingFlagsForUpdater      s    	*d	;;r   c                 `   [         R                  " SU (       + S9nUR                  [        U 5      5        UR                  U (       d
  [	        5       O	[        5       5        [         R                  " SU (       + S9nUR                  [        U 5      5        UR                  [        U 5      5        X/$ )zPython hook to add the arguments for scope and scheduling options.

Args:
  for_update: If flags are for update instead of create.

Returns:
  List consisting of the scope and scheduling arg groups.
z)Arguments to configure the crawler scope:)helprequiredz2Arguments to configure the crawler run scheduling:)r   ArgumentGroupAddArgumentGetCrawlScopeArgGetBucketArgForCreateGetBucketArgsForUpdateGetRunOptionArgGetRunScheduleArg)r   scope_groupscheduling_groups      r   r
   r
   !   s     ""6~+ *:67%/5K5MO ''?~ z:;0<=
	((r   c                 F    SSSS.n[         R                  " SUU (       + SS9$ )NzWDirects the crawler to crawl specific buckets within the project that owns the crawler.zRDirects the crawler to crawl all the buckets of the project that owns the crawler.zgDirects the crawler to crawl all the buckets of the projects in the organization that owns the crawler.)bucketprojectorganizationz--crawl-scopezScope of the crawler.choicesr   help_strr   ChoiceArgumentr   r#   s     r   r   r   :   s=    1*LM' 
		~&	
( (r   c                  V    [         R                  " S[        R                  " 5       SSS9$ )Nz	--bucketsBUCKETzqA list of buckets to crawl. This argument should be provided if and only if `--crawl-scope=BUCKET` was specified.typemetavarr   )r   Argumentr   ArgListr   r   r   r   r   I   s,    	 ?	
@ @r   c            	         [         R                  " SS9n U R                  [         R                  " S[        R
                  " 5       SSS95        [         R                  " SS9nUR                  [         R                  " S	[        R
                  " 5       SS
S95        UR                  [         R                  " SSSS95        U R                  U5        U $ )z/Returns bucket-related args for crawler update.zrUpdate buckets to crawl. These arguments can be provided only if the crawler will be bucket-scoped after updating.)r   z--add-bucketsr)   z*List of buckets to add to the crawl scope.r*   T)mutexz--remove-bucketsz/List of buckets to remove from the crawl scope.z--clear-buckets
store_truezDIf specified, clear the existing list of buckets in the crawl scope.)actionr   )r   r   r   r-   r   r.   )bucket_groupremove_bucket_groups     r   r   r   R   s    ##?@, 
mm
""$;	=> **6!!
mm
""$@	BC !!
mm
 ./	r   c                 D    SSS.n[         R                  " SUU (       + SS9$ )Nz3The crawler run will have to be triggered manually.z1The crawler will run automatically on a schedule.)manual	scheduledz--run-optionzRun option of the crawler.r"   r%   r'   s     r   r   r   p   s3    EFH' 
		~+	
- -r   c                 Z    SnU (       d  US-  nOUS-  n[         R                  " SSS/US9$ )NzSchedule for the crawler run.zX This argument should be provided if and only if `--run-option=SCHEDULED` was specified.z_ This argument can be provided only if the crawler run option will be scheduled after updating.z--run-scheduledailyweekly)r#   r$   r%   )r   r$   s     r   r   r   {   sK    ,(	 ; <H  < =H			!
 r   N)F)__doc__
__future__r   r   r   googlecloudsdk.callioper   r   r   r   r
   r   r   r   r   r   r   r   r   <module>r>      sB    : &  ' / (-<)2(@<-r   