
                            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 S	5      r " S
 S5      r\R                  " SSS9\R                  " \R                   R"                  5       " S S\\R$                  5      5       5       r\R                  " \R                   R(                  5       " S S\\R$                  5      5       rg)z2Implementation of connection profile list command.    )connection_profiles)base)resource_args)concept_parsers)
propertiesc                 ^    [         R                  " 5       R                  U R                  5      $ )z/Gets the resource URI for a connection profile.)r   ConnectionProfilesClientGetUriname)connection_profile_infos    2lib/surface/datastream/connection_profiles/list.py_GetUrir      s)     
	5	5	7	>	>""
$ $    c                       \ rS rSrSrS rSrg)_ConnectionProfileInfo    z<Container for connection profile data using in list display.c                 v    UR                   U l        UR                  U l        X l        UR                  U l        g )N)displayNamedisplay_namer   type
createTimecreate_time)selfmessagedb_types      r   __init___ConnectionProfileInfo.__init__#   s.    ++DDII))Dr   )r   r   r   r   N)__name__
__module____qualname____firstlineno____doc__r   __static_attributes__ r   r   r   r       s
    D*r   r   c                   4    \ rS rSrSr\S 5       rS rS rSr	g)_List*   z6Base class for listing Datastream connection profiles.c                     [         R                  R                  S[        R                  " 5       SSS9R                  U5        UR                  R                  S5        g)z Register flags for this command.z
--locationz:The location you want to list the connection profiles for.T)
group_helprequiredz
          table(
            display_name,
            name:label=ID,
            type,
            create_time.date():label=CREATED
          )
        N)r   ConceptParserForResourcer   GetLocationResourceSpecAddToParserdisplay_info	AddFormat)clsparsers     r   Args
_List.Args-   sW     !!----/O	 .  #{6*
!! # r   c           	         [         R                  " 5       n[        R                  R                  R
                  R                  SS9nUR                  X15      nU Vs/ s H  n[        XPR                  U5      5      PM     sn$ s  snf )zRuns the command.

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

Returns:
  An iterator over objects containing connection profile data.
T)r*   )
r   r	   r   VALUEScoreprojectGetListr   _GetType)r   args	cp_client
project_idprofilesprofiles         r   Run	_List.Run@   sz     $<<>I""''//33T3BJ~~j/H  G 	wg(>?  s   $Bc                     [         e)zGets DB type of a connection profile.

Args:
  profile: A connection configuration type of a connection profile.

Returns:
  A String representation of the provided profile DB type.
  Default is None.
)NotImplementedErrorr   r@   s     r   r;   _List._GetTypeR   s
     r   r$   N)
r   r   r    r!   r"   classmethodr3   rA   r;   r#   r$   r   r   r&   r&   *   s!    > $$
r   r&   FznDatastream beta version is deprecated. Please use`gcloud datastream connection-profiles list` command instead.)
is_removedwarningc                       \ rS rSrSrS rSrg)ListBeta_   c  List Datastream connection profiles.

List connection profiles.

## API REFERENCE
  This command uses the datastream/v1 API. The full documentation
  for this API can be found at: https://cloud.google.com/datastream/

## EXAMPLES
  To list all connection profiles in a project and location 'us-central1',
  run:

      $ {command} --location=us-central1

c                     UR                   (       a  gUR                  (       a  gUR                  (       a  gUR                  (       a  gg )NMySQLOracleGoogle Cloud Storage
SQL Server)mysqlProfileoracleProfile
gcsProfilesqlServerProfilerE   s     r   r;   ListBeta._GetTypev   s5    						#		!	!r   r$   Nr   r   r    r!   r"   r;   r#   r$   r   r   rK   rK   _   s     
r   rK   c                       \ rS rSrSrS rSrg)r:      rM   c                 $   UR                   (       a  gUR                  (       a  gUR                  (       a  gUR                  (       a  gUR                  (       a  gUR
                  (       a  gUR                  (       a  gUR                  (       a  gg )	NrO   rP   
PostgreSQLrQ   rR   
SalesforceBigQueryMongoDB)rS   rT   postgresqlProfilerU   rV   salesforceProfilebigqueryProfilemongodbProfilerE   s     r   r;   List._GetType   se    					"	"			#		!	!		"	"		 	 			r   r$   NrX   r$   r   r   r:   r:      s     r   r:   N)r"   !googlecloudsdk.api_lib.datastreamr   googlecloudsdk.callioper   %googlecloudsdk.command_lib.datastreamr   (googlecloudsdk.command_lib.util.conceptsr   googlecloudsdk.corer   r   r   r&   	DeprecateReleaseTracksReleaseTrackBETAListCommandrK   GAr:   r$   r   r   <module>rp      s    9 B ( ? D *$* *2 2j E
 D%%**+ud&&  ,< D%%(()#5$"" # *#r   