microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
samples/migration-bot

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

core/src/Microsoft.Teams.Bot.Apps/Schema/Entities/StreamInfoEntity.cs

68lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4using System.Text.Json.Serialization;
5
6namespace Microsoft.Teams.Bot.Apps.Schema.Entities;
7
8/// <summary>
9/// Stream info entity.
10/// </summary>
11public class StreamInfoEntity : Entity
12{
13 /// <summary>
14 /// Creates a new instance of <see cref="StreamInfoEntity"/>.
15 /// </summary>
16 public StreamInfoEntity() : base("streaminfo") { }
17
18 /// <summary>
19 /// Gets or sets the stream id.
20 /// </summary>
21 [JsonPropertyName("streamId")]
22 public string? StreamId
23 {
24 get => base.Properties.TryGetValue("streamId", out object? value) ? value?.ToString() : null;
25 set => base.Properties["streamId"] = value;
26 }
27
28 /// <summary>
29 /// Gets or sets the stream type. See <see cref="StreamType"/> for possible values.
30 /// </summary>
31 [JsonPropertyName("streamType")]
32 public string? StreamType
33 {
34 get => base.Properties.TryGetValue("streamType", out object? value) ? value?.ToString() : null;
35 set => base.Properties["streamType"] = value;
36 }
37
38 /// <summary>
39 /// Gets or sets the stream sequence.
40 /// </summary>
41 [JsonPropertyName("streamSequence")]
42 public int? StreamSequence
43 {
44 get => base.Properties.TryGetValue("streamSequence", out object? value) && value != null
45 ? (int.TryParse(value.ToString(), out int intVal) ? intVal : null)
46 : null;
47 set => base.Properties["streamSequence"] = value;
48 }
49}
50
51/// <summary>
52/// Represents the types of streams.
53/// </summary>
54public static class StreamType
55{
56 /// <summary>
57 /// Informative stream type.
58 /// </summary>
59 public const string Informative = "informative";
60 /// <summary>
61 /// Streaming stream type.
62 /// </summary>
63 public const string Streaming = "streaming";
64 /// <summary>
65 /// Represents the string literal "final".
66 /// </summary>
67 public const string Final = "final";
68}
69