
    >
                     f    d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
  G d d	e      Zy
) Cloud Datacatalog search client.    )absolute_import)division)unicode_literals)
list_pager)util)	arg_utilsc                       e Zd ZdZd Zd Zy)SearchClientr   c                     || _         t        j                  |      | _        t        j                  |      | _        | j                  j                  | _        y )N)version_labelr   GetClientInstanceclientGetMessagesModulemessagescatalogservice)selfr   s     1lib/googlecloudsdk/api_lib/data_catalog/search.py__init__zSearchClient.__init__   s?    &D((7DK**=9DM;;&&DL    c	           	         | j                   dk(  r| j                  j                  ||      }	n| j                  j                  ||      }	|rt	        j
                  |	d|       |rt	        j
                  |	d|       |rt	        j
                  |	d|       |rt	        j
                  |	d|       t        j                  | j                  |	||ddd	
      S )z$Parses search args into the request.v1)queryorderByzscope.includeGcpPublicDatasetszscope.includeOrgIdszscope.includeProjectIdszscope.restrictedLocationsSearchresultspageSize)
batch_sizelimitmethodfieldbatch_size_attribute)	r   r   ,GoogleCloudDatacatalogV1SearchCatalogRequest1GoogleCloudDatacatalogV1beta1SearchCatalogRequestr	   SetFieldInMessager   YieldFromListr   )
r   r   include_gcp_public_datasetsinclude_organization_idsrestricted_locationsinclude_project_idsorder_by	page_sizer    requests
             r   r   zSearchClient.Search#   s     T!JJ K g
 OO P g #!!
3
%'  !!
(
"$ !!
,
 !!
.
  ##g' r   N)__name__
__module____qualname____doc__r   r    r   r   r   r      s    (')r   r   N)r2   
__future__r   r   r   apitools.base.pyr   #googlecloudsdk.api_lib.data_catalogr   $googlecloudsdk.command_lib.util.apisr	   objectr   r3   r   r   <module>r9      s(    ' &  ' ' 4 :26 2r   