1.0.0-beta87 (latest) 1.0.0-beta86

    public abstract class GenAiCacheServiceClient

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

GenAiCacheService client wrapper, for convenient use.

## Inheritance

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

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

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

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

Service for managing Vertex AI's CachedContent resource.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the GenAiCacheService 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 GenAiCacheService 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 GenAiCacheService scopes are:

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

### GrpcClient

    public virtual GenAiCacheService.GenAiCacheServiceClient GrpcClient { get; }

The underlying gRPC GenAiCacheService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.GenAiCacheServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.GenAiCacheService.GenAiCacheServiceClient` |   |

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

### Create()

    public static GenAiCacheServiceClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

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

### CreateCachedContent(LocationName, CachedContent, CallSettings)

    public virtual CachedContent CreateCachedContent(LocationName parent, CachedContent cachedContent, CallSettings callSettings = null)

Creates cached content, this call will initialize the cached content in the
data storage, and users need to pay for the cache data storage.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where the cached content will be created |
| `cachedContent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` Required. The cached content to create |
| `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.CachedContent` | The RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    CachedContent cachedContent = new CachedContent();
    // Make the request
    CachedContent response = genAiCacheServiceClient.CreateCachedContent(parent, cachedContent);

### CreateCachedContent(CreateCachedContentRequest, CallSettings)

    public virtual CachedContent CreateCachedContent(CreateCachedContentRequest request, CallSettings callSettings = null)

Creates cached content, this call will initialize the cached content in the
data storage, and users need to pay for the cache data storage.

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    CreateCachedContentRequest request = new CreateCachedContentRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        CachedContent = new CachedContent(),
    };
    // Make the request
    CachedContent response = genAiCacheServiceClient.CreateCachedContent(request);

### CreateCachedContent(string, CachedContent, CallSettings)

    public virtual CachedContent CreateCachedContent(string parent, CachedContent cachedContent, CallSettings callSettings = null)

Creates cached content, this call will initialize the cached content in the
data storage, and users need to pay for the cache data storage.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where the cached content will be created |
| `cachedContent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` Required. The cached content to create |
| `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.CachedContent` | The RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    CachedContent cachedContent = new CachedContent();
    // Make the request
    CachedContent response = genAiCacheServiceClient.CreateCachedContent(parent, cachedContent);

### CreateCachedContentAsync(LocationName, CachedContent, CallSettings)

    public virtual Task<CachedContent> CreateCachedContentAsync(LocationName parent, CachedContent cachedContent, CallSettings callSettings = null)

Creates cached content, this call will initialize the cached content in the
data storage, and users need to pay for the cache data storage.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where the cached content will be created |
| `cachedContent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` Required. The cached content to create |
| `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.CachedContent` | A Task containing the RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    CachedContent cachedContent = new CachedContent();
    // Make the request
    CachedContent response = await genAiCacheServiceClient.CreateCachedContentAsync(parent, cachedContent);

### CreateCachedContentAsync(LocationName, CachedContent, CancellationToken)

    public virtual Task<CachedContent> CreateCachedContentAsync(LocationName parent, CachedContent cachedContent, CancellationToken cancellationToken)

Creates cached content, this call will initialize the cached content in the
data storage, and users need to pay for the cache data storage.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent resource where the cached content will be created |
| `cachedContent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` Required. The cached content to create |
| `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.CachedContent` | A Task containing the RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    CachedContent cachedContent = new CachedContent();
    // Make the request
    CachedContent response = await genAiCacheServiceClient.CreateCachedContentAsync(parent, cachedContent);

### CreateCachedContentAsync(CreateCachedContentRequest, CallSettings)

    public virtual Task<CachedContent> CreateCachedContentAsync(CreateCachedContentRequest request, CallSettings callSettings = null)

Creates cached content, this call will initialize the cached content in the
data storage, and users need to pay for the cache data storage.

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateCachedContentRequest request = new CreateCachedContentRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        CachedContent = new CachedContent(),
    };
    // Make the request
    CachedContent response = await genAiCacheServiceClient.CreateCachedContentAsync(request);

### CreateCachedContentAsync(CreateCachedContentRequest, CancellationToken)

    public virtual Task<CachedContent> CreateCachedContentAsync(CreateCachedContentRequest request, CancellationToken cancellationToken)

Creates cached content, this call will initialize the cached content in the
data storage, and users need to pay for the cache data storage.

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateCachedContentRequest request = new CreateCachedContentRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
        CachedContent = new CachedContent(),
    };
    // Make the request
    CachedContent response = await genAiCacheServiceClient.CreateCachedContentAsync(request);

### CreateCachedContentAsync(string, CachedContent, CallSettings)

    public virtual Task<CachedContent> CreateCachedContentAsync(string parent, CachedContent cachedContent, CallSettings callSettings = null)

Creates cached content, this call will initialize the cached content in the
data storage, and users need to pay for the cache data storage.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where the cached content will be created |
| `cachedContent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` Required. The cached content to create |
| `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.CachedContent` | A Task containing the RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    CachedContent cachedContent = new CachedContent();
    // Make the request
    CachedContent response = await genAiCacheServiceClient.CreateCachedContentAsync(parent, cachedContent);

### CreateCachedContentAsync(string, CachedContent, CancellationToken)

    public virtual Task<CachedContent> CreateCachedContentAsync(string parent, CachedContent cachedContent, CancellationToken cancellationToken)

Creates cached content, this call will initialize the cached content in the
data storage, and users need to pay for the cache data storage.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent resource where the cached content will be created |
| `cachedContent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` Required. The cached content to create |
| `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.CachedContent` | A Task containing the RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    CachedContent cachedContent = new CachedContent();
    // Make the request
    CachedContent response = await genAiCacheServiceClient.CreateCachedContentAsync(parent, cachedContent);

### DeleteCachedContent(CachedContentName, CallSettings)

    public virtual void DeleteCachedContent(CachedContentName name, CallSettings callSettings = null)

Deletes cached content

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContentName` Required. The resource name referring to the cached content |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    CachedContentName name = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]");
    // Make the request
    genAiCacheServiceClient.DeleteCachedContent(name);

### DeleteCachedContent(DeleteCachedContentRequest, CallSettings)

    public virtual void DeleteCachedContent(DeleteCachedContentRequest request, CallSettings callSettings = null)

Deletes cached content

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    DeleteCachedContentRequest request = new DeleteCachedContentRequest
    {
        CachedContentName = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]"),
    };
    // Make the request
    genAiCacheServiceClient.DeleteCachedContent(request);

### DeleteCachedContent(string, CallSettings)

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

Deletes cached content

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name referring to the cached content |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cachedContents/[CACHED_CONTENT]";
    // Make the request
    genAiCacheServiceClient.DeleteCachedContent(name);

### DeleteCachedContentAsync(CachedContentName, CallSettings)

    public virtual Task DeleteCachedContentAsync(CachedContentName name, CallSettings callSettings = null)

Deletes cached content

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContentName` Required. The resource name referring to the cached content |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    CachedContentName name = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]");
    // Make the request
    await genAiCacheServiceClient.DeleteCachedContentAsync(name);

### DeleteCachedContentAsync(CachedContentName, CancellationToken)

    public virtual Task DeleteCachedContentAsync(CachedContentName name, CancellationToken cancellationToken)

Deletes cached content

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContentName` Required. The resource name referring to the cached content |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    CachedContentName name = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]");
    // Make the request
    await genAiCacheServiceClient.DeleteCachedContentAsync(name);

### DeleteCachedContentAsync(DeleteCachedContentRequest, CallSettings)

    public virtual Task DeleteCachedContentAsync(DeleteCachedContentRequest request, CallSettings callSettings = null)

Deletes cached content

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

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteCachedContentRequest request = new DeleteCachedContentRequest
    {
        CachedContentName = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]"),
    };
    // Make the request
    await genAiCacheServiceClient.DeleteCachedContentAsync(request);

### DeleteCachedContentAsync(DeleteCachedContentRequest, CancellationToken)

    public virtual Task DeleteCachedContentAsync(DeleteCachedContentRequest request, CancellationToken cancellationToken)

Deletes cached content

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

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteCachedContentRequest request = new DeleteCachedContentRequest
    {
        CachedContentName = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]"),
    };
    // Make the request
    await genAiCacheServiceClient.DeleteCachedContentAsync(request);

### DeleteCachedContentAsync(string, CallSettings)

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

Deletes cached content

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name referring to the cached content |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cachedContents/[CACHED_CONTENT]";
    // Make the request
    await genAiCacheServiceClient.DeleteCachedContentAsync(name);

### DeleteCachedContentAsync(string, CancellationToken)

    public virtual Task DeleteCachedContentAsync(string name, CancellationToken cancellationToken)

Deletes cached content

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name referring to the cached content |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cachedContents/[CACHED_CONTENT]";
    // Make the request
    await genAiCacheServiceClient.DeleteCachedContentAsync(name);

### GetCachedContent(CachedContentName, CallSettings)

    public virtual CachedContent GetCachedContent(CachedContentName name, CallSettings callSettings = null)

Gets cached content configurations

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContentName` Required. The resource name referring to the cached content |
| `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.CachedContent` | The RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    CachedContentName name = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]");
    // Make the request
    CachedContent response = genAiCacheServiceClient.GetCachedContent(name);

### GetCachedContent(GetCachedContentRequest, CallSettings)

    public virtual CachedContent GetCachedContent(GetCachedContentRequest request, CallSettings callSettings = null)

Gets cached content configurations

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    GetCachedContentRequest request = new GetCachedContentRequest
    {
        CachedContentName = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]"),
    };
    // Make the request
    CachedContent response = genAiCacheServiceClient.GetCachedContent(request);

### GetCachedContent(string, CallSettings)

    public virtual CachedContent GetCachedContent(string name, CallSettings callSettings = null)

Gets cached content configurations

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name referring to the cached content |
| `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.CachedContent` | The RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cachedContents/[CACHED_CONTENT]";
    // Make the request
    CachedContent response = genAiCacheServiceClient.GetCachedContent(name);

### GetCachedContentAsync(CachedContentName, CallSettings)

    public virtual Task<CachedContent> GetCachedContentAsync(CachedContentName name, CallSettings callSettings = null)

Gets cached content configurations

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContentName` Required. The resource name referring to the cached content |
| `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.CachedContent` | A Task containing the RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    CachedContentName name = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]");
    // Make the request
    CachedContent response = await genAiCacheServiceClient.GetCachedContentAsync(name);

### GetCachedContentAsync(CachedContentName, CancellationToken)

    public virtual Task<CachedContent> GetCachedContentAsync(CachedContentName name, CancellationToken cancellationToken)

Gets cached content configurations

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContentName` Required. The resource name referring to the cached content |
| `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.CachedContent` | A Task containing the RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    CachedContentName name = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]");
    // Make the request
    CachedContent response = await genAiCacheServiceClient.GetCachedContentAsync(name);

### GetCachedContentAsync(GetCachedContentRequest, CallSettings)

    public virtual Task<CachedContent> GetCachedContentAsync(GetCachedContentRequest request, CallSettings callSettings = null)

Gets cached content configurations

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetCachedContentRequest request = new GetCachedContentRequest
    {
        CachedContentName = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]"),
    };
    // Make the request
    CachedContent response = await genAiCacheServiceClient.GetCachedContentAsync(request);

### GetCachedContentAsync(GetCachedContentRequest, CancellationToken)

    public virtual Task<CachedContent> GetCachedContentAsync(GetCachedContentRequest request, CancellationToken cancellationToken)

Gets cached content configurations

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetCachedContentRequest request = new GetCachedContentRequest
    {
        CachedContentName = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]"),
    };
    // Make the request
    CachedContent response = await genAiCacheServiceClient.GetCachedContentAsync(request);

### GetCachedContentAsync(string, CallSettings)

    public virtual Task<CachedContent> GetCachedContentAsync(string name, CallSettings callSettings = null)

Gets cached content configurations

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name referring to the cached content |
| `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.CachedContent` | A Task containing the RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cachedContents/[CACHED_CONTENT]";
    // Make the request
    CachedContent response = await genAiCacheServiceClient.GetCachedContentAsync(name);

### GetCachedContentAsync(string, CancellationToken)

    public virtual Task<CachedContent> GetCachedContentAsync(string name, CancellationToken cancellationToken)

Gets cached content configurations

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The resource name referring to the cached content |
| `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.CachedContent` | A Task containing the RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/cachedContents/[CACHED_CONTENT]";
    // Make the request
    CachedContent response = await genAiCacheServiceClient.GetCachedContentAsync(name);

### ListCachedContents(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListCachedContentsResponse, CachedContent> ListCachedContents(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists cached contents in a project

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent, which owns this collection of cached contents. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.ListCachedContentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` | A pageable sequence of [CachedContent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent) resources. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedEnumerable<ListCachedContentsResponse, CachedContent> response = genAiCacheServiceClient.ListCachedContents(parent);

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

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

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

### ListCachedContents(ListCachedContentsRequest, CallSettings)

    public virtual PagedEnumerable<ListCachedContentsResponse, CachedContent> ListCachedContents(ListCachedContentsRequest request, CallSettings callSettings = null)

Lists cached contents in a project

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.ListCachedContentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` | A pageable sequence of [CachedContent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent) resources. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    ListCachedContentsRequest request = new ListCachedContentsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    PagedEnumerable<ListCachedContentsResponse, CachedContent> response = genAiCacheServiceClient.ListCachedContents(request);

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

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

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

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

    public virtual PagedEnumerable<ListCachedContentsResponse, CachedContent> ListCachedContents(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists cached contents in a project

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent, which owns this collection of cached contents. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.ListCachedContentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` | A pageable sequence of [CachedContent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent) resources. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedEnumerable<ListCachedContentsResponse, CachedContent> response = genAiCacheServiceClient.ListCachedContents(parent);

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

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

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

### ListCachedContentsAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListCachedContentsResponse, CachedContent> ListCachedContentsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists cached contents in a project

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html` Required. The parent, which owns this collection of cached contents. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.ListCachedContentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` | A pageable asynchronous sequence of [CachedContent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent) resources. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
    // Make the request
    PagedAsyncEnumerable<ListCachedContentsResponse, CachedContent> response = genAiCacheServiceClient.ListCachedContentsAsync(parent);

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

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

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

### ListCachedContentsAsync(ListCachedContentsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListCachedContentsResponse, CachedContent> ListCachedContentsAsync(ListCachedContentsRequest request, CallSettings callSettings = null)

Lists cached contents in a project

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.ListCachedContentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` | A pageable asynchronous sequence of [CachedContent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent) resources. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListCachedContentsRequest request = new ListCachedContentsRequest
    {
        ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    };
    // Make the request
    PagedAsyncEnumerable<ListCachedContentsResponse, CachedContent> response = genAiCacheServiceClient.ListCachedContentsAsync(request);

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

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

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

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

    public virtual PagedAsyncEnumerable<ListCachedContentsResponse, CachedContent> ListCachedContentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists cached contents in a project

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent, which owns this collection of cached contents. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.ListCachedContentsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` | A pageable asynchronous sequence of [CachedContent](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent) resources. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]";
    // Make the request
    PagedAsyncEnumerable<ListCachedContentsResponse, CachedContent> response = genAiCacheServiceClient.ListCachedContentsAsync(parent);

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

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

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

### 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.GenAiCacheServiceClient#Google_Cloud_AIPlatform_V1Beta1_GenAiCacheServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.GenAiCacheServiceClient#Google_Cloud_AIPlatform_V1Beta1_GenAiCacheServiceClient_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.GenAiCacheServiceClient#Google_Cloud_AIPlatform_V1Beta1_GenAiCacheServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.GenAiCacheServiceClient#Google_Cloud_AIPlatform_V1Beta1_GenAiCacheServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateCachedContent(CachedContent, FieldMask, CallSettings)

    public virtual CachedContent UpdateCachedContent(CachedContent cachedContent, FieldMask updateMask, CallSettings callSettings = null)

Updates cached content configurations

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `cachedContent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` Required. The cached content to update |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. The list of fields to update. |
| `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.CachedContent` | The RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    CachedContent cachedContent = new CachedContent();
    FieldMask updateMask = new FieldMask();
    // Make the request
    CachedContent response = genAiCacheServiceClient.UpdateCachedContent(cachedContent, updateMask);

### UpdateCachedContent(UpdateCachedContentRequest, CallSettings)

    public virtual CachedContent UpdateCachedContent(UpdateCachedContentRequest request, CallSettings callSettings = null)

Updates cached content configurations

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create();
    // Initialize request argument(s)
    UpdateCachedContentRequest request = new UpdateCachedContentRequest
    {
        CachedContent = new CachedContent(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    CachedContent response = genAiCacheServiceClient.UpdateCachedContent(request);

### UpdateCachedContentAsync(CachedContent, FieldMask, CallSettings)

    public virtual Task<CachedContent> UpdateCachedContentAsync(CachedContent cachedContent, FieldMask updateMask, CallSettings callSettings = null)

Updates cached content configurations

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `cachedContent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` Required. The cached content to update |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. The list of fields to update. |
| `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.CachedContent` | A Task containing the RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    CachedContent cachedContent = new CachedContent();
    FieldMask updateMask = new FieldMask();
    // Make the request
    CachedContent response = await genAiCacheServiceClient.UpdateCachedContentAsync(cachedContent, updateMask);

### UpdateCachedContentAsync(CachedContent, FieldMask, CancellationToken)

    public virtual Task<CachedContent> UpdateCachedContentAsync(CachedContent cachedContent, FieldMask updateMask, CancellationToken cancellationToken)

Updates cached content configurations

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `cachedContent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.CachedContent` Required. The cached content to update |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Required. The list of fields to update. |
| `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.CachedContent` | A Task containing the RPC response. |

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    CachedContent cachedContent = new CachedContent();
    FieldMask updateMask = new FieldMask();
    // Make the request
    CachedContent response = await genAiCacheServiceClient.UpdateCachedContentAsync(cachedContent, updateMask);

### UpdateCachedContentAsync(UpdateCachedContentRequest, CallSettings)

    public virtual Task<CachedContent> UpdateCachedContentAsync(UpdateCachedContentRequest request, CallSettings callSettings = null)

Updates cached content configurations

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateCachedContentRequest request = new UpdateCachedContentRequest
    {
        CachedContent = new CachedContent(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    CachedContent response = await genAiCacheServiceClient.UpdateCachedContentAsync(request);

### UpdateCachedContentAsync(UpdateCachedContentRequest, CancellationToken)

    public virtual Task<CachedContent> UpdateCachedContentAsync(UpdateCachedContentRequest request, CancellationToken cancellationToken)

Updates cached content configurations

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

**Example**

    // Create client
    GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateCachedContentRequest request = new UpdateCachedContentRequest
    {
        CachedContent = new CachedContent(),
        UpdateMask = new FieldMask(),
    };
    // Make the request
    CachedContent response = await genAiCacheServiceClient.UpdateCachedContentAsync(request);