// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Text.Json.Serialization; using Microsoft.Teams.Apps.Schema.Entities; namespace Microsoft.Teams.Apps.Schema; /// /// Represents a streaming activity chunk. Has type "typing" to satisfy the Teams /// streaming API, but carries text content that accumulates into the final response. /// public class StreamingActivity : TeamsActivity { /// /// Initializes a new instance of the class with the specified text. /// /// [JsonConstructor] public StreamingActivity(string text) : base(TeamsActivityTypes.Typing) { Text = text; StreamInfo = StreamInfoEntityExtensions.AddToActivity(this, StreamTypes.Streaming); } /// /// Gets or sets the text content of the streaming chunk. /// [JsonPropertyName("text")] public string Text { get; set; } /// /// Gets the stream info entity for this streaming activity. /// public StreamInfoEntity StreamInfo { get; } }