
    I                        S 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	  SSKJ
r  SSKJr  \R                  " \R                   R"                  5      \R$                   " S	 S
\	R&                  \R(                  5      5       5       rg)z?Command to seed conversion workspaces for a database migration.    N)Optional)resource_args)base)command_mixin)flags)datamigration_v1_messagesc                       \ rS rSrSrSSS.r\S\R                  SS4S	 j5       r	S
\R                  S\\R                     4S jrSrg)Seed   z7Seed a Database Migration Service conversion workspace.zG
        Seed a Database Migration Service conversion workspace.
      z        To seed a conversion workspace:

            $ {command} my-conversion-workspace --region=us-central1
            --source-connection-profile=cp1
      )DESCRIPTIONEXAMPLESparserreturnNc                     [         R                  " U S5        [        R                  " U 5        [        R                  " U 5        g)zArgs is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use to add arguments that go on
    the command line after this command. Positional arguments are allowed.
zto seedN)r   %AddConversionWorkspaceSeedResourceArgcw_flagsAddNoAsyncFlagAddAutoCommitFlag)r   s    <lib/surface/database_migration/conversion_workspaces/seed.pyArgs	Seed.Args,   s0     77	JF#v&    argsc                    UR                   R                  R                  5       nU R                  R                  R                  UR                  5       UR                   R                  R                  5       UR                   R                  R                  5       UR                  S9nU R                  UUSUR                  S5      S9$ )a  Seed a Database Migration Service conversion workspace.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
    with.

Returns:
  A dict object representing the operations resource describing the seed
  operation if the seed was successful.
)namesrc_connection_profile_refdest_connection_profile_refauto_commitSeededno_async)conversion_workspace_refresult_operationoperation_namesync)CONCEPTSconversion_workspaceParseclient
operationsr
   RelativeNamesource_connection_profiledestination_connection_profiler   HandleOperationResultIsKnownAndSpecified)selfr   r!   r"   s       r   RunSeed.Run8   s      $}}AAGGI{{--22%224#'==#J#J#P#P#R$(MM$P$P$V$V$X$$	 3  %%!9)%%j1	 &  r    )__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodargparseArgumentParserr   	Namespacer   messages	Operationr0   __static_attributes__r2   r   r   r
   r
      se     @

	
- 	'8** 	't 	' 	'h(( Xh6H6H-I r   r
   )r7   r:   typingr   )googlecloudsdk.api_lib.database_migrationr   googlecloudsdk.callioper   Cgooglecloudsdk.command_lib.database_migration.conversion_workspacesr   r   r   6googlecloudsdk.generated_clients.apis.datamigration.v1r   r=   ReleaseTracksReleaseTrackGADefaultUniverseOnly ConversionWorkspacesCommandMixinCommandr
   r2   r   r   <module>rK      sl    F   C ( ] a h D%%(()3=994<< 3  *3r   