
    Q                     R   S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSKJ	r	  SSK
Jr  SS	K
Jr  \	R                  \	R                  " \	R                  R                   \	R                  R"                  \	R                  R$                  5       " S
 S\	R&                  5      5       5       rg)z)Command for spanner databases add splits.    )absolute_import)division)unicode_literalsN)database_splits)base)flags)resource_argsc                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	Add   z(Add split points to a  Spanner database.EXAMPLESa          To add split points to the given Spanner database, run:

          $ {command} my-database-id --instance=my-instance-id
              --splits-file=path/to/splits.txt --initiator=my-initiator-string
              --split-expiration-date=2024-08-15T15:55:10Z
        c                    [         R                  " U S5        [        R                  " SS9R	                  U 5        [        R
                  " SS9R	                  U 5        [        R                  " SS9R	                  U 5        g)zSee base class.zon which to add split pointsap  The path of a file containing split points to add to the database. Separate split points in the file with a new line. The file format is <ObjectType>[space]<ObjectName>[space]<Split Value>, where the ObjectType is one of TABLE or INDEX and the Split Value is the split point key. For index, the split point key is the index key with or without a full table key prefix.)	help_textzThe date when the split points become system managed and becomes eligible for merging. The default is 10 days from the date of creation. The maximum is 30 days from the date of creation.z6The tag to identify the initiator of the split points.N)r	   AddDatabaseResourceArgr   
SplitsFileAddToParserSplitExpirationDate	Initiator)parsers    +lib/surface/spanner/databases/splits/add.pyArgsAdd.Args.   so     ((1OP	B	 k&	 k&	OOD k&    c                     [         R                  " UR                  R                  R	                  5       [
        R                  " U5      UR                  5      $ )zThis is what gets called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  Some value that we want to have printed later.
)r   AddSplitPointsCONCEPTSdatabaseParser   GetSplitPoints	initiator)selfargss     r   RunAdd.RunJ   sB     ))$$&T" r    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r#   __static_attributes__r%   r   r   r   r      s<    
 1 (// # -  6r   r   )r*   
__future__r   r   r   r+   googlecloudsdk.api_lib.spannerr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   r	   DefaultUniverseOnlyReleaseTracksReleaseTrackALPHABETAGAUpdateCommandr   r%   r   r   <module>r;      s    0 &  '  : ( 4 < T..33T5F5F5I5I7$

 7 7r   