
                            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
  SSKJr  SSKJ
r  SS	KJr  S
SS.r\R"                  " \R$                  R&                  5      \R(                   " S S\R*                  5      5       5       rg)z?Command to create connection profiles for a database migration.    )absolute_import)division)unicode_literals)resource_args)base)flags)create_helper)
console_ioFCreate a Database Migration Service connection profile for PostgreSQL.a          To create a connection profile my-profile for PostgreSQL:

            $ {command} my-profile --region=us-central1
            --password=123456 --username=my-user
            --host=1.2.3.4 --port=5432

        If the source is a Cloud SQL database, run:

            $ {command} my-profile --region=us-central1
            --password=123456 --username=my-user
            --host=1.2.3.4 --port=5432 --cloudsql-instance=my-instance
        )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)
PostgreSQL0   r   c                    [         R                  " U S5        [        R                  " U 5        [        R                  " U 5        [        R
                  " U SSS9  [        R                  " U [        R                  R                  5        [        R                  " U 5        [        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.
z	to createT)with_database_namesupports_iam_authN)r   )AddPostgresqlConnectionProfileResourceArgcp_flagsAddNoAsyncFlagAddDisplayNameFlagAddDatabaseParamsFlagsAddSslConfigGroupr   ReleaseTrackGAAddCloudSQLInstanceFlagAddAlloydbClusterFlagAddRoleFlagr   AddLabelsCreateFlags)parsers    Glib/surface/database_migration/connection_profiles/create/postgresql.pyArgsPostgreSQL.Args7   s     ;;FKPF#'##44Avt'8'8';';<$$V,""6* 	v&    c                 L   UR                   R                  R                  5       nUR                  5       R	                  5       nUR
                  (       a  [        R                  " S5      Ul        [        R                  " 5       nUR                  U R                  5       UX!S5      $ )a  Create a Database Migration Service connection profile.

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

Returns:
  A dict object representing the operations resource describing the create
  operation if the create was successful.
zPlease Enter Password: 
POSTGRESQL)CONCEPTSconnection_profileParseParentRelativeNameprompt_for_passwordr
   PromptPasswordpasswordr	   CreateHelpercreater   )selfargsconnection_profile_ref
parent_refhelpers        r!   RunPostgreSQL.RunK   s     "]]==CCE'..0==?J //0IJdm'')F==**,j/|E Er$    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr"   r6   __static_attributes__r8   r$   r!   r   r   0   s%     O-' '&Er$   r   N)r=   
__future__r   r   r   )googlecloudsdk.api_lib.database_migrationr   googlecloudsdk.callioper   -googlecloudsdk.command_lib.database_migrationr   Agooglecloudsdk.command_lib.database_migration.connection_profilesr	   r   googlecloudsdk.core.consoler
   r>   ReleaseTracksr   r   DefaultUniverseOnlyCommandr   r8   r$   r!   <module>rK      s    F &  ' C ( ? [ _ 2 	Q	( D%%((),E ,E  *,Er$   