HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib/google-cloud-sdk/lib/surface/datastream/objects/__pycache__/lookup.cpython-312.pyc
�

���
��
�dZddlmZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZ
dd	lmZd
ZdZej$ej&ej(j*�Gd�d
ej,���Zy)z3Command to lookup a stream object for a datastream.�)�absolute_import)�division)�unicode_literals)�stream_objects)�base)�
resource_args)�flags)�
propertieszJLookup a stream object by its source object identifier (e.g. schema.table)a0    To lookup an existing Mysql stream object:

        $ {command} --stream=my-stream --location=us-central1 --mysql-database=my-db --mysql-table=my-table

    To lookup an existing Oracle stream object:

        $ {command} --stream=my-stream --location=us-central1 --oracle-schema=my-schema --oracle-table=my-table

    To lookup an existing PostgreSQL stream object:

        $ {command} --stream=my-stream --location=us-central1 --postgresql-schema=my-schema --postgresql-table=my-table

    To lookup an existing SQL Server stream object:

       $ {command} --stream=my-stream --location=us-central1 --sqlserver-schema=my-schema --sqlserver-table=my-table

    To lookup an existing Salesforce stream object:

       $ {command} --stream=my-stream --location=us-central1 --salesforce-object-name=my-object
   c�0�eZdZdZeed�Zed��Zd�Z	y)�Lookupz"Lookup a Datastream stream object.)�DESCRIPTION�EXAMPLESc�&�tj|�|jdd��}tj|�tj
|�tj|�tj|�tj|�y)z�Args 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.
    T)�required�mutexN)	r�AddStreamObjectResourceArg�	add_group�so_flags�AddOracleObjectIdentifier�AddMysqlObjectIdentifier�AddPostgresqlObjectIdentifier�AddSqlServerObjectIdentifier�AddSalesforceObjectIdentifier)�parser�object_identifier_parsers  �(lib/surface/datastream/objects/lookup.py�ArgszLookup.Args;ss���,�,�V�4�%�/�/��T�/�J���&�&�'?�@��%�%�&>�?��*�*�+C�D��)�)�*B�C��*�*�+C�D�c��tjjjj	d��}|j
jj�j}tj�}|j|||�S)z�Lookup a Datastream stream object.

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

    Returns:
      A dict object representing the looked up stream object if the lookup was
      successful.
    T)r)r
�VALUES�core�project�Get�CONCEPTS�stream�Parse�	streamsIdr�StreamObjectsClientr)�self�args�
project_id�	stream_id�	so_clients     r�Runz
Lookup.RunLsj���"�"�'�'�/�/�3�3�T�3�B�J��
�
�$�$�*�*�,�6�6�I��2�2�4�I����J�	�4�8�8rN)
�__name__�
__module__�__qualname__�__doc__r
r�
detailed_help�staticmethodrr.�rrrr5s*��+�"-�8�D�-��E��E� 9rrN)r2�
__future__rrr�!googlecloudsdk.api_lib.datastreamr�googlecloudsdk.callioper�%googlecloudsdk.command_lib.datastreamr�-googlecloudsdk.command_lib.datastream.objectsr	r�googlecloudsdk.corer
r
r�DefaultUniverseOnly�
ReleaseTracks�ReleaseTrack�GA�Commandrr5rr�<module>rAsz��:�&��'�<�(�?�K�*�Q����.�������D�%�%�(�(�)�#9�T�\�\�#9�*��#9r