microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.AI/Messages/DeveloperMessage.cs
34lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using System.Text.Json; |
| 5 | using System.Text.Json.Serialization; |
| 6 | |
| 7 | namespace Microsoft.Teams.AI.Messages; |
| 8 | |
| 9 | [Obsolete("Microsoft.Teams.AI is deprecated and will be removed by end of summer 2026.")] |
| 10 | public class DeveloperMessage : IMessage |
| 11 | { |
| 12 | [JsonPropertyName("role")] |
| 13 | [JsonPropertyOrder(0)] |
| 14 | public Role Role => Role.Developer; |
| 15 | |
| 16 | [JsonPropertyName("content")] |
| 17 | [JsonPropertyOrder(1)] |
| 18 | public string Content { get; set; } |
| 19 | |
| 20 | [JsonConstructor] |
| 21 | public DeveloperMessage(string content) |
| 22 | { |
| 23 | Content = content; |
| 24 | } |
| 25 | |
| 26 | public override string ToString() |
| 27 | { |
| 28 | return JsonSerializer.Serialize(this, new JsonSerializerOptions() |
| 29 | { |
| 30 | WriteIndented = true, |
| 31 | DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull |
| 32 | }); |
| 33 | } |
| 34 | } |