1.0.0-beta25 (latest) 1.0.0-beta24

    public sealed class SearchServiceClientImpl : SearchServiceClient

Reference documentation and code samples for the Discovery Engine v1beta API class SearchServiceClientImpl.

SearchService client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [SearchServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient) \> SearchServiceClientImpl

## Inherited Members

[SearchServiceClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_DefaultEndpoint) [SearchServiceClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_DefaultScopes) [SearchServiceClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_ServiceMetadata) [SearchServiceClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_CreateAsync_System_Threading_CancellationToken_) [SearchServiceClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_Create) [SearchServiceClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_ShutdownDefaultChannelsAsync) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.DiscoveryEngine.V1Beta](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)

## Assembly

Google.Cloud.DiscoveryEngine.V1Beta.dll

## Remarks

Service for search.

## Constructors

### SearchServiceClientImpl(SearchServiceClient, SearchServiceSettings, ILogger)

    public SearchServiceClientImpl(SearchService.SearchServiceClient grpcClient, SearchServiceSettings settings, ILogger logger)

Constructs a client wrapper for the SearchService service, with the specified gRPC client and settings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchService.SearchServiceClient` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceSettings` The base [SearchServiceSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceSettings) used within this client. |
| `logger` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override SearchService.SearchServiceClient GrpcClient { get; }

The underlying gRPC SearchService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchService.SearchServiceClient` |   |

**Overrides** [SearchServiceClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_GrpcClient)

### LocationsClient

    public override LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

**Overrides** [SearchServiceClient.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_LocationsClient)

## Methods

### Search(SearchRequest, CallSettings)

    public override PagedEnumerable<SearchResponse, SearchResponse.Types.SearchResult> Search(SearchRequest request, CallSettings callSettings = null)

Performs a search.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Types.SearchResult` | A pageable sequence of [SearchResponse.Types.SearchResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Types.SearchResult) resources. |

**Overrides** [SearchServiceClient.Search(SearchRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_Search_Google_Cloud_DiscoveryEngine_V1Beta_SearchRequest_Google_Api_Gax_Grpc_CallSettings_)

### SearchAsync(SearchRequest, CallSettings)

    public override PagedAsyncEnumerable<SearchResponse, SearchResponse.Types.SearchResult> SearchAsync(SearchRequest request, CallSettings callSettings = null)

Performs a search.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Types.SearchResult` | A pageable asynchronous sequence of [SearchResponse.Types.SearchResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Types.SearchResult) resources. |

**Overrides** [SearchServiceClient.SearchAsync(SearchRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_SearchAsync_Google_Cloud_DiscoveryEngine_V1Beta_SearchRequest_Google_Api_Gax_Grpc_CallSettings_)

### SearchLite(SearchRequest, CallSettings)

    public override PagedEnumerable<SearchResponse, SearchResponse.Types.SearchResult> SearchLite(SearchRequest request, CallSettings callSettings = null)

Performs a search. Similar to the
\[SearchService.Search\]\[google.cloud.discoveryengine.v1beta.SearchService.Search\]
method, but a lite version that allows API key for authentication, where
OAuth and IAM checks are not required.

Only public website search is supported by this method. If data stores and
engines not associated with public website search are specified, a
`FAILED_PRECONDITION` error is returned.

This method can be used for easy onboarding without having to implement an
authentication backend. However, it is strongly recommended to use
\[SearchService.Search\]\[google.cloud.discoveryengine.v1beta.SearchService.Search\]
instead with required OAuth and IAM checks to provide better data security.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Types.SearchResult` | A pageable sequence of [SearchResponse.Types.SearchResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Types.SearchResult) resources. |

**Overrides** [SearchServiceClient.SearchLite(SearchRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_SearchLite_Google_Cloud_DiscoveryEngine_V1Beta_SearchRequest_Google_Api_Gax_Grpc_CallSettings_)

### SearchLiteAsync(SearchRequest, CallSettings)

    public override PagedAsyncEnumerable<SearchResponse, SearchResponse.Types.SearchResult> SearchLiteAsync(SearchRequest request, CallSettings callSettings = null)

Performs a search. Similar to the
\[SearchService.Search\]\[google.cloud.discoveryengine.v1beta.SearchService.Search\]
method, but a lite version that allows API key for authentication, where
OAuth and IAM checks are not required.

Only public website search is supported by this method. If data stores and
engines not associated with public website search are specified, a
`FAILED_PRECONDITION` error is returned.

This method can be used for easy onboarding without having to implement an
authentication backend. However, it is strongly recommended to use
\[SearchService.Search\]\[google.cloud.discoveryengine.v1beta.SearchService.Search\]
instead with required OAuth and IAM checks to provide better data security.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Types.SearchResult` | A pageable asynchronous sequence of [SearchResponse.Types.SearchResult](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchResponse.Types.SearchResult) resources. |

**Overrides** [SearchServiceClient.SearchLiteAsync(SearchRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SearchServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SearchServiceClient_SearchLiteAsync_Google_Cloud_DiscoveryEngine_V1Beta_SearchRequest_Google_Api_Gax_Grpc_CallSettings_)