
                         :   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
  \R                  \R                  " \R                  R                  \R                  R                  \R                  R                   5       " S S	\R"                  5      5       5       rg)
zImports data into a Cloud SQL instance from a TDE file.

Imports data into a Cloud SQL instance from a TDE backup file in Google Cloud
Storage.
    N)api_util)base)flags)import_util)
console_ioc                   x    \ rS rSrSr\R                  " S5      \R                  " S5      S.r\S 5       r	S r
Srg	)
Tde   z@Import TDE certificate into a Cloud SQL for SQL Server instance.a/            {command} imports a TDE certificate into a Cloud SQL instance from a certificate file
          in Google Cloud Storage.

          For detailed help on importing data into Cloud SQL, refer to this
          guide: https://cloud.google.com/sql/docs/sqlserver/import-export/importing
          ah            To import a TDE certificate with the name `foo` and certificate path `my-bucket/my-cert.cert`
          and private key path `my-bucket/my-key.pvk` and pvk password `my-pvk-password` into
          the Cloud SQL instance `my-instance`,
          run:

            $ {command} my-instance --certificate=foo --cert-path=gs://my-bucket/my-cert.cert --pvk-path=gs://my-bucket/my-key.pvk --pvk-password=my-pvk-password

          To import a TDE certificate with the name `foo` and certificate path `my-bucket/my-cert.cert`
          and private key path `my-bucket/my-key.pvk` into
          the Cloud SQL instance `my-instance` and prompting for the
          private key password,
          run:

            $ {command} my-instance --certificate=foo --cert-path=gs://my-bucket/my-cert.cert --pvk-path=gs://my-bucket/my-key.pvk --prompt-for-pvk-password
          )DESCRIPTIONEXAMPLESc                     [         R                  R                  U 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.
N)r   
ASYNC_FLAGAddToParserr   AddInstanceArgumentAddTdeFlags)parsers    lib/surface/sql/import/tde.pyArgsTde.ArgsA   s2     	OO'	f%	f    c                     UR                   (       a  [        R                  " S5      Ul        [        R
                  " [        R                  5      n[        R                  " X5      $ )z7Runs the command to import into the Cloud SQL instance.zPrivate Key Password: )	prompt_for_pvk_passwordr   PromptPasswordpvk_passwordr   	SqlClientAPI_VERSION_DEFAULTr   RunTdeImportCommand)selfargsclients      r   RunTde.RunM   sF    ##$334LMd < <=F**488r    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r!   __static_attributes__r#   r   r   r	   r	      sN     I //   //  -8 	 	9r   r	   )r(   r)   googlecloudsdk.api_lib.sqlr   googlecloudsdk.callioper   googlecloudsdk.command_lib.sqlr   r   googlecloudsdk.core.consoler   DefaultUniverseOnlyReleaseTracksReleaseTrackGABETAALPHACommandr	   r#   r   r   <module>r9      s     / ( 0 6 2 D%%(($*;*;*@*@%%++-19$,, 19- 19r   