1.0.0-beta25 (latest) 1.0.0-beta24

    public abstract class SampleQueryServiceClient

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

SampleQueryService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> SampleQueryServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

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

## 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 managing
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s,

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the SampleQueryService service, which is a host of "discoveryengine.googleapis.com"
and a port of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default SampleQueryService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default SampleQueryService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>
- <https://www.googleapis.com/auth/discoveryengine.readwrite>
- <https://www.googleapis.com/auth/discoveryengine.serving.readwrite>

### GrpcClient

    public virtual SampleQueryService.SampleQueryServiceClient GrpcClient { get; }

The underlying gRPC SampleQueryService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryService.SampleQueryServiceClient` |   |

### ImportSampleQueriesOperationsClient

    public virtual OperationsClient ImportSampleQueriesOperationsClient { get; }

The long-running operations client for `ImportSampleQueries`.

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

### LocationsClient

    public virtual 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` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

## Methods

### Create()

    public static SampleQueryServiceClient Create()

Synchronously creates a [SampleQueryServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [SampleQueryServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClientBuilder)
.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClient` | The created [SampleQueryServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClient). |

### CreateAsync(CancellationToken)

    public static Task<SampleQueryServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [SampleQueryServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [SampleQueryServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClientBuilder)
.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClient` | The task representing the created [SampleQueryServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClient). |

### CreateSampleQuery(CreateSampleQueryRequest, CallSettings)

    public virtual SampleQuery CreateSampleQuery(CreateSampleQueryRequest request, CallSettings callSettings = null)

Creates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CreateSampleQueryRequest` 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://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | The RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    CreateSampleQueryRequest request = new CreateSampleQueryRequest
    {
        ParentAsSampleQuerySetName = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]"),
        SampleQuery = new SampleQuery(),
        SampleQueryId = "",
    };
    // Make the request
    SampleQuery response = sampleQueryServiceClient.CreateSampleQuery(request);

### CreateSampleQuery(SampleQuerySetName, SampleQuery, string, CallSettings)

    public virtual SampleQuery CreateSampleQuery(SampleQuerySetName parent, SampleQuery sampleQuery, string sampleQueryId, CallSettings callSettings = null)

Creates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuerySetName` Required. The parent resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. |
| `sampleQuery` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` Required. The \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to create. |
| `sampleQueryId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], which will become the final component of the \[SampleQuery.name\]\[google.cloud.discoveryengine.v1beta.SampleQuery.name\]. If the caller does not have permission to create the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s with the same \[parent\]\[google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest.parent\]. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. |
| `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://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | The RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    SampleQuerySetName parent = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]");
    SampleQuery sampleQuery = new SampleQuery();
    string sampleQueryId = "";
    // Make the request
    SampleQuery response = sampleQueryServiceClient.CreateSampleQuery(parent, sampleQuery, sampleQueryId);

### CreateSampleQuery(string, SampleQuery, string, CallSettings)

    public virtual SampleQuery CreateSampleQuery(string parent, SampleQuery sampleQuery, string sampleQueryId, CallSettings callSettings = null)

Creates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. |
| `sampleQuery` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` Required. The \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to create. |
| `sampleQueryId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], which will become the final component of the \[SampleQuery.name\]\[google.cloud.discoveryengine.v1beta.SampleQuery.name\]. If the caller does not have permission to create the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s with the same \[parent\]\[google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest.parent\]. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. |
| `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://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | The RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]";
    SampleQuery sampleQuery = new SampleQuery();
    string sampleQueryId = "";
    // Make the request
    SampleQuery response = sampleQueryServiceClient.CreateSampleQuery(parent, sampleQuery, sampleQueryId);

### CreateSampleQueryAsync(CreateSampleQueryRequest, CallSettings)

    public virtual Task<SampleQuery> CreateSampleQueryAsync(CreateSampleQueryRequest request, CallSettings callSettings = null)

Creates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CreateSampleQueryRequest` 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://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateSampleQueryRequest request = new CreateSampleQueryRequest
    {
        ParentAsSampleQuerySetName = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]"),
        SampleQuery = new SampleQuery(),
        SampleQueryId = "",
    };
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.CreateSampleQueryAsync(request);

### CreateSampleQueryAsync(CreateSampleQueryRequest, CancellationToken)

    public virtual Task<SampleQuery> CreateSampleQueryAsync(CreateSampleQueryRequest request, CancellationToken cancellationToken)

Creates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.CreateSampleQueryRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateSampleQueryRequest request = new CreateSampleQueryRequest
    {
        ParentAsSampleQuerySetName = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]"),
        SampleQuery = new SampleQuery(),
        SampleQueryId = "",
    };
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.CreateSampleQueryAsync(request);

### CreateSampleQueryAsync(SampleQuerySetName, SampleQuery, string, CallSettings)

    public virtual Task<SampleQuery> CreateSampleQueryAsync(SampleQuerySetName parent, SampleQuery sampleQuery, string sampleQueryId, CallSettings callSettings = null)

Creates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuerySetName` Required. The parent resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. |
| `sampleQuery` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` Required. The \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to create. |
| `sampleQueryId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], which will become the final component of the \[SampleQuery.name\]\[google.cloud.discoveryengine.v1beta.SampleQuery.name\]. If the caller does not have permission to create the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s with the same \[parent\]\[google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest.parent\]. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. |
| `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://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    SampleQuerySetName parent = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]");
    SampleQuery sampleQuery = new SampleQuery();
    string sampleQueryId = "";
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.CreateSampleQueryAsync(parent, sampleQuery, sampleQueryId);

### CreateSampleQueryAsync(SampleQuerySetName, SampleQuery, string, CancellationToken)

    public virtual Task<SampleQuery> CreateSampleQueryAsync(SampleQuerySetName parent, SampleQuery sampleQuery, string sampleQueryId, CancellationToken cancellationToken)

Creates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuerySetName` Required. The parent resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. |
| `sampleQuery` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` Required. The \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to create. |
| `sampleQueryId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], which will become the final component of the \[SampleQuery.name\]\[google.cloud.discoveryengine.v1beta.SampleQuery.name\]. If the caller does not have permission to create the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s with the same \[parent\]\[google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest.parent\]. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    SampleQuerySetName parent = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]");
    SampleQuery sampleQuery = new SampleQuery();
    string sampleQueryId = "";
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.CreateSampleQueryAsync(parent, sampleQuery, sampleQueryId);

### CreateSampleQueryAsync(string, SampleQuery, string, CallSettings)

    public virtual Task<SampleQuery> CreateSampleQueryAsync(string parent, SampleQuery sampleQuery, string sampleQueryId, CallSettings callSettings = null)

Creates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. |
| `sampleQuery` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` Required. The \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to create. |
| `sampleQueryId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], which will become the final component of the \[SampleQuery.name\]\[google.cloud.discoveryengine.v1beta.SampleQuery.name\]. If the caller does not have permission to create the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s with the same \[parent\]\[google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest.parent\]. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. |
| `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://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]";
    SampleQuery sampleQuery = new SampleQuery();
    string sampleQueryId = "";
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.CreateSampleQueryAsync(parent, sampleQuery, sampleQueryId);

### CreateSampleQueryAsync(string, SampleQuery, string, CancellationToken)

    public virtual Task<SampleQuery> CreateSampleQueryAsync(string parent, SampleQuery sampleQuery, string sampleQueryId, CancellationToken cancellationToken)

Creates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. |
| `sampleQuery` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` Required. The \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to create. |
| `sampleQueryId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], which will become the final component of the \[SampleQuery.name\]\[google.cloud.discoveryengine.v1beta.SampleQuery.name\]. If the caller does not have permission to create the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s with the same \[parent\]\[google.cloud.discoveryengine.v1beta.CreateSampleQueryRequest.parent\]. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]";
    SampleQuery sampleQuery = new SampleQuery();
    string sampleQueryId = "";
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.CreateSampleQueryAsync(parent, sampleQuery, sampleQueryId);

### DeleteSampleQuery(DeleteSampleQueryRequest, CallSettings)

    public virtual void DeleteSampleQuery(DeleteSampleQueryRequest request, CallSettings callSettings = null)

Deletes a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.DeleteSampleQueryRequest` 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. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    DeleteSampleQueryRequest request = new DeleteSampleQueryRequest
    {
        SampleQueryName = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]"),
    };
    // Make the request
    sampleQueryServiceClient.DeleteSampleQuery(request);

### DeleteSampleQuery(SampleQueryName, CallSettings)

    public virtual void DeleteSampleQuery(SampleQueryName name, CallSettings callSettings = null)

Deletes a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryName` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to delete the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to delete does not exist, a `NOT_FOUND` error is returned. |
| `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. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    SampleQueryName name = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]");
    // Make the request
    sampleQueryServiceClient.DeleteSampleQuery(name);

### DeleteSampleQuery(string, CallSettings)

    public virtual void DeleteSampleQuery(string name, CallSettings callSettings = null)

Deletes a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to delete the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to delete does not exist, a `NOT_FOUND` error is returned. |
| `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. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]/sampleQueries/[SAMPLE_QUERY]";
    // Make the request
    sampleQueryServiceClient.DeleteSampleQuery(name);

### DeleteSampleQueryAsync(DeleteSampleQueryRequest, CallSettings)

    public virtual Task DeleteSampleQueryAsync(DeleteSampleQueryRequest request, CallSettings callSettings = null)

Deletes a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.DeleteSampleQueryRequest` 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://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteSampleQueryRequest request = new DeleteSampleQueryRequest
    {
        SampleQueryName = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]"),
    };
    // Make the request
    await sampleQueryServiceClient.DeleteSampleQueryAsync(request);

### DeleteSampleQueryAsync(DeleteSampleQueryRequest, CancellationToken)

    public virtual Task DeleteSampleQueryAsync(DeleteSampleQueryRequest request, CancellationToken cancellationToken)

Deletes a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.DeleteSampleQueryRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteSampleQueryRequest request = new DeleteSampleQueryRequest
    {
        SampleQueryName = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]"),
    };
    // Make the request
    await sampleQueryServiceClient.DeleteSampleQueryAsync(request);

### DeleteSampleQueryAsync(SampleQueryName, CallSettings)

    public virtual Task DeleteSampleQueryAsync(SampleQueryName name, CallSettings callSettings = null)

Deletes a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryName` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to delete the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to delete does not exist, a `NOT_FOUND` error is returned. |
| `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://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    SampleQueryName name = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]");
    // Make the request
    await sampleQueryServiceClient.DeleteSampleQueryAsync(name);

### DeleteSampleQueryAsync(SampleQueryName, CancellationToken)

    public virtual Task DeleteSampleQueryAsync(SampleQueryName name, CancellationToken cancellationToken)

Deletes a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryName` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to delete the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to delete does not exist, a `NOT_FOUND` error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    SampleQueryName name = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]");
    // Make the request
    await sampleQueryServiceClient.DeleteSampleQueryAsync(name);

### DeleteSampleQueryAsync(string, CallSettings)

    public virtual Task DeleteSampleQueryAsync(string name, CallSettings callSettings = null)

Deletes a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to delete the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to delete does not exist, a `NOT_FOUND` error is returned. |
| `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://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]/sampleQueries/[SAMPLE_QUERY]";
    // Make the request
    await sampleQueryServiceClient.DeleteSampleQueryAsync(name);

### DeleteSampleQueryAsync(string, CancellationToken)

    public virtual Task DeleteSampleQueryAsync(string name, CancellationToken cancellationToken)

Deletes a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to delete the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to delete does not exist, a `NOT_FOUND` error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]/sampleQueries/[SAMPLE_QUERY]";
    // Make the request
    await sampleQueryServiceClient.DeleteSampleQueryAsync(name);

### GetSampleQuery(GetSampleQueryRequest, CallSettings)

    public virtual SampleQuery GetSampleQuery(GetSampleQueryRequest request, CallSettings callSettings = null)

Gets a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.GetSampleQueryRequest` 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://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | The RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    GetSampleQueryRequest request = new GetSampleQueryRequest
    {
        SampleQueryName = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]"),
    };
    // Make the request
    SampleQuery response = sampleQueryServiceClient.GetSampleQuery(request);

### GetSampleQuery(SampleQueryName, CallSettings)

    public virtual SampleQuery GetSampleQuery(SampleQueryName name, CallSettings callSettings = null)

Gets a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryName` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to access the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] does not exist, a NOT_FOUND error is returned. |
| `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://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | The RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    SampleQueryName name = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]");
    // Make the request
    SampleQuery response = sampleQueryServiceClient.GetSampleQuery(name);

### GetSampleQuery(string, CallSettings)

    public virtual SampleQuery GetSampleQuery(string name, CallSettings callSettings = null)

Gets a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to access the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] does not exist, a NOT_FOUND error is returned. |
| `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://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | The RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]/sampleQueries/[SAMPLE_QUERY]";
    // Make the request
    SampleQuery response = sampleQueryServiceClient.GetSampleQuery(name);

### GetSampleQueryAsync(GetSampleQueryRequest, CallSettings)

    public virtual Task<SampleQuery> GetSampleQueryAsync(GetSampleQueryRequest request, CallSettings callSettings = null)

Gets a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.GetSampleQueryRequest` 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://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetSampleQueryRequest request = new GetSampleQueryRequest
    {
        SampleQueryName = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]"),
    };
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.GetSampleQueryAsync(request);

### GetSampleQueryAsync(GetSampleQueryRequest, CancellationToken)

    public virtual Task<SampleQuery> GetSampleQueryAsync(GetSampleQueryRequest request, CancellationToken cancellationToken)

Gets a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.GetSampleQueryRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetSampleQueryRequest request = new GetSampleQueryRequest
    {
        SampleQueryName = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]"),
    };
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.GetSampleQueryAsync(request);

### GetSampleQueryAsync(SampleQueryName, CallSettings)

    public virtual Task<SampleQuery> GetSampleQueryAsync(SampleQueryName name, CallSettings callSettings = null)

Gets a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryName` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to access the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] does not exist, a NOT_FOUND error is returned. |
| `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://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    SampleQueryName name = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]");
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.GetSampleQueryAsync(name);

### GetSampleQueryAsync(SampleQueryName, CancellationToken)

    public virtual Task<SampleQuery> GetSampleQueryAsync(SampleQueryName name, CancellationToken cancellationToken)

Gets a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryName` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to access the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] does not exist, a NOT_FOUND error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    SampleQueryName name = SampleQueryName.FromProjectLocationSampleQuerySetSampleQuery("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]", "[SAMPLE_QUERY]");
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.GetSampleQueryAsync(name);

### GetSampleQueryAsync(string, CallSettings)

    public virtual Task<SampleQuery> GetSampleQueryAsync(string name, CallSettings callSettings = null)

Gets a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to access the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] does not exist, a NOT_FOUND error is returned. |
| `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://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]/sampleQueries/[SAMPLE_QUERY]";
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.GetSampleQueryAsync(name);

### GetSampleQueryAsync(string, CancellationToken)

    public virtual Task<SampleQuery> GetSampleQueryAsync(string name, CancellationToken cancellationToken)

Gets a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], such as `projects/{project}/locations/{location}/sampleQuerySets/{sample_query_set}/sampleQueries/{sample_query}`. If the caller does not have permission to access the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] does not exist, a NOT_FOUND error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]/sampleQueries/[SAMPLE_QUERY]";
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.GetSampleQueryAsync(name);

### ImportSampleQueries(ImportSampleQueriesRequest, CallSettings)

    public virtual Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> ImportSampleQueries(ImportSampleQueriesRequest request, CallSettings callSettings = null)

Bulk import of multiple
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s. Sample
queries that already exist may be deleted.

Note: It is possible for a subset of the
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s to be
successfully imported.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesRequest` 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://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesMetadata` | The RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    ImportSampleQueriesRequest request = new ImportSampleQueriesRequest
    {
        ParentAsSampleQuerySetName = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]"),
        InlineSource = new ImportSampleQueriesRequest.Types.InlineSource(),
        ErrorConfig = new ImportErrorConfig(),
    };
    // Make the request
    Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> response = sampleQueryServiceClient.ImportSampleQueries(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    ImportSampleQueriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> retrievedResponse = sampleQueryServiceClient.PollOnceImportSampleQueries(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportSampleQueriesResponse retrievedResult = retrievedResponse.Result;
    }

### ImportSampleQueriesAsync(ImportSampleQueriesRequest, CallSettings)

    public virtual Task<Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata>> ImportSampleQueriesAsync(ImportSampleQueriesRequest request, CallSettings callSettings = null)

Bulk import of multiple
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s. Sample
queries that already exist may be deleted.

Note: It is possible for a subset of the
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s to be
successfully imported.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesRequest` 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://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    ImportSampleQueriesRequest request = new ImportSampleQueriesRequest
    {
        ParentAsSampleQuerySetName = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]"),
        InlineSource = new ImportSampleQueriesRequest.Types.InlineSource(),
        ErrorConfig = new ImportErrorConfig(),
    };
    // Make the request
    Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> response = await sampleQueryServiceClient.ImportSampleQueriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ImportSampleQueriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> retrievedResponse = await sampleQueryServiceClient.PollOnceImportSampleQueriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportSampleQueriesResponse retrievedResult = retrievedResponse.Result;
    }

### ImportSampleQueriesAsync(ImportSampleQueriesRequest, CancellationToken)

    public virtual Task<Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata>> ImportSampleQueriesAsync(ImportSampleQueriesRequest request, CancellationToken cancellationToken)

Bulk import of multiple
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s. Sample
queries that already exist may be deleted.

Note: It is possible for a subset of the
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s to be
successfully imported.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    ImportSampleQueriesRequest request = new ImportSampleQueriesRequest
    {
        ParentAsSampleQuerySetName = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]"),
        InlineSource = new ImportSampleQueriesRequest.Types.InlineSource(),
        ErrorConfig = new ImportErrorConfig(),
    };
    // Make the request
    Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> response = await sampleQueryServiceClient.ImportSampleQueriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ImportSampleQueriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> retrievedResponse = await sampleQueryServiceClient.PollOnceImportSampleQueriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportSampleQueriesResponse retrievedResult = retrievedResponse.Result;
    }

### ListSampleQueries(ListSampleQueriesRequest, CallSettings)

    public virtual PagedEnumerable<ListSampleQueriesResponse, SampleQuery> ListSampleQueries(ListSampleQueriesRequest request, CallSettings callSettings = null)

Gets a list of
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ListSampleQueriesRequest` 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.ListSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A pageable sequence of [SampleQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery) resources. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    ListSampleQueriesRequest request = new ListSampleQueriesRequest
    {
        ParentAsSampleQuerySetName = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]"),
    };
    // Make the request
    PagedEnumerable<ListSampleQueriesResponse, SampleQuery> response = sampleQueryServiceClient.ListSampleQueries(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (SampleQuery item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListSampleQueriesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SampleQuery item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SampleQuery> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SampleQuery item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSampleQueries(SampleQuerySetName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListSampleQueriesResponse, SampleQuery> ListSampleQueries(SampleQuerySetName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuerySetName` Required. The parent sample query set resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to list \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s under this sample query set, regardless of whether or not this sample query set exists, a `PERMISSION_DENIED` error is returned. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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.ListSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A pageable sequence of [SampleQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery) resources. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    SampleQuerySetName parent = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]");
    // Make the request
    PagedEnumerable<ListSampleQueriesResponse, SampleQuery> response = sampleQueryServiceClient.ListSampleQueries(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (SampleQuery item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListSampleQueriesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SampleQuery item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SampleQuery> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SampleQuery item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSampleQueries(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListSampleQueriesResponse, SampleQuery> ListSampleQueries(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent sample query set resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to list \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s under this sample query set, regardless of whether or not this sample query set exists, a `PERMISSION_DENIED` error is returned. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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.ListSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A pageable sequence of [SampleQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery) resources. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]";
    // Make the request
    PagedEnumerable<ListSampleQueriesResponse, SampleQuery> response = sampleQueryServiceClient.ListSampleQueries(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (SampleQuery item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListSampleQueriesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SampleQuery item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SampleQuery> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SampleQuery item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSampleQueriesAsync(ListSampleQueriesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListSampleQueriesResponse, SampleQuery> ListSampleQueriesAsync(ListSampleQueriesRequest request, CallSettings callSettings = null)

Gets a list of
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ListSampleQueriesRequest` 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.ListSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A pageable asynchronous sequence of [SampleQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery) resources. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListSampleQueriesRequest request = new ListSampleQueriesRequest
    {
        ParentAsSampleQuerySetName = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]"),
    };
    // Make the request
    PagedAsyncEnumerable<ListSampleQueriesResponse, SampleQuery> response = sampleQueryServiceClient.ListSampleQueriesAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (SampleQuery item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListSampleQueriesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SampleQuery item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SampleQuery> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SampleQuery item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSampleQueriesAsync(SampleQuerySetName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListSampleQueriesResponse, SampleQuery> ListSampleQueriesAsync(SampleQuerySetName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuerySetName` Required. The parent sample query set resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to list \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s under this sample query set, regardless of whether or not this sample query set exists, a `PERMISSION_DENIED` error is returned. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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.ListSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A pageable asynchronous sequence of [SampleQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery) resources. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    SampleQuerySetName parent = SampleQuerySetName.FromProjectLocationSampleQuerySet("[PROJECT]", "[LOCATION]", "[SAMPLE_QUERY_SET]");
    // Make the request
    PagedAsyncEnumerable<ListSampleQueriesResponse, SampleQuery> response = sampleQueryServiceClient.ListSampleQueriesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (SampleQuery item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListSampleQueriesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SampleQuery item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SampleQuery> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SampleQuery item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListSampleQueriesAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListSampleQueriesResponse, SampleQuery> ListSampleQueriesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets a list of
\[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent sample query set resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to list \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\]s under this sample query set, regardless of whether or not this sample query set exists, a `PERMISSION_DENIED` error is returned. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `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.ListSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A pageable asynchronous sequence of [SampleQuery](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery) resources. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/sampleQuerySets/[SAMPLE_QUERY_SET]";
    // Make the request
    PagedAsyncEnumerable<ListSampleQueriesResponse, SampleQuery> response = sampleQueryServiceClient.ListSampleQueriesAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (SampleQuery item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ListSampleQueriesResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (SampleQuery item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<SampleQuery> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (SampleQuery item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### PollOnceImportSampleQueries(string, CallSettings)

    public virtual Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata> PollOnceImportSampleQueries(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `ImportSampleQueries`
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesMetadata` | The result of polling the operation. |

### PollOnceImportSampleQueriesAsync(string, CallSettings)

    public virtual Task<Operation<ImportSampleQueriesResponse, ImportSampleQueriesMetadata>> PollOnceImportSampleQueriesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`ImportSampleQueries`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `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://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.ImportSampleQueriesMetadata` | A task representing the result of polling the operation. |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SampleQueryServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SampleQueryServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SampleQueryServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQueryServiceClient#Google_Cloud_DiscoveryEngine_V1Beta_SampleQueryServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateSampleQuery(SampleQuery, FieldMask, CallSettings)

    public virtual SampleQuery UpdateSampleQuery(SampleQuery sampleQuery, FieldMask updateMask, CallSettings callSettings = null)

Updates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `sampleQuery` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` Required. The simple query to update. If the caller does not have permission to update the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to update does not exist a `NOT_FOUND` error is returned. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which fields in the provided imported 'simple query' to update. If not set, will by default update all fields. |
| `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://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | The RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    SampleQuery sampleQuery = new SampleQuery();
    FieldMask updateMask = new FieldMask();
    // Make the request
    SampleQuery response = sampleQueryServiceClient.UpdateSampleQuery(sampleQuery, updateMask);

### UpdateSampleQuery(UpdateSampleQueryRequest, CallSettings)

    public virtual SampleQuery UpdateSampleQuery(UpdateSampleQueryRequest request, CallSettings callSettings = null)

Updates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UpdateSampleQueryRequest` 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://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | The RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = SampleQueryServiceClient.Create();
    // Initialize request argument(s)
    UpdateSampleQueryRequest request = new UpdateSampleQueryRequest
    {
        SampleQuery = new SampleQuery(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    SampleQuery response = sampleQueryServiceClient.UpdateSampleQuery(request);

### UpdateSampleQueryAsync(SampleQuery, FieldMask, CallSettings)

    public virtual Task<SampleQuery> UpdateSampleQueryAsync(SampleQuery sampleQuery, FieldMask updateMask, CallSettings callSettings = null)

Updates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `sampleQuery` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` Required. The simple query to update. If the caller does not have permission to update the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to update does not exist a `NOT_FOUND` error is returned. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which fields in the provided imported 'simple query' to update. If not set, will by default update all fields. |
| `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://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    SampleQuery sampleQuery = new SampleQuery();
    FieldMask updateMask = new FieldMask();
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.UpdateSampleQueryAsync(sampleQuery, updateMask);

### UpdateSampleQueryAsync(SampleQuery, FieldMask, CancellationToken)

    public virtual Task<SampleQuery> UpdateSampleQueryAsync(SampleQuery sampleQuery, FieldMask updateMask, CancellationToken cancellationToken)

Updates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `sampleQuery` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` Required. The simple query to update. If the caller does not have permission to update the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\], regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\] to update does not exist a `NOT_FOUND` error is returned. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which fields in the provided imported 'simple query' to update. If not set, will by default update all fields. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    SampleQuery sampleQuery = new SampleQuery();
    FieldMask updateMask = new FieldMask();
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.UpdateSampleQueryAsync(sampleQuery, updateMask);

### UpdateSampleQueryAsync(UpdateSampleQueryRequest, CallSettings)

    public virtual Task<SampleQuery> UpdateSampleQueryAsync(UpdateSampleQueryRequest request, CallSettings callSettings = null)

Updates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UpdateSampleQueryRequest` 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://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateSampleQueryRequest request = new UpdateSampleQueryRequest
    {
        SampleQuery = new SampleQuery(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.UpdateSampleQueryAsync(request);

### UpdateSampleQueryAsync(UpdateSampleQueryRequest, CancellationToken)

    public virtual Task<SampleQuery> UpdateSampleQueryAsync(UpdateSampleQueryRequest request, CancellationToken cancellationToken)

Updates a \[SampleQuery\]\[google.cloud.discoveryengine.v1beta.SampleQuery\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UpdateSampleQueryRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.SampleQuery` | A Task containing the RPC response. |

**Example**

    // Create client
    SampleQueryServiceClient sampleQueryServiceClient = await SampleQueryServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateSampleQueryRequest request = new UpdateSampleQueryRequest
    {
        SampleQuery = new SampleQuery(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    SampleQuery response = await sampleQueryServiceClient.UpdateSampleQueryAsync(request);