mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
31 lines
1.2 KiB
C#
31 lines
1.2 KiB
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Microsoft.Extensions.AI.Agents.Runtime;
|
|
|
|
/// <summary>
|
|
/// Represents an operation to list keys from an actor's state, with optional pagination support.
|
|
/// </summary>
|
|
/// <param name="continuationToken">Optional token for pagination to continue listing from a previous operation.</param>
|
|
/// <param name="keyPrefix">Optional prefix to filter keys. Only keys starting with this prefix will be returned.</param>
|
|
public sealed class ListKeysOperation(string? continuationToken, string? keyPrefix = null) : ActorStateReadOperation
|
|
{
|
|
/// <summary>
|
|
/// Gets the continuation token for pagination.
|
|
/// </summary>
|
|
[JsonPropertyName("continuationToken")]
|
|
public string? ContinuationToken { get; } = continuationToken;
|
|
|
|
/// <summary>
|
|
/// Gets the key prefix for filtering. Only keys starting with this prefix will be returned.
|
|
/// </summary>
|
|
[JsonPropertyName("keyPrefix")]
|
|
public string? KeyPrefix { get; } = keyPrefix;
|
|
|
|
/// <summary>
|
|
/// Gets the type of the read operation.
|
|
/// </summary>
|
|
public override ActorReadOperationType Type => ActorReadOperationType.ListKeys;
|
|
}
|