1.0.0-beta87 (latest) 1.0.0-beta86

    public abstract class VertexRagServiceClient

Reference documentation and code samples for the Vertex AI v1beta1 API class VertexRagServiceClient.

VertexRagService client wrapper, for convenient use.

## Inheritance

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

## 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

[VertexRagServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagServiceClientImpl)

## Namespace

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

## Assembly

Google.Cloud.AIPlatform.V1Beta1.dll

## Remarks

A service for retrieving relevant contexts.

## Properties

### AsyncRetrieveContextsOperationsClient

    public virtual OperationsClient AsyncRetrieveContextsOperationsClient { get; }

The long-running operations client for `AsyncRetrieveContexts`.

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

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the VertexRagService service, which is a host of "aiplatform.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 VertexRagService 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 VertexRagService scopes are:

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

### GrpcClient

    public virtual VertexRagService.VertexRagServiceClient GrpcClient { get; }

The underlying gRPC VertexRagService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagService.VertexRagServiceClient` |   |

### IAMPolicyClient

    public virtual IAMPolicyClient IAMPolicyClient { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient.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

### AskContexts(LocationName, RagQuery, CallSettings)

    public virtual AskContextsResponse AskContexts(LocationName parent, RagQuery query, CallSettings callSettings = null)

Agentic Retrieval Ask API for RAG.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    RagQuery query = new RagQuery();
    // Make the request
    AskContextsResponse response = vertexRagServiceClient.AskContexts(parent, query);

### AskContexts(AskContextsRequest, CallSettings)

    public virtual AskContextsResponse AskContexts(AskContextsRequest request, CallSettings callSettings = null)

Agentic Retrieval Ask API for RAG.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    AskContextsRequest request = new AskContextsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Query = new RagQuery(),
        Tools = { new Tool(), },
    };
    // Make the request
    AskContextsResponse response = vertexRagServiceClient.AskContexts(request);

### AskContexts(string, RagQuery, CallSettings)

    public virtual AskContextsResponse AskContexts(string parent, RagQuery query, CallSettings callSettings = null)

Agentic Retrieval Ask API for RAG.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    RagQuery query = new RagQuery();
    // Make the request
    AskContextsResponse response = vertexRagServiceClient.AskContexts(parent, query);

### AskContextsAsync(LocationName, RagQuery, CallSettings)

    public virtual Task<AskContextsResponse> AskContextsAsync(LocationName parent, RagQuery query, CallSettings callSettings = null)

Agentic Retrieval Ask API for RAG.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    RagQuery query = new RagQuery();
    // Make the request
    AskContextsResponse response = await vertexRagServiceClient.AskContextsAsync(parent, query);

### AskContextsAsync(LocationName, RagQuery, CancellationToken)

    public virtual Task<AskContextsResponse> AskContextsAsync(LocationName parent, RagQuery query, CancellationToken cancellationToken)

Agentic Retrieval Ask API for RAG.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    RagQuery query = new RagQuery();
    // Make the request
    AskContextsResponse response = await vertexRagServiceClient.AskContextsAsync(parent, query);

### AskContextsAsync(AskContextsRequest, CallSettings)

    public virtual Task<AskContextsResponse> AskContextsAsync(AskContextsRequest request, CallSettings callSettings = null)

Agentic Retrieval Ask API for RAG.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    AskContextsRequest request = new AskContextsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Query = new RagQuery(),
        Tools = { new Tool(), },
    };
    // Make the request
    AskContextsResponse response = await vertexRagServiceClient.AskContextsAsync(request);

### AskContextsAsync(AskContextsRequest, CancellationToken)

    public virtual Task<AskContextsResponse> AskContextsAsync(AskContextsRequest request, CancellationToken cancellationToken)

Agentic Retrieval Ask API for RAG.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    AskContextsRequest request = new AskContextsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Query = new RagQuery(),
        Tools = { new Tool(), },
    };
    // Make the request
    AskContextsResponse response = await vertexRagServiceClient.AskContextsAsync(request);

### AskContextsAsync(string, RagQuery, CallSettings)

    public virtual Task<AskContextsResponse> AskContextsAsync(string parent, RagQuery query, CallSettings callSettings = null)

Agentic Retrieval Ask API for RAG.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    RagQuery query = new RagQuery();
    // Make the request
    AskContextsResponse response = await vertexRagServiceClient.AskContextsAsync(parent, query);

### AskContextsAsync(string, RagQuery, CancellationToken)

    public virtual Task<AskContextsResponse> AskContextsAsync(string parent, RagQuery query, CancellationToken cancellationToken)

Agentic Retrieval Ask API for RAG.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AskContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    RagQuery query = new RagQuery();
    // Make the request
    AskContextsResponse response = await vertexRagServiceClient.AskContextsAsync(parent, query);

### AsyncRetrieveContexts(LocationName, RagQuery, CallSettings)

    public virtual Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> AsyncRetrieveContexts(LocationName parent, RagQuery query, CallSettings callSettings = null)

Asynchronous API to retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    RagQuery query = new RagQuery();
    // Make the request
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> response = vertexRagServiceClient.AsyncRetrieveContexts(parent, query);

    // Poll until the returned long-running operation is complete
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AsyncRetrieveContextsResponse 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<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> retrievedResponse = vertexRagServiceClient.PollOnceAsyncRetrieveContexts(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AsyncRetrieveContextsResponse retrievedResult = retrievedResponse.Result;
    }

### AsyncRetrieveContexts(AsyncRetrieveContextsRequest, CallSettings)

    public virtual Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> AsyncRetrieveContexts(AsyncRetrieveContextsRequest request, CallSettings callSettings = null)

Asynchronous API to retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    AsyncRetrieveContextsRequest request = new AsyncRetrieveContextsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Query = new RagQuery(),
        Tools = { new Tool(), },
    };
    // Make the request
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> response = vertexRagServiceClient.AsyncRetrieveContexts(request);

    // Poll until the returned long-running operation is complete
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AsyncRetrieveContextsResponse 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<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> retrievedResponse = vertexRagServiceClient.PollOnceAsyncRetrieveContexts(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AsyncRetrieveContextsResponse retrievedResult = retrievedResponse.Result;
    }

### AsyncRetrieveContexts(string, RagQuery, CallSettings)

    public virtual Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> AsyncRetrieveContexts(string parent, RagQuery query, CallSettings callSettings = null)

Asynchronous API to retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    RagQuery query = new RagQuery();
    // Make the request
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> response = vertexRagServiceClient.AsyncRetrieveContexts(parent, query);

    // Poll until the returned long-running operation is complete
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AsyncRetrieveContextsResponse 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<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> retrievedResponse = vertexRagServiceClient.PollOnceAsyncRetrieveContexts(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AsyncRetrieveContextsResponse retrievedResult = retrievedResponse.Result;
    }

### AsyncRetrieveContextsAsync(LocationName, RagQuery, CallSettings)

    public virtual Task<Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata>> AsyncRetrieveContextsAsync(LocationName parent, RagQuery query, CallSettings callSettings = null)

Asynchronous API to retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    RagQuery query = new RagQuery();
    // Make the request
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> response = await vertexRagServiceClient.AsyncRetrieveContextsAsync(parent, query);

    // Poll until the returned long-running operation is complete
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AsyncRetrieveContextsResponse 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<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> retrievedResponse = await vertexRagServiceClient.PollOnceAsyncRetrieveContextsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AsyncRetrieveContextsResponse retrievedResult = retrievedResponse.Result;
    }

### AsyncRetrieveContextsAsync(LocationName, RagQuery, CancellationToken)

    public virtual Task<Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata>> AsyncRetrieveContextsAsync(LocationName parent, RagQuery query, CancellationToken cancellationToken)

Asynchronous API to retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    RagQuery query = new RagQuery();
    // Make the request
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> response = await vertexRagServiceClient.AsyncRetrieveContextsAsync(parent, query);

    // Poll until the returned long-running operation is complete
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AsyncRetrieveContextsResponse 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<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> retrievedResponse = await vertexRagServiceClient.PollOnceAsyncRetrieveContextsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AsyncRetrieveContextsResponse retrievedResult = retrievedResponse.Result;
    }

### AsyncRetrieveContextsAsync(AsyncRetrieveContextsRequest, CallSettings)

    public virtual Task<Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata>> AsyncRetrieveContextsAsync(AsyncRetrieveContextsRequest request, CallSettings callSettings = null)

Asynchronous API to retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    AsyncRetrieveContextsRequest request = new AsyncRetrieveContextsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Query = new RagQuery(),
        Tools = { new Tool(), },
    };
    // Make the request
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> response = await vertexRagServiceClient.AsyncRetrieveContextsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AsyncRetrieveContextsResponse 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<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> retrievedResponse = await vertexRagServiceClient.PollOnceAsyncRetrieveContextsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AsyncRetrieveContextsResponse retrievedResult = retrievedResponse.Result;
    }

### AsyncRetrieveContextsAsync(AsyncRetrieveContextsRequest, CancellationToken)

    public virtual Task<Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata>> AsyncRetrieveContextsAsync(AsyncRetrieveContextsRequest request, CancellationToken cancellationToken)

Asynchronous API to retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    AsyncRetrieveContextsRequest request = new AsyncRetrieveContextsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Query = new RagQuery(),
        Tools = { new Tool(), },
    };
    // Make the request
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> response = await vertexRagServiceClient.AsyncRetrieveContextsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AsyncRetrieveContextsResponse 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<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> retrievedResponse = await vertexRagServiceClient.PollOnceAsyncRetrieveContextsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AsyncRetrieveContextsResponse retrievedResult = retrievedResponse.Result;
    }

### AsyncRetrieveContextsAsync(string, RagQuery, CallSettings)

    public virtual Task<Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata>> AsyncRetrieveContextsAsync(string parent, RagQuery query, CallSettings callSettings = null)

Asynchronous API to retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    RagQuery query = new RagQuery();
    // Make the request
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> response = await vertexRagServiceClient.AsyncRetrieveContextsAsync(parent, query);

    // Poll until the returned long-running operation is complete
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AsyncRetrieveContextsResponse 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<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> retrievedResponse = await vertexRagServiceClient.PollOnceAsyncRetrieveContextsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AsyncRetrieveContextsResponse retrievedResult = retrievedResponse.Result;
    }

### AsyncRetrieveContextsAsync(string, RagQuery, CancellationToken)

    public virtual Task<Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata>> AsyncRetrieveContextsAsync(string parent, RagQuery query, CancellationToken cancellationToken)

Asynchronous API to retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    RagQuery query = new RagQuery();
    // Make the request
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> response = await vertexRagServiceClient.AsyncRetrieveContextsAsync(parent, query);

    // Poll until the returned long-running operation is complete
    Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AsyncRetrieveContextsResponse 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<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> retrievedResponse = await vertexRagServiceClient.PollOnceAsyncRetrieveContextsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AsyncRetrieveContextsResponse retrievedResult = retrievedResponse.Result;
    }

### AugmentPrompt(LocationName, Model, VertexRagStore, CallSettings)

    public virtual AugmentPromptResponse AugmentPrompt(LocationName parent, AugmentPromptRequest.Types.Model model, VertexRagStore vertexRagStore, CallSettings callSettings = null)

Given an input prompt, it returns augmented prompt from vertex rag store
to guide LLM towards generating grounded responses.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to augment prompt. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `model` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Types.Model` Optional. Metadata of the backend deployed model. |
| `vertexRagStore` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagStore` Optional. Retrieves contexts from the Vertex RagStore. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    AugmentPromptRequest.Types.Model model = new AugmentPromptRequest.Types.Model();
    VertexRagStore vertexRagStore = new VertexRagStore();
    // Make the request
    AugmentPromptResponse response = vertexRagServiceClient.AugmentPrompt(parent, model, vertexRagStore);

### AugmentPrompt(AugmentPromptRequest, CallSettings)

    public virtual AugmentPromptResponse AugmentPrompt(AugmentPromptRequest request, CallSettings callSettings = null)

Given an input prompt, it returns augmented prompt from vertex rag store
to guide LLM towards generating grounded responses.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    AugmentPromptRequest request = new AugmentPromptRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Contents = { new Content(), },
        Model = new AugmentPromptRequest.Types.Model(),
        VertexRagStore = new VertexRagStore(),
    };
    // Make the request
    AugmentPromptResponse response = vertexRagServiceClient.AugmentPrompt(request);

### AugmentPrompt(string, Model, VertexRagStore, CallSettings)

    public virtual AugmentPromptResponse AugmentPrompt(string parent, AugmentPromptRequest.Types.Model model, VertexRagStore vertexRagStore, CallSettings callSettings = null)

Given an input prompt, it returns augmented prompt from vertex rag store
to guide LLM towards generating grounded responses.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to augment prompt. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `model` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Types.Model` Optional. Metadata of the backend deployed model. |
| `vertexRagStore` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagStore` Optional. Retrieves contexts from the Vertex RagStore. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    AugmentPromptRequest.Types.Model model = new AugmentPromptRequest.Types.Model();
    VertexRagStore vertexRagStore = new VertexRagStore();
    // Make the request
    AugmentPromptResponse response = vertexRagServiceClient.AugmentPrompt(parent, model, vertexRagStore);

### AugmentPromptAsync(LocationName, Model, VertexRagStore, CallSettings)

    public virtual Task<AugmentPromptResponse> AugmentPromptAsync(LocationName parent, AugmentPromptRequest.Types.Model model, VertexRagStore vertexRagStore, CallSettings callSettings = null)

Given an input prompt, it returns augmented prompt from vertex rag store
to guide LLM towards generating grounded responses.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to augment prompt. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `model` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Types.Model` Optional. Metadata of the backend deployed model. |
| `vertexRagStore` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagStore` Optional. Retrieves contexts from the Vertex RagStore. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    AugmentPromptRequest.Types.Model model = new AugmentPromptRequest.Types.Model();
    VertexRagStore vertexRagStore = new VertexRagStore();
    // Make the request
    AugmentPromptResponse response = await vertexRagServiceClient.AugmentPromptAsync(parent, model, vertexRagStore);

### AugmentPromptAsync(LocationName, Model, VertexRagStore, CancellationToken)

    public virtual Task<AugmentPromptResponse> AugmentPromptAsync(LocationName parent, AugmentPromptRequest.Types.Model model, VertexRagStore vertexRagStore, CancellationToken cancellationToken)

Given an input prompt, it returns augmented prompt from vertex rag store
to guide LLM towards generating grounded responses.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to augment prompt. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `model` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Types.Model` Optional. Metadata of the backend deployed model. |
| `vertexRagStore` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagStore` Optional. Retrieves contexts from the Vertex RagStore. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    AugmentPromptRequest.Types.Model model = new AugmentPromptRequest.Types.Model();
    VertexRagStore vertexRagStore = new VertexRagStore();
    // Make the request
    AugmentPromptResponse response = await vertexRagServiceClient.AugmentPromptAsync(parent, model, vertexRagStore);

### AugmentPromptAsync(AugmentPromptRequest, CallSettings)

    public virtual Task<AugmentPromptResponse> AugmentPromptAsync(AugmentPromptRequest request, CallSettings callSettings = null)

Given an input prompt, it returns augmented prompt from vertex rag store
to guide LLM towards generating grounded responses.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    AugmentPromptRequest request = new AugmentPromptRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Contents = { new Content(), },
        Model = new AugmentPromptRequest.Types.Model(),
        VertexRagStore = new VertexRagStore(),
    };
    // Make the request
    AugmentPromptResponse response = await vertexRagServiceClient.AugmentPromptAsync(request);

### AugmentPromptAsync(AugmentPromptRequest, CancellationToken)

    public virtual Task<AugmentPromptResponse> AugmentPromptAsync(AugmentPromptRequest request, CancellationToken cancellationToken)

Given an input prompt, it returns augmented prompt from vertex rag store
to guide LLM towards generating grounded responses.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    AugmentPromptRequest request = new AugmentPromptRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Contents = { new Content(), },
        Model = new AugmentPromptRequest.Types.Model(),
        VertexRagStore = new VertexRagStore(),
    };
    // Make the request
    AugmentPromptResponse response = await vertexRagServiceClient.AugmentPromptAsync(request);

### AugmentPromptAsync(string, Model, VertexRagStore, CallSettings)

    public virtual Task<AugmentPromptResponse> AugmentPromptAsync(string parent, AugmentPromptRequest.Types.Model model, VertexRagStore vertexRagStore, CallSettings callSettings = null)

Given an input prompt, it returns augmented prompt from vertex rag store
to guide LLM towards generating grounded responses.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to augment prompt. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `model` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Types.Model` Optional. Metadata of the backend deployed model. |
| `vertexRagStore` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagStore` Optional. Retrieves contexts from the Vertex RagStore. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    AugmentPromptRequest.Types.Model model = new AugmentPromptRequest.Types.Model();
    VertexRagStore vertexRagStore = new VertexRagStore();
    // Make the request
    AugmentPromptResponse response = await vertexRagServiceClient.AugmentPromptAsync(parent, model, vertexRagStore);

### AugmentPromptAsync(string, Model, VertexRagStore, CancellationToken)

    public virtual Task<AugmentPromptResponse> AugmentPromptAsync(string parent, AugmentPromptRequest.Types.Model model, VertexRagStore vertexRagStore, CancellationToken cancellationToken)

Given an input prompt, it returns augmented prompt from vertex rag store
to guide LLM towards generating grounded responses.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to augment prompt. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `model` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequesthttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptRequest.Types.Model` Optional. Metadata of the backend deployed model. |
| `vertexRagStore` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagStore` Optional. Retrieves contexts from the Vertex RagStore. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AugmentPromptResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    AugmentPromptRequest.Types.Model model = new AugmentPromptRequest.Types.Model();
    VertexRagStore vertexRagStore = new VertexRagStore();
    // Make the request
    AugmentPromptResponse response = await vertexRagServiceClient.AugmentPromptAsync(parent, model, vertexRagStore);

### CorroborateContent(LocationName, Content, IEnumerable\<Fact\>, CallSettings)

    public virtual CorroborateContentResponse CorroborateContent(LocationName parent, Content content, IEnumerable<Fact> facts, CallSettings callSettings = null)

Given an input text, it returns a score that evaluates the factuality of
the text. It also extracts and returns claims from the text and provides
supporting facts.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to corroborate text. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `content` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Content` Optional. Input content to corroborate, only text format is supported for now. |
| `facts` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Fact` Optional. Facts used to generate the text can also be used to corroborate the text. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Content content = new Content();
    IEnumerable<Fact> facts = new Fact[] { new Fact(), };
    // Make the request
    CorroborateContentResponse response = vertexRagServiceClient.CorroborateContent(parent, content, facts);

### CorroborateContent(CorroborateContentRequest, CallSettings)

    public virtual CorroborateContentResponse CorroborateContent(CorroborateContentRequest request, CallSettings callSettings = null)

Given an input text, it returns a score that evaluates the factuality of
the text. It also extracts and returns claims from the text and provides
supporting facts.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    CorroborateContentRequest request = new CorroborateContentRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Content = new Content(),
        Facts = { new Fact(), },
        Parameters = new CorroborateContentRequest.Types.Parameters(),
    };
    // Make the request
    CorroborateContentResponse response = vertexRagServiceClient.CorroborateContent(request);

### CorroborateContent(string, Content, IEnumerable\<Fact\>, CallSettings)

    public virtual CorroborateContentResponse CorroborateContent(string parent, Content content, IEnumerable<Fact> facts, CallSettings callSettings = null)

Given an input text, it returns a score that evaluates the factuality of
the text. It also extracts and returns claims from the text and provides
supporting facts.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to corroborate text. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `content` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Content` Optional. Input content to corroborate, only text format is supported for now. |
| `facts` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Fact` Optional. Facts used to generate the text can also be used to corroborate the text. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Content content = new Content();
    IEnumerable<Fact> facts = new Fact[] { new Fact(), };
    // Make the request
    CorroborateContentResponse response = vertexRagServiceClient.CorroborateContent(parent, content, facts);

### CorroborateContentAsync(LocationName, Content, IEnumerable\<Fact\>, CallSettings)

    public virtual Task<CorroborateContentResponse> CorroborateContentAsync(LocationName parent, Content content, IEnumerable<Fact> facts, CallSettings callSettings = null)

Given an input text, it returns a score that evaluates the factuality of
the text. It also extracts and returns claims from the text and provides
supporting facts.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to corroborate text. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `content` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Content` Optional. Input content to corroborate, only text format is supported for now. |
| `facts` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Fact` Optional. Facts used to generate the text can also be used to corroborate the text. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Content content = new Content();
    IEnumerable<Fact> facts = new Fact[] { new Fact(), };
    // Make the request
    CorroborateContentResponse response = await vertexRagServiceClient.CorroborateContentAsync(parent, content, facts);

### CorroborateContentAsync(LocationName, Content, IEnumerable\<Fact\>, CancellationToken)

    public virtual Task<CorroborateContentResponse> CorroborateContentAsync(LocationName parent, Content content, IEnumerable<Fact> facts, CancellationToken cancellationToken)

Given an input text, it returns a score that evaluates the factuality of
the text. It also extracts and returns claims from the text and provides
supporting facts.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to corroborate text. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `content` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Content` Optional. Input content to corroborate, only text format is supported for now. |
| `facts` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Fact` Optional. Facts used to generate the text can also be used to corroborate the text. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    Content content = new Content();
    IEnumerable<Fact> facts = new Fact[] { new Fact(), };
    // Make the request
    CorroborateContentResponse response = await vertexRagServiceClient.CorroborateContentAsync(parent, content, facts);

### CorroborateContentAsync(CorroborateContentRequest, CallSettings)

    public virtual Task<CorroborateContentResponse> CorroborateContentAsync(CorroborateContentRequest request, CallSettings callSettings = null)

Given an input text, it returns a score that evaluates the factuality of
the text. It also extracts and returns claims from the text and provides
supporting facts.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    CorroborateContentRequest request = new CorroborateContentRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Content = new Content(),
        Facts = { new Fact(), },
        Parameters = new CorroborateContentRequest.Types.Parameters(),
    };
    // Make the request
    CorroborateContentResponse response = await vertexRagServiceClient.CorroborateContentAsync(request);

### CorroborateContentAsync(CorroborateContentRequest, CancellationToken)

    public virtual Task<CorroborateContentResponse> CorroborateContentAsync(CorroborateContentRequest request, CancellationToken cancellationToken)

Given an input text, it returns a score that evaluates the factuality of
the text. It also extracts and returns claims from the text and provides
supporting facts.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    CorroborateContentRequest request = new CorroborateContentRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        Content = new Content(),
        Facts = { new Fact(), },
        Parameters = new CorroborateContentRequest.Types.Parameters(),
    };
    // Make the request
    CorroborateContentResponse response = await vertexRagServiceClient.CorroborateContentAsync(request);

### CorroborateContentAsync(string, Content, IEnumerable\<Fact\>, CallSettings)

    public virtual Task<CorroborateContentResponse> CorroborateContentAsync(string parent, Content content, IEnumerable<Fact> facts, CallSettings callSettings = null)

Given an input text, it returns a score that evaluates the factuality of
the text. It also extracts and returns claims from the text and provides
supporting facts.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to corroborate text. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `content` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Content` Optional. Input content to corroborate, only text format is supported for now. |
| `facts` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Fact` Optional. Facts used to generate the text can also be used to corroborate the text. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Content content = new Content();
    IEnumerable<Fact> facts = new Fact[] { new Fact(), };
    // Make the request
    CorroborateContentResponse response = await vertexRagServiceClient.CorroborateContentAsync(parent, content, facts);

### CorroborateContentAsync(string, Content, IEnumerable\<Fact\>, CancellationToken)

    public virtual Task<CorroborateContentResponse> CorroborateContentAsync(string parent, Content content, IEnumerable<Fact> facts, CancellationToken cancellationToken)

Given an input text, it returns a score that evaluates the factuality of
the text. It also extracts and returns claims from the text and provides
supporting facts.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to corroborate text. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `content` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Content` Optional. Input content to corroborate, only text format is supported for now. |
| `facts` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.Fact` Optional. Facts used to generate the text can also be used to corroborate the text. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CorroborateContentResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    Content content = new Content();
    IEnumerable<Fact> facts = new Fact[] { new Fact(), };
    // Make the request
    CorroborateContentResponse response = await vertexRagServiceClient.CorroborateContentAsync(parent, content, facts);

### Create()

    public static VertexRagServiceClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

| **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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagServiceClient` | The task representing the created [VertexRagServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagServiceClient). |

### PollOnceAsyncRetrieveContexts(string, CallSettings)

    public virtual Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata> PollOnceAsyncRetrieveContexts(string operationName, CallSettings callSettings = null)

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

| **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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | The result of polling the operation. |

### PollOnceAsyncRetrieveContextsAsync(string, CallSettings)

    public virtual Task<Operation<AsyncRetrieveContextsResponse, AsyncRetrieveContextsOperationMetadata>> PollOnceAsyncRetrieveContextsAsync(string operationName, CallSettings callSettings = null)

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

| **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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.AsyncRetrieveContextsOperationMetadata` | A task representing the result of polling the operation. |

### RetrieveContexts(LocationName, RagQuery, CallSettings)

    public virtual RetrieveContextsResponse RetrieveContexts(LocationName parent, RagQuery query, CallSettings callSettings = null)

Retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    RagQuery query = new RagQuery();
    // Make the request
    RetrieveContextsResponse response = vertexRagServiceClient.RetrieveContexts(parent, query);

### RetrieveContexts(RetrieveContextsRequest, CallSettings)

    public virtual RetrieveContextsResponse RetrieveContexts(RetrieveContextsRequest request, CallSettings callSettings = null)

Retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    RetrieveContextsRequest request = new RetrieveContextsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        VertexRagStore = new RetrieveContextsRequest.Types.VertexRagStore(),
        Query = new RagQuery(),
    };
    // Make the request
    RetrieveContextsResponse response = vertexRagServiceClient.RetrieveContexts(request);

### RetrieveContexts(string, RagQuery, CallSettings)

    public virtual RetrieveContextsResponse RetrieveContexts(string parent, RagQuery query, CallSettings callSettings = null)

Retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsResponse` | The RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = VertexRagServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    RagQuery query = new RagQuery();
    // Make the request
    RetrieveContextsResponse response = vertexRagServiceClient.RetrieveContexts(parent, query);

### RetrieveContextsAsync(LocationName, RagQuery, CallSettings)

    public virtual Task<RetrieveContextsResponse> RetrieveContextsAsync(LocationName parent, RagQuery query, CallSettings callSettings = null)

Retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    RagQuery query = new RagQuery();
    // Make the request
    RetrieveContextsResponse response = await vertexRagServiceClient.RetrieveContextsAsync(parent, query);

### RetrieveContextsAsync(LocationName, RagQuery, CancellationToken)

    public virtual Task<RetrieveContextsResponse> RetrieveContextsAsync(LocationName parent, RagQuery query, CancellationToken cancellationToken)

Retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    RagQuery query = new RagQuery();
    // Make the request
    RetrieveContextsResponse response = await vertexRagServiceClient.RetrieveContextsAsync(parent, query);

### RetrieveContextsAsync(RetrieveContextsRequest, CallSettings)

    public virtual Task<RetrieveContextsResponse> RetrieveContextsAsync(RetrieveContextsRequest request, CallSettings callSettings = null)

Retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    RetrieveContextsRequest request = new RetrieveContextsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        VertexRagStore = new RetrieveContextsRequest.Types.VertexRagStore(),
        Query = new RagQuery(),
    };
    // Make the request
    RetrieveContextsResponse response = await vertexRagServiceClient.RetrieveContextsAsync(request);

### RetrieveContextsAsync(RetrieveContextsRequest, CancellationToken)

    public virtual Task<RetrieveContextsResponse> RetrieveContextsAsync(RetrieveContextsRequest request, CancellationToken cancellationToken)

Retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsRequest` 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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    RetrieveContextsRequest request = new RetrieveContextsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        VertexRagStore = new RetrieveContextsRequest.Types.VertexRagStore(),
        Query = new RagQuery(),
    };
    // Make the request
    RetrieveContextsResponse response = await vertexRagServiceClient.RetrieveContextsAsync(request);

### RetrieveContextsAsync(string, RagQuery, CallSettings)

    public virtual Task<RetrieveContextsResponse> RetrieveContextsAsync(string parent, RagQuery query, CallSettings callSettings = null)

Retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    RagQuery query = new RagQuery();
    // Make the request
    RetrieveContextsResponse response = await vertexRagServiceClient.RetrieveContextsAsync(parent, query);

### RetrieveContextsAsync(string, RagQuery, CancellationToken)

    public virtual Task<RetrieveContextsResponse> RetrieveContextsAsync(string parent, RagQuery query, CancellationToken cancellationToken)

Retrieves relevant contexts for a query.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name of the Location from which to retrieve RagContexts. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`. |
| `query` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RagQuery` Required. Single RAG retrieve query. |
| `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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsResponse` | A Task containing the RPC response. |

**Example**

    // Create client
    VertexRagServiceClient vertexRagServiceClient = await VertexRagServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    RagQuery query = new RagQuery();
    // Make the request
    RetrieveContextsResponse response = await vertexRagServiceClient.RetrieveContextsAsync(parent, query);

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagServiceClient#Google_Cloud_AIPlatform_V1Beta1_VertexRagServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagServiceClient#Google_Cloud_AIPlatform_V1Beta1_VertexRagServiceClient_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.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagServiceClient#Google_Cloud_AIPlatform_V1Beta1_VertexRagServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.VertexRagServiceClient#Google_Cloud_AIPlatform_V1Beta1_VertexRagServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.