-
Notifications
You must be signed in to change notification settings - Fork 482
/
VideoCard.cs
162 lines (146 loc) · 6.66 KB
/
VideoCard.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Microsoft.Bot.Schema
{
using System.Collections.Generic;
using Newtonsoft.Json;
/// <summary>
/// Video card.
/// </summary>
public partial class VideoCard
{
/// <summary>
/// Initializes a new instance of the <see cref="VideoCard"/> class.
/// </summary>
public VideoCard()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the <see cref="VideoCard"/> class.
/// </summary>
/// <param name="title">Title of this card.</param>
/// <param name="subtitle">Subtitle of this card.</param>
/// <param name="text">Text of this card.</param>
/// <param name="image">Thumbnail placeholder.</param>
/// <param name="media">Media URLs for this card. When this field
/// contains more than one URL, each URL is an alternative format of
/// the same content.</param>
/// <param name="buttons">Actions on this card.</param>
/// <param name="shareable">This content may be shared with others
/// (default:true).</param>
/// <param name="autoloop">Should the client loop playback at end of
/// content (default:true).</param>
/// <param name="autostart">Should the client automatically start
/// playback of media in this card (default:true).</param>
/// <param name="aspect">Aspect ratio of thumbnail/media placeholder.
/// Allowed values are "16:9" and "4:3".</param>
/// <param name="duration">Describes the length of the media content
/// without requiring a receiver to open the content. Formatted as an
/// ISO 8601 Duration field.</param>
/// <param name="value">Supplementary parameter for this card.</param>
public VideoCard(string title = default, string subtitle = default, string text = default, ThumbnailUrl image = default, IList<MediaUrl> media = default, IList<CardAction> buttons = default, bool? shareable = default, bool? autoloop = default, bool? autostart = default, string aspect = default, object value = default, string duration = default)
{
Title = title;
Subtitle = subtitle;
Text = text;
Image = image;
Media = media;
Buttons = buttons;
Shareable = shareable;
Autoloop = autoloop;
Autostart = autostart;
Aspect = aspect;
Duration = duration;
Value = value;
CustomInit();
}
/// <summary>
/// Gets or sets title of this card.
/// </summary>
/// <value>The title of this card.</value>
[JsonProperty(PropertyName = "title")]
public string Title { get; set; }
/// <summary>
/// Gets or sets subtitle of this card.
/// </summary>
/// <value>The subtitle of this card.</value>
[JsonProperty(PropertyName = "subtitle")]
public string Subtitle { get; set; }
/// <summary>
/// Gets or sets text of this card.
/// </summary>
/// <value>The text of this card.</value>
[JsonProperty(PropertyName = "text")]
public string Text { get; set; }
/// <summary>
/// Gets or sets thumbnail placeholder.
/// </summary>
/// <value>The thumbnail placeholder.</value>
[JsonProperty(PropertyName = "image")]
public ThumbnailUrl Image { get; set; }
/// <summary>
/// Gets or sets media URLs for this card. When this field contains
/// more than one URL, each URL is an alternative format of the same
/// content.
/// </summary>
/// <value>The media URLs for this card.</value>
[JsonProperty(PropertyName = "media")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking compat).
public IList<MediaUrl> Media { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets actions on this card.
/// </summary>
/// <value>The actions of this card.</value>
[JsonProperty(PropertyName = "buttons")]
#pragma warning disable CA2227 // Collection properties should be read only (we can't change this without breaking compat).
public IList<CardAction> Buttons { get; set; }
#pragma warning restore CA2227 // Collection properties should be read only
/// <summary>
/// Gets or sets this content may be shared with others (default:true).
/// </summary>
/// <value>Boolean indicating if content may be shared with others.</value>
[JsonProperty(PropertyName = "shareable")]
public bool? Shareable { get; set; }
/// <summary>
/// Gets or sets should the client loop playback at end of content
/// (default:true).
/// </summary>
/// <value>Boolean indicating if client should loop playback at end of content.</value>
[JsonProperty(PropertyName = "autoloop")]
public bool? Autoloop { get; set; }
/// <summary>
/// Gets or sets should the client automatically start playback of
/// media in this card (default:true).
/// </summary>
/// <value>Boolean indicating if client should automatically start playback of media.</value>
[JsonProperty(PropertyName = "autostart")]
public bool? Autostart { get; set; }
/// <summary>
/// Gets or sets aspect ratio of thumbnail/media placeholder. Allowed
/// values are "16:9" and "4:3".
/// </summary>
/// <value>The aspect ratio of the thumbnail/media placeholder.</value>
[JsonProperty(PropertyName = "aspect")]
public string Aspect { get; set; }
/// <summary>
/// Gets or sets describes the length of the media content without
/// requiring a receiver to open the content. Formatted as an ISO 8601
/// Duration field.
/// </summary>
/// <value>The duration of the media content.</value>
[JsonProperty(PropertyName = "duration")]
public string Duration { get; set; }
/// <summary>
/// Gets or sets supplementary parameter for this card.
/// </summary>
/// <value>The supplementary parameter for this card.</value>
[JsonProperty(PropertyName = "value")]
public object Value { get; set; }
/// <summary>
/// An initialization method that performs custom operations like setting defaults.
/// </summary>
partial void CustomInit();
}
}