// Copyright (c) Microsoft. All rights reserved. using System.Text.Json.Serialization; using Microsoft.Extensions.AI; namespace Microsoft.Agents.AI.DurableTask.State; /// /// Represents durable agent state content that contains hosted file content. /// internal sealed class DurableAgentStateHostedFileContent : DurableAgentStateContent { /// /// Gets the file ID of the hosted file content. /// [JsonPropertyName("fileId")] public required string FileId { get; init; } /// /// Creates a from a . /// /// The to convert. /// /// A representing the original . /// public static DurableAgentStateHostedFileContent FromHostedFileContent(HostedFileContent content) { return new DurableAgentStateHostedFileContent() { FileId = content.FileId }; } /// public override AIContent ToAIContent() { return new HostedFileContent(this.FileId); } }