microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v2.0.0-preview.5

Branches

Tags

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

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Cards/Core.cs

13265lines · modecode

1// This file was automatically generated by a tool on 05/07/2025, 6:43 PM UTC.
2// It includes declarations for Adaptive Card features available in Teams.
3
4#pragma warning disable IDE0290
5
6using System.Text.Json;
7using System.Text.Json.Serialization;
8
9using Microsoft.Teams.Common;
10
11namespace Microsoft.Teams.Cards;
12
13[JsonConverter(typeof(JsonConverter<ActionStyle>))]
14public class ActionStyle(string value) : StringEnum(value, caseSensitive: false)
15{
16 public static readonly ActionStyle Default = new("default");
17 public bool IsDefault => Default.Equals(Value);
18
19 public static readonly ActionStyle Positive = new("positive");
20 public bool IsPositive => Positive.Equals(Value);
21
22 public static readonly ActionStyle Destructive = new("destructive");
23 public bool IsDestructive => Destructive.Equals(Value);
24}
25
26[JsonConverter(typeof(JsonConverter<ActionMode>))]
27public class ActionMode(string value) : StringEnum(value, caseSensitive: false)
28{
29 public static readonly ActionMode Primary = new("primary");
30 public bool IsPrimary => Primary.Equals(Value);
31
32 public static readonly ActionMode Secondary = new("secondary");
33 public bool IsSecondary => Secondary.Equals(Value);
34}
35
36[JsonConverter(typeof(JsonConverter<AssociatedInputs>))]
37public class AssociatedInputs(string value) : StringEnum(value, caseSensitive: false)
38{
39 public static readonly AssociatedInputs Auto = new("auto");
40 public bool IsAuto => Auto.Equals(Value);
41
42 public static readonly AssociatedInputs None = new("none");
43 public bool IsNone => None.Equals(Value);
44}
45
46[JsonConverter(typeof(JsonConverter<FallbackAction>))]
47public class FallbackAction(string value) : StringEnum(value, caseSensitive: false)
48{
49 public static readonly FallbackAction Drop = new("drop");
50 public bool IsDrop => Drop.Equals(Value);
51}
52
53[JsonConverter(typeof(JsonConverter<ContainerStyle>))]
54public class ContainerStyle(string value) : StringEnum(value, caseSensitive: false)
55{
56 public static readonly ContainerStyle Default = new("default");
57 public bool IsDefault => Default.Equals(Value);
58
59 public static readonly ContainerStyle Emphasis = new("emphasis");
60 public bool IsEmphasis => Emphasis.Equals(Value);
61
62 public static readonly ContainerStyle Accent = new("accent");
63 public bool IsAccent => Accent.Equals(Value);
64
65 public static readonly ContainerStyle Good = new("good");
66 public bool IsGood => Good.Equals(Value);
67
68 public static readonly ContainerStyle Attention = new("attention");
69 public bool IsAttention => Attention.Equals(Value);
70
71 public static readonly ContainerStyle Warning = new("warning");
72 public bool IsWarning => Warning.Equals(Value);
73}
74
75[JsonConverter(typeof(JsonConverter<TargetWidth>))]
76public class TargetWidth(string value) : StringEnum(value, caseSensitive: false)
77{
78 public static readonly TargetWidth VeryNarrow = new("VeryNarrow");
79 public bool IsVeryNarrow => VeryNarrow.Equals(Value);
80
81 public static readonly TargetWidth Narrow = new("Narrow");
82 public bool IsNarrow => Narrow.Equals(Value);
83
84 public static readonly TargetWidth Standard = new("Standard");
85 public bool IsStandard => Standard.Equals(Value);
86
87 public static readonly TargetWidth Wide = new("Wide");
88 public bool IsWide => Wide.Equals(Value);
89
90 public static readonly TargetWidth AtLeastVeryNarrow = new("atLeast:VeryNarrow");
91 public bool IsAtLeastVeryNarrow => AtLeastVeryNarrow.Equals(Value);
92
93 public static readonly TargetWidth AtMostVeryNarrow = new("atMost:VeryNarrow");
94 public bool IsAtMostVeryNarrow => AtMostVeryNarrow.Equals(Value);
95
96 public static readonly TargetWidth AtLeastNarrow = new("atLeast:Narrow");
97 public bool IsAtLeastNarrow => AtLeastNarrow.Equals(Value);
98
99 public static readonly TargetWidth AtMostNarrow = new("atMost:Narrow");
100 public bool IsAtMostNarrow => AtMostNarrow.Equals(Value);
101
102 public static readonly TargetWidth AtLeastStandard = new("atLeast:Standard");
103 public bool IsAtLeastStandard => AtLeastStandard.Equals(Value);
104
105 public static readonly TargetWidth AtMostStandard = new("atMost:Standard");
106 public bool IsAtMostStandard => AtMostStandard.Equals(Value);
107
108 public static readonly TargetWidth AtLeastWide = new("atLeast:Wide");
109 public bool IsAtLeastWide => AtLeastWide.Equals(Value);
110
111 public static readonly TargetWidth AtMostWide = new("atMost:Wide");
112 public bool IsAtMostWide => AtMostWide.Equals(Value);
113}
114
115[JsonConverter(typeof(JsonConverter<HorizontalAlignment>))]
116public class HorizontalAlignment(string value) : StringEnum(value, caseSensitive: false)
117{
118 public static readonly HorizontalAlignment Left = new("Left");
119 public bool IsLeft => Left.Equals(Value);
120
121 public static readonly HorizontalAlignment Center = new("Center");
122 public bool IsCenter => Center.Equals(Value);
123
124 public static readonly HorizontalAlignment Right = new("Right");
125 public bool IsRight => Right.Equals(Value);
126}
127
128[JsonConverter(typeof(JsonConverter<VerticalAlignment>))]
129public class VerticalAlignment(string value) : StringEnum(value, caseSensitive: false)
130{
131 public static readonly VerticalAlignment Top = new("Top");
132 public bool IsTop => Top.Equals(Value);
133
134 public static readonly VerticalAlignment Center = new("Center");
135 public bool IsCenter => Center.Equals(Value);
136
137 public static readonly VerticalAlignment Bottom = new("Bottom");
138 public bool IsBottom => Bottom.Equals(Value);
139}
140
141[JsonConverter(typeof(JsonConverter<FlowLayoutItemFit>))]
142public class FlowLayoutItemFit(string value) : StringEnum(value, caseSensitive: false)
143{
144 public static readonly FlowLayoutItemFit Fit = new("Fit");
145 public bool IsFit => Fit.Equals(Value);
146
147 public static readonly FlowLayoutItemFit Fill = new("Fill");
148 public bool IsFill => Fill.Equals(Value);
149}
150
151[JsonConverter(typeof(JsonConverter<Spacing>))]
152public class Spacing(string value) : StringEnum(value, caseSensitive: false)
153{
154 public static readonly Spacing None = new("None");
155 public bool IsNone => None.Equals(Value);
156
157 public static readonly Spacing ExtraSmall = new("ExtraSmall");
158 public bool IsExtraSmall => ExtraSmall.Equals(Value);
159
160 public static readonly Spacing Small = new("Small");
161 public bool IsSmall => Small.Equals(Value);
162
163 public static readonly Spacing Default = new("Default");
164 public bool IsDefault => Default.Equals(Value);
165
166 public static readonly Spacing Medium = new("Medium");
167 public bool IsMedium => Medium.Equals(Value);
168
169 public static readonly Spacing Large = new("Large");
170 public bool IsLarge => Large.Equals(Value);
171
172 public static readonly Spacing ExtraLarge = new("ExtraLarge");
173 public bool IsExtraLarge => ExtraLarge.Equals(Value);
174
175 public static readonly Spacing Padding = new("Padding");
176 public bool IsPadding => Padding.Equals(Value);
177}
178
179[JsonConverter(typeof(JsonConverter<FillMode>))]
180public class FillMode(string value) : StringEnum(value, caseSensitive: false)
181{
182 public static readonly FillMode Cover = new("Cover");
183 public bool IsCover => Cover.Equals(Value);
184
185 public static readonly FillMode RepeatHorizontally = new("RepeatHorizontally");
186 public bool IsRepeatHorizontally => RepeatHorizontally.Equals(Value);
187
188 public static readonly FillMode RepeatVertically = new("RepeatVertically");
189 public bool IsRepeatVertically => RepeatVertically.Equals(Value);
190
191 public static readonly FillMode Repeat = new("Repeat");
192 public bool IsRepeat => Repeat.Equals(Value);
193}
194
195[JsonConverter(typeof(JsonConverter<Version>))]
196public class Version(string value) : StringEnum(value, caseSensitive: false)
197{
198 public static readonly Version Version1_0 = new("1.0");
199 public bool IsVersion1_0 => Version1_0.Equals(Value);
200
201 public static readonly Version Version1_1 = new("1.1");
202 public bool IsVersion1_1 => Version1_1.Equals(Value);
203
204 public static readonly Version Version1_2 = new("1.2");
205 public bool IsVersion1_2 => Version1_2.Equals(Value);
206
207 public static readonly Version Version1_3 = new("1.3");
208 public bool IsVersion1_3 => Version1_3.Equals(Value);
209
210 public static readonly Version Version1_4 = new("1.4");
211 public bool IsVersion1_4 => Version1_4.Equals(Value);
212
213 public static readonly Version Version1_5 = new("1.5");
214 public bool IsVersion1_5 => Version1_5.Equals(Value);
215
216 public static readonly Version Version1_6 = new("1.6");
217 public bool IsVersion1_6 => Version1_6.Equals(Value);
218}
219
220[JsonConverter(typeof(JsonConverter<TeamsCardWidth>))]
221public class TeamsCardWidth(string value) : StringEnum(value, caseSensitive: false)
222{
223 public static readonly TeamsCardWidth Full = new("full");
224 public bool IsFull => Full.Equals(Value);
225}
226
227[JsonConverter(typeof(JsonConverter<MentionType>))]
228public class MentionType(string value) : StringEnum(value, caseSensitive: false)
229{
230 public static readonly MentionType Person = new("Person");
231 public bool IsPerson => Person.Equals(Value);
232
233 public static readonly MentionType Tag = new("Tag");
234 public bool IsTag => Tag.Equals(Value);
235}
236
237[JsonConverter(typeof(JsonConverter<ElementHeight>))]
238public class ElementHeight(string value) : StringEnum(value, caseSensitive: false)
239{
240 public static readonly ElementHeight Auto = new("auto");
241 public bool IsAuto => Auto.Equals(Value);
242
243 public static readonly ElementHeight Stretch = new("stretch");
244 public bool IsStretch => Stretch.Equals(Value);
245}
246
247[JsonConverter(typeof(JsonConverter<TextSize>))]
248public class TextSize(string value) : StringEnum(value, caseSensitive: false)
249{
250 public static readonly TextSize Small = new("Small");
251 public bool IsSmall => Small.Equals(Value);
252
253 public static readonly TextSize Default = new("Default");
254 public bool IsDefault => Default.Equals(Value);
255
256 public static readonly TextSize Medium = new("Medium");
257 public bool IsMedium => Medium.Equals(Value);
258
259 public static readonly TextSize Large = new("Large");
260 public bool IsLarge => Large.Equals(Value);
261
262 public static readonly TextSize ExtraLarge = new("ExtraLarge");
263 public bool IsExtraLarge => ExtraLarge.Equals(Value);
264}
265
266[JsonConverter(typeof(JsonConverter<TextWeight>))]
267public class TextWeight(string value) : StringEnum(value, caseSensitive: false)
268{
269 public static readonly TextWeight Lighter = new("Lighter");
270 public bool IsLighter => Lighter.Equals(Value);
271
272 public static readonly TextWeight Default = new("Default");
273 public bool IsDefault => Default.Equals(Value);
274
275 public static readonly TextWeight Bolder = new("Bolder");
276 public bool IsBolder => Bolder.Equals(Value);
277}
278
279[JsonConverter(typeof(JsonConverter<TextColor>))]
280public class TextColor(string value) : StringEnum(value, caseSensitive: false)
281{
282 public static readonly TextColor Default = new("Default");
283 public bool IsDefault => Default.Equals(Value);
284
285 public static readonly TextColor Dark = new("Dark");
286 public bool IsDark => Dark.Equals(Value);
287
288 public static readonly TextColor Light = new("Light");
289 public bool IsLight => Light.Equals(Value);
290
291 public static readonly TextColor Accent = new("Accent");
292 public bool IsAccent => Accent.Equals(Value);
293
294 public static readonly TextColor Good = new("Good");
295 public bool IsGood => Good.Equals(Value);
296
297 public static readonly TextColor Warning = new("Warning");
298 public bool IsWarning => Warning.Equals(Value);
299
300 public static readonly TextColor Attention = new("Attention");
301 public bool IsAttention => Attention.Equals(Value);
302}
303
304[JsonConverter(typeof(JsonConverter<FontType>))]
305public class FontType(string value) : StringEnum(value, caseSensitive: false)
306{
307 public static readonly FontType Default = new("Default");
308 public bool IsDefault => Default.Equals(Value);
309
310 public static readonly FontType Monospace = new("Monospace");
311 public bool IsMonospace => Monospace.Equals(Value);
312}
313
314[JsonConverter(typeof(JsonConverter<StyleEnum>))]
315public class StyleEnum(string value) : StringEnum(value, caseSensitive: false)
316{
317 public static readonly StyleEnum Compact = new("compact");
318 public bool IsCompact => Compact.Equals(Value);
319
320 public static readonly StyleEnum Expanded = new("expanded");
321 public bool IsExpanded => Expanded.Equals(Value);
322
323 public static readonly StyleEnum Filtered = new("filtered");
324 public bool IsFiltered => Filtered.Equals(Value);
325}
326
327[JsonConverter(typeof(JsonConverter<ImageStyle>))]
328public class ImageStyle(string value) : StringEnum(value, caseSensitive: false)
329{
330 public static readonly ImageStyle Default = new("Default");
331 public bool IsDefault => Default.Equals(Value);
332
333 public static readonly ImageStyle Person = new("Person");
334 public bool IsPerson => Person.Equals(Value);
335
336 public static readonly ImageStyle RoundedCorners = new("RoundedCorners");
337 public bool IsRoundedCorners => RoundedCorners.Equals(Value);
338}
339
340[JsonConverter(typeof(JsonConverter<Size>))]
341public class Size(string value) : StringEnum(value, caseSensitive: false)
342{
343 public static readonly Size Auto = new("Auto");
344 public bool IsAuto => Auto.Equals(Value);
345
346 public static readonly Size Stretch = new("Stretch");
347 public bool IsStretch => Stretch.Equals(Value);
348
349 public static readonly Size Small = new("Small");
350 public bool IsSmall => Small.Equals(Value);
351
352 public static readonly Size Medium = new("Medium");
353 public bool IsMedium => Medium.Equals(Value);
354
355 public static readonly Size Large = new("Large");
356 public bool IsLarge => Large.Equals(Value);
357}
358
359[JsonConverter(typeof(JsonConverter<InputTextStyle>))]
360public class InputTextStyle(string value) : StringEnum(value, caseSensitive: false)
361{
362 public static readonly InputTextStyle Text = new("Text");
363 public bool IsText => Text.Equals(Value);
364
365 public static readonly InputTextStyle Tel = new("Tel");
366 public bool IsTel => Tel.Equals(Value);
367
368 public static readonly InputTextStyle Url = new("Url");
369 public bool IsUrl => Url.Equals(Value);
370
371 public static readonly InputTextStyle Email = new("Email");
372 public bool IsEmail => Email.Equals(Value);
373
374 public static readonly InputTextStyle Password = new("Password");
375 public bool IsPassword => Password.Equals(Value);
376}
377
378[JsonConverter(typeof(JsonConverter<RatingSize>))]
379public class RatingSize(string value) : StringEnum(value, caseSensitive: false)
380{
381 public static readonly RatingSize Medium = new("Medium");
382 public bool IsMedium => Medium.Equals(Value);
383
384 public static readonly RatingSize Large = new("Large");
385 public bool IsLarge => Large.Equals(Value);
386}
387
388[JsonConverter(typeof(JsonConverter<RatingColor>))]
389public class RatingColor(string value) : StringEnum(value, caseSensitive: false)
390{
391 public static readonly RatingColor Neutral = new("Neutral");
392 public bool IsNeutral => Neutral.Equals(Value);
393
394 public static readonly RatingColor Marigold = new("Marigold");
395 public bool IsMarigold => Marigold.Equals(Value);
396}
397
398[JsonConverter(typeof(JsonConverter<RatingStyle>))]
399public class RatingStyle(string value) : StringEnum(value, caseSensitive: false)
400{
401 public static readonly RatingStyle Default = new("Default");
402 public bool IsDefault => Default.Equals(Value);
403
404 public static readonly RatingStyle Compact = new("Compact");
405 public bool IsCompact => Compact.Equals(Value);
406}
407
408[JsonConverter(typeof(JsonConverter<IconSize>))]
409public class IconSize(string value) : StringEnum(value, caseSensitive: false)
410{
411 public static readonly IconSize XxSmall = new("xxSmall");
412 public bool IsXxSmall => XxSmall.Equals(Value);
413
414 public static readonly IconSize XSmall = new("xSmall");
415 public bool IsXSmall => XSmall.Equals(Value);
416
417 public static readonly IconSize Small = new("Small");
418 public bool IsSmall => Small.Equals(Value);
419
420 public static readonly IconSize Standard = new("Standard");
421 public bool IsStandard => Standard.Equals(Value);
422
423 public static readonly IconSize Medium = new("Medium");
424 public bool IsMedium => Medium.Equals(Value);
425
426 public static readonly IconSize Large = new("Large");
427 public bool IsLarge => Large.Equals(Value);
428
429 public static readonly IconSize XLarge = new("xLarge");
430 public bool IsXLarge => XLarge.Equals(Value);
431
432 public static readonly IconSize XxLarge = new("xxLarge");
433 public bool IsXxLarge => XxLarge.Equals(Value);
434}
435
436[JsonConverter(typeof(JsonConverter<IconStyle>))]
437public class IconStyle(string value) : StringEnum(value, caseSensitive: false)
438{
439 public static readonly IconStyle Regular = new("Regular");
440 public bool IsRegular => Regular.Equals(Value);
441
442 public static readonly IconStyle Filled = new("Filled");
443 public bool IsFilled => Filled.Equals(Value);
444}
445
446[JsonConverter(typeof(JsonConverter<CarouselPageAnimation>))]
447public class CarouselPageAnimation(string value) : StringEnum(value, caseSensitive: false)
448{
449 public static readonly CarouselPageAnimation Slide = new("Slide");
450 public bool IsSlide => Slide.Equals(Value);
451
452 public static readonly CarouselPageAnimation CrossFade = new("CrossFade");
453 public bool IsCrossFade => CrossFade.Equals(Value);
454
455 public static readonly CarouselPageAnimation None = new("None");
456 public bool IsNone => None.Equals(Value);
457}
458
459[JsonConverter(typeof(JsonConverter<BadgeIconPosition>))]
460public class BadgeIconPosition(string value) : StringEnum(value, caseSensitive: false)
461{
462 public static readonly BadgeIconPosition Before = new("Before");
463 public bool IsBefore => Before.Equals(Value);
464
465 public static readonly BadgeIconPosition After = new("After");
466 public bool IsAfter => After.Equals(Value);
467}
468
469[JsonConverter(typeof(JsonConverter<BadgeAppearance>))]
470public class BadgeAppearance(string value) : StringEnum(value, caseSensitive: false)
471{
472 public static readonly BadgeAppearance Filled = new("Filled");
473 public bool IsFilled => Filled.Equals(Value);
474
475 public static readonly BadgeAppearance Tint = new("Tint");
476 public bool IsTint => Tint.Equals(Value);
477}
478
479[JsonConverter(typeof(JsonConverter<BadgeSize>))]
480public class BadgeSize(string value) : StringEnum(value, caseSensitive: false)
481{
482 public static readonly BadgeSize Medium = new("Medium");
483 public bool IsMedium => Medium.Equals(Value);
484
485 public static readonly BadgeSize Large = new("Large");
486 public bool IsLarge => Large.Equals(Value);
487
488 public static readonly BadgeSize ExtraLarge = new("ExtraLarge");
489 public bool IsExtraLarge => ExtraLarge.Equals(Value);
490}
491
492[JsonConverter(typeof(JsonConverter<BadgeShape>))]
493public class BadgeShape(string value) : StringEnum(value, caseSensitive: false)
494{
495 public static readonly BadgeShape Square = new("Square");
496 public bool IsSquare => Square.Equals(Value);
497
498 public static readonly BadgeShape Rounded = new("Rounded");
499 public bool IsRounded => Rounded.Equals(Value);
500
501 public static readonly BadgeShape Circular = new("Circular");
502 public bool IsCircular => Circular.Equals(Value);
503}
504
505[JsonConverter(typeof(JsonConverter<BadgeStyle>))]
506public class BadgeStyle(string value) : StringEnum(value, caseSensitive: false)
507{
508 public static readonly BadgeStyle Default = new("Default");
509 public bool IsDefault => Default.Equals(Value);
510
511 public static readonly BadgeStyle Subtle = new("Subtle");
512 public bool IsSubtle => Subtle.Equals(Value);
513
514 public static readonly BadgeStyle Informative = new("Informative");
515 public bool IsInformative => Informative.Equals(Value);
516
517 public static readonly BadgeStyle Accent = new("Accent");
518 public bool IsAccent => Accent.Equals(Value);
519
520 public static readonly BadgeStyle Good = new("Good");
521 public bool IsGood => Good.Equals(Value);
522
523 public static readonly BadgeStyle Attention = new("Attention");
524 public bool IsAttention => Attention.Equals(Value);
525
526 public static readonly BadgeStyle Warning = new("Warning");
527 public bool IsWarning => Warning.Equals(Value);
528}
529
530[JsonConverter(typeof(JsonConverter<ChartColorSet>))]
531public class ChartColorSet(string value) : StringEnum(value, caseSensitive: false)
532{
533 public static readonly ChartColorSet Categorical = new("categorical");
534 public bool IsCategorical => Categorical.Equals(Value);
535
536 public static readonly ChartColorSet Sequential = new("sequential");
537 public bool IsSequential => Sequential.Equals(Value);
538
539 public static readonly ChartColorSet Diverging = new("diverging");
540 public bool IsDiverging => Diverging.Equals(Value);
541}
542
543[JsonConverter(typeof(JsonConverter<ChartColor>))]
544public class ChartColor(string value) : StringEnum(value, caseSensitive: false)
545{
546 public static readonly ChartColor Good = new("good");
547 public bool IsGood => Good.Equals(Value);
548
549 public static readonly ChartColor Warning = new("warning");
550 public bool IsWarning => Warning.Equals(Value);
551
552 public static readonly ChartColor Attention = new("attention");
553 public bool IsAttention => Attention.Equals(Value);
554
555 public static readonly ChartColor Neutral = new("neutral");
556 public bool IsNeutral => Neutral.Equals(Value);
557
558 public static readonly ChartColor CategoricalRed = new("categoricalRed");
559 public bool IsCategoricalRed => CategoricalRed.Equals(Value);
560
561 public static readonly ChartColor CategoricalPurple = new("categoricalPurple");
562 public bool IsCategoricalPurple => CategoricalPurple.Equals(Value);
563
564 public static readonly ChartColor CategoricalLavender = new("categoricalLavender");
565 public bool IsCategoricalLavender => CategoricalLavender.Equals(Value);
566
567 public static readonly ChartColor CategoricalBlue = new("categoricalBlue");
568 public bool IsCategoricalBlue => CategoricalBlue.Equals(Value);
569
570 public static readonly ChartColor CategoricalLightBlue = new("categoricalLightBlue");
571 public bool IsCategoricalLightBlue => CategoricalLightBlue.Equals(Value);
572
573 public static readonly ChartColor CategoricalTeal = new("categoricalTeal");
574 public bool IsCategoricalTeal => CategoricalTeal.Equals(Value);
575
576 public static readonly ChartColor CategoricalGreen = new("categoricalGreen");
577 public bool IsCategoricalGreen => CategoricalGreen.Equals(Value);
578
579 public static readonly ChartColor CategoricalLime = new("categoricalLime");
580 public bool IsCategoricalLime => CategoricalLime.Equals(Value);
581
582 public static readonly ChartColor CategoricalMarigold = new("categoricalMarigold");
583 public bool IsCategoricalMarigold => CategoricalMarigold.Equals(Value);
584
585 public static readonly ChartColor Sequential1 = new("sequential1");
586 public bool IsSequential1 => Sequential1.Equals(Value);
587
588 public static readonly ChartColor Sequential2 = new("sequential2");
589 public bool IsSequential2 => Sequential2.Equals(Value);
590
591 public static readonly ChartColor Sequential3 = new("sequential3");
592 public bool IsSequential3 => Sequential3.Equals(Value);
593
594 public static readonly ChartColor Sequential4 = new("sequential4");
595 public bool IsSequential4 => Sequential4.Equals(Value);
596
597 public static readonly ChartColor Sequential5 = new("sequential5");
598 public bool IsSequential5 => Sequential5.Equals(Value);
599
600 public static readonly ChartColor Sequential6 = new("sequential6");
601 public bool IsSequential6 => Sequential6.Equals(Value);
602
603 public static readonly ChartColor Sequential7 = new("sequential7");
604 public bool IsSequential7 => Sequential7.Equals(Value);
605
606 public static readonly ChartColor Sequential8 = new("sequential8");
607 public bool IsSequential8 => Sequential8.Equals(Value);
608
609 public static readonly ChartColor DivergingBlue = new("divergingBlue");
610 public bool IsDivergingBlue => DivergingBlue.Equals(Value);
611
612 public static readonly ChartColor DivergingLightBlue = new("divergingLightBlue");
613 public bool IsDivergingLightBlue => DivergingLightBlue.Equals(Value);
614
615 public static readonly ChartColor DivergingCyan = new("divergingCyan");
616 public bool IsDivergingCyan => DivergingCyan.Equals(Value);
617
618 public static readonly ChartColor DivergingTeal = new("divergingTeal");
619 public bool IsDivergingTeal => DivergingTeal.Equals(Value);
620
621 public static readonly ChartColor DivergingYellow = new("divergingYellow");
622 public bool IsDivergingYellow => DivergingYellow.Equals(Value);
623
624 public static readonly ChartColor DivergingPeach = new("divergingPeach");
625 public bool IsDivergingPeach => DivergingPeach.Equals(Value);
626
627 public static readonly ChartColor DivergingLightRed = new("divergingLightRed");
628 public bool IsDivergingLightRed => DivergingLightRed.Equals(Value);
629
630 public static readonly ChartColor DivergingRed = new("divergingRed");
631 public bool IsDivergingRed => DivergingRed.Equals(Value);
632
633 public static readonly ChartColor DivergingMaroon = new("divergingMaroon");
634 public bool IsDivergingMaroon => DivergingMaroon.Equals(Value);
635
636 public static readonly ChartColor DivergingGray = new("divergingGray");
637 public bool IsDivergingGray => DivergingGray.Equals(Value);
638}
639
640[JsonConverter(typeof(JsonConverter<HorizontalBarChartDisplayMode>))]
641public class HorizontalBarChartDisplayMode(string value) : StringEnum(value, caseSensitive: false)
642{
643 public static readonly HorizontalBarChartDisplayMode AbsoluteWithAxis = new("AbsoluteWithAxis");
644 public bool IsAbsoluteWithAxis => AbsoluteWithAxis.Equals(Value);
645
646 public static readonly HorizontalBarChartDisplayMode AbsoluteNoAxis = new("AbsoluteNoAxis");
647 public bool IsAbsoluteNoAxis => AbsoluteNoAxis.Equals(Value);
648
649 public static readonly HorizontalBarChartDisplayMode PartToWhole = new("PartToWhole");
650 public bool IsPartToWhole => PartToWhole.Equals(Value);
651}
652
653[JsonConverter(typeof(JsonConverter<GaugeChartValueFormat>))]
654public class GaugeChartValueFormat(string value) : StringEnum(value, caseSensitive: false)
655{
656 public static readonly GaugeChartValueFormat Percentage = new("Percentage");
657 public bool IsPercentage => Percentage.Equals(Value);
658
659 public static readonly GaugeChartValueFormat Fraction = new("Fraction");
660 public bool IsFraction => Fraction.Equals(Value);
661}
662
663[JsonConverter(typeof(JsonConverter<CodeLanguage>))]
664public class CodeLanguage(string value) : StringEnum(value, caseSensitive: false)
665{
666 public static readonly CodeLanguage Bash = new("Bash");
667 public bool IsBash => Bash.Equals(Value);
668
669 public static readonly CodeLanguage C = new("C");
670 public bool IsC => C.Equals(Value);
671
672 public static readonly CodeLanguage Cpp = new("Cpp");
673 public bool IsCpp => Cpp.Equals(Value);
674
675 public static readonly CodeLanguage CSharp = new("CSharp");
676 public bool IsCSharp => CSharp.Equals(Value);
677
678 public static readonly CodeLanguage Css = new("Css");
679 public bool IsCss => Css.Equals(Value);
680
681 public static readonly CodeLanguage Dos = new("Dos");
682 public bool IsDos => Dos.Equals(Value);
683
684 public static readonly CodeLanguage Go = new("Go");
685 public bool IsGo => Go.Equals(Value);
686
687 public static readonly CodeLanguage Graphql = new("Graphql");
688 public bool IsGraphql => Graphql.Equals(Value);
689
690 public static readonly CodeLanguage Html = new("Html");
691 public bool IsHtml => Html.Equals(Value);
692
693 public static readonly CodeLanguage Java = new("Java");
694 public bool IsJava => Java.Equals(Value);
695
696 public static readonly CodeLanguage JavaScript = new("JavaScript");
697 public bool IsJavaScript => JavaScript.Equals(Value);
698
699 public static readonly CodeLanguage Json = new("Json");
700 public bool IsJson => Json.Equals(Value);
701
702 public static readonly CodeLanguage ObjectiveC = new("ObjectiveC");
703 public bool IsObjectiveC => ObjectiveC.Equals(Value);
704
705 public static readonly CodeLanguage Perl = new("Perl");
706 public bool IsPerl => Perl.Equals(Value);
707
708 public static readonly CodeLanguage Php = new("Php");
709 public bool IsPhp => Php.Equals(Value);
710
711 public static readonly CodeLanguage PlainText = new("PlainText");
712 public bool IsPlainText => PlainText.Equals(Value);
713
714 public static readonly CodeLanguage PowerShell = new("PowerShell");
715 public bool IsPowerShell => PowerShell.Equals(Value);
716
717 public static readonly CodeLanguage Python = new("Python");
718 public bool IsPython => Python.Equals(Value);
719
720 public static readonly CodeLanguage Sql = new("Sql");
721 public bool IsSql => Sql.Equals(Value);
722
723 public static readonly CodeLanguage TypeScript = new("TypeScript");
724 public bool IsTypeScript => TypeScript.Equals(Value);
725
726 public static readonly CodeLanguage VbNet = new("VbNet");
727 public bool IsVbNet => VbNet.Equals(Value);
728
729 public static readonly CodeLanguage Verilog = new("Verilog");
730 public bool IsVerilog => Verilog.Equals(Value);
731
732 public static readonly CodeLanguage Vhdl = new("Vhdl");
733 public bool IsVhdl => Vhdl.Equals(Value);
734
735 public static readonly CodeLanguage Xml = new("Xml");
736 public bool IsXml => Xml.Equals(Value);
737}
738
739[JsonConverter(typeof(JsonConverter<FallbackElement>))]
740public class FallbackElement(string value) : StringEnum(value, caseSensitive: false)
741{
742 public static readonly FallbackElement Drop = new("drop");
743 public bool IsDrop => Drop.Equals(Value);
744}
745
746[JsonConverter(typeof(JsonConverter<ImageSize>))]
747public class ImageSize(string value) : StringEnum(value, caseSensitive: false)
748{
749 public static readonly ImageSize Small = new("Small");
750 public bool IsSmall => Small.Equals(Value);
751
752 public static readonly ImageSize Medium = new("Medium");
753 public bool IsMedium => Medium.Equals(Value);
754
755 public static readonly ImageSize Large = new("Large");
756 public bool IsLarge => Large.Equals(Value);
757}
758
759public abstract class SerializableObject
760{
761 public override string ToString()
762 {
763 return JsonSerializer.Serialize(this, new JsonSerializerOptions()
764 {
765 WriteIndented = true,
766 DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
767 });
768 }
769}
770
771public abstract class CardElement : SerializableObject { }
772public abstract class Action : SerializableObject { }
773public abstract class ContainerLayout : SerializableObject { }
774
775/// <summary>
776/// An Adaptive Card, containing a free-form body of card elements, and an optional set of actions.
777/// </summary>
778public class AdaptiveCard : CardElement
779{
780 /// <summary>
781 /// Must be **AdaptiveCard**.
782 /// </summary>
783 [JsonPropertyName("type")]
784 public string Type { get; } = "AdaptiveCard";
785
786 /// <summary>
787 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
788 /// </summary>
789 [JsonPropertyName("id")]
790 public string? Id { get; set; }
791
792 /// <summary>
793 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
794 /// </summary>
795 [JsonPropertyName("requires")]
796 public HostCapabilities? Requires { get; set; }
797
798 /// <summary>
799 /// The locale associated with the element.
800 /// </summary>
801 [JsonPropertyName("lang")]
802 public string? Lang { get; set; }
803
804 /// <summary>
805 /// Controls the visibility of the element.
806 /// </summary>
807 [JsonPropertyName("isVisible")]
808 public bool? IsVisible { get; set; }
809
810 /// <summary>
811 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
812 /// </summary>
813 [JsonPropertyName("isSortKey")]
814 public bool? IsSortKey { get; set; }
815
816 /// <summary>
817 /// An Action that will be invoked when the element is tapped or clicked. Action.ShowCard is not supported.
818 /// </summary>
819 [JsonPropertyName("selectAction")]
820 public Action? SelectAction { get; set; }
821
822 /// <summary>
823 /// The style of the container. Container styles control the colors of the background, border and text inside the container, in such a way that contrast requirements are always met.
824 /// </summary>
825 [JsonPropertyName("style")]
826 public ContainerStyle? Style { get; set; }
827
828 /// <summary>
829 /// The layouts associated with the container. The container can dynamically switch from one layout to another as the card's width changes. See [Container layouts](https://adaptivecards.microsoft.com/?topic=container-layouts) for more details.
830 /// </summary>
831 [JsonPropertyName("layouts")]
832 public IList<ContainerLayout>? Layouts { get; set; }
833
834 /// <summary>
835 /// The minimum height, in pixels, of the container, in the `<number>px` format.
836 /// </summary>
837 [JsonPropertyName("minHeight")]
838 public string? MinHeight { get; set; }
839
840 /// <summary>
841 /// Defines the container's background image.
842 /// </summary>
843 [JsonPropertyName("backgroundImage")]
844 public IUnion<string, BackgroundImage>? BackgroundImage { get; set; }
845
846 /// <summary>
847 /// Controls how the container's content should be vertically aligned.
848 /// </summary>
849 [JsonPropertyName("verticalContentAlignment")]
850 public VerticalAlignment? VerticalContentAlignment { get; set; }
851
852 /// <summary>
853 /// Controls if the content of the card is to be rendered left-to-right or right-to-left.
854 /// </summary>
855 [JsonPropertyName("rtl")]
856 public bool? Rtl { get; set; }
857
858 /// <summary>
859 /// A URL to the Adaptive Card schema the card is authored against.
860 /// </summary>
861 [JsonPropertyName("$schema")]
862 public string? Schema { get; set; }
863
864 /// <summary>
865 /// The Adaptive Card schema version the card is authored against.
866 /// </summary>
867 [JsonPropertyName("version")]
868 public Version? Version { get; set; }
869
870 /// <summary>
871 /// The text that should be displayed if the client is not able to render the card.
872 /// </summary>
873 [JsonPropertyName("fallbackText")]
874 public string? FallbackText { get; set; }
875
876 /// <summary>
877 /// The text that should be spoken for the entire card.
878 /// </summary>
879 [JsonPropertyName("speak")]
880 public string? Speak { get; set; }
881
882 /// <summary>
883 /// Defines how the card can be refreshed by making a request to the target Bot.
884 /// </summary>
885 [JsonPropertyName("refresh")]
886 public RefreshDefinition? Refresh { get; set; }
887
888 /// <summary>
889 /// Defines authentication information to enable on-behalf-of single-sign-on or just-in-time OAuth. This information is used in conjunction with the refresh property and Action.Execute in general.
890 /// </summary>
891 [JsonPropertyName("authentication")]
892 public Authentication? Authentication { get; set; }
893
894 /// <summary>
895 /// Teams-specific metadata associated with the card.
896 /// </summary>
897 [JsonPropertyName("msTeams")]
898 public TeamsCardProperties? MsTeams { get; set; }
899
900 /// <summary>
901 /// Metadata associated with the card.
902 /// </summary>
903 [JsonPropertyName("metadata")]
904 public CardMetadata? Metadata { get; set; }
905
906 /// <summary>
907 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
908 /// </summary>
909 [JsonPropertyName("grid.area")]
910 public string? GridArea { get; set; }
911
912 /// <summary>
913 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
914 /// </summary>
915 [JsonPropertyName("fallback")]
916 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
917
918 /// <summary>
919 /// The body of the card, comprised of a list of elements displayed according to the layouts property. If the layouts property is not specified, a Layout.Stack is used.
920 /// </summary>
921 [JsonPropertyName("body")]
922 public IList<CardElement>? Body { get; set; }
923
924 /// <summary>
925 /// The card level actions, which always appear at the bottom of the card.
926 /// </summary>
927 [JsonPropertyName("actions")]
928 public IList<Action>? Actions { get; set; }
929
930 public AdaptiveCard(params IList<CardElement> body)
931 {
932 this.Body = body;
933 }
934
935 public AdaptiveCard WithId(string value)
936 {
937 this.Id = value;
938 return this;
939 }
940
941 public AdaptiveCard WithRequires(HostCapabilities value)
942 {
943 this.Requires = value;
944 return this;
945 }
946
947 public AdaptiveCard WithLang(string value)
948 {
949 this.Lang = value;
950 return this;
951 }
952
953 public AdaptiveCard WithIsVisible(bool value)
954 {
955 this.IsVisible = value;
956 return this;
957 }
958
959 public AdaptiveCard WithIsSortKey(bool value)
960 {
961 this.IsSortKey = value;
962 return this;
963 }
964
965 public AdaptiveCard WithSelectAction(Action value)
966 {
967 this.SelectAction = value;
968 return this;
969 }
970
971 public AdaptiveCard WithStyle(ContainerStyle value)
972 {
973 this.Style = value;
974 return this;
975 }
976
977 public AdaptiveCard WithLayouts(params IList<ContainerLayout> value)
978 {
979 this.Layouts = value;
980 return this;
981 }
982
983 public AdaptiveCard WithMinHeight(string value)
984 {
985 this.MinHeight = value;
986 return this;
987 }
988
989 public AdaptiveCard WithBackgroundImage(IUnion<string, BackgroundImage> value)
990 {
991 this.BackgroundImage = value;
992 return this;
993 }
994
995 public AdaptiveCard WithVerticalContentAlignment(VerticalAlignment value)
996 {
997 this.VerticalContentAlignment = value;
998 return this;
999 }
1000
1001 public AdaptiveCard WithRtl(bool value)
1002 {
1003 this.Rtl = value;
1004 return this;
1005 }
1006
1007 public AdaptiveCard WithSchema(string value)
1008 {
1009 this.Schema = value;
1010 return this;
1011 }
1012
1013 public AdaptiveCard WithVersion(Version value)
1014 {
1015 this.Version = value;
1016 return this;
1017 }
1018
1019 public AdaptiveCard WithFallbackText(string value)
1020 {
1021 this.FallbackText = value;
1022 return this;
1023 }
1024
1025 public AdaptiveCard WithSpeak(string value)
1026 {
1027 this.Speak = value;
1028 return this;
1029 }
1030
1031 public AdaptiveCard WithRefresh(RefreshDefinition value)
1032 {
1033 this.Refresh = value;
1034 return this;
1035 }
1036
1037 public AdaptiveCard WithAuthentication(Authentication value)
1038 {
1039 this.Authentication = value;
1040 return this;
1041 }
1042
1043 public AdaptiveCard WithMsTeams(TeamsCardProperties value)
1044 {
1045 this.MsTeams = value;
1046 return this;
1047 }
1048
1049 public AdaptiveCard WithMetadata(CardMetadata value)
1050 {
1051 this.Metadata = value;
1052 return this;
1053 }
1054
1055 public AdaptiveCard WithGridArea(string value)
1056 {
1057 this.GridArea = value;
1058 return this;
1059 }
1060
1061 public AdaptiveCard WithFallback(IUnion<CardElement, FallbackElement> value)
1062 {
1063 this.Fallback = value;
1064 return this;
1065 }
1066
1067 public AdaptiveCard WithBody(params IList<CardElement> value)
1068 {
1069 this.Body = value;
1070 return this;
1071 }
1072
1073 public AdaptiveCard WithActions(params IList<Action> value)
1074 {
1075 this.Actions = value;
1076 return this;
1077 }
1078}
1079
1080/// <summary>
1081/// Represents a list of versioned capabilities a host application must support.
1082/// </summary>
1083public class HostCapabilities : SerializableObject
1084{
1085 [JsonExtensionData]
1086 public IDictionary<string, object?> NonSchemaProperties { get; set; } = new Dictionary<string, object?>();
1087}
1088
1089/// <summary>
1090/// Gathers input values, merges them with the data property if specified, and sends them to the Bot via an Invoke activity. The Bot can respond synchronously and return an updated Adaptive Card to be displayed by the client. Action.Execute works in all Adaptive Card hosts.
1091/// </summary>
1092public class ExecuteAction : Action
1093{
1094 /// <summary>
1095 /// Must be **Action.Execute**.
1096 /// </summary>
1097 [JsonPropertyName("type")]
1098 public string Type { get; } = "Action.Execute";
1099
1100 /// <summary>
1101 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
1102 /// </summary>
1103 [JsonPropertyName("id")]
1104 public string? Id { get; set; }
1105
1106 /// <summary>
1107 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
1108 /// </summary>
1109 [JsonPropertyName("requires")]
1110 public HostCapabilities? Requires { get; set; }
1111
1112 /// <summary>
1113 /// The title of the action, as it appears on buttons.
1114 /// </summary>
1115 [JsonPropertyName("title")]
1116 public string? Title { get; set; }
1117
1118 /// <summary>
1119 /// A URL (or Base64-encoded Data URI) to a PNG, GIF, JPEG or SVG image to be displayed on the left of the action's title.
1120 ///
1121 /// `iconUrl` also accepts the `<icon-name>[,regular|filled]` format to display an icon from the vast [Adaptive Card icon catalog](https://adaptivecards.microsoft.com/?topic=icon-catalog) instead of an image.
1122 /// </summary>
1123 [JsonPropertyName("iconUrl")]
1124 public string? IconUrl { get; set; }
1125
1126 /// <summary>
1127 /// Control the style of the action, affecting its visual and spoken representations.
1128 /// </summary>
1129 [JsonPropertyName("style")]
1130 public ActionStyle? Style { get; set; }
1131
1132 /// <summary>
1133 /// Controls if the action is primary or secondary. Secondary actions appear in an overflow menu.
1134 /// </summary>
1135 [JsonPropertyName("mode")]
1136 public ActionMode? Mode { get; set; }
1137
1138 /// <summary>
1139 /// The tooltip text to display when the action is hovered over.
1140 /// </summary>
1141 [JsonPropertyName("tooltip")]
1142 public string? Tooltip { get; set; }
1143
1144 /// <summary>
1145 /// Controls the enabled state of the action. A disabled action cannot be clicked. If the action is represented as a button, the button's style will reflect this state.
1146 /// </summary>
1147 [JsonPropertyName("isEnabled")]
1148 public bool? IsEnabled { get; set; }
1149
1150 /// <summary>
1151 /// The data to send to the Bot when the action is executed. The data specified in the card payload will be sent back to the Bot as is, alongside the values of the inputs expressed as key/value pairs where the key is the Id of the input.
1152 /// </summary>
1153 [JsonPropertyName("data")]
1154 public SubmitActionData? Data { get; set; }
1155
1156 /// <summary>
1157 /// The Ids of the inputs associated with the Action.Submit. When the action is executed, the values of the associated inputs are sent to the Bot. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
1158 /// </summary>
1159 [JsonPropertyName("associatedInputs")]
1160 public AssociatedInputs? AssociatedInputs { get; set; }
1161
1162 /// <summary>
1163 /// Controls if the action is enabled only if at least one required input has been filled by the user.
1164 /// </summary>
1165 [JsonPropertyName("conditionallyEnabled")]
1166 public bool? ConditionallyEnabled { get; set; }
1167
1168 /// <summary>
1169 /// The verb of the action.
1170 /// </summary>
1171 [JsonPropertyName("verb")]
1172 public string? Verb { get; set; }
1173
1174 /// <summary>
1175 /// An alternate action to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
1176 /// </summary>
1177 [JsonPropertyName("fallback")]
1178 public IUnion<Action, FallbackAction>? Fallback { get; set; }
1179
1180 public ExecuteAction WithId(string value)
1181 {
1182 this.Id = value;
1183 return this;
1184 }
1185
1186 public ExecuteAction WithRequires(HostCapabilities value)
1187 {
1188 this.Requires = value;
1189 return this;
1190 }
1191
1192 public ExecuteAction WithTitle(string value)
1193 {
1194 this.Title = value;
1195 return this;
1196 }
1197
1198 public ExecuteAction WithIconUrl(string value)
1199 {
1200 this.IconUrl = value;
1201 return this;
1202 }
1203
1204 public ExecuteAction WithStyle(ActionStyle value)
1205 {
1206 this.Style = value;
1207 return this;
1208 }
1209
1210 public ExecuteAction WithMode(ActionMode value)
1211 {
1212 this.Mode = value;
1213 return this;
1214 }
1215
1216 public ExecuteAction WithTooltip(string value)
1217 {
1218 this.Tooltip = value;
1219 return this;
1220 }
1221
1222 public ExecuteAction WithIsEnabled(bool value)
1223 {
1224 this.IsEnabled = value;
1225 return this;
1226 }
1227
1228 public ExecuteAction WithData(SubmitActionData value)
1229 {
1230 this.Data = value;
1231 return this;
1232 }
1233
1234 public ExecuteAction WithAssociatedInputs(AssociatedInputs value)
1235 {
1236 this.AssociatedInputs = value;
1237 return this;
1238 }
1239
1240 public ExecuteAction WithConditionallyEnabled(bool value)
1241 {
1242 this.ConditionallyEnabled = value;
1243 return this;
1244 }
1245
1246 public ExecuteAction WithVerb(string value)
1247 {
1248 this.Verb = value;
1249 return this;
1250 }
1251
1252 public ExecuteAction WithFallback(IUnion<Action, FallbackAction> value)
1253 {
1254 this.Fallback = value;
1255 return this;
1256 }
1257}
1258
1259/// <summary>
1260/// Represents the data of an Action.Submit.
1261/// </summary>
1262public class SubmitActionData : SerializableObject
1263{
1264 /// <summary>
1265 /// Defines the optional Teams-specific portion of the action's data.
1266 /// </summary>
1267 [JsonPropertyName("msTeams")]
1268 public object? MsTeams { get; set; }
1269
1270 public SubmitActionData WithMsTeams(object value)
1271 {
1272 this.MsTeams = value;
1273 return this;
1274 }
1275 [JsonExtensionData]
1276 public IDictionary<string, object?> NonSchemaProperties { get; set; } = new Dictionary<string, object?>();
1277}
1278
1279/// <summary>
1280/// Represents Teams-specific data in an Action.Submit to send an Instant Message back to the Bot.
1281/// </summary>
1282public class ImBackSubmitActionData : SerializableObject
1283{
1284 /// <summary>
1285 /// Must be **imBack**.
1286 /// </summary>
1287 [JsonPropertyName("type")]
1288 public string Type { get; } = "imBack";
1289
1290 /// <summary>
1291 /// The value that will be sent to the Bot.
1292 /// </summary>
1293 [JsonPropertyName("value")]
1294 public string? Value { get; set; }
1295
1296 public ImBackSubmitActionData(string value)
1297 {
1298 this.Value = value;
1299 }
1300
1301 public ImBackSubmitActionData WithValue(string value)
1302 {
1303 this.Value = value;
1304 return this;
1305 }
1306}
1307
1308/// <summary>
1309/// Represents Teams-specific data in an Action.Submit to make an Invoke request to the Bot.
1310/// </summary>
1311public class InvokeSubmitActionData : SerializableObject
1312{
1313 /// <summary>
1314 /// Must be **invoke**.
1315 /// </summary>
1316 [JsonPropertyName("type")]
1317 public string Type { get; } = "invoke";
1318
1319 /// <summary>
1320 /// The object to send to the Bot with the Invoke request.
1321 /// </summary>
1322 [JsonPropertyName("value")]
1323 public object? Value { get; set; }
1324
1325 public InvokeSubmitActionData(object value)
1326 {
1327 this.Value = value;
1328 }
1329
1330 public InvokeSubmitActionData WithValue(object value)
1331 {
1332 this.Value = value;
1333 return this;
1334 }
1335}
1336
1337/// <summary>
1338/// Represents Teams-specific data in an Action.Submit to send a message back to the Bot.
1339/// </summary>
1340public class MessageBackSubmitActionData : SerializableObject
1341{
1342 /// <summary>
1343 /// Must be **messageBack**.
1344 /// </summary>
1345 [JsonPropertyName("type")]
1346 public string Type { get; } = "messageBack";
1347
1348 /// <summary>
1349 /// The text that will be sent to the Bot.
1350 /// </summary>
1351 [JsonPropertyName("text")]
1352 public string? Text { get; set; }
1353
1354 /// <summary>
1355 /// The optional text that will be displayed as a new message in the conversation, as if the end-user sent it. `displayText` is not sent to the Bot.
1356 /// </summary>
1357 [JsonPropertyName("displayText")]
1358 public string? DisplayText { get; set; }
1359
1360 /// <summary>
1361 /// Optional additional value that will be sent to the Bot. For instance, `value` can encode specific context for the action, such as unique identifiers or a JSON object.
1362 /// </summary>
1363 [JsonPropertyName("value")]
1364 public string? Value { get; set; }
1365
1366 public MessageBackSubmitActionData WithText(string value)
1367 {
1368 this.Text = value;
1369 return this;
1370 }
1371
1372 public MessageBackSubmitActionData WithDisplayText(string value)
1373 {
1374 this.DisplayText = value;
1375 return this;
1376 }
1377
1378 public MessageBackSubmitActionData WithValue(string value)
1379 {
1380 this.Value = value;
1381 return this;
1382 }
1383}
1384
1385/// <summary>
1386/// Represents Teams-specific data in an Action.Submit to sign in a user.
1387/// </summary>
1388public class SigninSubmitActionData : SerializableObject
1389{
1390 /// <summary>
1391 /// Must be **signin**.
1392 /// </summary>
1393 [JsonPropertyName("type")]
1394 public string Type { get; } = "signin";
1395
1396 /// <summary>
1397 /// The URL to redirect the end-user for signing in.
1398 /// </summary>
1399 [JsonPropertyName("value")]
1400 public string? Value { get; set; }
1401
1402 public SigninSubmitActionData(string value)
1403 {
1404 this.Value = value;
1405 }
1406
1407 public SigninSubmitActionData WithValue(string value)
1408 {
1409 this.Value = value;
1410 return this;
1411 }
1412}
1413
1414/// <summary>
1415/// Represents Teams-specific data in an Action.Submit to open a task module.
1416/// </summary>
1417public class TaskFetchSubmitActionData : SerializableObject
1418{
1419 /// <summary>
1420 /// Must be **task/fetch**.
1421 /// </summary>
1422 [JsonPropertyName("type")]
1423 public string Type { get; } = "task/fetch";
1424
1425 /// <summary>
1426 /// The contextual data sent to the Bot to specify which task module to open.
1427 /// </summary>
1428 [JsonPropertyName("value")]
1429 public object? Value { get; set; }
1430
1431 public TaskFetchSubmitActionData(object value)
1432 {
1433 this.Value = value;
1434 }
1435
1436 public TaskFetchSubmitActionData WithValue(object value)
1437 {
1438 this.Value = value;
1439 return this;
1440 }
1441}
1442
1443/// <summary>
1444/// Gathers input values, merges them with the data property if specified, and sends them to the Bot via an Invoke activity. The Bot can only acknowledge is has received the request. Action.Submit only works in Teams.
1445/// </summary>
1446public class SubmitAction : Action
1447{
1448 /// <summary>
1449 /// Must be **Action.Submit**.
1450 /// </summary>
1451 [JsonPropertyName("type")]
1452 public string Type { get; } = "Action.Submit";
1453
1454 /// <summary>
1455 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
1456 /// </summary>
1457 [JsonPropertyName("id")]
1458 public string? Id { get; set; }
1459
1460 /// <summary>
1461 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
1462 /// </summary>
1463 [JsonPropertyName("requires")]
1464 public HostCapabilities? Requires { get; set; }
1465
1466 /// <summary>
1467 /// The title of the action, as it appears on buttons.
1468 /// </summary>
1469 [JsonPropertyName("title")]
1470 public string? Title { get; set; }
1471
1472 /// <summary>
1473 /// A URL (or Base64-encoded Data URI) to a PNG, GIF, JPEG or SVG image to be displayed on the left of the action's title.
1474 ///
1475 /// `iconUrl` also accepts the `<icon-name>[,regular|filled]` format to display an icon from the vast [Adaptive Card icon catalog](https://adaptivecards.microsoft.com/?topic=icon-catalog) instead of an image.
1476 /// </summary>
1477 [JsonPropertyName("iconUrl")]
1478 public string? IconUrl { get; set; }
1479
1480 /// <summary>
1481 /// Control the style of the action, affecting its visual and spoken representations.
1482 /// </summary>
1483 [JsonPropertyName("style")]
1484 public ActionStyle? Style { get; set; }
1485
1486 /// <summary>
1487 /// Controls if the action is primary or secondary. Secondary actions appear in an overflow menu.
1488 /// </summary>
1489 [JsonPropertyName("mode")]
1490 public ActionMode? Mode { get; set; }
1491
1492 /// <summary>
1493 /// The tooltip text to display when the action is hovered over.
1494 /// </summary>
1495 [JsonPropertyName("tooltip")]
1496 public string? Tooltip { get; set; }
1497
1498 /// <summary>
1499 /// Controls the enabled state of the action. A disabled action cannot be clicked. If the action is represented as a button, the button's style will reflect this state.
1500 /// </summary>
1501 [JsonPropertyName("isEnabled")]
1502 public bool? IsEnabled { get; set; }
1503
1504 /// <summary>
1505 /// The data to send to the Bot when the action is executed. The data specified in the card payload will be sent back to the Bot as is, alongside the values of the inputs expressed as key/value pairs where the key is the Id of the input.
1506 /// </summary>
1507 [JsonPropertyName("data")]
1508 public SubmitActionData? Data { get; set; }
1509
1510 /// <summary>
1511 /// The Ids of the inputs associated with the Action.Submit. When the action is executed, the values of the associated inputs are sent to the Bot. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
1512 /// </summary>
1513 [JsonPropertyName("associatedInputs")]
1514 public AssociatedInputs? AssociatedInputs { get; set; }
1515
1516 /// <summary>
1517 /// Controls if the action is enabled only if at least one required input has been filled by the user.
1518 /// </summary>
1519 [JsonPropertyName("conditionallyEnabled")]
1520 public bool? ConditionallyEnabled { get; set; }
1521
1522 /// <summary>
1523 /// Teams-specific metadata associated with the action.
1524 /// </summary>
1525 [JsonPropertyName("msTeams")]
1526 public TeamsSubmitActionProperties? MsTeams { get; set; }
1527
1528 /// <summary>
1529 /// An alternate action to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
1530 /// </summary>
1531 [JsonPropertyName("fallback")]
1532 public IUnion<Action, FallbackAction>? Fallback { get; set; }
1533
1534 public SubmitAction WithId(string value)
1535 {
1536 this.Id = value;
1537 return this;
1538 }
1539
1540 public SubmitAction WithRequires(HostCapabilities value)
1541 {
1542 this.Requires = value;
1543 return this;
1544 }
1545
1546 public SubmitAction WithTitle(string value)
1547 {
1548 this.Title = value;
1549 return this;
1550 }
1551
1552 public SubmitAction WithIconUrl(string value)
1553 {
1554 this.IconUrl = value;
1555 return this;
1556 }
1557
1558 public SubmitAction WithStyle(ActionStyle value)
1559 {
1560 this.Style = value;
1561 return this;
1562 }
1563
1564 public SubmitAction WithMode(ActionMode value)
1565 {
1566 this.Mode = value;
1567 return this;
1568 }
1569
1570 public SubmitAction WithTooltip(string value)
1571 {
1572 this.Tooltip = value;
1573 return this;
1574 }
1575
1576 public SubmitAction WithIsEnabled(bool value)
1577 {
1578 this.IsEnabled = value;
1579 return this;
1580 }
1581
1582 public SubmitAction WithData(SubmitActionData value)
1583 {
1584 this.Data = value;
1585 return this;
1586 }
1587
1588 public SubmitAction WithAssociatedInputs(AssociatedInputs value)
1589 {
1590 this.AssociatedInputs = value;
1591 return this;
1592 }
1593
1594 public SubmitAction WithConditionallyEnabled(bool value)
1595 {
1596 this.ConditionallyEnabled = value;
1597 return this;
1598 }
1599
1600 public SubmitAction WithMsTeams(TeamsSubmitActionProperties value)
1601 {
1602 this.MsTeams = value;
1603 return this;
1604 }
1605
1606 public SubmitAction WithFallback(IUnion<Action, FallbackAction> value)
1607 {
1608 this.Fallback = value;
1609 return this;
1610 }
1611}
1612
1613/// <summary>
1614/// Teams-specific properties associated with the action.
1615/// </summary>
1616public class TeamsSubmitActionProperties : SerializableObject
1617{
1618 /// <summary>
1619 /// Defines how feedback is provided to the end-user when the action is executed.
1620 /// </summary>
1621 [JsonPropertyName("feedback")]
1622 public TeamsSubmitActionFeedback? Feedback { get; set; }
1623
1624 public TeamsSubmitActionProperties WithFeedback(TeamsSubmitActionFeedback value)
1625 {
1626 this.Feedback = value;
1627 return this;
1628 }
1629}
1630
1631/// <summary>
1632/// Represents feedback options for an [Action.Submit](https://adaptivecards.microsoft.com/?topic=Action.Submit).
1633/// </summary>
1634public class TeamsSubmitActionFeedback : SerializableObject
1635{
1636 /// <summary>
1637 /// Defines if a feedback message should be displayed after the action is executed.
1638 /// </summary>
1639 [JsonPropertyName("hide")]
1640 public bool? Hide { get; set; }
1641
1642 public TeamsSubmitActionFeedback WithHide(bool value)
1643 {
1644 this.Hide = value;
1645 return this;
1646 }
1647}
1648
1649/// <summary>
1650/// Opens the provided URL in either a separate browser tab or within the host application.
1651/// </summary>
1652public class OpenUrlAction : Action
1653{
1654 /// <summary>
1655 /// Must be **Action.OpenUrl**.
1656 /// </summary>
1657 [JsonPropertyName("type")]
1658 public string Type { get; } = "Action.OpenUrl";
1659
1660 /// <summary>
1661 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
1662 /// </summary>
1663 [JsonPropertyName("id")]
1664 public string? Id { get; set; }
1665
1666 /// <summary>
1667 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
1668 /// </summary>
1669 [JsonPropertyName("requires")]
1670 public HostCapabilities? Requires { get; set; }
1671
1672 /// <summary>
1673 /// The title of the action, as it appears on buttons.
1674 /// </summary>
1675 [JsonPropertyName("title")]
1676 public string? Title { get; set; }
1677
1678 /// <summary>
1679 /// A URL (or Base64-encoded Data URI) to a PNG, GIF, JPEG or SVG image to be displayed on the left of the action's title.
1680 ///
1681 /// `iconUrl` also accepts the `<icon-name>[,regular|filled]` format to display an icon from the vast [Adaptive Card icon catalog](https://adaptivecards.microsoft.com/?topic=icon-catalog) instead of an image.
1682 /// </summary>
1683 [JsonPropertyName("iconUrl")]
1684 public string? IconUrl { get; set; }
1685
1686 /// <summary>
1687 /// Control the style of the action, affecting its visual and spoken representations.
1688 /// </summary>
1689 [JsonPropertyName("style")]
1690 public ActionStyle? Style { get; set; }
1691
1692 /// <summary>
1693 /// Controls if the action is primary or secondary. Secondary actions appear in an overflow menu.
1694 /// </summary>
1695 [JsonPropertyName("mode")]
1696 public ActionMode? Mode { get; set; }
1697
1698 /// <summary>
1699 /// The tooltip text to display when the action is hovered over.
1700 /// </summary>
1701 [JsonPropertyName("tooltip")]
1702 public string? Tooltip { get; set; }
1703
1704 /// <summary>
1705 /// Controls the enabled state of the action. A disabled action cannot be clicked. If the action is represented as a button, the button's style will reflect this state.
1706 /// </summary>
1707 [JsonPropertyName("isEnabled")]
1708 public bool? IsEnabled { get; set; }
1709
1710 /// <summary>
1711 /// The URL to open.
1712 /// </summary>
1713 [JsonPropertyName("url")]
1714 public string? Url { get; set; }
1715
1716 /// <summary>
1717 /// An alternate action to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
1718 /// </summary>
1719 [JsonPropertyName("fallback")]
1720 public IUnion<Action, FallbackAction>? Fallback { get; set; }
1721
1722 public OpenUrlAction(string url)
1723 {
1724 this.Url = url;
1725 }
1726
1727 public OpenUrlAction WithId(string value)
1728 {
1729 this.Id = value;
1730 return this;
1731 }
1732
1733 public OpenUrlAction WithRequires(HostCapabilities value)
1734 {
1735 this.Requires = value;
1736 return this;
1737 }
1738
1739 public OpenUrlAction WithTitle(string value)
1740 {
1741 this.Title = value;
1742 return this;
1743 }
1744
1745 public OpenUrlAction WithIconUrl(string value)
1746 {
1747 this.IconUrl = value;
1748 return this;
1749 }
1750
1751 public OpenUrlAction WithStyle(ActionStyle value)
1752 {
1753 this.Style = value;
1754 return this;
1755 }
1756
1757 public OpenUrlAction WithMode(ActionMode value)
1758 {
1759 this.Mode = value;
1760 return this;
1761 }
1762
1763 public OpenUrlAction WithTooltip(string value)
1764 {
1765 this.Tooltip = value;
1766 return this;
1767 }
1768
1769 public OpenUrlAction WithIsEnabled(bool value)
1770 {
1771 this.IsEnabled = value;
1772 return this;
1773 }
1774
1775 public OpenUrlAction WithUrl(string value)
1776 {
1777 this.Url = value;
1778 return this;
1779 }
1780
1781 public OpenUrlAction WithFallback(IUnion<Action, FallbackAction> value)
1782 {
1783 this.Fallback = value;
1784 return this;
1785 }
1786}
1787
1788/// <summary>
1789/// Toggles the visibility of a set of elements. Action.ToggleVisibility is useful for creating "Show more" type UI patterns.
1790/// </summary>
1791public class ToggleVisibilityAction : Action
1792{
1793 /// <summary>
1794 /// Must be **Action.ToggleVisibility**.
1795 /// </summary>
1796 [JsonPropertyName("type")]
1797 public string Type { get; } = "Action.ToggleVisibility";
1798
1799 /// <summary>
1800 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
1801 /// </summary>
1802 [JsonPropertyName("id")]
1803 public string? Id { get; set; }
1804
1805 /// <summary>
1806 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
1807 /// </summary>
1808 [JsonPropertyName("requires")]
1809 public HostCapabilities? Requires { get; set; }
1810
1811 /// <summary>
1812 /// The title of the action, as it appears on buttons.
1813 /// </summary>
1814 [JsonPropertyName("title")]
1815 public string? Title { get; set; }
1816
1817 /// <summary>
1818 /// A URL (or Base64-encoded Data URI) to a PNG, GIF, JPEG or SVG image to be displayed on the left of the action's title.
1819 ///
1820 /// `iconUrl` also accepts the `<icon-name>[,regular|filled]` format to display an icon from the vast [Adaptive Card icon catalog](https://adaptivecards.microsoft.com/?topic=icon-catalog) instead of an image.
1821 /// </summary>
1822 [JsonPropertyName("iconUrl")]
1823 public string? IconUrl { get; set; }
1824
1825 /// <summary>
1826 /// Control the style of the action, affecting its visual and spoken representations.
1827 /// </summary>
1828 [JsonPropertyName("style")]
1829 public ActionStyle? Style { get; set; }
1830
1831 /// <summary>
1832 /// Controls if the action is primary or secondary. Secondary actions appear in an overflow menu.
1833 /// </summary>
1834 [JsonPropertyName("mode")]
1835 public ActionMode? Mode { get; set; }
1836
1837 /// <summary>
1838 /// The tooltip text to display when the action is hovered over.
1839 /// </summary>
1840 [JsonPropertyName("tooltip")]
1841 public string? Tooltip { get; set; }
1842
1843 /// <summary>
1844 /// Controls the enabled state of the action. A disabled action cannot be clicked. If the action is represented as a button, the button's style will reflect this state.
1845 /// </summary>
1846 [JsonPropertyName("isEnabled")]
1847 public bool? IsEnabled { get; set; }
1848
1849 /// <summary>
1850 /// The Ids of the elements to toggle the visibility of.
1851 /// </summary>
1852 [JsonPropertyName("targetElements")]
1853 public IUnion<IList<string>, IList<TargetElement>>? TargetElements { get; set; }
1854
1855 /// <summary>
1856 /// An alternate action to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
1857 /// </summary>
1858 [JsonPropertyName("fallback")]
1859 public IUnion<Action, FallbackAction>? Fallback { get; set; }
1860
1861 public ToggleVisibilityAction WithId(string value)
1862 {
1863 this.Id = value;
1864 return this;
1865 }
1866
1867 public ToggleVisibilityAction WithRequires(HostCapabilities value)
1868 {
1869 this.Requires = value;
1870 return this;
1871 }
1872
1873 public ToggleVisibilityAction WithTitle(string value)
1874 {
1875 this.Title = value;
1876 return this;
1877 }
1878
1879 public ToggleVisibilityAction WithIconUrl(string value)
1880 {
1881 this.IconUrl = value;
1882 return this;
1883 }
1884
1885 public ToggleVisibilityAction WithStyle(ActionStyle value)
1886 {
1887 this.Style = value;
1888 return this;
1889 }
1890
1891 public ToggleVisibilityAction WithMode(ActionMode value)
1892 {
1893 this.Mode = value;
1894 return this;
1895 }
1896
1897 public ToggleVisibilityAction WithTooltip(string value)
1898 {
1899 this.Tooltip = value;
1900 return this;
1901 }
1902
1903 public ToggleVisibilityAction WithIsEnabled(bool value)
1904 {
1905 this.IsEnabled = value;
1906 return this;
1907 }
1908
1909 public ToggleVisibilityAction WithTargetElements(IUnion<IList<string>, IList<TargetElement>> value)
1910 {
1911 this.TargetElements = value;
1912 return this;
1913 }
1914
1915 public ToggleVisibilityAction WithFallback(IUnion<Action, FallbackAction> value)
1916 {
1917 this.Fallback = value;
1918 return this;
1919 }
1920}
1921
1922/// <summary>
1923/// Defines a target element in an Action.ToggleVisibility.
1924/// </summary>
1925public class TargetElement : SerializableObject
1926{
1927 /// <summary>
1928 /// The Id of the element to change the visibility of.
1929 /// </summary>
1930 [JsonPropertyName("elementId")]
1931 public string? ElementId { get; set; }
1932
1933 /// <summary>
1934 /// The new visibility state of the element.
1935 /// </summary>
1936 [JsonPropertyName("isVisible")]
1937 public bool? IsVisible { get; set; }
1938
1939 public TargetElement WithElementId(string value)
1940 {
1941 this.ElementId = value;
1942 return this;
1943 }
1944
1945 public TargetElement WithIsVisible(bool value)
1946 {
1947 this.IsVisible = value;
1948 return this;
1949 }
1950}
1951
1952/// <summary>
1953/// Expands or collapses an embedded card within the main card.
1954/// </summary>
1955public class ShowCardAction : Action
1956{
1957 /// <summary>
1958 /// Must be **Action.ShowCard**.
1959 /// </summary>
1960 [JsonPropertyName("type")]
1961 public string Type { get; } = "Action.ShowCard";
1962
1963 /// <summary>
1964 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
1965 /// </summary>
1966 [JsonPropertyName("id")]
1967 public string? Id { get; set; }
1968
1969 /// <summary>
1970 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
1971 /// </summary>
1972 [JsonPropertyName("requires")]
1973 public HostCapabilities? Requires { get; set; }
1974
1975 /// <summary>
1976 /// The title of the action, as it appears on buttons.
1977 /// </summary>
1978 [JsonPropertyName("title")]
1979 public string? Title { get; set; }
1980
1981 /// <summary>
1982 /// A URL (or Base64-encoded Data URI) to a PNG, GIF, JPEG or SVG image to be displayed on the left of the action's title.
1983 ///
1984 /// `iconUrl` also accepts the `<icon-name>[,regular|filled]` format to display an icon from the vast [Adaptive Card icon catalog](https://adaptivecards.microsoft.com/?topic=icon-catalog) instead of an image.
1985 /// </summary>
1986 [JsonPropertyName("iconUrl")]
1987 public string? IconUrl { get; set; }
1988
1989 /// <summary>
1990 /// Control the style of the action, affecting its visual and spoken representations.
1991 /// </summary>
1992 [JsonPropertyName("style")]
1993 public ActionStyle? Style { get; set; }
1994
1995 /// <summary>
1996 /// Controls if the action is primary or secondary. Secondary actions appear in an overflow menu.
1997 /// </summary>
1998 [JsonPropertyName("mode")]
1999 public ActionMode? Mode { get; set; }
2000
2001 /// <summary>
2002 /// The tooltip text to display when the action is hovered over.
2003 /// </summary>
2004 [JsonPropertyName("tooltip")]
2005 public string? Tooltip { get; set; }
2006
2007 /// <summary>
2008 /// Controls the enabled state of the action. A disabled action cannot be clicked. If the action is represented as a button, the button's style will reflect this state.
2009 /// </summary>
2010 [JsonPropertyName("isEnabled")]
2011 public bool? IsEnabled { get; set; }
2012
2013 /// <summary>
2014 /// An alternate action to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
2015 /// </summary>
2016 [JsonPropertyName("fallback")]
2017 public IUnion<Action, FallbackAction>? Fallback { get; set; }
2018
2019 /// <summary>
2020 /// The card that should be displayed when the action is executed.
2021 /// </summary>
2022 [JsonPropertyName("card")]
2023 public AdaptiveCard? Card { get; set; }
2024
2025 public ShowCardAction WithId(string value)
2026 {
2027 this.Id = value;
2028 return this;
2029 }
2030
2031 public ShowCardAction WithRequires(HostCapabilities value)
2032 {
2033 this.Requires = value;
2034 return this;
2035 }
2036
2037 public ShowCardAction WithTitle(string value)
2038 {
2039 this.Title = value;
2040 return this;
2041 }
2042
2043 public ShowCardAction WithIconUrl(string value)
2044 {
2045 this.IconUrl = value;
2046 return this;
2047 }
2048
2049 public ShowCardAction WithStyle(ActionStyle value)
2050 {
2051 this.Style = value;
2052 return this;
2053 }
2054
2055 public ShowCardAction WithMode(ActionMode value)
2056 {
2057 this.Mode = value;
2058 return this;
2059 }
2060
2061 public ShowCardAction WithTooltip(string value)
2062 {
2063 this.Tooltip = value;
2064 return this;
2065 }
2066
2067 public ShowCardAction WithIsEnabled(bool value)
2068 {
2069 this.IsEnabled = value;
2070 return this;
2071 }
2072
2073 public ShowCardAction WithFallback(IUnion<Action, FallbackAction> value)
2074 {
2075 this.Fallback = value;
2076 return this;
2077 }
2078
2079 public ShowCardAction WithCard(AdaptiveCard value)
2080 {
2081 this.Card = value;
2082 return this;
2083 }
2084}
2085
2086/// <summary>
2087/// Resets the values of the inputs in the card.
2088/// </summary>
2089public class ResetInputsAction : Action
2090{
2091 /// <summary>
2092 /// Must be **Action.ResetInputs**.
2093 /// </summary>
2094 [JsonPropertyName("type")]
2095 public string Type { get; } = "Action.ResetInputs";
2096
2097 /// <summary>
2098 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
2099 /// </summary>
2100 [JsonPropertyName("id")]
2101 public string? Id { get; set; }
2102
2103 /// <summary>
2104 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
2105 /// </summary>
2106 [JsonPropertyName("requires")]
2107 public HostCapabilities? Requires { get; set; }
2108
2109 /// <summary>
2110 /// The title of the action, as it appears on buttons.
2111 /// </summary>
2112 [JsonPropertyName("title")]
2113 public string? Title { get; set; }
2114
2115 /// <summary>
2116 /// A URL (or Base64-encoded Data URI) to a PNG, GIF, JPEG or SVG image to be displayed on the left of the action's title.
2117 ///
2118 /// `iconUrl` also accepts the `<icon-name>[,regular|filled]` format to display an icon from the vast [Adaptive Card icon catalog](https://adaptivecards.microsoft.com/?topic=icon-catalog) instead of an image.
2119 /// </summary>
2120 [JsonPropertyName("iconUrl")]
2121 public string? IconUrl { get; set; }
2122
2123 /// <summary>
2124 /// Control the style of the action, affecting its visual and spoken representations.
2125 /// </summary>
2126 [JsonPropertyName("style")]
2127 public ActionStyle? Style { get; set; }
2128
2129 /// <summary>
2130 /// Controls if the action is primary or secondary. Secondary actions appear in an overflow menu.
2131 /// </summary>
2132 [JsonPropertyName("mode")]
2133 public ActionMode? Mode { get; set; }
2134
2135 /// <summary>
2136 /// The tooltip text to display when the action is hovered over.
2137 /// </summary>
2138 [JsonPropertyName("tooltip")]
2139 public string? Tooltip { get; set; }
2140
2141 /// <summary>
2142 /// Controls the enabled state of the action. A disabled action cannot be clicked. If the action is represented as a button, the button's style will reflect this state.
2143 /// </summary>
2144 [JsonPropertyName("isEnabled")]
2145 public bool? IsEnabled { get; set; }
2146
2147 /// <summary>
2148 /// The Ids of the inputs that should be reset.
2149 /// </summary>
2150 [JsonPropertyName("targetInputIds")]
2151 public IList<string>? TargetInputIds { get; set; }
2152
2153 /// <summary>
2154 /// An alternate action to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
2155 /// </summary>
2156 [JsonPropertyName("fallback")]
2157 public IUnion<Action, FallbackAction>? Fallback { get; set; }
2158
2159 public ResetInputsAction WithId(string value)
2160 {
2161 this.Id = value;
2162 return this;
2163 }
2164
2165 public ResetInputsAction WithRequires(HostCapabilities value)
2166 {
2167 this.Requires = value;
2168 return this;
2169 }
2170
2171 public ResetInputsAction WithTitle(string value)
2172 {
2173 this.Title = value;
2174 return this;
2175 }
2176
2177 public ResetInputsAction WithIconUrl(string value)
2178 {
2179 this.IconUrl = value;
2180 return this;
2181 }
2182
2183 public ResetInputsAction WithStyle(ActionStyle value)
2184 {
2185 this.Style = value;
2186 return this;
2187 }
2188
2189 public ResetInputsAction WithMode(ActionMode value)
2190 {
2191 this.Mode = value;
2192 return this;
2193 }
2194
2195 public ResetInputsAction WithTooltip(string value)
2196 {
2197 this.Tooltip = value;
2198 return this;
2199 }
2200
2201 public ResetInputsAction WithIsEnabled(bool value)
2202 {
2203 this.IsEnabled = value;
2204 return this;
2205 }
2206
2207 public ResetInputsAction WithTargetInputIds(params IList<string> value)
2208 {
2209 this.TargetInputIds = value;
2210 return this;
2211 }
2212
2213 public ResetInputsAction WithFallback(IUnion<Action, FallbackAction> value)
2214 {
2215 this.Fallback = value;
2216 return this;
2217 }
2218}
2219
2220/// <summary>
2221/// A layout that stacks elements on top of each other. Layout.Stack is the default layout used by AdaptiveCard and all containers.
2222/// </summary>
2223public class StackLayout : ContainerLayout
2224{
2225 /// <summary>
2226 /// Must be **Layout.Stack**.
2227 /// </summary>
2228 [JsonPropertyName("type")]
2229 public string Type { get; } = "Layout.Stack";
2230
2231 /// <summary>
2232 /// Controls for which card width the layout should be used.
2233 /// </summary>
2234 [JsonPropertyName("targetWidth")]
2235 public TargetWidth? TargetWidth { get; set; }
2236
2237 public StackLayout WithTargetWidth(TargetWidth value)
2238 {
2239 this.TargetWidth = value;
2240 return this;
2241 }
2242}
2243
2244/// <summary>
2245/// A layout that spreads elements horizontally and wraps them across multiple rows, as needed.
2246/// </summary>
2247public class FlowLayout : ContainerLayout
2248{
2249 /// <summary>
2250 /// Must be **Layout.Flow**.
2251 /// </summary>
2252 [JsonPropertyName("type")]
2253 public string Type { get; } = "Layout.Flow";
2254
2255 /// <summary>
2256 /// Controls for which card width the layout should be used.
2257 /// </summary>
2258 [JsonPropertyName("targetWidth")]
2259 public TargetWidth? TargetWidth { get; set; }
2260
2261 /// <summary>
2262 /// Controls how the content of the container should be horizontally aligned.
2263 /// </summary>
2264 [JsonPropertyName("horizontalItemsAlignment")]
2265 public HorizontalAlignment? HorizontalItemsAlignment { get; set; }
2266
2267 /// <summary>
2268 /// Controls how the content of the container should be vertically aligned.
2269 /// </summary>
2270 [JsonPropertyName("verticalItemsAlignment")]
2271 public VerticalAlignment? VerticalItemsAlignment { get; set; }
2272
2273 /// <summary>
2274 /// Controls how item should fit inside the container.
2275 /// </summary>
2276 [JsonPropertyName("itemFit")]
2277 public FlowLayoutItemFit? ItemFit { get; set; }
2278
2279 /// <summary>
2280 /// The minimum width, in pixels, of each item, in the `<number>px` format. Should not be used if itemWidth is set.
2281 /// </summary>
2282 [JsonPropertyName("minItemWidth")]
2283 public string? MinItemWidth { get; set; }
2284
2285 /// <summary>
2286 /// The maximum width, in pixels, of each item, in the `<number>px` format. Should not be used if itemWidth is set.
2287 /// </summary>
2288 [JsonPropertyName("maxItemWidth")]
2289 public string? MaxItemWidth { get; set; }
2290
2291 /// <summary>
2292 /// The width, in pixels, of each item, in the `<number>px` format. Should not be used if maxItemWidth and/or minItemWidth are set.
2293 /// </summary>
2294 [JsonPropertyName("itemWidth")]
2295 public string? ItemWidth { get; set; }
2296
2297 /// <summary>
2298 /// The space between items.
2299 /// </summary>
2300 [JsonPropertyName("columnSpacing")]
2301 public Spacing? ColumnSpacing { get; set; }
2302
2303 /// <summary>
2304 /// The space between rows of items.
2305 /// </summary>
2306 [JsonPropertyName("rowSpacing")]
2307 public Spacing? RowSpacing { get; set; }
2308
2309 public FlowLayout WithTargetWidth(TargetWidth value)
2310 {
2311 this.TargetWidth = value;
2312 return this;
2313 }
2314
2315 public FlowLayout WithHorizontalItemsAlignment(HorizontalAlignment value)
2316 {
2317 this.HorizontalItemsAlignment = value;
2318 return this;
2319 }
2320
2321 public FlowLayout WithVerticalItemsAlignment(VerticalAlignment value)
2322 {
2323 this.VerticalItemsAlignment = value;
2324 return this;
2325 }
2326
2327 public FlowLayout WithItemFit(FlowLayoutItemFit value)
2328 {
2329 this.ItemFit = value;
2330 return this;
2331 }
2332
2333 public FlowLayout WithMinItemWidth(string value)
2334 {
2335 this.MinItemWidth = value;
2336 return this;
2337 }
2338
2339 public FlowLayout WithMaxItemWidth(string value)
2340 {
2341 this.MaxItemWidth = value;
2342 return this;
2343 }
2344
2345 public FlowLayout WithItemWidth(string value)
2346 {
2347 this.ItemWidth = value;
2348 return this;
2349 }
2350
2351 public FlowLayout WithColumnSpacing(Spacing value)
2352 {
2353 this.ColumnSpacing = value;
2354 return this;
2355 }
2356
2357 public FlowLayout WithRowSpacing(Spacing value)
2358 {
2359 this.RowSpacing = value;
2360 return this;
2361 }
2362}
2363
2364/// <summary>
2365/// A layout that divides a container into named areas into which elements can be placed.
2366/// </summary>
2367public class AreaGridLayout : ContainerLayout
2368{
2369 /// <summary>
2370 /// Must be **Layout.AreaGrid**.
2371 /// </summary>
2372 [JsonPropertyName("type")]
2373 public string Type { get; } = "Layout.AreaGrid";
2374
2375 /// <summary>
2376 /// Controls for which card width the layout should be used.
2377 /// </summary>
2378 [JsonPropertyName("targetWidth")]
2379 public TargetWidth? TargetWidth { get; set; }
2380
2381 /// <summary>
2382 /// The columns in the grid layout, defined as a percentage of the available width or in pixels using the `<number>px` format.
2383 /// </summary>
2384 [JsonPropertyName("columns")]
2385 public IUnion<IList<float>, IList<string>>? Columns { get; set; }
2386
2387 /// <summary>
2388 /// The areas in the grid layout.
2389 /// </summary>
2390 [JsonPropertyName("areas")]
2391 public IList<GridArea>? Areas { get; set; }
2392
2393 /// <summary>
2394 /// The space between columns.
2395 /// </summary>
2396 [JsonPropertyName("columnSpacing")]
2397 public Spacing? ColumnSpacing { get; set; }
2398
2399 /// <summary>
2400 /// The space between rows.
2401 /// </summary>
2402 [JsonPropertyName("rowSpacing")]
2403 public Spacing? RowSpacing { get; set; }
2404
2405 public AreaGridLayout WithTargetWidth(TargetWidth value)
2406 {
2407 this.TargetWidth = value;
2408 return this;
2409 }
2410
2411 public AreaGridLayout WithColumns(IUnion<IList<float>, IList<string>> value)
2412 {
2413 this.Columns = value;
2414 return this;
2415 }
2416
2417 public AreaGridLayout WithAreas(params IList<GridArea> value)
2418 {
2419 this.Areas = value;
2420 return this;
2421 }
2422
2423 public AreaGridLayout WithColumnSpacing(Spacing value)
2424 {
2425 this.ColumnSpacing = value;
2426 return this;
2427 }
2428
2429 public AreaGridLayout WithRowSpacing(Spacing value)
2430 {
2431 this.RowSpacing = value;
2432 return this;
2433 }
2434}
2435
2436/// <summary>
2437/// Defines an area in a Layout.AreaGrid layout.
2438/// </summary>
2439public class GridArea : SerializableObject
2440{
2441 /// <summary>
2442 /// The name of the area. To place an element in this area, set its `grid.area` property to match the name of the area.
2443 /// </summary>
2444 [JsonPropertyName("name")]
2445 public string? Name { get; set; }
2446
2447 /// <summary>
2448 /// The start column index of the area. Column indices start at 1.
2449 /// </summary>
2450 [JsonPropertyName("column")]
2451 public float? Column { get; set; }
2452
2453 /// <summary>
2454 /// Defines how many columns the area should span.
2455 /// </summary>
2456 [JsonPropertyName("columnSpan")]
2457 public float? ColumnSpan { get; set; }
2458
2459 /// <summary>
2460 /// The start row index of the area. Row indices start at 1.
2461 /// </summary>
2462 [JsonPropertyName("row")]
2463 public float? Row { get; set; }
2464
2465 /// <summary>
2466 /// Defines how many rows the area should span.
2467 /// </summary>
2468 [JsonPropertyName("rowSpan")]
2469 public float? RowSpan { get; set; }
2470
2471 public GridArea WithName(string value)
2472 {
2473 this.Name = value;
2474 return this;
2475 }
2476
2477 public GridArea WithColumn(float value)
2478 {
2479 this.Column = value;
2480 return this;
2481 }
2482
2483 public GridArea WithColumnSpan(float value)
2484 {
2485 this.ColumnSpan = value;
2486 return this;
2487 }
2488
2489 public GridArea WithRow(float value)
2490 {
2491 this.Row = value;
2492 return this;
2493 }
2494
2495 public GridArea WithRowSpan(float value)
2496 {
2497 this.RowSpan = value;
2498 return this;
2499 }
2500}
2501
2502/// <summary>
2503/// Defines a container's background image and the way it should be rendered.
2504/// </summary>
2505public class BackgroundImage : SerializableObject
2506{
2507 /// <summary>
2508 /// The URL (or Base64-encoded Data URI) of the image. Acceptable formats are PNG, JPEG, GIF and SVG.
2509 /// </summary>
2510 [JsonPropertyName("url")]
2511 public string? Url { get; set; }
2512
2513 /// <summary>
2514 /// Controls how the image should fill the area.
2515 /// </summary>
2516 [JsonPropertyName("fillMode")]
2517 public FillMode? FillMode { get; set; }
2518
2519 /// <summary>
2520 /// Controls how the image should be aligned if it must be cropped or if using repeat fill mode.
2521 /// </summary>
2522 [JsonPropertyName("horizontalAlignment")]
2523 public HorizontalAlignment? HorizontalAlignment { get; set; }
2524
2525 /// <summary>
2526 /// Controls how the image should be aligned if it must be cropped or if using repeat fill mode.
2527 /// </summary>
2528 [JsonPropertyName("verticalAlignment")]
2529 public VerticalAlignment? VerticalAlignment { get; set; }
2530
2531 public BackgroundImage WithUrl(string value)
2532 {
2533 this.Url = value;
2534 return this;
2535 }
2536
2537 public BackgroundImage WithFillMode(FillMode value)
2538 {
2539 this.FillMode = value;
2540 return this;
2541 }
2542
2543 public BackgroundImage WithHorizontalAlignment(HorizontalAlignment value)
2544 {
2545 this.HorizontalAlignment = value;
2546 return this;
2547 }
2548
2549 public BackgroundImage WithVerticalAlignment(VerticalAlignment value)
2550 {
2551 this.VerticalAlignment = value;
2552 return this;
2553 }
2554}
2555
2556/// <summary>
2557/// Defines how a card can be refreshed by making a request to the target Bot.
2558/// </summary>
2559public class RefreshDefinition : SerializableObject
2560{
2561 /// <summary>
2562 /// The Action.Execute action to invoke to refresh the card.
2563 /// </summary>
2564 [JsonPropertyName("action")]
2565 public ExecuteAction? Action { get; set; }
2566
2567 /// <summary>
2568 /// The list of user Ids for which the card will be automatically refreshed. In Teams, in chats or channels with more than 60 users, the card will automatically refresh only for users specified in the userIds list. Other users will have to manually click on a "refresh" button. In contexts with fewer than 60 users, the card will automatically refresh for all users.
2569 /// </summary>
2570 [JsonPropertyName("userIds")]
2571 public IList<string>? UserIds { get; set; }
2572
2573 public RefreshDefinition WithAction(ExecuteAction value)
2574 {
2575 this.Action = value;
2576 return this;
2577 }
2578
2579 public RefreshDefinition WithUserIds(params IList<string> value)
2580 {
2581 this.UserIds = value;
2582 return this;
2583 }
2584}
2585
2586/// <summary>
2587/// Defines authentication information associated with a card. For more information, refer to the [Bot Framework OAuthCard type](https://docs.microsoft.com/dotnet/api/microsoft.bot.schema.oauthcard)
2588/// </summary>
2589public class Authentication : SerializableObject
2590{
2591 /// <summary>
2592 /// The text that can be displayed to the end user when prompting them to authenticate.
2593 /// </summary>
2594 [JsonPropertyName("text")]
2595 public string? Text { get; set; }
2596
2597 /// <summary>
2598 /// The identifier for registered OAuth connection setting information.
2599 /// </summary>
2600 [JsonPropertyName("connectionName")]
2601 public string? ConnectionName { get; set; }
2602
2603 /// <summary>
2604 /// The buttons that should be displayed to the user when prompting for authentication. The array MUST contain one button of type “signin”. Other button types are not currently supported.
2605 /// </summary>
2606 [JsonPropertyName("buttons")]
2607 public IList<AuthCardButton>? Buttons { get; set; }
2608
2609 /// <summary>
2610 /// Provides information required to enable on-behalf-of single sign-on user authentication.
2611 /// </summary>
2612 [JsonPropertyName("tokenExchangeResource")]
2613 public TokenExchangeResource? TokenExchangeResource { get; set; }
2614
2615 public Authentication WithText(string value)
2616 {
2617 this.Text = value;
2618 return this;
2619 }
2620
2621 public Authentication WithConnectionName(string value)
2622 {
2623 this.ConnectionName = value;
2624 return this;
2625 }
2626
2627 public Authentication WithButtons(params IList<AuthCardButton> value)
2628 {
2629 this.Buttons = value;
2630 return this;
2631 }
2632
2633 public Authentication WithTokenExchangeResource(TokenExchangeResource value)
2634 {
2635 this.TokenExchangeResource = value;
2636 return this;
2637 }
2638}
2639
2640/// <summary>
2641/// Defines a button as displayed when prompting a user to authenticate. For more information, refer to the [Bot Framework CardAction type](https://docs.microsoft.com/dotnet/api/microsoft.bot.schema.cardaction).
2642/// </summary>
2643public class AuthCardButton : SerializableObject
2644{
2645 /// <summary>
2646 /// Must be **signin**.
2647 /// </summary>
2648 [JsonPropertyName("type")]
2649 public string? Type { get; set; }
2650
2651 /// <summary>
2652 /// The caption of the button.
2653 /// </summary>
2654 [JsonPropertyName("title")]
2655 public string? Title { get; set; }
2656
2657 /// <summary>
2658 /// A URL to an image to display alongside the button’s caption.
2659 /// </summary>
2660 [JsonPropertyName("image")]
2661 public string? Image { get; set; }
2662
2663 /// <summary>
2664 /// The value associated with the button. The meaning of value depends on the button’s type.
2665 /// </summary>
2666 [JsonPropertyName("value")]
2667 public string? Value { get; set; }
2668
2669 public AuthCardButton WithType(string value)
2670 {
2671 this.Type = value;
2672 return this;
2673 }
2674
2675 public AuthCardButton WithTitle(string value)
2676 {
2677 this.Title = value;
2678 return this;
2679 }
2680
2681 public AuthCardButton WithImage(string value)
2682 {
2683 this.Image = value;
2684 return this;
2685 }
2686
2687 public AuthCardButton WithValue(string value)
2688 {
2689 this.Value = value;
2690 return this;
2691 }
2692}
2693
2694/// <summary>
2695/// Defines information required to enable on-behalf-of single sign-on user authentication. For more information, refer to the [Bot Framework TokenExchangeResource type](https://docs.microsoft.com/dotnet/api/microsoft.bot.schema.tokenexchangeresource)
2696/// </summary>
2697public class TokenExchangeResource : SerializableObject
2698{
2699 /// <summary>
2700 /// The unique identified of this token exchange instance.
2701 /// </summary>
2702 [JsonPropertyName("id")]
2703 public string? Id { get; set; }
2704
2705 /// <summary>
2706 /// An application ID or resource identifier with which to exchange a token on behalf of. This property is identity provider- and application-specific.
2707 /// </summary>
2708 [JsonPropertyName("uri")]
2709 public string? Uri { get; set; }
2710
2711 /// <summary>
2712 /// An identifier for the identity provider with which to attempt a token exchange.
2713 /// </summary>
2714 [JsonPropertyName("providerId")]
2715 public string? ProviderId { get; set; }
2716
2717 public TokenExchangeResource WithId(string value)
2718 {
2719 this.Id = value;
2720 return this;
2721 }
2722
2723 public TokenExchangeResource WithUri(string value)
2724 {
2725 this.Uri = value;
2726 return this;
2727 }
2728
2729 public TokenExchangeResource WithProviderId(string value)
2730 {
2731 this.ProviderId = value;
2732 return this;
2733 }
2734}
2735
2736/// <summary>
2737/// Represents a set of Teams-specific properties on a card.
2738/// </summary>
2739public class TeamsCardProperties : SerializableObject
2740{
2741 /// <summary>
2742 /// Controls the width of the card in a Teams chat.
2743 ///
2744 /// Note that setting `width` to "full" will not actually stretch the card to the "full width" of the chat pane. It will only make the card wider than when the `width` property isn't set.
2745 /// </summary>
2746 [JsonPropertyName("width")]
2747 public TeamsCardWidth? Width { get; set; }
2748
2749 /// <summary>
2750 /// The Teams-specific entities associated with the card.
2751 /// </summary>
2752 [JsonPropertyName("entities")]
2753 public IList<Mention>? Entities { get; set; }
2754
2755 public TeamsCardProperties WithWidth(TeamsCardWidth value)
2756 {
2757 this.Width = value;
2758 return this;
2759 }
2760
2761 public TeamsCardProperties WithEntities(params IList<Mention> value)
2762 {
2763 this.Entities = value;
2764 return this;
2765 }
2766}
2767
2768/// <summary>
2769/// Represents a mention to a person.
2770/// </summary>
2771public class Mention : SerializableObject
2772{
2773 /// <summary>
2774 /// Must be **mention**.
2775 /// </summary>
2776 [JsonPropertyName("type")]
2777 public string Type { get; } = "mention";
2778
2779 /// <summary>
2780 /// The text that will be substituted with the mention.
2781 /// </summary>
2782 [JsonPropertyName("text")]
2783 public string? Text { get; set; }
2784
2785 /// <summary>
2786 /// Defines the entity being mentioned.
2787 /// </summary>
2788 [JsonPropertyName("mentioned")]
2789 public MentionedEntity? Mentioned { get; set; }
2790
2791 public Mention WithText(string value)
2792 {
2793 this.Text = value;
2794 return this;
2795 }
2796
2797 public Mention WithMentioned(MentionedEntity value)
2798 {
2799 this.Mentioned = value;
2800 return this;
2801 }
2802}
2803
2804/// <summary>
2805/// Represents a mentioned person or tag.
2806/// </summary>
2807public class MentionedEntity : SerializableObject
2808{
2809 /// <summary>
2810 /// The Id of a person (typically a Microsoft Entra user Id) or tag.
2811 /// </summary>
2812 [JsonPropertyName("id")]
2813 public string? Id { get; set; }
2814
2815 /// <summary>
2816 /// The name of the mentioned entity.
2817 /// </summary>
2818 [JsonPropertyName("name")]
2819 public string? Name { get; set; }
2820
2821 /// <summary>
2822 /// The type of the mentioned entity.
2823 /// </summary>
2824 [JsonPropertyName("mentionType")]
2825 public MentionType? MentionType { get; set; }
2826
2827 public MentionedEntity WithId(string value)
2828 {
2829 this.Id = value;
2830 return this;
2831 }
2832
2833 public MentionedEntity WithName(string value)
2834 {
2835 this.Name = value;
2836 return this;
2837 }
2838
2839 public MentionedEntity WithMentionType(MentionType value)
2840 {
2841 this.MentionType = value;
2842 return this;
2843 }
2844}
2845
2846/// <summary>
2847/// Card-level metadata.
2848/// </summary>
2849public class CardMetadata : SerializableObject
2850{
2851 /// <summary>
2852 /// The URL the card originates from. When `webUrl` is set, the card is dubbed an **Adaptive Card-based Loop Component** and, when pasted in Teams or other Loop Component-capable host applications, the URL will unfurl to the same exact card.
2853 /// </summary>
2854 [JsonPropertyName("webUrl")]
2855 public string? WebUrl { get; set; }
2856
2857 public CardMetadata WithWebUrl(string value)
2858 {
2859 this.WebUrl = value;
2860 return this;
2861 }
2862}
2863
2864/// <summary>
2865/// A container for other elements. Use containers for styling purposes and/or to logically group a set of elements together, which can be especially useful when used with Action.ToggleVisibility.
2866/// </summary>
2867public class Container : CardElement
2868{
2869 /// <summary>
2870 /// Must be **Container**.
2871 /// </summary>
2872 [JsonPropertyName("type")]
2873 public string Type { get; } = "Container";
2874
2875 /// <summary>
2876 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
2877 /// </summary>
2878 [JsonPropertyName("id")]
2879 public string? Id { get; set; }
2880
2881 /// <summary>
2882 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
2883 /// </summary>
2884 [JsonPropertyName("requires")]
2885 public HostCapabilities? Requires { get; set; }
2886
2887 /// <summary>
2888 /// The locale associated with the element.
2889 /// </summary>
2890 [JsonPropertyName("lang")]
2891 public string? Lang { get; set; }
2892
2893 /// <summary>
2894 /// Controls the visibility of the element.
2895 /// </summary>
2896 [JsonPropertyName("isVisible")]
2897 public bool? IsVisible { get; set; }
2898
2899 /// <summary>
2900 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
2901 /// </summary>
2902 [JsonPropertyName("separator")]
2903 public bool? Separator { get; set; }
2904
2905 /// <summary>
2906 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
2907 /// </summary>
2908 [JsonPropertyName("height")]
2909 public ElementHeight? Height { get; set; }
2910
2911 /// <summary>
2912 /// Controls how the element should be horizontally aligned.
2913 /// </summary>
2914 [JsonPropertyName("horizontalAlignment")]
2915 public HorizontalAlignment? HorizontalAlignment { get; set; }
2916
2917 /// <summary>
2918 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
2919 /// </summary>
2920 [JsonPropertyName("spacing")]
2921 public Spacing? Spacing { get; set; }
2922
2923 /// <summary>
2924 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
2925 /// </summary>
2926 [JsonPropertyName("targetWidth")]
2927 public TargetWidth? TargetWidth { get; set; }
2928
2929 /// <summary>
2930 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
2931 /// </summary>
2932 [JsonPropertyName("isSortKey")]
2933 public bool? IsSortKey { get; set; }
2934
2935 /// <summary>
2936 /// An Action that will be invoked when the element is tapped or clicked. Action.ShowCard is not supported.
2937 /// </summary>
2938 [JsonPropertyName("selectAction")]
2939 public Action? SelectAction { get; set; }
2940
2941 /// <summary>
2942 /// The style of the container. Container styles control the colors of the background, border and text inside the container, in such a way that contrast requirements are always met.
2943 /// </summary>
2944 [JsonPropertyName("style")]
2945 public ContainerStyle? Style { get; set; }
2946
2947 /// <summary>
2948 /// Controls if a border should be displayed around the container.
2949 /// </summary>
2950 [JsonPropertyName("showBorder")]
2951 public bool? ShowBorder { get; set; }
2952
2953 /// <summary>
2954 /// Controls if the container should have rounded corners.
2955 /// </summary>
2956 [JsonPropertyName("roundedCorners")]
2957 public bool? RoundedCorners { get; set; }
2958
2959 /// <summary>
2960 /// The layouts associated with the container. The container can dynamically switch from one layout to another as the card's width changes. See [Container layouts](https://adaptivecards.microsoft.com/?topic=container-layouts) for more details.
2961 /// </summary>
2962 [JsonPropertyName("layouts")]
2963 public IList<ContainerLayout>? Layouts { get; set; }
2964
2965 /// <summary>
2966 /// Controls if the container should bleed into its parent. A bleeding container extends into its parent's padding.
2967 /// </summary>
2968 [JsonPropertyName("bleed")]
2969 public bool? Bleed { get; set; }
2970
2971 /// <summary>
2972 /// The minimum height, in pixels, of the container, in the `<number>px` format.
2973 /// </summary>
2974 [JsonPropertyName("minHeight")]
2975 public string? MinHeight { get; set; }
2976
2977 /// <summary>
2978 /// Defines the container's background image.
2979 /// </summary>
2980 [JsonPropertyName("backgroundImage")]
2981 public IUnion<string, BackgroundImage>? BackgroundImage { get; set; }
2982
2983 /// <summary>
2984 /// Controls how the container's content should be vertically aligned.
2985 /// </summary>
2986 [JsonPropertyName("verticalContentAlignment")]
2987 public VerticalAlignment? VerticalContentAlignment { get; set; }
2988
2989 /// <summary>
2990 /// Controls if the content of the card is to be rendered left-to-right or right-to-left.
2991 /// </summary>
2992 [JsonPropertyName("rtl")]
2993 public bool? Rtl { get; set; }
2994
2995 /// <summary>
2996 /// The maximum height, in pixels, of the container, in the `<number>px` format. When the content of a container exceeds the container's maximum height, a vertical scrollbar is displayed.
2997 /// </summary>
2998 [JsonPropertyName("maxHeight")]
2999 public string? MaxHeight { get; set; }
3000
3001 /// <summary>
3002 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
3003 /// </summary>
3004 [JsonPropertyName("grid.area")]
3005 public string? GridArea { get; set; }
3006
3007 /// <summary>
3008 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
3009 /// </summary>
3010 [JsonPropertyName("fallback")]
3011 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
3012
3013 /// <summary>
3014 /// The elements in the container.
3015 /// </summary>
3016 [JsonPropertyName("items")]
3017 public IList<CardElement>? Items { get; set; }
3018
3019 public Container(params IList<CardElement> items)
3020 {
3021 this.Items = items;
3022 }
3023
3024 public Container WithId(string value)
3025 {
3026 this.Id = value;
3027 return this;
3028 }
3029
3030 public Container WithRequires(HostCapabilities value)
3031 {
3032 this.Requires = value;
3033 return this;
3034 }
3035
3036 public Container WithLang(string value)
3037 {
3038 this.Lang = value;
3039 return this;
3040 }
3041
3042 public Container WithIsVisible(bool value)
3043 {
3044 this.IsVisible = value;
3045 return this;
3046 }
3047
3048 public Container WithSeparator(bool value)
3049 {
3050 this.Separator = value;
3051 return this;
3052 }
3053
3054 public Container WithHeight(ElementHeight value)
3055 {
3056 this.Height = value;
3057 return this;
3058 }
3059
3060 public Container WithHorizontalAlignment(HorizontalAlignment value)
3061 {
3062 this.HorizontalAlignment = value;
3063 return this;
3064 }
3065
3066 public Container WithSpacing(Spacing value)
3067 {
3068 this.Spacing = value;
3069 return this;
3070 }
3071
3072 public Container WithTargetWidth(TargetWidth value)
3073 {
3074 this.TargetWidth = value;
3075 return this;
3076 }
3077
3078 public Container WithIsSortKey(bool value)
3079 {
3080 this.IsSortKey = value;
3081 return this;
3082 }
3083
3084 public Container WithSelectAction(Action value)
3085 {
3086 this.SelectAction = value;
3087 return this;
3088 }
3089
3090 public Container WithStyle(ContainerStyle value)
3091 {
3092 this.Style = value;
3093 return this;
3094 }
3095
3096 public Container WithShowBorder(bool value)
3097 {
3098 this.ShowBorder = value;
3099 return this;
3100 }
3101
3102 public Container WithRoundedCorners(bool value)
3103 {
3104 this.RoundedCorners = value;
3105 return this;
3106 }
3107
3108 public Container WithLayouts(params IList<ContainerLayout> value)
3109 {
3110 this.Layouts = value;
3111 return this;
3112 }
3113
3114 public Container WithBleed(bool value)
3115 {
3116 this.Bleed = value;
3117 return this;
3118 }
3119
3120 public Container WithMinHeight(string value)
3121 {
3122 this.MinHeight = value;
3123 return this;
3124 }
3125
3126 public Container WithBackgroundImage(IUnion<string, BackgroundImage> value)
3127 {
3128 this.BackgroundImage = value;
3129 return this;
3130 }
3131
3132 public Container WithVerticalContentAlignment(VerticalAlignment value)
3133 {
3134 this.VerticalContentAlignment = value;
3135 return this;
3136 }
3137
3138 public Container WithRtl(bool value)
3139 {
3140 this.Rtl = value;
3141 return this;
3142 }
3143
3144 public Container WithMaxHeight(string value)
3145 {
3146 this.MaxHeight = value;
3147 return this;
3148 }
3149
3150 public Container WithGridArea(string value)
3151 {
3152 this.GridArea = value;
3153 return this;
3154 }
3155
3156 public Container WithFallback(IUnion<CardElement, FallbackElement> value)
3157 {
3158 this.Fallback = value;
3159 return this;
3160 }
3161
3162 public Container WithItems(params IList<CardElement> value)
3163 {
3164 this.Items = value;
3165 return this;
3166 }
3167}
3168
3169/// <summary>
3170/// Displays a set of action, which can be placed anywhere in the card.
3171/// </summary>
3172public class ActionSet : CardElement
3173{
3174 /// <summary>
3175 /// Must be **ActionSet**.
3176 /// </summary>
3177 [JsonPropertyName("type")]
3178 public string Type { get; } = "ActionSet";
3179
3180 /// <summary>
3181 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
3182 /// </summary>
3183 [JsonPropertyName("id")]
3184 public string? Id { get; set; }
3185
3186 /// <summary>
3187 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
3188 /// </summary>
3189 [JsonPropertyName("requires")]
3190 public HostCapabilities? Requires { get; set; }
3191
3192 /// <summary>
3193 /// The locale associated with the element.
3194 /// </summary>
3195 [JsonPropertyName("lang")]
3196 public string? Lang { get; set; }
3197
3198 /// <summary>
3199 /// Controls the visibility of the element.
3200 /// </summary>
3201 [JsonPropertyName("isVisible")]
3202 public bool? IsVisible { get; set; }
3203
3204 /// <summary>
3205 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
3206 /// </summary>
3207 [JsonPropertyName("separator")]
3208 public bool? Separator { get; set; }
3209
3210 /// <summary>
3211 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
3212 /// </summary>
3213 [JsonPropertyName("height")]
3214 public ElementHeight? Height { get; set; }
3215
3216 /// <summary>
3217 /// Controls how the element should be horizontally aligned.
3218 /// </summary>
3219 [JsonPropertyName("horizontalAlignment")]
3220 public HorizontalAlignment? HorizontalAlignment { get; set; }
3221
3222 /// <summary>
3223 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
3224 /// </summary>
3225 [JsonPropertyName("spacing")]
3226 public Spacing? Spacing { get; set; }
3227
3228 /// <summary>
3229 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
3230 /// </summary>
3231 [JsonPropertyName("targetWidth")]
3232 public TargetWidth? TargetWidth { get; set; }
3233
3234 /// <summary>
3235 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
3236 /// </summary>
3237 [JsonPropertyName("isSortKey")]
3238 public bool? IsSortKey { get; set; }
3239
3240 /// <summary>
3241 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
3242 /// </summary>
3243 [JsonPropertyName("grid.area")]
3244 public string? GridArea { get; set; }
3245
3246 /// <summary>
3247 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
3248 /// </summary>
3249 [JsonPropertyName("fallback")]
3250 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
3251
3252 /// <summary>
3253 /// The actions in the set.
3254 /// </summary>
3255 [JsonPropertyName("actions")]
3256 public IList<Action>? Actions { get; set; }
3257
3258 public ActionSet(params IList<Action> actions)
3259 {
3260 this.Actions = actions;
3261 }
3262
3263 public ActionSet WithId(string value)
3264 {
3265 this.Id = value;
3266 return this;
3267 }
3268
3269 public ActionSet WithRequires(HostCapabilities value)
3270 {
3271 this.Requires = value;
3272 return this;
3273 }
3274
3275 public ActionSet WithLang(string value)
3276 {
3277 this.Lang = value;
3278 return this;
3279 }
3280
3281 public ActionSet WithIsVisible(bool value)
3282 {
3283 this.IsVisible = value;
3284 return this;
3285 }
3286
3287 public ActionSet WithSeparator(bool value)
3288 {
3289 this.Separator = value;
3290 return this;
3291 }
3292
3293 public ActionSet WithHeight(ElementHeight value)
3294 {
3295 this.Height = value;
3296 return this;
3297 }
3298
3299 public ActionSet WithHorizontalAlignment(HorizontalAlignment value)
3300 {
3301 this.HorizontalAlignment = value;
3302 return this;
3303 }
3304
3305 public ActionSet WithSpacing(Spacing value)
3306 {
3307 this.Spacing = value;
3308 return this;
3309 }
3310
3311 public ActionSet WithTargetWidth(TargetWidth value)
3312 {
3313 this.TargetWidth = value;
3314 return this;
3315 }
3316
3317 public ActionSet WithIsSortKey(bool value)
3318 {
3319 this.IsSortKey = value;
3320 return this;
3321 }
3322
3323 public ActionSet WithGridArea(string value)
3324 {
3325 this.GridArea = value;
3326 return this;
3327 }
3328
3329 public ActionSet WithFallback(IUnion<CardElement, FallbackElement> value)
3330 {
3331 this.Fallback = value;
3332 return this;
3333 }
3334
3335 public ActionSet WithActions(params IList<Action> value)
3336 {
3337 this.Actions = value;
3338 return this;
3339 }
3340}
3341
3342/// <summary>
3343/// Splits the available horizontal space into separate columns, so elements can be organized in a row.
3344/// </summary>
3345public class ColumnSet : CardElement
3346{
3347 /// <summary>
3348 /// Must be **ColumnSet**.
3349 /// </summary>
3350 [JsonPropertyName("type")]
3351 public string Type { get; } = "ColumnSet";
3352
3353 /// <summary>
3354 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
3355 /// </summary>
3356 [JsonPropertyName("id")]
3357 public string? Id { get; set; }
3358
3359 /// <summary>
3360 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
3361 /// </summary>
3362 [JsonPropertyName("requires")]
3363 public HostCapabilities? Requires { get; set; }
3364
3365 /// <summary>
3366 /// The locale associated with the element.
3367 /// </summary>
3368 [JsonPropertyName("lang")]
3369 public string? Lang { get; set; }
3370
3371 /// <summary>
3372 /// Controls the visibility of the element.
3373 /// </summary>
3374 [JsonPropertyName("isVisible")]
3375 public bool? IsVisible { get; set; }
3376
3377 /// <summary>
3378 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
3379 /// </summary>
3380 [JsonPropertyName("separator")]
3381 public bool? Separator { get; set; }
3382
3383 /// <summary>
3384 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
3385 /// </summary>
3386 [JsonPropertyName("height")]
3387 public ElementHeight? Height { get; set; }
3388
3389 /// <summary>
3390 /// Controls how the element should be horizontally aligned.
3391 /// </summary>
3392 [JsonPropertyName("horizontalAlignment")]
3393 public HorizontalAlignment? HorizontalAlignment { get; set; }
3394
3395 /// <summary>
3396 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
3397 /// </summary>
3398 [JsonPropertyName("spacing")]
3399 public Spacing? Spacing { get; set; }
3400
3401 /// <summary>
3402 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
3403 /// </summary>
3404 [JsonPropertyName("targetWidth")]
3405 public TargetWidth? TargetWidth { get; set; }
3406
3407 /// <summary>
3408 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
3409 /// </summary>
3410 [JsonPropertyName("isSortKey")]
3411 public bool? IsSortKey { get; set; }
3412
3413 /// <summary>
3414 /// An Action that will be invoked when the element is tapped or clicked. Action.ShowCard is not supported.
3415 /// </summary>
3416 [JsonPropertyName("selectAction")]
3417 public Action? SelectAction { get; set; }
3418
3419 /// <summary>
3420 /// The style of the container. Container styles control the colors of the background, border and text inside the container, in such a way that contrast requirements are always met.
3421 /// </summary>
3422 [JsonPropertyName("style")]
3423 public ContainerStyle? Style { get; set; }
3424
3425 /// <summary>
3426 /// Controls if a border should be displayed around the container.
3427 /// </summary>
3428 [JsonPropertyName("showBorder")]
3429 public bool? ShowBorder { get; set; }
3430
3431 /// <summary>
3432 /// Controls if the container should have rounded corners.
3433 /// </summary>
3434 [JsonPropertyName("roundedCorners")]
3435 public bool? RoundedCorners { get; set; }
3436
3437 /// <summary>
3438 /// Controls if the container should bleed into its parent. A bleeding container extends into its parent's padding.
3439 /// </summary>
3440 [JsonPropertyName("bleed")]
3441 public bool? Bleed { get; set; }
3442
3443 /// <summary>
3444 /// The minimum height, in pixels, of the container, in the `<number>px` format.
3445 /// </summary>
3446 [JsonPropertyName("minHeight")]
3447 public string? MinHeight { get; set; }
3448
3449 /// <summary>
3450 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
3451 /// </summary>
3452 [JsonPropertyName("grid.area")]
3453 public string? GridArea { get; set; }
3454
3455 /// <summary>
3456 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
3457 /// </summary>
3458 [JsonPropertyName("fallback")]
3459 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
3460
3461 /// <summary>
3462 /// The columns in the set.
3463 /// </summary>
3464 [JsonPropertyName("columns")]
3465 public IList<Column>? Columns { get; set; }
3466
3467 public ColumnSet WithId(string value)
3468 {
3469 this.Id = value;
3470 return this;
3471 }
3472
3473 public ColumnSet WithRequires(HostCapabilities value)
3474 {
3475 this.Requires = value;
3476 return this;
3477 }
3478
3479 public ColumnSet WithLang(string value)
3480 {
3481 this.Lang = value;
3482 return this;
3483 }
3484
3485 public ColumnSet WithIsVisible(bool value)
3486 {
3487 this.IsVisible = value;
3488 return this;
3489 }
3490
3491 public ColumnSet WithSeparator(bool value)
3492 {
3493 this.Separator = value;
3494 return this;
3495 }
3496
3497 public ColumnSet WithHeight(ElementHeight value)
3498 {
3499 this.Height = value;
3500 return this;
3501 }
3502
3503 public ColumnSet WithHorizontalAlignment(HorizontalAlignment value)
3504 {
3505 this.HorizontalAlignment = value;
3506 return this;
3507 }
3508
3509 public ColumnSet WithSpacing(Spacing value)
3510 {
3511 this.Spacing = value;
3512 return this;
3513 }
3514
3515 public ColumnSet WithTargetWidth(TargetWidth value)
3516 {
3517 this.TargetWidth = value;
3518 return this;
3519 }
3520
3521 public ColumnSet WithIsSortKey(bool value)
3522 {
3523 this.IsSortKey = value;
3524 return this;
3525 }
3526
3527 public ColumnSet WithSelectAction(Action value)
3528 {
3529 this.SelectAction = value;
3530 return this;
3531 }
3532
3533 public ColumnSet WithStyle(ContainerStyle value)
3534 {
3535 this.Style = value;
3536 return this;
3537 }
3538
3539 public ColumnSet WithShowBorder(bool value)
3540 {
3541 this.ShowBorder = value;
3542 return this;
3543 }
3544
3545 public ColumnSet WithRoundedCorners(bool value)
3546 {
3547 this.RoundedCorners = value;
3548 return this;
3549 }
3550
3551 public ColumnSet WithBleed(bool value)
3552 {
3553 this.Bleed = value;
3554 return this;
3555 }
3556
3557 public ColumnSet WithMinHeight(string value)
3558 {
3559 this.MinHeight = value;
3560 return this;
3561 }
3562
3563 public ColumnSet WithGridArea(string value)
3564 {
3565 this.GridArea = value;
3566 return this;
3567 }
3568
3569 public ColumnSet WithFallback(IUnion<CardElement, FallbackElement> value)
3570 {
3571 this.Fallback = value;
3572 return this;
3573 }
3574
3575 public ColumnSet WithColumns(params IList<Column> value)
3576 {
3577 this.Columns = value;
3578 return this;
3579 }
3580}
3581
3582/// <summary>
3583/// A media element, that makes it possible to embed videos inside a card.
3584/// </summary>
3585public class Media : CardElement
3586{
3587 /// <summary>
3588 /// Must be **Media**.
3589 /// </summary>
3590 [JsonPropertyName("type")]
3591 public string Type { get; } = "Media";
3592
3593 /// <summary>
3594 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
3595 /// </summary>
3596 [JsonPropertyName("id")]
3597 public string? Id { get; set; }
3598
3599 /// <summary>
3600 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
3601 /// </summary>
3602 [JsonPropertyName("requires")]
3603 public HostCapabilities? Requires { get; set; }
3604
3605 /// <summary>
3606 /// The locale associated with the element.
3607 /// </summary>
3608 [JsonPropertyName("lang")]
3609 public string? Lang { get; set; }
3610
3611 /// <summary>
3612 /// Controls the visibility of the element.
3613 /// </summary>
3614 [JsonPropertyName("isVisible")]
3615 public bool? IsVisible { get; set; }
3616
3617 /// <summary>
3618 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
3619 /// </summary>
3620 [JsonPropertyName("separator")]
3621 public bool? Separator { get; set; }
3622
3623 /// <summary>
3624 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
3625 /// </summary>
3626 [JsonPropertyName("height")]
3627 public ElementHeight? Height { get; set; }
3628
3629 /// <summary>
3630 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
3631 /// </summary>
3632 [JsonPropertyName("spacing")]
3633 public Spacing? Spacing { get; set; }
3634
3635 /// <summary>
3636 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
3637 /// </summary>
3638 [JsonPropertyName("targetWidth")]
3639 public TargetWidth? TargetWidth { get; set; }
3640
3641 /// <summary>
3642 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
3643 /// </summary>
3644 [JsonPropertyName("isSortKey")]
3645 public bool? IsSortKey { get; set; }
3646
3647 /// <summary>
3648 /// The sources for the media. For YouTube, Dailymotion and Vimeo, only one source can be specified.
3649 /// </summary>
3650 [JsonPropertyName("sources")]
3651 public IList<MediaSource>? Sources { get; set; }
3652
3653 /// <summary>
3654 /// The caption sources for the media. Caption sources are not used for YouTube, Dailymotion or Vimeo sources.
3655 /// </summary>
3656 [JsonPropertyName("captionSources")]
3657 public IList<CaptionSource>? CaptionSources { get; set; }
3658
3659 /// <summary>
3660 /// The URL of the poster image to display.
3661 /// </summary>
3662 [JsonPropertyName("poster")]
3663 public string? Poster { get; set; }
3664
3665 /// <summary>
3666 /// The alternate text for the media, used for accessibility purposes.
3667 /// </summary>
3668 [JsonPropertyName("altText")]
3669 public string? AltText { get; set; }
3670
3671 /// <summary>
3672 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
3673 /// </summary>
3674 [JsonPropertyName("grid.area")]
3675 public string? GridArea { get; set; }
3676
3677 /// <summary>
3678 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
3679 /// </summary>
3680 [JsonPropertyName("fallback")]
3681 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
3682
3683 public Media WithId(string value)
3684 {
3685 this.Id = value;
3686 return this;
3687 }
3688
3689 public Media WithRequires(HostCapabilities value)
3690 {
3691 this.Requires = value;
3692 return this;
3693 }
3694
3695 public Media WithLang(string value)
3696 {
3697 this.Lang = value;
3698 return this;
3699 }
3700
3701 public Media WithIsVisible(bool value)
3702 {
3703 this.IsVisible = value;
3704 return this;
3705 }
3706
3707 public Media WithSeparator(bool value)
3708 {
3709 this.Separator = value;
3710 return this;
3711 }
3712
3713 public Media WithHeight(ElementHeight value)
3714 {
3715 this.Height = value;
3716 return this;
3717 }
3718
3719 public Media WithSpacing(Spacing value)
3720 {
3721 this.Spacing = value;
3722 return this;
3723 }
3724
3725 public Media WithTargetWidth(TargetWidth value)
3726 {
3727 this.TargetWidth = value;
3728 return this;
3729 }
3730
3731 public Media WithIsSortKey(bool value)
3732 {
3733 this.IsSortKey = value;
3734 return this;
3735 }
3736
3737 public Media WithSources(params IList<MediaSource> value)
3738 {
3739 this.Sources = value;
3740 return this;
3741 }
3742
3743 public Media WithCaptionSources(params IList<CaptionSource> value)
3744 {
3745 this.CaptionSources = value;
3746 return this;
3747 }
3748
3749 public Media WithPoster(string value)
3750 {
3751 this.Poster = value;
3752 return this;
3753 }
3754
3755 public Media WithAltText(string value)
3756 {
3757 this.AltText = value;
3758 return this;
3759 }
3760
3761 public Media WithGridArea(string value)
3762 {
3763 this.GridArea = value;
3764 return this;
3765 }
3766
3767 public Media WithFallback(IUnion<CardElement, FallbackElement> value)
3768 {
3769 this.Fallback = value;
3770 return this;
3771 }
3772}
3773
3774/// <summary>
3775/// Defines the source URL of a media stream. YouTube, Dailymotion, Vimeo and Microsoft Stream URLs are supported.
3776/// </summary>
3777public class MediaSource : SerializableObject
3778{
3779 /// <summary>
3780 /// The MIME type of the source.
3781 /// </summary>
3782 [JsonPropertyName("mimeType")]
3783 public string? MimeType { get; set; }
3784
3785 /// <summary>
3786 /// The URL of the source.
3787 /// </summary>
3788 [JsonPropertyName("url")]
3789 public string? Url { get; set; }
3790
3791 public MediaSource WithMimeType(string value)
3792 {
3793 this.MimeType = value;
3794 return this;
3795 }
3796
3797 public MediaSource WithUrl(string value)
3798 {
3799 this.Url = value;
3800 return this;
3801 }
3802}
3803
3804/// <summary>
3805/// Defines a source URL for a video captions.
3806/// </summary>
3807public class CaptionSource : SerializableObject
3808{
3809 /// <summary>
3810 /// The MIME type of the source.
3811 /// </summary>
3812 [JsonPropertyName("mimeType")]
3813 public string? MimeType { get; set; }
3814
3815 /// <summary>
3816 /// The URL of the source.
3817 /// </summary>
3818 [JsonPropertyName("url")]
3819 public string? Url { get; set; }
3820
3821 /// <summary>
3822 /// The label of this caption source.
3823 /// </summary>
3824 [JsonPropertyName("label")]
3825 public string? Label { get; set; }
3826
3827 public CaptionSource WithMimeType(string value)
3828 {
3829 this.MimeType = value;
3830 return this;
3831 }
3832
3833 public CaptionSource WithUrl(string value)
3834 {
3835 this.Url = value;
3836 return this;
3837 }
3838
3839 public CaptionSource WithLabel(string value)
3840 {
3841 this.Label = value;
3842 return this;
3843 }
3844}
3845
3846/// <summary>
3847/// A rich text block that displays formatted text.
3848/// </summary>
3849public class RichTextBlock : CardElement
3850{
3851 /// <summary>
3852 /// Must be **RichTextBlock**.
3853 /// </summary>
3854 [JsonPropertyName("type")]
3855 public string Type { get; } = "RichTextBlock";
3856
3857 /// <summary>
3858 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
3859 /// </summary>
3860 [JsonPropertyName("id")]
3861 public string? Id { get; set; }
3862
3863 /// <summary>
3864 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
3865 /// </summary>
3866 [JsonPropertyName("requires")]
3867 public HostCapabilities? Requires { get; set; }
3868
3869 /// <summary>
3870 /// The locale associated with the element.
3871 /// </summary>
3872 [JsonPropertyName("lang")]
3873 public string? Lang { get; set; }
3874
3875 /// <summary>
3876 /// Controls the visibility of the element.
3877 /// </summary>
3878 [JsonPropertyName("isVisible")]
3879 public bool? IsVisible { get; set; }
3880
3881 /// <summary>
3882 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
3883 /// </summary>
3884 [JsonPropertyName("separator")]
3885 public bool? Separator { get; set; }
3886
3887 /// <summary>
3888 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
3889 /// </summary>
3890 [JsonPropertyName("height")]
3891 public ElementHeight? Height { get; set; }
3892
3893 /// <summary>
3894 /// Controls how the element should be horizontally aligned.
3895 /// </summary>
3896 [JsonPropertyName("horizontalAlignment")]
3897 public HorizontalAlignment? HorizontalAlignment { get; set; }
3898
3899 /// <summary>
3900 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
3901 /// </summary>
3902 [JsonPropertyName("spacing")]
3903 public Spacing? Spacing { get; set; }
3904
3905 /// <summary>
3906 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
3907 /// </summary>
3908 [JsonPropertyName("targetWidth")]
3909 public TargetWidth? TargetWidth { get; set; }
3910
3911 /// <summary>
3912 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
3913 /// </summary>
3914 [JsonPropertyName("isSortKey")]
3915 public bool? IsSortKey { get; set; }
3916
3917 /// <summary>
3918 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
3919 /// </summary>
3920 [JsonPropertyName("grid.area")]
3921 public string? GridArea { get; set; }
3922
3923 /// <summary>
3924 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
3925 /// </summary>
3926 [JsonPropertyName("fallback")]
3927 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
3928
3929 /// <summary>
3930 /// The inlines making up the rich text block.
3931 /// </summary>
3932 [JsonPropertyName("inlines")]
3933 public IUnion<IList<TextRun>, IList<string>>? Inlines { get; set; }
3934
3935 public RichTextBlock WithId(string value)
3936 {
3937 this.Id = value;
3938 return this;
3939 }
3940
3941 public RichTextBlock WithRequires(HostCapabilities value)
3942 {
3943 this.Requires = value;
3944 return this;
3945 }
3946
3947 public RichTextBlock WithLang(string value)
3948 {
3949 this.Lang = value;
3950 return this;
3951 }
3952
3953 public RichTextBlock WithIsVisible(bool value)
3954 {
3955 this.IsVisible = value;
3956 return this;
3957 }
3958
3959 public RichTextBlock WithSeparator(bool value)
3960 {
3961 this.Separator = value;
3962 return this;
3963 }
3964
3965 public RichTextBlock WithHeight(ElementHeight value)
3966 {
3967 this.Height = value;
3968 return this;
3969 }
3970
3971 public RichTextBlock WithHorizontalAlignment(HorizontalAlignment value)
3972 {
3973 this.HorizontalAlignment = value;
3974 return this;
3975 }
3976
3977 public RichTextBlock WithSpacing(Spacing value)
3978 {
3979 this.Spacing = value;
3980 return this;
3981 }
3982
3983 public RichTextBlock WithTargetWidth(TargetWidth value)
3984 {
3985 this.TargetWidth = value;
3986 return this;
3987 }
3988
3989 public RichTextBlock WithIsSortKey(bool value)
3990 {
3991 this.IsSortKey = value;
3992 return this;
3993 }
3994
3995 public RichTextBlock WithGridArea(string value)
3996 {
3997 this.GridArea = value;
3998 return this;
3999 }
4000
4001 public RichTextBlock WithFallback(IUnion<CardElement, FallbackElement> value)
4002 {
4003 this.Fallback = value;
4004 return this;
4005 }
4006
4007 public RichTextBlock WithInlines(IUnion<IList<TextRun>, IList<string>> value)
4008 {
4009 this.Inlines = value;
4010 return this;
4011 }
4012}
4013
4014/// <summary>
4015/// Use tables to display data in a tabular way, with rows, columns and cells.
4016/// </summary>
4017public class Table : CardElement
4018{
4019 /// <summary>
4020 /// Must be **Table**.
4021 /// </summary>
4022 [JsonPropertyName("type")]
4023 public string Type { get; } = "Table";
4024
4025 /// <summary>
4026 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
4027 /// </summary>
4028 [JsonPropertyName("id")]
4029 public string? Id { get; set; }
4030
4031 /// <summary>
4032 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
4033 /// </summary>
4034 [JsonPropertyName("requires")]
4035 public HostCapabilities? Requires { get; set; }
4036
4037 /// <summary>
4038 /// The locale associated with the element.
4039 /// </summary>
4040 [JsonPropertyName("lang")]
4041 public string? Lang { get; set; }
4042
4043 /// <summary>
4044 /// Controls the visibility of the element.
4045 /// </summary>
4046 [JsonPropertyName("isVisible")]
4047 public bool? IsVisible { get; set; }
4048
4049 /// <summary>
4050 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
4051 /// </summary>
4052 [JsonPropertyName("separator")]
4053 public bool? Separator { get; set; }
4054
4055 /// <summary>
4056 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
4057 /// </summary>
4058 [JsonPropertyName("height")]
4059 public ElementHeight? Height { get; set; }
4060
4061 /// <summary>
4062 /// Controls how the element should be horizontally aligned.
4063 /// </summary>
4064 [JsonPropertyName("horizontalAlignment")]
4065 public HorizontalAlignment? HorizontalAlignment { get; set; }
4066
4067 /// <summary>
4068 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
4069 /// </summary>
4070 [JsonPropertyName("spacing")]
4071 public Spacing? Spacing { get; set; }
4072
4073 /// <summary>
4074 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
4075 /// </summary>
4076 [JsonPropertyName("targetWidth")]
4077 public TargetWidth? TargetWidth { get; set; }
4078
4079 /// <summary>
4080 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
4081 /// </summary>
4082 [JsonPropertyName("isSortKey")]
4083 public bool? IsSortKey { get; set; }
4084
4085 /// <summary>
4086 /// The style of the container. Container styles control the colors of the background, border and text inside the container, in such a way that contrast requirements are always met.
4087 /// </summary>
4088 [JsonPropertyName("style")]
4089 public ContainerStyle? Style { get; set; }
4090
4091 /// <summary>
4092 /// Controls if a border should be displayed around the container.
4093 /// </summary>
4094 [JsonPropertyName("showBorder")]
4095 public bool? ShowBorder { get; set; }
4096
4097 /// <summary>
4098 /// Controls if the container should have rounded corners.
4099 /// </summary>
4100 [JsonPropertyName("roundedCorners")]
4101 public bool? RoundedCorners { get; set; }
4102
4103 /// <summary>
4104 /// The columns in the table.
4105 /// </summary>
4106 [JsonPropertyName("columns")]
4107 public IList<ColumnDefinition>? Columns { get; set; }
4108
4109 /// <summary>
4110 /// Controls whether the first row of the table should be treated as a header.
4111 /// </summary>
4112 [JsonPropertyName("firstRowAsHeaders")]
4113 public bool? FirstRowAsHeaders { get; set; }
4114
4115 /// <summary>
4116 /// Controls if grid lines should be displayed.
4117 /// </summary>
4118 [JsonPropertyName("showGridLines")]
4119 public bool? ShowGridLines { get; set; }
4120
4121 /// <summary>
4122 /// The style of the grid lines between cells.
4123 /// </summary>
4124 [JsonPropertyName("gridStyle")]
4125 public ContainerStyle? GridStyle { get; set; }
4126
4127 /// <summary>
4128 /// Controls how the content of every cell in the table should be horizontally aligned by default.
4129 /// </summary>
4130 [JsonPropertyName("horizontalCellContentAlignment")]
4131 public HorizontalAlignment? HorizontalCellContentAlignment { get; set; }
4132
4133 /// <summary>
4134 /// Controls how the content of every cell in the table should be vertically aligned by default.
4135 /// </summary>
4136 [JsonPropertyName("verticalCellContentAlignment")]
4137 public VerticalAlignment? VerticalCellContentAlignment { get; set; }
4138
4139 /// <summary>
4140 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
4141 /// </summary>
4142 [JsonPropertyName("grid.area")]
4143 public string? GridArea { get; set; }
4144
4145 /// <summary>
4146 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
4147 /// </summary>
4148 [JsonPropertyName("fallback")]
4149 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
4150
4151 /// <summary>
4152 /// The rows of the table.
4153 /// </summary>
4154 [JsonPropertyName("rows")]
4155 public IList<TableRow>? Rows { get; set; }
4156
4157 public Table WithId(string value)
4158 {
4159 this.Id = value;
4160 return this;
4161 }
4162
4163 public Table WithRequires(HostCapabilities value)
4164 {
4165 this.Requires = value;
4166 return this;
4167 }
4168
4169 public Table WithLang(string value)
4170 {
4171 this.Lang = value;
4172 return this;
4173 }
4174
4175 public Table WithIsVisible(bool value)
4176 {
4177 this.IsVisible = value;
4178 return this;
4179 }
4180
4181 public Table WithSeparator(bool value)
4182 {
4183 this.Separator = value;
4184 return this;
4185 }
4186
4187 public Table WithHeight(ElementHeight value)
4188 {
4189 this.Height = value;
4190 return this;
4191 }
4192
4193 public Table WithHorizontalAlignment(HorizontalAlignment value)
4194 {
4195 this.HorizontalAlignment = value;
4196 return this;
4197 }
4198
4199 public Table WithSpacing(Spacing value)
4200 {
4201 this.Spacing = value;
4202 return this;
4203 }
4204
4205 public Table WithTargetWidth(TargetWidth value)
4206 {
4207 this.TargetWidth = value;
4208 return this;
4209 }
4210
4211 public Table WithIsSortKey(bool value)
4212 {
4213 this.IsSortKey = value;
4214 return this;
4215 }
4216
4217 public Table WithStyle(ContainerStyle value)
4218 {
4219 this.Style = value;
4220 return this;
4221 }
4222
4223 public Table WithShowBorder(bool value)
4224 {
4225 this.ShowBorder = value;
4226 return this;
4227 }
4228
4229 public Table WithRoundedCorners(bool value)
4230 {
4231 this.RoundedCorners = value;
4232 return this;
4233 }
4234
4235 public Table WithColumns(params IList<ColumnDefinition> value)
4236 {
4237 this.Columns = value;
4238 return this;
4239 }
4240
4241 public Table WithFirstRowAsHeaders(bool value)
4242 {
4243 this.FirstRowAsHeaders = value;
4244 return this;
4245 }
4246
4247 public Table WithShowGridLines(bool value)
4248 {
4249 this.ShowGridLines = value;
4250 return this;
4251 }
4252
4253 public Table WithGridStyle(ContainerStyle value)
4254 {
4255 this.GridStyle = value;
4256 return this;
4257 }
4258
4259 public Table WithHorizontalCellContentAlignment(HorizontalAlignment value)
4260 {
4261 this.HorizontalCellContentAlignment = value;
4262 return this;
4263 }
4264
4265 public Table WithVerticalCellContentAlignment(VerticalAlignment value)
4266 {
4267 this.VerticalCellContentAlignment = value;
4268 return this;
4269 }
4270
4271 public Table WithGridArea(string value)
4272 {
4273 this.GridArea = value;
4274 return this;
4275 }
4276
4277 public Table WithFallback(IUnion<CardElement, FallbackElement> value)
4278 {
4279 this.Fallback = value;
4280 return this;
4281 }
4282
4283 public Table WithRows(params IList<TableRow> value)
4284 {
4285 this.Rows = value;
4286 return this;
4287 }
4288}
4289
4290/// <summary>
4291/// Defines a column in a Table element.
4292/// </summary>
4293public class ColumnDefinition : SerializableObject
4294{
4295 /// <summary>
4296 /// Controls how the content of every cell in the table should be horizontally aligned by default. This property overrides the horizontalCellContentAlignment property of the table.
4297 /// </summary>
4298 [JsonPropertyName("horizontalCellContentAlignment")]
4299 public HorizontalAlignment? HorizontalCellContentAlignment { get; set; }
4300
4301 /// <summary>
4302 /// Controls how the content of every cell in the column should be vertically aligned by default. This property overrides the verticalCellContentAlignment property of the table.
4303 /// </summary>
4304 [JsonPropertyName("verticalCellContentAlignment")]
4305 public VerticalAlignment? VerticalCellContentAlignment { get; set; }
4306
4307 /// <summary>
4308 /// The width of the column in the table, expressed as either a percentage of the available width or in pixels, using the `<number>px` format.
4309 /// </summary>
4310 [JsonPropertyName("width")]
4311 public IUnion<string, float>? Width { get; set; }
4312
4313 public ColumnDefinition WithHorizontalCellContentAlignment(HorizontalAlignment value)
4314 {
4315 this.HorizontalCellContentAlignment = value;
4316 return this;
4317 }
4318
4319 public ColumnDefinition WithVerticalCellContentAlignment(VerticalAlignment value)
4320 {
4321 this.VerticalCellContentAlignment = value;
4322 return this;
4323 }
4324
4325 public ColumnDefinition WithWidth(IUnion<string, float> value)
4326 {
4327 this.Width = value;
4328 return this;
4329 }
4330}
4331
4332/// <summary>
4333/// A block of text, optionally formatted using Markdown.
4334/// </summary>
4335public class TextBlock : CardElement
4336{
4337 /// <summary>
4338 /// Must be **TextBlock**.
4339 /// </summary>
4340 [JsonPropertyName("type")]
4341 public string Type { get; } = "TextBlock";
4342
4343 /// <summary>
4344 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
4345 /// </summary>
4346 [JsonPropertyName("id")]
4347 public string? Id { get; set; }
4348
4349 /// <summary>
4350 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
4351 /// </summary>
4352 [JsonPropertyName("requires")]
4353 public HostCapabilities? Requires { get; set; }
4354
4355 /// <summary>
4356 /// The locale associated with the element.
4357 /// </summary>
4358 [JsonPropertyName("lang")]
4359 public string? Lang { get; set; }
4360
4361 /// <summary>
4362 /// Controls the visibility of the element.
4363 /// </summary>
4364 [JsonPropertyName("isVisible")]
4365 public bool? IsVisible { get; set; }
4366
4367 /// <summary>
4368 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
4369 /// </summary>
4370 [JsonPropertyName("separator")]
4371 public bool? Separator { get; set; }
4372
4373 /// <summary>
4374 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
4375 /// </summary>
4376 [JsonPropertyName("height")]
4377 public ElementHeight? Height { get; set; }
4378
4379 /// <summary>
4380 /// Controls how the element should be horizontally aligned.
4381 /// </summary>
4382 [JsonPropertyName("horizontalAlignment")]
4383 public HorizontalAlignment? HorizontalAlignment { get; set; }
4384
4385 /// <summary>
4386 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
4387 /// </summary>
4388 [JsonPropertyName("spacing")]
4389 public Spacing? Spacing { get; set; }
4390
4391 /// <summary>
4392 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
4393 /// </summary>
4394 [JsonPropertyName("targetWidth")]
4395 public TargetWidth? TargetWidth { get; set; }
4396
4397 /// <summary>
4398 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
4399 /// </summary>
4400 [JsonPropertyName("isSortKey")]
4401 public bool? IsSortKey { get; set; }
4402
4403 /// <summary>
4404 /// The text to display. A subset of markdown is supported.
4405 /// </summary>
4406 [JsonPropertyName("text")]
4407 public string? Text { get; set; }
4408
4409 /// <summary>
4410 /// The size of the text.
4411 /// </summary>
4412 [JsonPropertyName("size")]
4413 public TextSize? Size { get; set; }
4414
4415 /// <summary>
4416 /// The weight of the text.
4417 /// </summary>
4418 [JsonPropertyName("weight")]
4419 public TextWeight? Weight { get; set; }
4420
4421 /// <summary>
4422 /// The color of the text.
4423 /// </summary>
4424 [JsonPropertyName("color")]
4425 public TextColor? Color { get; set; }
4426
4427 /// <summary>
4428 /// Controls whether the text should be renderer using a subtler variant of the select color.
4429 /// </summary>
4430 [JsonPropertyName("isSubtle")]
4431 public bool? IsSubtle { get; set; }
4432
4433 /// <summary>
4434 /// The type of font to use for rendering.
4435 /// </summary>
4436 [JsonPropertyName("fontType")]
4437 public FontType? FontType { get; set; }
4438
4439 /// <summary>
4440 /// Controls if the text should wrap.
4441 /// </summary>
4442 [JsonPropertyName("wrap")]
4443 public bool? Wrap { get; set; }
4444
4445 /// <summary>
4446 /// The maximum number of lines to display.
4447 /// </summary>
4448 [JsonPropertyName("maxLines")]
4449 public float? MaxLines { get; set; }
4450
4451 /// <summary>
4452 /// The style of the text.
4453 /// </summary>
4454 [JsonPropertyName("style")]
4455 public StyleEnum? Style { get; set; }
4456
4457 /// <summary>
4458 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
4459 /// </summary>
4460 [JsonPropertyName("grid.area")]
4461 public string? GridArea { get; set; }
4462
4463 /// <summary>
4464 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
4465 /// </summary>
4466 [JsonPropertyName("fallback")]
4467 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
4468
4469 public TextBlock(string text)
4470 {
4471 this.Text = text;
4472 }
4473
4474 public TextBlock WithId(string value)
4475 {
4476 this.Id = value;
4477 return this;
4478 }
4479
4480 public TextBlock WithRequires(HostCapabilities value)
4481 {
4482 this.Requires = value;
4483 return this;
4484 }
4485
4486 public TextBlock WithLang(string value)
4487 {
4488 this.Lang = value;
4489 return this;
4490 }
4491
4492 public TextBlock WithIsVisible(bool value)
4493 {
4494 this.IsVisible = value;
4495 return this;
4496 }
4497
4498 public TextBlock WithSeparator(bool value)
4499 {
4500 this.Separator = value;
4501 return this;
4502 }
4503
4504 public TextBlock WithHeight(ElementHeight value)
4505 {
4506 this.Height = value;
4507 return this;
4508 }
4509
4510 public TextBlock WithHorizontalAlignment(HorizontalAlignment value)
4511 {
4512 this.HorizontalAlignment = value;
4513 return this;
4514 }
4515
4516 public TextBlock WithSpacing(Spacing value)
4517 {
4518 this.Spacing = value;
4519 return this;
4520 }
4521
4522 public TextBlock WithTargetWidth(TargetWidth value)
4523 {
4524 this.TargetWidth = value;
4525 return this;
4526 }
4527
4528 public TextBlock WithIsSortKey(bool value)
4529 {
4530 this.IsSortKey = value;
4531 return this;
4532 }
4533
4534 public TextBlock WithText(string value)
4535 {
4536 this.Text = value;
4537 return this;
4538 }
4539
4540 public TextBlock WithSize(TextSize value)
4541 {
4542 this.Size = value;
4543 return this;
4544 }
4545
4546 public TextBlock WithWeight(TextWeight value)
4547 {
4548 this.Weight = value;
4549 return this;
4550 }
4551
4552 public TextBlock WithColor(TextColor value)
4553 {
4554 this.Color = value;
4555 return this;
4556 }
4557
4558 public TextBlock WithIsSubtle(bool value)
4559 {
4560 this.IsSubtle = value;
4561 return this;
4562 }
4563
4564 public TextBlock WithFontType(FontType value)
4565 {
4566 this.FontType = value;
4567 return this;
4568 }
4569
4570 public TextBlock WithWrap(bool value)
4571 {
4572 this.Wrap = value;
4573 return this;
4574 }
4575
4576 public TextBlock WithMaxLines(float value)
4577 {
4578 this.MaxLines = value;
4579 return this;
4580 }
4581
4582 public TextBlock WithStyle(StyleEnum value)
4583 {
4584 this.Style = value;
4585 return this;
4586 }
4587
4588 public TextBlock WithGridArea(string value)
4589 {
4590 this.GridArea = value;
4591 return this;
4592 }
4593
4594 public TextBlock WithFallback(IUnion<CardElement, FallbackElement> value)
4595 {
4596 this.Fallback = value;
4597 return this;
4598 }
4599}
4600
4601/// <summary>
4602/// A set of facts, displayed as a table or a vertical list when horizontal space is constrained.
4603/// </summary>
4604public class FactSet : CardElement
4605{
4606 /// <summary>
4607 /// Must be **FactSet**.
4608 /// </summary>
4609 [JsonPropertyName("type")]
4610 public string Type { get; } = "FactSet";
4611
4612 /// <summary>
4613 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
4614 /// </summary>
4615 [JsonPropertyName("id")]
4616 public string? Id { get; set; }
4617
4618 /// <summary>
4619 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
4620 /// </summary>
4621 [JsonPropertyName("requires")]
4622 public HostCapabilities? Requires { get; set; }
4623
4624 /// <summary>
4625 /// The locale associated with the element.
4626 /// </summary>
4627 [JsonPropertyName("lang")]
4628 public string? Lang { get; set; }
4629
4630 /// <summary>
4631 /// Controls the visibility of the element.
4632 /// </summary>
4633 [JsonPropertyName("isVisible")]
4634 public bool? IsVisible { get; set; }
4635
4636 /// <summary>
4637 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
4638 /// </summary>
4639 [JsonPropertyName("separator")]
4640 public bool? Separator { get; set; }
4641
4642 /// <summary>
4643 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
4644 /// </summary>
4645 [JsonPropertyName("height")]
4646 public ElementHeight? Height { get; set; }
4647
4648 /// <summary>
4649 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
4650 /// </summary>
4651 [JsonPropertyName("spacing")]
4652 public Spacing? Spacing { get; set; }
4653
4654 /// <summary>
4655 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
4656 /// </summary>
4657 [JsonPropertyName("targetWidth")]
4658 public TargetWidth? TargetWidth { get; set; }
4659
4660 /// <summary>
4661 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
4662 /// </summary>
4663 [JsonPropertyName("isSortKey")]
4664 public bool? IsSortKey { get; set; }
4665
4666 /// <summary>
4667 /// The facts in the set.
4668 /// </summary>
4669 [JsonPropertyName("facts")]
4670 public IList<Fact>? Facts { get; set; }
4671
4672 /// <summary>
4673 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
4674 /// </summary>
4675 [JsonPropertyName("grid.area")]
4676 public string? GridArea { get; set; }
4677
4678 /// <summary>
4679 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
4680 /// </summary>
4681 [JsonPropertyName("fallback")]
4682 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
4683
4684 public FactSet(params IList<Fact> facts)
4685 {
4686 this.Facts = facts;
4687 }
4688
4689 public FactSet WithId(string value)
4690 {
4691 this.Id = value;
4692 return this;
4693 }
4694
4695 public FactSet WithRequires(HostCapabilities value)
4696 {
4697 this.Requires = value;
4698 return this;
4699 }
4700
4701 public FactSet WithLang(string value)
4702 {
4703 this.Lang = value;
4704 return this;
4705 }
4706
4707 public FactSet WithIsVisible(bool value)
4708 {
4709 this.IsVisible = value;
4710 return this;
4711 }
4712
4713 public FactSet WithSeparator(bool value)
4714 {
4715 this.Separator = value;
4716 return this;
4717 }
4718
4719 public FactSet WithHeight(ElementHeight value)
4720 {
4721 this.Height = value;
4722 return this;
4723 }
4724
4725 public FactSet WithSpacing(Spacing value)
4726 {
4727 this.Spacing = value;
4728 return this;
4729 }
4730
4731 public FactSet WithTargetWidth(TargetWidth value)
4732 {
4733 this.TargetWidth = value;
4734 return this;
4735 }
4736
4737 public FactSet WithIsSortKey(bool value)
4738 {
4739 this.IsSortKey = value;
4740 return this;
4741 }
4742
4743 public FactSet WithFacts(params IList<Fact> value)
4744 {
4745 this.Facts = value;
4746 return this;
4747 }
4748
4749 public FactSet WithGridArea(string value)
4750 {
4751 this.GridArea = value;
4752 return this;
4753 }
4754
4755 public FactSet WithFallback(IUnion<CardElement, FallbackElement> value)
4756 {
4757 this.Fallback = value;
4758 return this;
4759 }
4760}
4761
4762/// <summary>
4763/// A fact in a FactSet element.
4764/// </summary>
4765public class Fact : SerializableObject
4766{
4767 /// <summary>
4768 /// The fact's title.
4769 /// </summary>
4770 [JsonPropertyName("title")]
4771 public string? Title { get; set; }
4772
4773 /// <summary>
4774 /// The fact's value.
4775 /// </summary>
4776 [JsonPropertyName("value")]
4777 public string? Value { get; set; }
4778
4779 public Fact(string title, string value)
4780 {
4781 this.Title = title;
4782 this.Value = value;
4783 }
4784
4785 public Fact WithTitle(string value)
4786 {
4787 this.Title = value;
4788 return this;
4789 }
4790
4791 public Fact WithValue(string value)
4792 {
4793 this.Value = value;
4794 return this;
4795 }
4796}
4797
4798/// <summary>
4799/// A set of images, displayed side-by-side and wrapped across multiple rows as needed.
4800/// </summary>
4801public class ImageSet : CardElement
4802{
4803 /// <summary>
4804 /// Must be **ImageSet**.
4805 /// </summary>
4806 [JsonPropertyName("type")]
4807 public string Type { get; } = "ImageSet";
4808
4809 /// <summary>
4810 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
4811 /// </summary>
4812 [JsonPropertyName("id")]
4813 public string? Id { get; set; }
4814
4815 /// <summary>
4816 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
4817 /// </summary>
4818 [JsonPropertyName("requires")]
4819 public HostCapabilities? Requires { get; set; }
4820
4821 /// <summary>
4822 /// The locale associated with the element.
4823 /// </summary>
4824 [JsonPropertyName("lang")]
4825 public string? Lang { get; set; }
4826
4827 /// <summary>
4828 /// Controls the visibility of the element.
4829 /// </summary>
4830 [JsonPropertyName("isVisible")]
4831 public bool? IsVisible { get; set; }
4832
4833 /// <summary>
4834 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
4835 /// </summary>
4836 [JsonPropertyName("separator")]
4837 public bool? Separator { get; set; }
4838
4839 /// <summary>
4840 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
4841 /// </summary>
4842 [JsonPropertyName("height")]
4843 public ElementHeight? Height { get; set; }
4844
4845 /// <summary>
4846 /// Controls how the element should be horizontally aligned.
4847 /// </summary>
4848 [JsonPropertyName("horizontalAlignment")]
4849 public HorizontalAlignment? HorizontalAlignment { get; set; }
4850
4851 /// <summary>
4852 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
4853 /// </summary>
4854 [JsonPropertyName("spacing")]
4855 public Spacing? Spacing { get; set; }
4856
4857 /// <summary>
4858 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
4859 /// </summary>
4860 [JsonPropertyName("targetWidth")]
4861 public TargetWidth? TargetWidth { get; set; }
4862
4863 /// <summary>
4864 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
4865 /// </summary>
4866 [JsonPropertyName("isSortKey")]
4867 public bool? IsSortKey { get; set; }
4868
4869 /// <summary>
4870 /// The images in the set.
4871 /// </summary>
4872 [JsonPropertyName("images")]
4873 public IList<Image>? Images { get; set; }
4874
4875 /// <summary>
4876 /// The size to use to render all images in the set.
4877 /// </summary>
4878 [JsonPropertyName("imageSize")]
4879 public ImageSize? ImageSize { get; set; }
4880
4881 /// <summary>
4882 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
4883 /// </summary>
4884 [JsonPropertyName("grid.area")]
4885 public string? GridArea { get; set; }
4886
4887 /// <summary>
4888 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
4889 /// </summary>
4890 [JsonPropertyName("fallback")]
4891 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
4892
4893 public ImageSet(params IList<Image> images)
4894 {
4895 this.Images = images;
4896 }
4897
4898 public ImageSet WithId(string value)
4899 {
4900 this.Id = value;
4901 return this;
4902 }
4903
4904 public ImageSet WithRequires(HostCapabilities value)
4905 {
4906 this.Requires = value;
4907 return this;
4908 }
4909
4910 public ImageSet WithLang(string value)
4911 {
4912 this.Lang = value;
4913 return this;
4914 }
4915
4916 public ImageSet WithIsVisible(bool value)
4917 {
4918 this.IsVisible = value;
4919 return this;
4920 }
4921
4922 public ImageSet WithSeparator(bool value)
4923 {
4924 this.Separator = value;
4925 return this;
4926 }
4927
4928 public ImageSet WithHeight(ElementHeight value)
4929 {
4930 this.Height = value;
4931 return this;
4932 }
4933
4934 public ImageSet WithHorizontalAlignment(HorizontalAlignment value)
4935 {
4936 this.HorizontalAlignment = value;
4937 return this;
4938 }
4939
4940 public ImageSet WithSpacing(Spacing value)
4941 {
4942 this.Spacing = value;
4943 return this;
4944 }
4945
4946 public ImageSet WithTargetWidth(TargetWidth value)
4947 {
4948 this.TargetWidth = value;
4949 return this;
4950 }
4951
4952 public ImageSet WithIsSortKey(bool value)
4953 {
4954 this.IsSortKey = value;
4955 return this;
4956 }
4957
4958 public ImageSet WithImages(params IList<Image> value)
4959 {
4960 this.Images = value;
4961 return this;
4962 }
4963
4964 public ImageSet WithImageSize(ImageSize value)
4965 {
4966 this.ImageSize = value;
4967 return this;
4968 }
4969
4970 public ImageSet WithGridArea(string value)
4971 {
4972 this.GridArea = value;
4973 return this;
4974 }
4975
4976 public ImageSet WithFallback(IUnion<CardElement, FallbackElement> value)
4977 {
4978 this.Fallback = value;
4979 return this;
4980 }
4981}
4982
4983/// <summary>
4984/// A standalone image element.
4985/// </summary>
4986public class Image : CardElement
4987{
4988 /// <summary>
4989 /// Must be **Image**.
4990 /// </summary>
4991 [JsonPropertyName("type")]
4992 public string Type { get; } = "Image";
4993
4994 /// <summary>
4995 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
4996 /// </summary>
4997 [JsonPropertyName("id")]
4998 public string? Id { get; set; }
4999
5000 /// <summary>
5001 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
5002 /// </summary>
5003 [JsonPropertyName("requires")]
5004 public HostCapabilities? Requires { get; set; }
5005
5006 /// <summary>
5007 /// The locale associated with the element.
5008 /// </summary>
5009 [JsonPropertyName("lang")]
5010 public string? Lang { get; set; }
5011
5012 /// <summary>
5013 /// Controls the visibility of the element.
5014 /// </summary>
5015 [JsonPropertyName("isVisible")]
5016 public bool? IsVisible { get; set; }
5017
5018 /// <summary>
5019 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
5020 /// </summary>
5021 [JsonPropertyName("separator")]
5022 public bool? Separator { get; set; }
5023
5024 /// <summary>
5025 /// Controls how the element should be horizontally aligned.
5026 /// </summary>
5027 [JsonPropertyName("horizontalAlignment")]
5028 public HorizontalAlignment? HorizontalAlignment { get; set; }
5029
5030 /// <summary>
5031 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
5032 /// </summary>
5033 [JsonPropertyName("spacing")]
5034 public Spacing? Spacing { get; set; }
5035
5036 /// <summary>
5037 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
5038 /// </summary>
5039 [JsonPropertyName("targetWidth")]
5040 public TargetWidth? TargetWidth { get; set; }
5041
5042 /// <summary>
5043 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
5044 /// </summary>
5045 [JsonPropertyName("isSortKey")]
5046 public bool? IsSortKey { get; set; }
5047
5048 /// <summary>
5049 /// The URL (or Base64-encoded Data URI) of the image. Acceptable formats are PNG, JPEG, GIF and SVG.
5050 /// </summary>
5051 [JsonPropertyName("url")]
5052 public string? Url { get; set; }
5053
5054 /// <summary>
5055 /// The alternate text for the image, used for accessibility purposes.
5056 /// </summary>
5057 [JsonPropertyName("altText")]
5058 public string? AltText { get; set; }
5059
5060 /// <summary>
5061 /// The background color of the image.
5062 /// </summary>
5063 [JsonPropertyName("backgroundColor")]
5064 public string? BackgroundColor { get; set; }
5065
5066 /// <summary>
5067 /// The style of the image.
5068 /// </summary>
5069 [JsonPropertyName("style")]
5070 public ImageStyle? Style { get; set; }
5071
5072 /// <summary>
5073 /// The size of the image.
5074 /// </summary>
5075 [JsonPropertyName("size")]
5076 public Size? Size { get; set; }
5077
5078 /// <summary>
5079 /// The width of the image.
5080 /// </summary>
5081 [JsonPropertyName("width")]
5082 public string? Width { get; set; }
5083
5084 /// <summary>
5085 /// An Action that will be invoked when the image is tapped or clicked. Action.ShowCard is not supported.
5086 /// </summary>
5087 [JsonPropertyName("selectAction")]
5088 public Action? SelectAction { get; set; }
5089
5090 /// <summary>
5091 /// Controls if the image can be expanded to full screen.
5092 /// </summary>
5093 [JsonPropertyName("allowExpand")]
5094 public bool? AllowExpand { get; set; }
5095
5096 /// <summary>
5097 /// Teams-specific metadata associated with the image.
5098 /// </summary>
5099 [JsonPropertyName("msTeams")]
5100 public TeamsImageProperties? MsTeams { get; set; }
5101
5102 /// <summary>
5103 /// The height of the image.
5104 /// </summary>
5105 [JsonPropertyName("height")]
5106 public string? Height { get; set; }
5107
5108 /// <summary>
5109 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
5110 /// </summary>
5111 [JsonPropertyName("grid.area")]
5112 public string? GridArea { get; set; }
5113
5114 /// <summary>
5115 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
5116 /// </summary>
5117 [JsonPropertyName("fallback")]
5118 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
5119
5120 public Image(string url)
5121 {
5122 this.Url = url;
5123 }
5124
5125 public Image WithId(string value)
5126 {
5127 this.Id = value;
5128 return this;
5129 }
5130
5131 public Image WithRequires(HostCapabilities value)
5132 {
5133 this.Requires = value;
5134 return this;
5135 }
5136
5137 public Image WithLang(string value)
5138 {
5139 this.Lang = value;
5140 return this;
5141 }
5142
5143 public Image WithIsVisible(bool value)
5144 {
5145 this.IsVisible = value;
5146 return this;
5147 }
5148
5149 public Image WithSeparator(bool value)
5150 {
5151 this.Separator = value;
5152 return this;
5153 }
5154
5155 public Image WithHorizontalAlignment(HorizontalAlignment value)
5156 {
5157 this.HorizontalAlignment = value;
5158 return this;
5159 }
5160
5161 public Image WithSpacing(Spacing value)
5162 {
5163 this.Spacing = value;
5164 return this;
5165 }
5166
5167 public Image WithTargetWidth(TargetWidth value)
5168 {
5169 this.TargetWidth = value;
5170 return this;
5171 }
5172
5173 public Image WithIsSortKey(bool value)
5174 {
5175 this.IsSortKey = value;
5176 return this;
5177 }
5178
5179 public Image WithUrl(string value)
5180 {
5181 this.Url = value;
5182 return this;
5183 }
5184
5185 public Image WithAltText(string value)
5186 {
5187 this.AltText = value;
5188 return this;
5189 }
5190
5191 public Image WithBackgroundColor(string value)
5192 {
5193 this.BackgroundColor = value;
5194 return this;
5195 }
5196
5197 public Image WithStyle(ImageStyle value)
5198 {
5199 this.Style = value;
5200 return this;
5201 }
5202
5203 public Image WithSize(Size value)
5204 {
5205 this.Size = value;
5206 return this;
5207 }
5208
5209 public Image WithWidth(string value)
5210 {
5211 this.Width = value;
5212 return this;
5213 }
5214
5215 public Image WithSelectAction(Action value)
5216 {
5217 this.SelectAction = value;
5218 return this;
5219 }
5220
5221 public Image WithAllowExpand(bool value)
5222 {
5223 this.AllowExpand = value;
5224 return this;
5225 }
5226
5227 public Image WithMsTeams(TeamsImageProperties value)
5228 {
5229 this.MsTeams = value;
5230 return this;
5231 }
5232
5233 public Image WithHeight(string value)
5234 {
5235 this.Height = value;
5236 return this;
5237 }
5238
5239 public Image WithGridArea(string value)
5240 {
5241 this.GridArea = value;
5242 return this;
5243 }
5244
5245 public Image WithFallback(IUnion<CardElement, FallbackElement> value)
5246 {
5247 this.Fallback = value;
5248 return this;
5249 }
5250}
5251
5252/// <summary>
5253/// Represents a set of Teams-specific properties on an image.
5254/// </summary>
5255public class TeamsImageProperties : SerializableObject
5256{
5257 /// <summary>
5258 /// Controls if the image is expandable in Teams. This property is equivalent to the Image.allowExpand property.
5259 /// </summary>
5260 [JsonPropertyName("allowExpand")]
5261 public bool? AllowExpand { get; set; }
5262
5263 public TeamsImageProperties WithAllowExpand(bool value)
5264 {
5265 this.AllowExpand = value;
5266 return this;
5267 }
5268}
5269
5270/// <summary>
5271/// An input to allow the user to enter text.
5272/// </summary>
5273public class TextInput : CardElement
5274{
5275 /// <summary>
5276 /// Must be **Input.Text**.
5277 /// </summary>
5278 [JsonPropertyName("type")]
5279 public string Type { get; } = "Input.Text";
5280
5281 /// <summary>
5282 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
5283 /// </summary>
5284 [JsonPropertyName("id")]
5285 public string? Id { get; set; }
5286
5287 /// <summary>
5288 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
5289 /// </summary>
5290 [JsonPropertyName("requires")]
5291 public HostCapabilities? Requires { get; set; }
5292
5293 /// <summary>
5294 /// The locale associated with the element.
5295 /// </summary>
5296 [JsonPropertyName("lang")]
5297 public string? Lang { get; set; }
5298
5299 /// <summary>
5300 /// Controls the visibility of the element.
5301 /// </summary>
5302 [JsonPropertyName("isVisible")]
5303 public bool? IsVisible { get; set; }
5304
5305 /// <summary>
5306 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
5307 /// </summary>
5308 [JsonPropertyName("separator")]
5309 public bool? Separator { get; set; }
5310
5311 /// <summary>
5312 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
5313 /// </summary>
5314 [JsonPropertyName("height")]
5315 public ElementHeight? Height { get; set; }
5316
5317 /// <summary>
5318 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
5319 /// </summary>
5320 [JsonPropertyName("spacing")]
5321 public Spacing? Spacing { get; set; }
5322
5323 /// <summary>
5324 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
5325 /// </summary>
5326 [JsonPropertyName("targetWidth")]
5327 public TargetWidth? TargetWidth { get; set; }
5328
5329 /// <summary>
5330 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
5331 /// </summary>
5332 [JsonPropertyName("isSortKey")]
5333 public bool? IsSortKey { get; set; }
5334
5335 /// <summary>
5336 /// The label of the input.
5337 ///
5338 /// A label should **always** be provided to ensure the best user experience especially for users of assistive technology.
5339 /// </summary>
5340 [JsonPropertyName("label")]
5341 public string? Label { get; set; }
5342
5343 /// <summary>
5344 /// Controls whether the input is required. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
5345 /// </summary>
5346 [JsonPropertyName("isRequired")]
5347 public bool? IsRequired { get; set; }
5348
5349 /// <summary>
5350 /// The error message to display when the input fails validation. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
5351 /// </summary>
5352 [JsonPropertyName("errorMessage")]
5353 public string? ErrorMessage { get; set; }
5354
5355 /// <summary>
5356 /// An Action.ResetInputs action that will be executed when the value of the input changes.
5357 /// </summary>
5358 [JsonPropertyName("valueChangedAction")]
5359 public ResetInputsAction? ValueChangedAction { get; set; }
5360
5361 /// <summary>
5362 /// The default value of the input.
5363 /// </summary>
5364 [JsonPropertyName("value")]
5365 public string? Value { get; set; }
5366
5367 /// <summary>
5368 /// The maximum length of the text in the input.
5369 /// </summary>
5370 [JsonPropertyName("maxLength")]
5371 public float? MaxLength { get; set; }
5372
5373 /// <summary>
5374 /// Controls if the input should allow multiple lines of text.
5375 /// </summary>
5376 [JsonPropertyName("isMultiline")]
5377 public bool? IsMultiline { get; set; }
5378
5379 /// <summary>
5380 /// The text to display as a placeholder when the user hasn't entered a value.
5381 /// </summary>
5382 [JsonPropertyName("placeholder")]
5383 public string? Placeholder { get; set; }
5384
5385 /// <summary>
5386 /// The style of the input.
5387 /// </summary>
5388 [JsonPropertyName("style")]
5389 public InputTextStyle? Style { get; set; }
5390
5391 /// <summary>
5392 /// The action that should be displayed as a button alongside the input. Action.ShowCard is not supported.
5393 /// </summary>
5394 [JsonPropertyName("inlineAction")]
5395 public Action? InlineAction { get; set; }
5396
5397 /// <summary>
5398 /// The regular expression to validate the input.
5399 /// </summary>
5400 [JsonPropertyName("regex")]
5401 public string? Regex { get; set; }
5402
5403 /// <summary>
5404 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
5405 /// </summary>
5406 [JsonPropertyName("grid.area")]
5407 public string? GridArea { get; set; }
5408
5409 /// <summary>
5410 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
5411 /// </summary>
5412 [JsonPropertyName("fallback")]
5413 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
5414
5415 public TextInput WithId(string value)
5416 {
5417 this.Id = value;
5418 return this;
5419 }
5420
5421 public TextInput WithRequires(HostCapabilities value)
5422 {
5423 this.Requires = value;
5424 return this;
5425 }
5426
5427 public TextInput WithLang(string value)
5428 {
5429 this.Lang = value;
5430 return this;
5431 }
5432
5433 public TextInput WithIsVisible(bool value)
5434 {
5435 this.IsVisible = value;
5436 return this;
5437 }
5438
5439 public TextInput WithSeparator(bool value)
5440 {
5441 this.Separator = value;
5442 return this;
5443 }
5444
5445 public TextInput WithHeight(ElementHeight value)
5446 {
5447 this.Height = value;
5448 return this;
5449 }
5450
5451 public TextInput WithSpacing(Spacing value)
5452 {
5453 this.Spacing = value;
5454 return this;
5455 }
5456
5457 public TextInput WithTargetWidth(TargetWidth value)
5458 {
5459 this.TargetWidth = value;
5460 return this;
5461 }
5462
5463 public TextInput WithIsSortKey(bool value)
5464 {
5465 this.IsSortKey = value;
5466 return this;
5467 }
5468
5469 public TextInput WithLabel(string value)
5470 {
5471 this.Label = value;
5472 return this;
5473 }
5474
5475 public TextInput WithIsRequired(bool value)
5476 {
5477 this.IsRequired = value;
5478 return this;
5479 }
5480
5481 public TextInput WithErrorMessage(string value)
5482 {
5483 this.ErrorMessage = value;
5484 return this;
5485 }
5486
5487 public TextInput WithValueChangedAction(ResetInputsAction value)
5488 {
5489 this.ValueChangedAction = value;
5490 return this;
5491 }
5492
5493 public TextInput WithValue(string value)
5494 {
5495 this.Value = value;
5496 return this;
5497 }
5498
5499 public TextInput WithMaxLength(float value)
5500 {
5501 this.MaxLength = value;
5502 return this;
5503 }
5504
5505 public TextInput WithIsMultiline(bool value)
5506 {
5507 this.IsMultiline = value;
5508 return this;
5509 }
5510
5511 public TextInput WithPlaceholder(string value)
5512 {
5513 this.Placeholder = value;
5514 return this;
5515 }
5516
5517 public TextInput WithStyle(InputTextStyle value)
5518 {
5519 this.Style = value;
5520 return this;
5521 }
5522
5523 public TextInput WithInlineAction(Action value)
5524 {
5525 this.InlineAction = value;
5526 return this;
5527 }
5528
5529 public TextInput WithRegex(string value)
5530 {
5531 this.Regex = value;
5532 return this;
5533 }
5534
5535 public TextInput WithGridArea(string value)
5536 {
5537 this.GridArea = value;
5538 return this;
5539 }
5540
5541 public TextInput WithFallback(IUnion<CardElement, FallbackElement> value)
5542 {
5543 this.Fallback = value;
5544 return this;
5545 }
5546}
5547
5548/// <summary>
5549/// An input to allow the user to select a date.
5550/// </summary>
5551public class DateInput : CardElement
5552{
5553 /// <summary>
5554 /// Must be **Input.Date**.
5555 /// </summary>
5556 [JsonPropertyName("type")]
5557 public string Type { get; } = "Input.Date";
5558
5559 /// <summary>
5560 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
5561 /// </summary>
5562 [JsonPropertyName("id")]
5563 public string? Id { get; set; }
5564
5565 /// <summary>
5566 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
5567 /// </summary>
5568 [JsonPropertyName("requires")]
5569 public HostCapabilities? Requires { get; set; }
5570
5571 /// <summary>
5572 /// The locale associated with the element.
5573 /// </summary>
5574 [JsonPropertyName("lang")]
5575 public string? Lang { get; set; }
5576
5577 /// <summary>
5578 /// Controls the visibility of the element.
5579 /// </summary>
5580 [JsonPropertyName("isVisible")]
5581 public bool? IsVisible { get; set; }
5582
5583 /// <summary>
5584 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
5585 /// </summary>
5586 [JsonPropertyName("separator")]
5587 public bool? Separator { get; set; }
5588
5589 /// <summary>
5590 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
5591 /// </summary>
5592 [JsonPropertyName("height")]
5593 public ElementHeight? Height { get; set; }
5594
5595 /// <summary>
5596 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
5597 /// </summary>
5598 [JsonPropertyName("spacing")]
5599 public Spacing? Spacing { get; set; }
5600
5601 /// <summary>
5602 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
5603 /// </summary>
5604 [JsonPropertyName("targetWidth")]
5605 public TargetWidth? TargetWidth { get; set; }
5606
5607 /// <summary>
5608 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
5609 /// </summary>
5610 [JsonPropertyName("isSortKey")]
5611 public bool? IsSortKey { get; set; }
5612
5613 /// <summary>
5614 /// The label of the input.
5615 ///
5616 /// A label should **always** be provided to ensure the best user experience especially for users of assistive technology.
5617 /// </summary>
5618 [JsonPropertyName("label")]
5619 public string? Label { get; set; }
5620
5621 /// <summary>
5622 /// Controls whether the input is required. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
5623 /// </summary>
5624 [JsonPropertyName("isRequired")]
5625 public bool? IsRequired { get; set; }
5626
5627 /// <summary>
5628 /// The error message to display when the input fails validation. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
5629 /// </summary>
5630 [JsonPropertyName("errorMessage")]
5631 public string? ErrorMessage { get; set; }
5632
5633 /// <summary>
5634 /// An Action.ResetInputs action that will be executed when the value of the input changes.
5635 /// </summary>
5636 [JsonPropertyName("valueChangedAction")]
5637 public ResetInputsAction? ValueChangedAction { get; set; }
5638
5639 /// <summary>
5640 /// The default value of the input, in the `YYYY-MM-DD` format.
5641 /// </summary>
5642 [JsonPropertyName("value")]
5643 public string? Value { get; set; }
5644
5645 /// <summary>
5646 /// The text to display as a placeholder when the user has not selected a date.
5647 /// </summary>
5648 [JsonPropertyName("placeholder")]
5649 public string? Placeholder { get; set; }
5650
5651 /// <summary>
5652 /// The minimum date that can be selected.
5653 /// </summary>
5654 [JsonPropertyName("min")]
5655 public string? Min { get; set; }
5656
5657 /// <summary>
5658 /// The maximum date that can be selected.
5659 /// </summary>
5660 [JsonPropertyName("max")]
5661 public string? Max { get; set; }
5662
5663 /// <summary>
5664 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
5665 /// </summary>
5666 [JsonPropertyName("grid.area")]
5667 public string? GridArea { get; set; }
5668
5669 /// <summary>
5670 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
5671 /// </summary>
5672 [JsonPropertyName("fallback")]
5673 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
5674
5675 public DateInput WithId(string value)
5676 {
5677 this.Id = value;
5678 return this;
5679 }
5680
5681 public DateInput WithRequires(HostCapabilities value)
5682 {
5683 this.Requires = value;
5684 return this;
5685 }
5686
5687 public DateInput WithLang(string value)
5688 {
5689 this.Lang = value;
5690 return this;
5691 }
5692
5693 public DateInput WithIsVisible(bool value)
5694 {
5695 this.IsVisible = value;
5696 return this;
5697 }
5698
5699 public DateInput WithSeparator(bool value)
5700 {
5701 this.Separator = value;
5702 return this;
5703 }
5704
5705 public DateInput WithHeight(ElementHeight value)
5706 {
5707 this.Height = value;
5708 return this;
5709 }
5710
5711 public DateInput WithSpacing(Spacing value)
5712 {
5713 this.Spacing = value;
5714 return this;
5715 }
5716
5717 public DateInput WithTargetWidth(TargetWidth value)
5718 {
5719 this.TargetWidth = value;
5720 return this;
5721 }
5722
5723 public DateInput WithIsSortKey(bool value)
5724 {
5725 this.IsSortKey = value;
5726 return this;
5727 }
5728
5729 public DateInput WithLabel(string value)
5730 {
5731 this.Label = value;
5732 return this;
5733 }
5734
5735 public DateInput WithIsRequired(bool value)
5736 {
5737 this.IsRequired = value;
5738 return this;
5739 }
5740
5741 public DateInput WithErrorMessage(string value)
5742 {
5743 this.ErrorMessage = value;
5744 return this;
5745 }
5746
5747 public DateInput WithValueChangedAction(ResetInputsAction value)
5748 {
5749 this.ValueChangedAction = value;
5750 return this;
5751 }
5752
5753 public DateInput WithValue(string value)
5754 {
5755 this.Value = value;
5756 return this;
5757 }
5758
5759 public DateInput WithPlaceholder(string value)
5760 {
5761 this.Placeholder = value;
5762 return this;
5763 }
5764
5765 public DateInput WithMin(string value)
5766 {
5767 this.Min = value;
5768 return this;
5769 }
5770
5771 public DateInput WithMax(string value)
5772 {
5773 this.Max = value;
5774 return this;
5775 }
5776
5777 public DateInput WithGridArea(string value)
5778 {
5779 this.GridArea = value;
5780 return this;
5781 }
5782
5783 public DateInput WithFallback(IUnion<CardElement, FallbackElement> value)
5784 {
5785 this.Fallback = value;
5786 return this;
5787 }
5788}
5789
5790/// <summary>
5791/// An input to allow the user to select a time.
5792/// </summary>
5793public class TimeInput : CardElement
5794{
5795 /// <summary>
5796 /// Must be **Input.Time**.
5797 /// </summary>
5798 [JsonPropertyName("type")]
5799 public string Type { get; } = "Input.Time";
5800
5801 /// <summary>
5802 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
5803 /// </summary>
5804 [JsonPropertyName("id")]
5805 public string? Id { get; set; }
5806
5807 /// <summary>
5808 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
5809 /// </summary>
5810 [JsonPropertyName("requires")]
5811 public HostCapabilities? Requires { get; set; }
5812
5813 /// <summary>
5814 /// The locale associated with the element.
5815 /// </summary>
5816 [JsonPropertyName("lang")]
5817 public string? Lang { get; set; }
5818
5819 /// <summary>
5820 /// Controls the visibility of the element.
5821 /// </summary>
5822 [JsonPropertyName("isVisible")]
5823 public bool? IsVisible { get; set; }
5824
5825 /// <summary>
5826 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
5827 /// </summary>
5828 [JsonPropertyName("separator")]
5829 public bool? Separator { get; set; }
5830
5831 /// <summary>
5832 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
5833 /// </summary>
5834 [JsonPropertyName("height")]
5835 public ElementHeight? Height { get; set; }
5836
5837 /// <summary>
5838 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
5839 /// </summary>
5840 [JsonPropertyName("spacing")]
5841 public Spacing? Spacing { get; set; }
5842
5843 /// <summary>
5844 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
5845 /// </summary>
5846 [JsonPropertyName("targetWidth")]
5847 public TargetWidth? TargetWidth { get; set; }
5848
5849 /// <summary>
5850 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
5851 /// </summary>
5852 [JsonPropertyName("isSortKey")]
5853 public bool? IsSortKey { get; set; }
5854
5855 /// <summary>
5856 /// The label of the input.
5857 ///
5858 /// A label should **always** be provided to ensure the best user experience especially for users of assistive technology.
5859 /// </summary>
5860 [JsonPropertyName("label")]
5861 public string? Label { get; set; }
5862
5863 /// <summary>
5864 /// Controls whether the input is required. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
5865 /// </summary>
5866 [JsonPropertyName("isRequired")]
5867 public bool? IsRequired { get; set; }
5868
5869 /// <summary>
5870 /// The error message to display when the input fails validation. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
5871 /// </summary>
5872 [JsonPropertyName("errorMessage")]
5873 public string? ErrorMessage { get; set; }
5874
5875 /// <summary>
5876 /// An Action.ResetInputs action that will be executed when the value of the input changes.
5877 /// </summary>
5878 [JsonPropertyName("valueChangedAction")]
5879 public ResetInputsAction? ValueChangedAction { get; set; }
5880
5881 /// <summary>
5882 /// The default value of the input, in the `HH:MM` format.
5883 /// </summary>
5884 [JsonPropertyName("value")]
5885 public string? Value { get; set; }
5886
5887 /// <summary>
5888 /// The text to display as a placeholder when the user hasn't entered a value.
5889 /// </summary>
5890 [JsonPropertyName("placeholder")]
5891 public string? Placeholder { get; set; }
5892
5893 /// <summary>
5894 /// The minimum time that can be selected, in the `HH:MM` format.
5895 /// </summary>
5896 [JsonPropertyName("min")]
5897 public string? Min { get; set; }
5898
5899 /// <summary>
5900 /// The maximum time that can be selected, in the `HH:MM` format.
5901 /// </summary>
5902 [JsonPropertyName("max")]
5903 public string? Max { get; set; }
5904
5905 /// <summary>
5906 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
5907 /// </summary>
5908 [JsonPropertyName("grid.area")]
5909 public string? GridArea { get; set; }
5910
5911 /// <summary>
5912 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
5913 /// </summary>
5914 [JsonPropertyName("fallback")]
5915 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
5916
5917 public TimeInput WithId(string value)
5918 {
5919 this.Id = value;
5920 return this;
5921 }
5922
5923 public TimeInput WithRequires(HostCapabilities value)
5924 {
5925 this.Requires = value;
5926 return this;
5927 }
5928
5929 public TimeInput WithLang(string value)
5930 {
5931 this.Lang = value;
5932 return this;
5933 }
5934
5935 public TimeInput WithIsVisible(bool value)
5936 {
5937 this.IsVisible = value;
5938 return this;
5939 }
5940
5941 public TimeInput WithSeparator(bool value)
5942 {
5943 this.Separator = value;
5944 return this;
5945 }
5946
5947 public TimeInput WithHeight(ElementHeight value)
5948 {
5949 this.Height = value;
5950 return this;
5951 }
5952
5953 public TimeInput WithSpacing(Spacing value)
5954 {
5955 this.Spacing = value;
5956 return this;
5957 }
5958
5959 public TimeInput WithTargetWidth(TargetWidth value)
5960 {
5961 this.TargetWidth = value;
5962 return this;
5963 }
5964
5965 public TimeInput WithIsSortKey(bool value)
5966 {
5967 this.IsSortKey = value;
5968 return this;
5969 }
5970
5971 public TimeInput WithLabel(string value)
5972 {
5973 this.Label = value;
5974 return this;
5975 }
5976
5977 public TimeInput WithIsRequired(bool value)
5978 {
5979 this.IsRequired = value;
5980 return this;
5981 }
5982
5983 public TimeInput WithErrorMessage(string value)
5984 {
5985 this.ErrorMessage = value;
5986 return this;
5987 }
5988
5989 public TimeInput WithValueChangedAction(ResetInputsAction value)
5990 {
5991 this.ValueChangedAction = value;
5992 return this;
5993 }
5994
5995 public TimeInput WithValue(string value)
5996 {
5997 this.Value = value;
5998 return this;
5999 }
6000
6001 public TimeInput WithPlaceholder(string value)
6002 {
6003 this.Placeholder = value;
6004 return this;
6005 }
6006
6007 public TimeInput WithMin(string value)
6008 {
6009 this.Min = value;
6010 return this;
6011 }
6012
6013 public TimeInput WithMax(string value)
6014 {
6015 this.Max = value;
6016 return this;
6017 }
6018
6019 public TimeInput WithGridArea(string value)
6020 {
6021 this.GridArea = value;
6022 return this;
6023 }
6024
6025 public TimeInput WithFallback(IUnion<CardElement, FallbackElement> value)
6026 {
6027 this.Fallback = value;
6028 return this;
6029 }
6030}
6031
6032/// <summary>
6033/// An input to allow the user to enter a number.
6034/// </summary>
6035public class NumberInput : CardElement
6036{
6037 /// <summary>
6038 /// Must be **Input.Number**.
6039 /// </summary>
6040 [JsonPropertyName("type")]
6041 public string Type { get; } = "Input.Number";
6042
6043 /// <summary>
6044 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
6045 /// </summary>
6046 [JsonPropertyName("id")]
6047 public string? Id { get; set; }
6048
6049 /// <summary>
6050 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
6051 /// </summary>
6052 [JsonPropertyName("requires")]
6053 public HostCapabilities? Requires { get; set; }
6054
6055 /// <summary>
6056 /// The locale associated with the element.
6057 /// </summary>
6058 [JsonPropertyName("lang")]
6059 public string? Lang { get; set; }
6060
6061 /// <summary>
6062 /// Controls the visibility of the element.
6063 /// </summary>
6064 [JsonPropertyName("isVisible")]
6065 public bool? IsVisible { get; set; }
6066
6067 /// <summary>
6068 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
6069 /// </summary>
6070 [JsonPropertyName("separator")]
6071 public bool? Separator { get; set; }
6072
6073 /// <summary>
6074 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
6075 /// </summary>
6076 [JsonPropertyName("height")]
6077 public ElementHeight? Height { get; set; }
6078
6079 /// <summary>
6080 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
6081 /// </summary>
6082 [JsonPropertyName("spacing")]
6083 public Spacing? Spacing { get; set; }
6084
6085 /// <summary>
6086 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
6087 /// </summary>
6088 [JsonPropertyName("targetWidth")]
6089 public TargetWidth? TargetWidth { get; set; }
6090
6091 /// <summary>
6092 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
6093 /// </summary>
6094 [JsonPropertyName("isSortKey")]
6095 public bool? IsSortKey { get; set; }
6096
6097 /// <summary>
6098 /// The label of the input.
6099 ///
6100 /// A label should **always** be provided to ensure the best user experience especially for users of assistive technology.
6101 /// </summary>
6102 [JsonPropertyName("label")]
6103 public string? Label { get; set; }
6104
6105 /// <summary>
6106 /// Controls whether the input is required. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
6107 /// </summary>
6108 [JsonPropertyName("isRequired")]
6109 public bool? IsRequired { get; set; }
6110
6111 /// <summary>
6112 /// The error message to display when the input fails validation. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
6113 /// </summary>
6114 [JsonPropertyName("errorMessage")]
6115 public string? ErrorMessage { get; set; }
6116
6117 /// <summary>
6118 /// An Action.ResetInputs action that will be executed when the value of the input changes.
6119 /// </summary>
6120 [JsonPropertyName("valueChangedAction")]
6121 public ResetInputsAction? ValueChangedAction { get; set; }
6122
6123 /// <summary>
6124 /// The default value of the input.
6125 /// </summary>
6126 [JsonPropertyName("value")]
6127 public float? Value { get; set; }
6128
6129 /// <summary>
6130 /// The text to display as a placeholder when the user hasn't entered a value.
6131 /// </summary>
6132 [JsonPropertyName("placeholder")]
6133 public string? Placeholder { get; set; }
6134
6135 /// <summary>
6136 /// The minimum value that can be entered.
6137 /// </summary>
6138 [JsonPropertyName("min")]
6139 public float? Min { get; set; }
6140
6141 /// <summary>
6142 /// The maximum value that can be entered.
6143 /// </summary>
6144 [JsonPropertyName("max")]
6145 public float? Max { get; set; }
6146
6147 /// <summary>
6148 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
6149 /// </summary>
6150 [JsonPropertyName("grid.area")]
6151 public string? GridArea { get; set; }
6152
6153 /// <summary>
6154 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
6155 /// </summary>
6156 [JsonPropertyName("fallback")]
6157 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
6158
6159 public NumberInput WithId(string value)
6160 {
6161 this.Id = value;
6162 return this;
6163 }
6164
6165 public NumberInput WithRequires(HostCapabilities value)
6166 {
6167 this.Requires = value;
6168 return this;
6169 }
6170
6171 public NumberInput WithLang(string value)
6172 {
6173 this.Lang = value;
6174 return this;
6175 }
6176
6177 public NumberInput WithIsVisible(bool value)
6178 {
6179 this.IsVisible = value;
6180 return this;
6181 }
6182
6183 public NumberInput WithSeparator(bool value)
6184 {
6185 this.Separator = value;
6186 return this;
6187 }
6188
6189 public NumberInput WithHeight(ElementHeight value)
6190 {
6191 this.Height = value;
6192 return this;
6193 }
6194
6195 public NumberInput WithSpacing(Spacing value)
6196 {
6197 this.Spacing = value;
6198 return this;
6199 }
6200
6201 public NumberInput WithTargetWidth(TargetWidth value)
6202 {
6203 this.TargetWidth = value;
6204 return this;
6205 }
6206
6207 public NumberInput WithIsSortKey(bool value)
6208 {
6209 this.IsSortKey = value;
6210 return this;
6211 }
6212
6213 public NumberInput WithLabel(string value)
6214 {
6215 this.Label = value;
6216 return this;
6217 }
6218
6219 public NumberInput WithIsRequired(bool value)
6220 {
6221 this.IsRequired = value;
6222 return this;
6223 }
6224
6225 public NumberInput WithErrorMessage(string value)
6226 {
6227 this.ErrorMessage = value;
6228 return this;
6229 }
6230
6231 public NumberInput WithValueChangedAction(ResetInputsAction value)
6232 {
6233 this.ValueChangedAction = value;
6234 return this;
6235 }
6236
6237 public NumberInput WithValue(float value)
6238 {
6239 this.Value = value;
6240 return this;
6241 }
6242
6243 public NumberInput WithPlaceholder(string value)
6244 {
6245 this.Placeholder = value;
6246 return this;
6247 }
6248
6249 public NumberInput WithMin(float value)
6250 {
6251 this.Min = value;
6252 return this;
6253 }
6254
6255 public NumberInput WithMax(float value)
6256 {
6257 this.Max = value;
6258 return this;
6259 }
6260
6261 public NumberInput WithGridArea(string value)
6262 {
6263 this.GridArea = value;
6264 return this;
6265 }
6266
6267 public NumberInput WithFallback(IUnion<CardElement, FallbackElement> value)
6268 {
6269 this.Fallback = value;
6270 return this;
6271 }
6272}
6273
6274/// <summary>
6275/// An input to allow the user to select between on/off states.
6276/// </summary>
6277public class ToggleInput : CardElement
6278{
6279 /// <summary>
6280 /// Must be **Input.Toggle**.
6281 /// </summary>
6282 [JsonPropertyName("type")]
6283 public string Type { get; } = "Input.Toggle";
6284
6285 /// <summary>
6286 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
6287 /// </summary>
6288 [JsonPropertyName("id")]
6289 public string? Id { get; set; }
6290
6291 /// <summary>
6292 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
6293 /// </summary>
6294 [JsonPropertyName("requires")]
6295 public HostCapabilities? Requires { get; set; }
6296
6297 /// <summary>
6298 /// The locale associated with the element.
6299 /// </summary>
6300 [JsonPropertyName("lang")]
6301 public string? Lang { get; set; }
6302
6303 /// <summary>
6304 /// Controls the visibility of the element.
6305 /// </summary>
6306 [JsonPropertyName("isVisible")]
6307 public bool? IsVisible { get; set; }
6308
6309 /// <summary>
6310 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
6311 /// </summary>
6312 [JsonPropertyName("separator")]
6313 public bool? Separator { get; set; }
6314
6315 /// <summary>
6316 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
6317 /// </summary>
6318 [JsonPropertyName("height")]
6319 public ElementHeight? Height { get; set; }
6320
6321 /// <summary>
6322 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
6323 /// </summary>
6324 [JsonPropertyName("spacing")]
6325 public Spacing? Spacing { get; set; }
6326
6327 /// <summary>
6328 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
6329 /// </summary>
6330 [JsonPropertyName("targetWidth")]
6331 public TargetWidth? TargetWidth { get; set; }
6332
6333 /// <summary>
6334 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
6335 /// </summary>
6336 [JsonPropertyName("isSortKey")]
6337 public bool? IsSortKey { get; set; }
6338
6339 /// <summary>
6340 /// The label of the input.
6341 ///
6342 /// A label should **always** be provided to ensure the best user experience especially for users of assistive technology.
6343 /// </summary>
6344 [JsonPropertyName("label")]
6345 public string? Label { get; set; }
6346
6347 /// <summary>
6348 /// Controls whether the input is required. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
6349 /// </summary>
6350 [JsonPropertyName("isRequired")]
6351 public bool? IsRequired { get; set; }
6352
6353 /// <summary>
6354 /// The error message to display when the input fails validation. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
6355 /// </summary>
6356 [JsonPropertyName("errorMessage")]
6357 public string? ErrorMessage { get; set; }
6358
6359 /// <summary>
6360 /// An Action.ResetInputs action that will be executed when the value of the input changes.
6361 /// </summary>
6362 [JsonPropertyName("valueChangedAction")]
6363 public ResetInputsAction? ValueChangedAction { get; set; }
6364
6365 /// <summary>
6366 /// The default value of the input.
6367 /// </summary>
6368 [JsonPropertyName("value")]
6369 public string? Value { get; set; }
6370
6371 /// <summary>
6372 /// The title (caption) to display next to the toggle.
6373 /// </summary>
6374 [JsonPropertyName("title")]
6375 public string? Title { get; set; }
6376
6377 /// <summary>
6378 /// The value to send to the Bot when the toggle is on.
6379 /// </summary>
6380 [JsonPropertyName("valueOn")]
6381 public string? ValueOn { get; set; }
6382
6383 /// <summary>
6384 /// The value to send to the Bot when the toggle is off.
6385 /// </summary>
6386 [JsonPropertyName("valueOff")]
6387 public string? ValueOff { get; set; }
6388
6389 /// <summary>
6390 /// Controls if the title should wrap.
6391 /// </summary>
6392 [JsonPropertyName("wrap")]
6393 public bool? Wrap { get; set; }
6394
6395 /// <summary>
6396 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
6397 /// </summary>
6398 [JsonPropertyName("grid.area")]
6399 public string? GridArea { get; set; }
6400
6401 /// <summary>
6402 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
6403 /// </summary>
6404 [JsonPropertyName("fallback")]
6405 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
6406
6407 public ToggleInput(string title)
6408 {
6409 this.Title = title;
6410 }
6411
6412 public ToggleInput WithId(string value)
6413 {
6414 this.Id = value;
6415 return this;
6416 }
6417
6418 public ToggleInput WithRequires(HostCapabilities value)
6419 {
6420 this.Requires = value;
6421 return this;
6422 }
6423
6424 public ToggleInput WithLang(string value)
6425 {
6426 this.Lang = value;
6427 return this;
6428 }
6429
6430 public ToggleInput WithIsVisible(bool value)
6431 {
6432 this.IsVisible = value;
6433 return this;
6434 }
6435
6436 public ToggleInput WithSeparator(bool value)
6437 {
6438 this.Separator = value;
6439 return this;
6440 }
6441
6442 public ToggleInput WithHeight(ElementHeight value)
6443 {
6444 this.Height = value;
6445 return this;
6446 }
6447
6448 public ToggleInput WithSpacing(Spacing value)
6449 {
6450 this.Spacing = value;
6451 return this;
6452 }
6453
6454 public ToggleInput WithTargetWidth(TargetWidth value)
6455 {
6456 this.TargetWidth = value;
6457 return this;
6458 }
6459
6460 public ToggleInput WithIsSortKey(bool value)
6461 {
6462 this.IsSortKey = value;
6463 return this;
6464 }
6465
6466 public ToggleInput WithLabel(string value)
6467 {
6468 this.Label = value;
6469 return this;
6470 }
6471
6472 public ToggleInput WithIsRequired(bool value)
6473 {
6474 this.IsRequired = value;
6475 return this;
6476 }
6477
6478 public ToggleInput WithErrorMessage(string value)
6479 {
6480 this.ErrorMessage = value;
6481 return this;
6482 }
6483
6484 public ToggleInput WithValueChangedAction(ResetInputsAction value)
6485 {
6486 this.ValueChangedAction = value;
6487 return this;
6488 }
6489
6490 public ToggleInput WithValue(string value)
6491 {
6492 this.Value = value;
6493 return this;
6494 }
6495
6496 public ToggleInput WithTitle(string value)
6497 {
6498 this.Title = value;
6499 return this;
6500 }
6501
6502 public ToggleInput WithValueOn(string value)
6503 {
6504 this.ValueOn = value;
6505 return this;
6506 }
6507
6508 public ToggleInput WithValueOff(string value)
6509 {
6510 this.ValueOff = value;
6511 return this;
6512 }
6513
6514 public ToggleInput WithWrap(bool value)
6515 {
6516 this.Wrap = value;
6517 return this;
6518 }
6519
6520 public ToggleInput WithGridArea(string value)
6521 {
6522 this.GridArea = value;
6523 return this;
6524 }
6525
6526 public ToggleInput WithFallback(IUnion<CardElement, FallbackElement> value)
6527 {
6528 this.Fallback = value;
6529 return this;
6530 }
6531}
6532
6533/// <summary>
6534/// An input to allow the user to select one or more values.
6535/// </summary>
6536public class ChoiceSetInput : CardElement
6537{
6538 /// <summary>
6539 /// Must be **Input.ChoiceSet**.
6540 /// </summary>
6541 [JsonPropertyName("type")]
6542 public string Type { get; } = "Input.ChoiceSet";
6543
6544 /// <summary>
6545 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
6546 /// </summary>
6547 [JsonPropertyName("id")]
6548 public string? Id { get; set; }
6549
6550 /// <summary>
6551 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
6552 /// </summary>
6553 [JsonPropertyName("requires")]
6554 public HostCapabilities? Requires { get; set; }
6555
6556 /// <summary>
6557 /// The locale associated with the element.
6558 /// </summary>
6559 [JsonPropertyName("lang")]
6560 public string? Lang { get; set; }
6561
6562 /// <summary>
6563 /// Controls the visibility of the element.
6564 /// </summary>
6565 [JsonPropertyName("isVisible")]
6566 public bool? IsVisible { get; set; }
6567
6568 /// <summary>
6569 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
6570 /// </summary>
6571 [JsonPropertyName("separator")]
6572 public bool? Separator { get; set; }
6573
6574 /// <summary>
6575 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
6576 /// </summary>
6577 [JsonPropertyName("height")]
6578 public ElementHeight? Height { get; set; }
6579
6580 /// <summary>
6581 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
6582 /// </summary>
6583 [JsonPropertyName("spacing")]
6584 public Spacing? Spacing { get; set; }
6585
6586 /// <summary>
6587 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
6588 /// </summary>
6589 [JsonPropertyName("targetWidth")]
6590 public TargetWidth? TargetWidth { get; set; }
6591
6592 /// <summary>
6593 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
6594 /// </summary>
6595 [JsonPropertyName("isSortKey")]
6596 public bool? IsSortKey { get; set; }
6597
6598 /// <summary>
6599 /// The label of the input.
6600 ///
6601 /// A label should **always** be provided to ensure the best user experience especially for users of assistive technology.
6602 /// </summary>
6603 [JsonPropertyName("label")]
6604 public string? Label { get; set; }
6605
6606 /// <summary>
6607 /// Controls whether the input is required. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
6608 /// </summary>
6609 [JsonPropertyName("isRequired")]
6610 public bool? IsRequired { get; set; }
6611
6612 /// <summary>
6613 /// The error message to display when the input fails validation. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
6614 /// </summary>
6615 [JsonPropertyName("errorMessage")]
6616 public string? ErrorMessage { get; set; }
6617
6618 /// <summary>
6619 /// An Action.ResetInputs action that will be executed when the value of the input changes.
6620 /// </summary>
6621 [JsonPropertyName("valueChangedAction")]
6622 public ResetInputsAction? ValueChangedAction { get; set; }
6623
6624 /// <summary>
6625 /// The default value of the input.
6626 /// </summary>
6627 [JsonPropertyName("value")]
6628 public string? Value { get; set; }
6629
6630 /// <summary>
6631 /// The choices associated with the input.
6632 /// </summary>
6633 [JsonPropertyName("choices")]
6634 public IList<Choice>? Choices { get; set; }
6635
6636 /// <summary>
6637 /// A Data.Query object that defines the dataset from which to dynamically fetch the choices for the input.
6638 /// </summary>
6639 [JsonPropertyName("choices.data")]
6640 public QueryData? ChoicesData { get; set; }
6641
6642 /// <summary>
6643 /// Controls whether the input should be displayed as a dropdown (compact) or a list of radio buttons or checkboxes (expanded).
6644 /// </summary>
6645 [JsonPropertyName("style")]
6646 public StyleEnum? Style { get; set; }
6647
6648 /// <summary>
6649 /// Controls whether multiple choices can be selected.
6650 /// </summary>
6651 [JsonPropertyName("isMultiSelect")]
6652 public bool? IsMultiSelect { get; set; }
6653
6654 /// <summary>
6655 /// The text to display as a placeholder when the user has not entered any value.
6656 /// </summary>
6657 [JsonPropertyName("placeholder")]
6658 public string? Placeholder { get; set; }
6659
6660 /// <summary>
6661 /// Controls if choice titles should wrap.
6662 /// </summary>
6663 [JsonPropertyName("wrap")]
6664 public bool? Wrap { get; set; }
6665
6666 /// <summary>
6667 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
6668 /// </summary>
6669 [JsonPropertyName("grid.area")]
6670 public string? GridArea { get; set; }
6671
6672 /// <summary>
6673 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
6674 /// </summary>
6675 [JsonPropertyName("fallback")]
6676 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
6677
6678 public ChoiceSetInput(params IList<Choice> choices)
6679 {
6680 this.Choices = choices;
6681 }
6682
6683 public ChoiceSetInput WithId(string value)
6684 {
6685 this.Id = value;
6686 return this;
6687 }
6688
6689 public ChoiceSetInput WithRequires(HostCapabilities value)
6690 {
6691 this.Requires = value;
6692 return this;
6693 }
6694
6695 public ChoiceSetInput WithLang(string value)
6696 {
6697 this.Lang = value;
6698 return this;
6699 }
6700
6701 public ChoiceSetInput WithIsVisible(bool value)
6702 {
6703 this.IsVisible = value;
6704 return this;
6705 }
6706
6707 public ChoiceSetInput WithSeparator(bool value)
6708 {
6709 this.Separator = value;
6710 return this;
6711 }
6712
6713 public ChoiceSetInput WithHeight(ElementHeight value)
6714 {
6715 this.Height = value;
6716 return this;
6717 }
6718
6719 public ChoiceSetInput WithSpacing(Spacing value)
6720 {
6721 this.Spacing = value;
6722 return this;
6723 }
6724
6725 public ChoiceSetInput WithTargetWidth(TargetWidth value)
6726 {
6727 this.TargetWidth = value;
6728 return this;
6729 }
6730
6731 public ChoiceSetInput WithIsSortKey(bool value)
6732 {
6733 this.IsSortKey = value;
6734 return this;
6735 }
6736
6737 public ChoiceSetInput WithLabel(string value)
6738 {
6739 this.Label = value;
6740 return this;
6741 }
6742
6743 public ChoiceSetInput WithIsRequired(bool value)
6744 {
6745 this.IsRequired = value;
6746 return this;
6747 }
6748
6749 public ChoiceSetInput WithErrorMessage(string value)
6750 {
6751 this.ErrorMessage = value;
6752 return this;
6753 }
6754
6755 public ChoiceSetInput WithValueChangedAction(ResetInputsAction value)
6756 {
6757 this.ValueChangedAction = value;
6758 return this;
6759 }
6760
6761 public ChoiceSetInput WithValue(string value)
6762 {
6763 this.Value = value;
6764 return this;
6765 }
6766
6767 public ChoiceSetInput WithChoices(params IList<Choice> value)
6768 {
6769 this.Choices = value;
6770 return this;
6771 }
6772
6773 public ChoiceSetInput WithChoicesData(QueryData value)
6774 {
6775 this.ChoicesData = value;
6776 return this;
6777 }
6778
6779 public ChoiceSetInput WithStyle(StyleEnum value)
6780 {
6781 this.Style = value;
6782 return this;
6783 }
6784
6785 public ChoiceSetInput WithIsMultiSelect(bool value)
6786 {
6787 this.IsMultiSelect = value;
6788 return this;
6789 }
6790
6791 public ChoiceSetInput WithPlaceholder(string value)
6792 {
6793 this.Placeholder = value;
6794 return this;
6795 }
6796
6797 public ChoiceSetInput WithWrap(bool value)
6798 {
6799 this.Wrap = value;
6800 return this;
6801 }
6802
6803 public ChoiceSetInput WithGridArea(string value)
6804 {
6805 this.GridArea = value;
6806 return this;
6807 }
6808
6809 public ChoiceSetInput WithFallback(IUnion<CardElement, FallbackElement> value)
6810 {
6811 this.Fallback = value;
6812 return this;
6813 }
6814}
6815
6816/// <summary>
6817/// A choice as used by the Input.ChoiceSet input.
6818/// </summary>
6819public class Choice : SerializableObject
6820{
6821 /// <summary>
6822 /// The text to display for the choice.
6823 /// </summary>
6824 [JsonPropertyName("title")]
6825 public string? Title { get; set; }
6826
6827 /// <summary>
6828 /// The value associated with the choice, as sent to the Bot when an Action.Submit or Action.Execute is invoked
6829 /// </summary>
6830 [JsonPropertyName("value")]
6831 public string? Value { get; set; }
6832
6833 public Choice WithTitle(string value)
6834 {
6835 this.Title = value;
6836 return this;
6837 }
6838
6839 public Choice WithValue(string value)
6840 {
6841 this.Value = value;
6842 return this;
6843 }
6844}
6845
6846/// <summary>
6847/// Defines a query to dynamically fetch data from a Bot.
6848/// </summary>
6849public class QueryData : SerializableObject
6850{
6851 /// <summary>
6852 /// Must be **Data.Query**.
6853 /// </summary>
6854 [JsonPropertyName("type")]
6855 public string Type { get; } = "Data.Query";
6856
6857 /// <summary>
6858 /// The dataset from which to fetch the data.
6859 /// </summary>
6860 [JsonPropertyName("dataset")]
6861 public string? Dataset { get; set; }
6862
6863 /// <summary>
6864 /// Controls which inputs are associated with the Data.Query. When a Data.Query is executed, the values of the associated inputs are sent to the Bot, allowing it to perform filtering operations based on the user's input.
6865 /// </summary>
6866 [JsonPropertyName("associatedInputs")]
6867 public AssociatedInputs? AssociatedInputs { get; set; }
6868
6869 /// <summary>
6870 /// The maximum number of data items that should be returned by the query. Card authors should not specify this property in their card payload. It is determined by the client and sent to the Bot to enable pagination.
6871 /// </summary>
6872 [JsonPropertyName("count")]
6873 public float? Count { get; set; }
6874
6875 /// <summary>
6876 /// The number of data items to be skipped by the query. Card authors should not specify this property in their card payload. It is determined by the client and sent to the Bot to enable pagination.
6877 /// </summary>
6878 [JsonPropertyName("skip")]
6879 public float? Skip { get; set; }
6880
6881 public QueryData WithDataset(string value)
6882 {
6883 this.Dataset = value;
6884 return this;
6885 }
6886
6887 public QueryData WithAssociatedInputs(AssociatedInputs value)
6888 {
6889 this.AssociatedInputs = value;
6890 return this;
6891 }
6892
6893 public QueryData WithCount(float value)
6894 {
6895 this.Count = value;
6896 return this;
6897 }
6898
6899 public QueryData WithSkip(float value)
6900 {
6901 this.Skip = value;
6902 return this;
6903 }
6904}
6905
6906/// <summary>
6907/// An input to allow the user to rate something using stars.
6908/// </summary>
6909public class RatingInput : CardElement
6910{
6911 /// <summary>
6912 /// Must be **Input.Rating**.
6913 /// </summary>
6914 [JsonPropertyName("type")]
6915 public string Type { get; } = "Input.Rating";
6916
6917 /// <summary>
6918 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
6919 /// </summary>
6920 [JsonPropertyName("id")]
6921 public string? Id { get; set; }
6922
6923 /// <summary>
6924 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
6925 /// </summary>
6926 [JsonPropertyName("requires")]
6927 public HostCapabilities? Requires { get; set; }
6928
6929 /// <summary>
6930 /// The locale associated with the element.
6931 /// </summary>
6932 [JsonPropertyName("lang")]
6933 public string? Lang { get; set; }
6934
6935 /// <summary>
6936 /// Controls the visibility of the element.
6937 /// </summary>
6938 [JsonPropertyName("isVisible")]
6939 public bool? IsVisible { get; set; }
6940
6941 /// <summary>
6942 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
6943 /// </summary>
6944 [JsonPropertyName("separator")]
6945 public bool? Separator { get; set; }
6946
6947 /// <summary>
6948 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
6949 /// </summary>
6950 [JsonPropertyName("height")]
6951 public ElementHeight? Height { get; set; }
6952
6953 /// <summary>
6954 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
6955 /// </summary>
6956 [JsonPropertyName("spacing")]
6957 public Spacing? Spacing { get; set; }
6958
6959 /// <summary>
6960 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
6961 /// </summary>
6962 [JsonPropertyName("targetWidth")]
6963 public TargetWidth? TargetWidth { get; set; }
6964
6965 /// <summary>
6966 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
6967 /// </summary>
6968 [JsonPropertyName("isSortKey")]
6969 public bool? IsSortKey { get; set; }
6970
6971 /// <summary>
6972 /// The label of the input.
6973 ///
6974 /// A label should **always** be provided to ensure the best user experience especially for users of assistive technology.
6975 /// </summary>
6976 [JsonPropertyName("label")]
6977 public string? Label { get; set; }
6978
6979 /// <summary>
6980 /// Controls whether the input is required. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
6981 /// </summary>
6982 [JsonPropertyName("isRequired")]
6983 public bool? IsRequired { get; set; }
6984
6985 /// <summary>
6986 /// The error message to display when the input fails validation. See [Input validation](https://adaptivecards.microsoft.com/?topic=input-validation) for more details.
6987 /// </summary>
6988 [JsonPropertyName("errorMessage")]
6989 public string? ErrorMessage { get; set; }
6990
6991 /// <summary>
6992 /// An Action.ResetInputs action that will be executed when the value of the input changes.
6993 /// </summary>
6994 [JsonPropertyName("valueChangedAction")]
6995 public ResetInputsAction? ValueChangedAction { get; set; }
6996
6997 /// <summary>
6998 /// The default value of the input.
6999 /// </summary>
7000 [JsonPropertyName("value")]
7001 public float? Value { get; set; }
7002
7003 /// <summary>
7004 /// The number of stars to display.
7005 /// </summary>
7006 [JsonPropertyName("max")]
7007 public float? Max { get; set; }
7008
7009 /// <summary>
7010 /// Controls if the user can select half stars.
7011 /// </summary>
7012 [JsonPropertyName("allowHalfSteps")]
7013 public bool? AllowHalfSteps { get; set; }
7014
7015 /// <summary>
7016 /// The size of the stars.
7017 /// </summary>
7018 [JsonPropertyName("size")]
7019 public RatingSize? Size { get; set; }
7020
7021 /// <summary>
7022 /// The color of the stars.
7023 /// </summary>
7024 [JsonPropertyName("color")]
7025 public RatingColor? Color { get; set; }
7026
7027 /// <summary>
7028 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
7029 /// </summary>
7030 [JsonPropertyName("grid.area")]
7031 public string? GridArea { get; set; }
7032
7033 /// <summary>
7034 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
7035 /// </summary>
7036 [JsonPropertyName("fallback")]
7037 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
7038
7039 public RatingInput WithId(string value)
7040 {
7041 this.Id = value;
7042 return this;
7043 }
7044
7045 public RatingInput WithRequires(HostCapabilities value)
7046 {
7047 this.Requires = value;
7048 return this;
7049 }
7050
7051 public RatingInput WithLang(string value)
7052 {
7053 this.Lang = value;
7054 return this;
7055 }
7056
7057 public RatingInput WithIsVisible(bool value)
7058 {
7059 this.IsVisible = value;
7060 return this;
7061 }
7062
7063 public RatingInput WithSeparator(bool value)
7064 {
7065 this.Separator = value;
7066 return this;
7067 }
7068
7069 public RatingInput WithHeight(ElementHeight value)
7070 {
7071 this.Height = value;
7072 return this;
7073 }
7074
7075 public RatingInput WithSpacing(Spacing value)
7076 {
7077 this.Spacing = value;
7078 return this;
7079 }
7080
7081 public RatingInput WithTargetWidth(TargetWidth value)
7082 {
7083 this.TargetWidth = value;
7084 return this;
7085 }
7086
7087 public RatingInput WithIsSortKey(bool value)
7088 {
7089 this.IsSortKey = value;
7090 return this;
7091 }
7092
7093 public RatingInput WithLabel(string value)
7094 {
7095 this.Label = value;
7096 return this;
7097 }
7098
7099 public RatingInput WithIsRequired(bool value)
7100 {
7101 this.IsRequired = value;
7102 return this;
7103 }
7104
7105 public RatingInput WithErrorMessage(string value)
7106 {
7107 this.ErrorMessage = value;
7108 return this;
7109 }
7110
7111 public RatingInput WithValueChangedAction(ResetInputsAction value)
7112 {
7113 this.ValueChangedAction = value;
7114 return this;
7115 }
7116
7117 public RatingInput WithValue(float value)
7118 {
7119 this.Value = value;
7120 return this;
7121 }
7122
7123 public RatingInput WithMax(float value)
7124 {
7125 this.Max = value;
7126 return this;
7127 }
7128
7129 public RatingInput WithAllowHalfSteps(bool value)
7130 {
7131 this.AllowHalfSteps = value;
7132 return this;
7133 }
7134
7135 public RatingInput WithSize(RatingSize value)
7136 {
7137 this.Size = value;
7138 return this;
7139 }
7140
7141 public RatingInput WithColor(RatingColor value)
7142 {
7143 this.Color = value;
7144 return this;
7145 }
7146
7147 public RatingInput WithGridArea(string value)
7148 {
7149 this.GridArea = value;
7150 return this;
7151 }
7152
7153 public RatingInput WithFallback(IUnion<CardElement, FallbackElement> value)
7154 {
7155 this.Fallback = value;
7156 return this;
7157 }
7158}
7159
7160/// <summary>
7161/// A read-only star rating element, to display the rating of something.
7162/// </summary>
7163public class Rating : CardElement
7164{
7165 /// <summary>
7166 /// Must be **Rating**.
7167 /// </summary>
7168 [JsonPropertyName("type")]
7169 public string Type { get; } = "Rating";
7170
7171 /// <summary>
7172 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
7173 /// </summary>
7174 [JsonPropertyName("id")]
7175 public string? Id { get; set; }
7176
7177 /// <summary>
7178 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
7179 /// </summary>
7180 [JsonPropertyName("requires")]
7181 public HostCapabilities? Requires { get; set; }
7182
7183 /// <summary>
7184 /// The locale associated with the element.
7185 /// </summary>
7186 [JsonPropertyName("lang")]
7187 public string? Lang { get; set; }
7188
7189 /// <summary>
7190 /// Controls the visibility of the element.
7191 /// </summary>
7192 [JsonPropertyName("isVisible")]
7193 public bool? IsVisible { get; set; }
7194
7195 /// <summary>
7196 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
7197 /// </summary>
7198 [JsonPropertyName("separator")]
7199 public bool? Separator { get; set; }
7200
7201 /// <summary>
7202 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
7203 /// </summary>
7204 [JsonPropertyName("height")]
7205 public ElementHeight? Height { get; set; }
7206
7207 /// <summary>
7208 /// Controls how the element should be horizontally aligned.
7209 /// </summary>
7210 [JsonPropertyName("horizontalAlignment")]
7211 public HorizontalAlignment? HorizontalAlignment { get; set; }
7212
7213 /// <summary>
7214 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
7215 /// </summary>
7216 [JsonPropertyName("spacing")]
7217 public Spacing? Spacing { get; set; }
7218
7219 /// <summary>
7220 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
7221 /// </summary>
7222 [JsonPropertyName("targetWidth")]
7223 public TargetWidth? TargetWidth { get; set; }
7224
7225 /// <summary>
7226 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
7227 /// </summary>
7228 [JsonPropertyName("isSortKey")]
7229 public bool? IsSortKey { get; set; }
7230
7231 /// <summary>
7232 /// The value of the rating. Must be between 0 and max.
7233 /// </summary>
7234 [JsonPropertyName("value")]
7235 public float? Value { get; set; }
7236
7237 /// <summary>
7238 /// The number of "votes" associated with the rating.
7239 /// </summary>
7240 [JsonPropertyName("count")]
7241 public float? Count { get; set; }
7242
7243 /// <summary>
7244 /// The number of stars to display.
7245 /// </summary>
7246 [JsonPropertyName("max")]
7247 public float? Max { get; set; }
7248
7249 /// <summary>
7250 /// The size of the stars.
7251 /// </summary>
7252 [JsonPropertyName("size")]
7253 public RatingSize? Size { get; set; }
7254
7255 /// <summary>
7256 /// The color of the stars.
7257 /// </summary>
7258 [JsonPropertyName("color")]
7259 public RatingColor? Color { get; set; }
7260
7261 /// <summary>
7262 /// The style of the stars.
7263 /// </summary>
7264 [JsonPropertyName("style")]
7265 public RatingStyle? Style { get; set; }
7266
7267 /// <summary>
7268 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
7269 /// </summary>
7270 [JsonPropertyName("grid.area")]
7271 public string? GridArea { get; set; }
7272
7273 /// <summary>
7274 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
7275 /// </summary>
7276 [JsonPropertyName("fallback")]
7277 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
7278
7279 public Rating WithId(string value)
7280 {
7281 this.Id = value;
7282 return this;
7283 }
7284
7285 public Rating WithRequires(HostCapabilities value)
7286 {
7287 this.Requires = value;
7288 return this;
7289 }
7290
7291 public Rating WithLang(string value)
7292 {
7293 this.Lang = value;
7294 return this;
7295 }
7296
7297 public Rating WithIsVisible(bool value)
7298 {
7299 this.IsVisible = value;
7300 return this;
7301 }
7302
7303 public Rating WithSeparator(bool value)
7304 {
7305 this.Separator = value;
7306 return this;
7307 }
7308
7309 public Rating WithHeight(ElementHeight value)
7310 {
7311 this.Height = value;
7312 return this;
7313 }
7314
7315 public Rating WithHorizontalAlignment(HorizontalAlignment value)
7316 {
7317 this.HorizontalAlignment = value;
7318 return this;
7319 }
7320
7321 public Rating WithSpacing(Spacing value)
7322 {
7323 this.Spacing = value;
7324 return this;
7325 }
7326
7327 public Rating WithTargetWidth(TargetWidth value)
7328 {
7329 this.TargetWidth = value;
7330 return this;
7331 }
7332
7333 public Rating WithIsSortKey(bool value)
7334 {
7335 this.IsSortKey = value;
7336 return this;
7337 }
7338
7339 public Rating WithValue(float value)
7340 {
7341 this.Value = value;
7342 return this;
7343 }
7344
7345 public Rating WithCount(float value)
7346 {
7347 this.Count = value;
7348 return this;
7349 }
7350
7351 public Rating WithMax(float value)
7352 {
7353 this.Max = value;
7354 return this;
7355 }
7356
7357 public Rating WithSize(RatingSize value)
7358 {
7359 this.Size = value;
7360 return this;
7361 }
7362
7363 public Rating WithColor(RatingColor value)
7364 {
7365 this.Color = value;
7366 return this;
7367 }
7368
7369 public Rating WithStyle(RatingStyle value)
7370 {
7371 this.Style = value;
7372 return this;
7373 }
7374
7375 public Rating WithGridArea(string value)
7376 {
7377 this.GridArea = value;
7378 return this;
7379 }
7380
7381 public Rating WithFallback(IUnion<CardElement, FallbackElement> value)
7382 {
7383 this.Fallback = value;
7384 return this;
7385 }
7386}
7387
7388/// <summary>
7389/// A special type of button with an icon, title and description.
7390/// </summary>
7391public class CompoundButton : CardElement
7392{
7393 /// <summary>
7394 /// Must be **CompoundButton**.
7395 /// </summary>
7396 [JsonPropertyName("type")]
7397 public string Type { get; } = "CompoundButton";
7398
7399 /// <summary>
7400 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
7401 /// </summary>
7402 [JsonPropertyName("id")]
7403 public string? Id { get; set; }
7404
7405 /// <summary>
7406 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
7407 /// </summary>
7408 [JsonPropertyName("requires")]
7409 public HostCapabilities? Requires { get; set; }
7410
7411 /// <summary>
7412 /// The locale associated with the element.
7413 /// </summary>
7414 [JsonPropertyName("lang")]
7415 public string? Lang { get; set; }
7416
7417 /// <summary>
7418 /// Controls the visibility of the element.
7419 /// </summary>
7420 [JsonPropertyName("isVisible")]
7421 public bool? IsVisible { get; set; }
7422
7423 /// <summary>
7424 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
7425 /// </summary>
7426 [JsonPropertyName("separator")]
7427 public bool? Separator { get; set; }
7428
7429 /// <summary>
7430 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
7431 /// </summary>
7432 [JsonPropertyName("height")]
7433 public ElementHeight? Height { get; set; }
7434
7435 /// <summary>
7436 /// Controls how the element should be horizontally aligned.
7437 /// </summary>
7438 [JsonPropertyName("horizontalAlignment")]
7439 public HorizontalAlignment? HorizontalAlignment { get; set; }
7440
7441 /// <summary>
7442 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
7443 /// </summary>
7444 [JsonPropertyName("spacing")]
7445 public Spacing? Spacing { get; set; }
7446
7447 /// <summary>
7448 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
7449 /// </summary>
7450 [JsonPropertyName("targetWidth")]
7451 public TargetWidth? TargetWidth { get; set; }
7452
7453 /// <summary>
7454 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
7455 /// </summary>
7456 [JsonPropertyName("isSortKey")]
7457 public bool? IsSortKey { get; set; }
7458
7459 /// <summary>
7460 /// The icon to show on the button.
7461 /// </summary>
7462 [JsonPropertyName("icon")]
7463 public IconInfo? Icon { get; set; }
7464
7465 /// <summary>
7466 /// The badge to show on the button.
7467 /// </summary>
7468 [JsonPropertyName("badge")]
7469 public string? Badge { get; set; }
7470
7471 /// <summary>
7472 /// The title of the button.
7473 /// </summary>
7474 [JsonPropertyName("title")]
7475 public string? Title { get; set; }
7476
7477 /// <summary>
7478 /// The description text of the button.
7479 /// </summary>
7480 [JsonPropertyName("description")]
7481 public string? Description { get; set; }
7482
7483 /// <summary>
7484 /// An Action that will be invoked when the button is tapped or clicked. Action.ShowCard is not supported.
7485 /// </summary>
7486 [JsonPropertyName("selectAction")]
7487 public Action? SelectAction { get; set; }
7488
7489 /// <summary>
7490 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
7491 /// </summary>
7492 [JsonPropertyName("grid.area")]
7493 public string? GridArea { get; set; }
7494
7495 /// <summary>
7496 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
7497 /// </summary>
7498 [JsonPropertyName("fallback")]
7499 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
7500
7501 public CompoundButton WithId(string value)
7502 {
7503 this.Id = value;
7504 return this;
7505 }
7506
7507 public CompoundButton WithRequires(HostCapabilities value)
7508 {
7509 this.Requires = value;
7510 return this;
7511 }
7512
7513 public CompoundButton WithLang(string value)
7514 {
7515 this.Lang = value;
7516 return this;
7517 }
7518
7519 public CompoundButton WithIsVisible(bool value)
7520 {
7521 this.IsVisible = value;
7522 return this;
7523 }
7524
7525 public CompoundButton WithSeparator(bool value)
7526 {
7527 this.Separator = value;
7528 return this;
7529 }
7530
7531 public CompoundButton WithHeight(ElementHeight value)
7532 {
7533 this.Height = value;
7534 return this;
7535 }
7536
7537 public CompoundButton WithHorizontalAlignment(HorizontalAlignment value)
7538 {
7539 this.HorizontalAlignment = value;
7540 return this;
7541 }
7542
7543 public CompoundButton WithSpacing(Spacing value)
7544 {
7545 this.Spacing = value;
7546 return this;
7547 }
7548
7549 public CompoundButton WithTargetWidth(TargetWidth value)
7550 {
7551 this.TargetWidth = value;
7552 return this;
7553 }
7554
7555 public CompoundButton WithIsSortKey(bool value)
7556 {
7557 this.IsSortKey = value;
7558 return this;
7559 }
7560
7561 public CompoundButton WithIcon(IconInfo value)
7562 {
7563 this.Icon = value;
7564 return this;
7565 }
7566
7567 public CompoundButton WithBadge(string value)
7568 {
7569 this.Badge = value;
7570 return this;
7571 }
7572
7573 public CompoundButton WithTitle(string value)
7574 {
7575 this.Title = value;
7576 return this;
7577 }
7578
7579 public CompoundButton WithDescription(string value)
7580 {
7581 this.Description = value;
7582 return this;
7583 }
7584
7585 public CompoundButton WithSelectAction(Action value)
7586 {
7587 this.SelectAction = value;
7588 return this;
7589 }
7590
7591 public CompoundButton WithGridArea(string value)
7592 {
7593 this.GridArea = value;
7594 return this;
7595 }
7596
7597 public CompoundButton WithFallback(IUnion<CardElement, FallbackElement> value)
7598 {
7599 this.Fallback = value;
7600 return this;
7601 }
7602}
7603
7604/// <summary>
7605/// Defines information about a Fluent icon and how it should be rendered.
7606/// </summary>
7607public class IconInfo : SerializableObject
7608{
7609 /// <summary>
7610 /// The name of the icon to display.
7611 /// </summary>
7612 [JsonPropertyName("name")]
7613 public string? Name { get; set; }
7614
7615 /// <summary>
7616 /// The size of the icon.
7617 /// </summary>
7618 [JsonPropertyName("size")]
7619 public IconSize? Size { get; set; }
7620
7621 /// <summary>
7622 /// The style of the icon.
7623 /// </summary>
7624 [JsonPropertyName("style")]
7625 public IconStyle? Style { get; set; }
7626
7627 /// <summary>
7628 /// The color of the icon.
7629 /// </summary>
7630 [JsonPropertyName("color")]
7631 public TextColor? Color { get; set; }
7632
7633 public IconInfo WithName(string value)
7634 {
7635 this.Name = value;
7636 return this;
7637 }
7638
7639 public IconInfo WithSize(IconSize value)
7640 {
7641 this.Size = value;
7642 return this;
7643 }
7644
7645 public IconInfo WithStyle(IconStyle value)
7646 {
7647 this.Style = value;
7648 return this;
7649 }
7650
7651 public IconInfo WithColor(TextColor value)
7652 {
7653 this.Color = value;
7654 return this;
7655 }
7656}
7657
7658/// <summary>
7659/// A standalone icon element. Icons can be picked from the vast [Adaptive Card icon catalog](https://adaptivecards.microsoft.com/?topic=icon-catalog).
7660/// </summary>
7661public class Icon : CardElement
7662{
7663 /// <summary>
7664 /// Must be **Icon**.
7665 /// </summary>
7666 [JsonPropertyName("type")]
7667 public string Type { get; } = "Icon";
7668
7669 /// <summary>
7670 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
7671 /// </summary>
7672 [JsonPropertyName("id")]
7673 public string? Id { get; set; }
7674
7675 /// <summary>
7676 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
7677 /// </summary>
7678 [JsonPropertyName("requires")]
7679 public HostCapabilities? Requires { get; set; }
7680
7681 /// <summary>
7682 /// The locale associated with the element.
7683 /// </summary>
7684 [JsonPropertyName("lang")]
7685 public string? Lang { get; set; }
7686
7687 /// <summary>
7688 /// Controls the visibility of the element.
7689 /// </summary>
7690 [JsonPropertyName("isVisible")]
7691 public bool? IsVisible { get; set; }
7692
7693 /// <summary>
7694 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
7695 /// </summary>
7696 [JsonPropertyName("separator")]
7697 public bool? Separator { get; set; }
7698
7699 /// <summary>
7700 /// Controls how the element should be horizontally aligned.
7701 /// </summary>
7702 [JsonPropertyName("horizontalAlignment")]
7703 public HorizontalAlignment? HorizontalAlignment { get; set; }
7704
7705 /// <summary>
7706 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
7707 /// </summary>
7708 [JsonPropertyName("spacing")]
7709 public Spacing? Spacing { get; set; }
7710
7711 /// <summary>
7712 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
7713 /// </summary>
7714 [JsonPropertyName("targetWidth")]
7715 public TargetWidth? TargetWidth { get; set; }
7716
7717 /// <summary>
7718 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
7719 /// </summary>
7720 [JsonPropertyName("isSortKey")]
7721 public bool? IsSortKey { get; set; }
7722
7723 /// <summary>
7724 /// The name of the icon to display.
7725 /// </summary>
7726 [JsonPropertyName("name")]
7727 public string? Name { get; set; }
7728
7729 /// <summary>
7730 /// The size of the icon.
7731 /// </summary>
7732 [JsonPropertyName("size")]
7733 public IconSize? Size { get; set; }
7734
7735 /// <summary>
7736 /// The style of the icon.
7737 /// </summary>
7738 [JsonPropertyName("style")]
7739 public IconStyle? Style { get; set; }
7740
7741 /// <summary>
7742 /// The color of the icon.
7743 /// </summary>
7744 [JsonPropertyName("color")]
7745 public TextColor? Color { get; set; }
7746
7747 /// <summary>
7748 /// An Action that will be invoked when the icon is tapped or clicked. Action.ShowCard is not supported.
7749 /// </summary>
7750 [JsonPropertyName("selectAction")]
7751 public Action? SelectAction { get; set; }
7752
7753 /// <summary>
7754 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
7755 /// </summary>
7756 [JsonPropertyName("grid.area")]
7757 public string? GridArea { get; set; }
7758
7759 /// <summary>
7760 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
7761 /// </summary>
7762 [JsonPropertyName("fallback")]
7763 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
7764
7765 public Icon(string name)
7766 {
7767 this.Name = name;
7768 }
7769
7770 public Icon WithId(string value)
7771 {
7772 this.Id = value;
7773 return this;
7774 }
7775
7776 public Icon WithRequires(HostCapabilities value)
7777 {
7778 this.Requires = value;
7779 return this;
7780 }
7781
7782 public Icon WithLang(string value)
7783 {
7784 this.Lang = value;
7785 return this;
7786 }
7787
7788 public Icon WithIsVisible(bool value)
7789 {
7790 this.IsVisible = value;
7791 return this;
7792 }
7793
7794 public Icon WithSeparator(bool value)
7795 {
7796 this.Separator = value;
7797 return this;
7798 }
7799
7800 public Icon WithHorizontalAlignment(HorizontalAlignment value)
7801 {
7802 this.HorizontalAlignment = value;
7803 return this;
7804 }
7805
7806 public Icon WithSpacing(Spacing value)
7807 {
7808 this.Spacing = value;
7809 return this;
7810 }
7811
7812 public Icon WithTargetWidth(TargetWidth value)
7813 {
7814 this.TargetWidth = value;
7815 return this;
7816 }
7817
7818 public Icon WithIsSortKey(bool value)
7819 {
7820 this.IsSortKey = value;
7821 return this;
7822 }
7823
7824 public Icon WithName(string value)
7825 {
7826 this.Name = value;
7827 return this;
7828 }
7829
7830 public Icon WithSize(IconSize value)
7831 {
7832 this.Size = value;
7833 return this;
7834 }
7835
7836 public Icon WithStyle(IconStyle value)
7837 {
7838 this.Style = value;
7839 return this;
7840 }
7841
7842 public Icon WithColor(TextColor value)
7843 {
7844 this.Color = value;
7845 return this;
7846 }
7847
7848 public Icon WithSelectAction(Action value)
7849 {
7850 this.SelectAction = value;
7851 return this;
7852 }
7853
7854 public Icon WithGridArea(string value)
7855 {
7856 this.GridArea = value;
7857 return this;
7858 }
7859
7860 public Icon WithFallback(IUnion<CardElement, FallbackElement> value)
7861 {
7862 this.Fallback = value;
7863 return this;
7864 }
7865}
7866
7867/// <summary>
7868/// A carousel with sliding pages.
7869/// </summary>
7870public class Carousel : CardElement
7871{
7872 /// <summary>
7873 /// Must be **Carousel**.
7874 /// </summary>
7875 [JsonPropertyName("type")]
7876 public string Type { get; } = "Carousel";
7877
7878 /// <summary>
7879 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
7880 /// </summary>
7881 [JsonPropertyName("id")]
7882 public string? Id { get; set; }
7883
7884 /// <summary>
7885 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
7886 /// </summary>
7887 [JsonPropertyName("requires")]
7888 public HostCapabilities? Requires { get; set; }
7889
7890 /// <summary>
7891 /// The locale associated with the element.
7892 /// </summary>
7893 [JsonPropertyName("lang")]
7894 public string? Lang { get; set; }
7895
7896 /// <summary>
7897 /// Controls the visibility of the element.
7898 /// </summary>
7899 [JsonPropertyName("isVisible")]
7900 public bool? IsVisible { get; set; }
7901
7902 /// <summary>
7903 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
7904 /// </summary>
7905 [JsonPropertyName("separator")]
7906 public bool? Separator { get; set; }
7907
7908 /// <summary>
7909 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
7910 /// </summary>
7911 [JsonPropertyName("height")]
7912 public ElementHeight? Height { get; set; }
7913
7914 /// <summary>
7915 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
7916 /// </summary>
7917 [JsonPropertyName("spacing")]
7918 public Spacing? Spacing { get; set; }
7919
7920 /// <summary>
7921 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
7922 /// </summary>
7923 [JsonPropertyName("targetWidth")]
7924 public TargetWidth? TargetWidth { get; set; }
7925
7926 /// <summary>
7927 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
7928 /// </summary>
7929 [JsonPropertyName("isSortKey")]
7930 public bool? IsSortKey { get; set; }
7931
7932 /// <summary>
7933 /// Controls if the container should bleed into its parent. A bleeding container extends into its parent's padding.
7934 /// </summary>
7935 [JsonPropertyName("bleed")]
7936 public bool? Bleed { get; set; }
7937
7938 /// <summary>
7939 /// The minimum height, in pixels, of the container, in the `<number>px` format.
7940 /// </summary>
7941 [JsonPropertyName("minHeight")]
7942 public string? MinHeight { get; set; }
7943
7944 /// <summary>
7945 /// Controls the type of animation to use to navigate between pages.
7946 /// </summary>
7947 [JsonPropertyName("pageAnimation")]
7948 public CarouselPageAnimation? PageAnimation { get; set; }
7949
7950 /// <summary>
7951 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
7952 /// </summary>
7953 [JsonPropertyName("grid.area")]
7954 public string? GridArea { get; set; }
7955
7956 /// <summary>
7957 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
7958 /// </summary>
7959 [JsonPropertyName("fallback")]
7960 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
7961
7962 /// <summary>
7963 /// The pages in the carousel.
7964 /// </summary>
7965 [JsonPropertyName("pages")]
7966 public IList<CarouselPage>? Pages { get; set; }
7967
7968 public Carousel WithId(string value)
7969 {
7970 this.Id = value;
7971 return this;
7972 }
7973
7974 public Carousel WithRequires(HostCapabilities value)
7975 {
7976 this.Requires = value;
7977 return this;
7978 }
7979
7980 public Carousel WithLang(string value)
7981 {
7982 this.Lang = value;
7983 return this;
7984 }
7985
7986 public Carousel WithIsVisible(bool value)
7987 {
7988 this.IsVisible = value;
7989 return this;
7990 }
7991
7992 public Carousel WithSeparator(bool value)
7993 {
7994 this.Separator = value;
7995 return this;
7996 }
7997
7998 public Carousel WithHeight(ElementHeight value)
7999 {
8000 this.Height = value;
8001 return this;
8002 }
8003
8004 public Carousel WithSpacing(Spacing value)
8005 {
8006 this.Spacing = value;
8007 return this;
8008 }
8009
8010 public Carousel WithTargetWidth(TargetWidth value)
8011 {
8012 this.TargetWidth = value;
8013 return this;
8014 }
8015
8016 public Carousel WithIsSortKey(bool value)
8017 {
8018 this.IsSortKey = value;
8019 return this;
8020 }
8021
8022 public Carousel WithBleed(bool value)
8023 {
8024 this.Bleed = value;
8025 return this;
8026 }
8027
8028 public Carousel WithMinHeight(string value)
8029 {
8030 this.MinHeight = value;
8031 return this;
8032 }
8033
8034 public Carousel WithPageAnimation(CarouselPageAnimation value)
8035 {
8036 this.PageAnimation = value;
8037 return this;
8038 }
8039
8040 public Carousel WithGridArea(string value)
8041 {
8042 this.GridArea = value;
8043 return this;
8044 }
8045
8046 public Carousel WithFallback(IUnion<CardElement, FallbackElement> value)
8047 {
8048 this.Fallback = value;
8049 return this;
8050 }
8051
8052 public Carousel WithPages(params IList<CarouselPage> value)
8053 {
8054 this.Pages = value;
8055 return this;
8056 }
8057}
8058
8059/// <summary>
8060/// A badge element to show an icon and/or text in a compact form over a colored background.
8061/// </summary>
8062public class Badge : CardElement
8063{
8064 /// <summary>
8065 /// Must be **Badge**.
8066 /// </summary>
8067 [JsonPropertyName("type")]
8068 public string Type { get; } = "Badge";
8069
8070 /// <summary>
8071 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
8072 /// </summary>
8073 [JsonPropertyName("id")]
8074 public string? Id { get; set; }
8075
8076 /// <summary>
8077 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
8078 /// </summary>
8079 [JsonPropertyName("requires")]
8080 public HostCapabilities? Requires { get; set; }
8081
8082 /// <summary>
8083 /// The locale associated with the element.
8084 /// </summary>
8085 [JsonPropertyName("lang")]
8086 public string? Lang { get; set; }
8087
8088 /// <summary>
8089 /// Controls the visibility of the element.
8090 /// </summary>
8091 [JsonPropertyName("isVisible")]
8092 public bool? IsVisible { get; set; }
8093
8094 /// <summary>
8095 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
8096 /// </summary>
8097 [JsonPropertyName("separator")]
8098 public bool? Separator { get; set; }
8099
8100 /// <summary>
8101 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
8102 /// </summary>
8103 [JsonPropertyName("height")]
8104 public ElementHeight? Height { get; set; }
8105
8106 /// <summary>
8107 /// Controls how the element should be horizontally aligned.
8108 /// </summary>
8109 [JsonPropertyName("horizontalAlignment")]
8110 public HorizontalAlignment? HorizontalAlignment { get; set; }
8111
8112 /// <summary>
8113 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
8114 /// </summary>
8115 [JsonPropertyName("spacing")]
8116 public Spacing? Spacing { get; set; }
8117
8118 /// <summary>
8119 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
8120 /// </summary>
8121 [JsonPropertyName("targetWidth")]
8122 public TargetWidth? TargetWidth { get; set; }
8123
8124 /// <summary>
8125 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
8126 /// </summary>
8127 [JsonPropertyName("isSortKey")]
8128 public bool? IsSortKey { get; set; }
8129
8130 /// <summary>
8131 /// The text to display.
8132 /// </summary>
8133 [JsonPropertyName("text")]
8134 public string? Text { get; set; }
8135
8136 /// <summary>
8137 /// The name of an icon from the [Adaptive Card icon catalog](https://adaptivecards.microsoft.com/?topic=icon-catalog) to display, in the `<icon-name>[,regular|filled]` format. If the style is not specified, the regular style is used.
8138 /// </summary>
8139 [JsonPropertyName("icon")]
8140 public string? Icon { get; set; }
8141
8142 /// <summary>
8143 /// Controls the position of the icon.
8144 /// </summary>
8145 [JsonPropertyName("iconPosition")]
8146 public BadgeIconPosition? IconPosition { get; set; }
8147
8148 /// <summary>
8149 /// Controls the strength of the background color.
8150 /// </summary>
8151 [JsonPropertyName("appearance")]
8152 public BadgeAppearance? Appearance { get; set; }
8153
8154 /// <summary>
8155 /// The size of the badge.
8156 /// </summary>
8157 [JsonPropertyName("size")]
8158 public BadgeSize? Size { get; set; }
8159
8160 /// <summary>
8161 /// Controls the shape of the badge.
8162 /// </summary>
8163 [JsonPropertyName("shape")]
8164 public BadgeShape? Shape { get; set; }
8165
8166 /// <summary>
8167 /// The style of the badge.
8168 /// </summary>
8169 [JsonPropertyName("style")]
8170 public BadgeStyle? Style { get; set; }
8171
8172 /// <summary>
8173 /// Controls the tooltip text to display when the badge is hovered over.
8174 /// </summary>
8175 [JsonPropertyName("tooltip")]
8176 public string? Tooltip { get; set; }
8177
8178 /// <summary>
8179 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
8180 /// </summary>
8181 [JsonPropertyName("grid.area")]
8182 public string? GridArea { get; set; }
8183
8184 /// <summary>
8185 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
8186 /// </summary>
8187 [JsonPropertyName("fallback")]
8188 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
8189
8190 public Badge WithId(string value)
8191 {
8192 this.Id = value;
8193 return this;
8194 }
8195
8196 public Badge WithRequires(HostCapabilities value)
8197 {
8198 this.Requires = value;
8199 return this;
8200 }
8201
8202 public Badge WithLang(string value)
8203 {
8204 this.Lang = value;
8205 return this;
8206 }
8207
8208 public Badge WithIsVisible(bool value)
8209 {
8210 this.IsVisible = value;
8211 return this;
8212 }
8213
8214 public Badge WithSeparator(bool value)
8215 {
8216 this.Separator = value;
8217 return this;
8218 }
8219
8220 public Badge WithHeight(ElementHeight value)
8221 {
8222 this.Height = value;
8223 return this;
8224 }
8225
8226 public Badge WithHorizontalAlignment(HorizontalAlignment value)
8227 {
8228 this.HorizontalAlignment = value;
8229 return this;
8230 }
8231
8232 public Badge WithSpacing(Spacing value)
8233 {
8234 this.Spacing = value;
8235 return this;
8236 }
8237
8238 public Badge WithTargetWidth(TargetWidth value)
8239 {
8240 this.TargetWidth = value;
8241 return this;
8242 }
8243
8244 public Badge WithIsSortKey(bool value)
8245 {
8246 this.IsSortKey = value;
8247 return this;
8248 }
8249
8250 public Badge WithText(string value)
8251 {
8252 this.Text = value;
8253 return this;
8254 }
8255
8256 public Badge WithIcon(string value)
8257 {
8258 this.Icon = value;
8259 return this;
8260 }
8261
8262 public Badge WithIconPosition(BadgeIconPosition value)
8263 {
8264 this.IconPosition = value;
8265 return this;
8266 }
8267
8268 public Badge WithAppearance(BadgeAppearance value)
8269 {
8270 this.Appearance = value;
8271 return this;
8272 }
8273
8274 public Badge WithSize(BadgeSize value)
8275 {
8276 this.Size = value;
8277 return this;
8278 }
8279
8280 public Badge WithShape(BadgeShape value)
8281 {
8282 this.Shape = value;
8283 return this;
8284 }
8285
8286 public Badge WithStyle(BadgeStyle value)
8287 {
8288 this.Style = value;
8289 return this;
8290 }
8291
8292 public Badge WithTooltip(string value)
8293 {
8294 this.Tooltip = value;
8295 return this;
8296 }
8297
8298 public Badge WithGridArea(string value)
8299 {
8300 this.GridArea = value;
8301 return this;
8302 }
8303
8304 public Badge WithFallback(IUnion<CardElement, FallbackElement> value)
8305 {
8306 this.Fallback = value;
8307 return this;
8308 }
8309}
8310
8311/// <summary>
8312/// A donut chart.
8313/// </summary>
8314public class DonutChart : CardElement
8315{
8316 /// <summary>
8317 /// Must be **Chart.Donut**.
8318 /// </summary>
8319 [JsonPropertyName("type")]
8320 public string Type { get; } = "Chart.Donut";
8321
8322 /// <summary>
8323 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
8324 /// </summary>
8325 [JsonPropertyName("id")]
8326 public string? Id { get; set; }
8327
8328 /// <summary>
8329 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
8330 /// </summary>
8331 [JsonPropertyName("requires")]
8332 public HostCapabilities? Requires { get; set; }
8333
8334 /// <summary>
8335 /// The locale associated with the element.
8336 /// </summary>
8337 [JsonPropertyName("lang")]
8338 public string? Lang { get; set; }
8339
8340 /// <summary>
8341 /// Controls the visibility of the element.
8342 /// </summary>
8343 [JsonPropertyName("isVisible")]
8344 public bool? IsVisible { get; set; }
8345
8346 /// <summary>
8347 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
8348 /// </summary>
8349 [JsonPropertyName("separator")]
8350 public bool? Separator { get; set; }
8351
8352 /// <summary>
8353 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
8354 /// </summary>
8355 [JsonPropertyName("height")]
8356 public ElementHeight? Height { get; set; }
8357
8358 /// <summary>
8359 /// Controls how the element should be horizontally aligned.
8360 /// </summary>
8361 [JsonPropertyName("horizontalAlignment")]
8362 public HorizontalAlignment? HorizontalAlignment { get; set; }
8363
8364 /// <summary>
8365 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
8366 /// </summary>
8367 [JsonPropertyName("spacing")]
8368 public Spacing? Spacing { get; set; }
8369
8370 /// <summary>
8371 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
8372 /// </summary>
8373 [JsonPropertyName("targetWidth")]
8374 public TargetWidth? TargetWidth { get; set; }
8375
8376 /// <summary>
8377 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
8378 /// </summary>
8379 [JsonPropertyName("isSortKey")]
8380 public bool? IsSortKey { get; set; }
8381
8382 /// <summary>
8383 /// The title of the chart.
8384 /// </summary>
8385 [JsonPropertyName("title")]
8386 public string? Title { get; set; }
8387
8388 /// <summary>
8389 /// The name of the set of colors to use to render the chart. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
8390 /// </summary>
8391 [JsonPropertyName("colorSet")]
8392 public ChartColorSet? ColorSet { get; set; }
8393
8394 /// <summary>
8395 /// The data to display in the chart.
8396 /// </summary>
8397 [JsonPropertyName("data")]
8398 public IList<DonutChartData>? Data { get; set; }
8399
8400 /// <summary>
8401 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
8402 /// </summary>
8403 [JsonPropertyName("grid.area")]
8404 public string? GridArea { get; set; }
8405
8406 /// <summary>
8407 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
8408 /// </summary>
8409 [JsonPropertyName("fallback")]
8410 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
8411
8412 public DonutChart WithId(string value)
8413 {
8414 this.Id = value;
8415 return this;
8416 }
8417
8418 public DonutChart WithRequires(HostCapabilities value)
8419 {
8420 this.Requires = value;
8421 return this;
8422 }
8423
8424 public DonutChart WithLang(string value)
8425 {
8426 this.Lang = value;
8427 return this;
8428 }
8429
8430 public DonutChart WithIsVisible(bool value)
8431 {
8432 this.IsVisible = value;
8433 return this;
8434 }
8435
8436 public DonutChart WithSeparator(bool value)
8437 {
8438 this.Separator = value;
8439 return this;
8440 }
8441
8442 public DonutChart WithHeight(ElementHeight value)
8443 {
8444 this.Height = value;
8445 return this;
8446 }
8447
8448 public DonutChart WithHorizontalAlignment(HorizontalAlignment value)
8449 {
8450 this.HorizontalAlignment = value;
8451 return this;
8452 }
8453
8454 public DonutChart WithSpacing(Spacing value)
8455 {
8456 this.Spacing = value;
8457 return this;
8458 }
8459
8460 public DonutChart WithTargetWidth(TargetWidth value)
8461 {
8462 this.TargetWidth = value;
8463 return this;
8464 }
8465
8466 public DonutChart WithIsSortKey(bool value)
8467 {
8468 this.IsSortKey = value;
8469 return this;
8470 }
8471
8472 public DonutChart WithTitle(string value)
8473 {
8474 this.Title = value;
8475 return this;
8476 }
8477
8478 public DonutChart WithColorSet(ChartColorSet value)
8479 {
8480 this.ColorSet = value;
8481 return this;
8482 }
8483
8484 public DonutChart WithData(params IList<DonutChartData> value)
8485 {
8486 this.Data = value;
8487 return this;
8488 }
8489
8490 public DonutChart WithGridArea(string value)
8491 {
8492 this.GridArea = value;
8493 return this;
8494 }
8495
8496 public DonutChart WithFallback(IUnion<CardElement, FallbackElement> value)
8497 {
8498 this.Fallback = value;
8499 return this;
8500 }
8501}
8502
8503/// <summary>
8504/// A data point in a Donut chart.
8505/// </summary>
8506public class DonutChartData : SerializableObject
8507{
8508 /// <summary>
8509 /// The legend of the chart.
8510 /// </summary>
8511 [JsonPropertyName("legend")]
8512 public string? Legend { get; set; }
8513
8514 /// <summary>
8515 /// The value associated with the data point.
8516 /// </summary>
8517 [JsonPropertyName("value")]
8518 public float? Value { get; set; }
8519
8520 /// <summary>
8521 /// The color to use for the data point. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
8522 /// </summary>
8523 [JsonPropertyName("color")]
8524 public ChartColor? Color { get; set; }
8525
8526 public DonutChartData WithLegend(string value)
8527 {
8528 this.Legend = value;
8529 return this;
8530 }
8531
8532 public DonutChartData WithValue(float value)
8533 {
8534 this.Value = value;
8535 return this;
8536 }
8537
8538 public DonutChartData WithColor(ChartColor value)
8539 {
8540 this.Color = value;
8541 return this;
8542 }
8543}
8544
8545/// <summary>
8546/// A pie chart.
8547/// </summary>
8548public class PieChart : CardElement
8549{
8550 /// <summary>
8551 /// Must be **Chart.Pie**.
8552 /// </summary>
8553 [JsonPropertyName("type")]
8554 public string Type { get; } = "Chart.Pie";
8555
8556 /// <summary>
8557 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
8558 /// </summary>
8559 [JsonPropertyName("id")]
8560 public string? Id { get; set; }
8561
8562 /// <summary>
8563 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
8564 /// </summary>
8565 [JsonPropertyName("requires")]
8566 public HostCapabilities? Requires { get; set; }
8567
8568 /// <summary>
8569 /// The locale associated with the element.
8570 /// </summary>
8571 [JsonPropertyName("lang")]
8572 public string? Lang { get; set; }
8573
8574 /// <summary>
8575 /// Controls the visibility of the element.
8576 /// </summary>
8577 [JsonPropertyName("isVisible")]
8578 public bool? IsVisible { get; set; }
8579
8580 /// <summary>
8581 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
8582 /// </summary>
8583 [JsonPropertyName("separator")]
8584 public bool? Separator { get; set; }
8585
8586 /// <summary>
8587 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
8588 /// </summary>
8589 [JsonPropertyName("height")]
8590 public ElementHeight? Height { get; set; }
8591
8592 /// <summary>
8593 /// Controls how the element should be horizontally aligned.
8594 /// </summary>
8595 [JsonPropertyName("horizontalAlignment")]
8596 public HorizontalAlignment? HorizontalAlignment { get; set; }
8597
8598 /// <summary>
8599 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
8600 /// </summary>
8601 [JsonPropertyName("spacing")]
8602 public Spacing? Spacing { get; set; }
8603
8604 /// <summary>
8605 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
8606 /// </summary>
8607 [JsonPropertyName("targetWidth")]
8608 public TargetWidth? TargetWidth { get; set; }
8609
8610 /// <summary>
8611 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
8612 /// </summary>
8613 [JsonPropertyName("isSortKey")]
8614 public bool? IsSortKey { get; set; }
8615
8616 /// <summary>
8617 /// The title of the chart.
8618 /// </summary>
8619 [JsonPropertyName("title")]
8620 public string? Title { get; set; }
8621
8622 /// <summary>
8623 /// The name of the set of colors to use to render the chart. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
8624 /// </summary>
8625 [JsonPropertyName("colorSet")]
8626 public ChartColorSet? ColorSet { get; set; }
8627
8628 /// <summary>
8629 /// The data to display in the chart.
8630 /// </summary>
8631 [JsonPropertyName("data")]
8632 public IList<DonutChartData>? Data { get; set; }
8633
8634 /// <summary>
8635 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
8636 /// </summary>
8637 [JsonPropertyName("grid.area")]
8638 public string? GridArea { get; set; }
8639
8640 /// <summary>
8641 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
8642 /// </summary>
8643 [JsonPropertyName("fallback")]
8644 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
8645
8646 public PieChart WithId(string value)
8647 {
8648 this.Id = value;
8649 return this;
8650 }
8651
8652 public PieChart WithRequires(HostCapabilities value)
8653 {
8654 this.Requires = value;
8655 return this;
8656 }
8657
8658 public PieChart WithLang(string value)
8659 {
8660 this.Lang = value;
8661 return this;
8662 }
8663
8664 public PieChart WithIsVisible(bool value)
8665 {
8666 this.IsVisible = value;
8667 return this;
8668 }
8669
8670 public PieChart WithSeparator(bool value)
8671 {
8672 this.Separator = value;
8673 return this;
8674 }
8675
8676 public PieChart WithHeight(ElementHeight value)
8677 {
8678 this.Height = value;
8679 return this;
8680 }
8681
8682 public PieChart WithHorizontalAlignment(HorizontalAlignment value)
8683 {
8684 this.HorizontalAlignment = value;
8685 return this;
8686 }
8687
8688 public PieChart WithSpacing(Spacing value)
8689 {
8690 this.Spacing = value;
8691 return this;
8692 }
8693
8694 public PieChart WithTargetWidth(TargetWidth value)
8695 {
8696 this.TargetWidth = value;
8697 return this;
8698 }
8699
8700 public PieChart WithIsSortKey(bool value)
8701 {
8702 this.IsSortKey = value;
8703 return this;
8704 }
8705
8706 public PieChart WithTitle(string value)
8707 {
8708 this.Title = value;
8709 return this;
8710 }
8711
8712 public PieChart WithColorSet(ChartColorSet value)
8713 {
8714 this.ColorSet = value;
8715 return this;
8716 }
8717
8718 public PieChart WithData(params IList<DonutChartData> value)
8719 {
8720 this.Data = value;
8721 return this;
8722 }
8723
8724 public PieChart WithGridArea(string value)
8725 {
8726 this.GridArea = value;
8727 return this;
8728 }
8729
8730 public PieChart WithFallback(IUnion<CardElement, FallbackElement> value)
8731 {
8732 this.Fallback = value;
8733 return this;
8734 }
8735}
8736
8737/// <summary>
8738/// A grouped vertical bar chart.
8739/// </summary>
8740public class GroupedVerticalBarChart : CardElement
8741{
8742 /// <summary>
8743 /// Must be **Chart.VerticalBar.Grouped**.
8744 /// </summary>
8745 [JsonPropertyName("type")]
8746 public string Type { get; } = "Chart.VerticalBar.Grouped";
8747
8748 /// <summary>
8749 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
8750 /// </summary>
8751 [JsonPropertyName("id")]
8752 public string? Id { get; set; }
8753
8754 /// <summary>
8755 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
8756 /// </summary>
8757 [JsonPropertyName("requires")]
8758 public HostCapabilities? Requires { get; set; }
8759
8760 /// <summary>
8761 /// The locale associated with the element.
8762 /// </summary>
8763 [JsonPropertyName("lang")]
8764 public string? Lang { get; set; }
8765
8766 /// <summary>
8767 /// Controls the visibility of the element.
8768 /// </summary>
8769 [JsonPropertyName("isVisible")]
8770 public bool? IsVisible { get; set; }
8771
8772 /// <summary>
8773 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
8774 /// </summary>
8775 [JsonPropertyName("separator")]
8776 public bool? Separator { get; set; }
8777
8778 /// <summary>
8779 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
8780 /// </summary>
8781 [JsonPropertyName("height")]
8782 public ElementHeight? Height { get; set; }
8783
8784 /// <summary>
8785 /// Controls how the element should be horizontally aligned.
8786 /// </summary>
8787 [JsonPropertyName("horizontalAlignment")]
8788 public HorizontalAlignment? HorizontalAlignment { get; set; }
8789
8790 /// <summary>
8791 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
8792 /// </summary>
8793 [JsonPropertyName("spacing")]
8794 public Spacing? Spacing { get; set; }
8795
8796 /// <summary>
8797 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
8798 /// </summary>
8799 [JsonPropertyName("targetWidth")]
8800 public TargetWidth? TargetWidth { get; set; }
8801
8802 /// <summary>
8803 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
8804 /// </summary>
8805 [JsonPropertyName("isSortKey")]
8806 public bool? IsSortKey { get; set; }
8807
8808 /// <summary>
8809 /// The title of the chart.
8810 /// </summary>
8811 [JsonPropertyName("title")]
8812 public string? Title { get; set; }
8813
8814 /// <summary>
8815 /// The name of the set of colors to use to render the chart. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
8816 /// </summary>
8817 [JsonPropertyName("colorSet")]
8818 public ChartColorSet? ColorSet { get; set; }
8819
8820 /// <summary>
8821 /// The title of the x axis.
8822 /// </summary>
8823 [JsonPropertyName("xAxisTitle")]
8824 public string? XAxisTitle { get; set; }
8825
8826 /// <summary>
8827 /// The title of the y axis.
8828 /// </summary>
8829 [JsonPropertyName("yAxisTitle")]
8830 public string? YAxisTitle { get; set; }
8831
8832 /// <summary>
8833 /// The color to use for all data points. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
8834 /// </summary>
8835 [JsonPropertyName("color")]
8836 public ChartColor? Color { get; set; }
8837
8838 /// <summary>
8839 /// Controls if bars in the chart should be displayed as stacked instead of grouped.
8840 /// </summary>
8841 [JsonPropertyName("stacked")]
8842 public bool? Stacked { get; set; }
8843
8844 /// <summary>
8845 /// The data points in a series.
8846 /// </summary>
8847 [JsonPropertyName("data")]
8848 public IList<GroupedVerticalBarChartData>? Data { get; set; }
8849
8850 /// <summary>
8851 /// Controls if values should be displayed on each bar.
8852 /// </summary>
8853 [JsonPropertyName("showBarValues")]
8854 public bool? ShowBarValues { get; set; }
8855
8856 /// <summary>
8857 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
8858 /// </summary>
8859 [JsonPropertyName("grid.area")]
8860 public string? GridArea { get; set; }
8861
8862 /// <summary>
8863 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
8864 /// </summary>
8865 [JsonPropertyName("fallback")]
8866 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
8867
8868 public GroupedVerticalBarChart WithId(string value)
8869 {
8870 this.Id = value;
8871 return this;
8872 }
8873
8874 public GroupedVerticalBarChart WithRequires(HostCapabilities value)
8875 {
8876 this.Requires = value;
8877 return this;
8878 }
8879
8880 public GroupedVerticalBarChart WithLang(string value)
8881 {
8882 this.Lang = value;
8883 return this;
8884 }
8885
8886 public GroupedVerticalBarChart WithIsVisible(bool value)
8887 {
8888 this.IsVisible = value;
8889 return this;
8890 }
8891
8892 public GroupedVerticalBarChart WithSeparator(bool value)
8893 {
8894 this.Separator = value;
8895 return this;
8896 }
8897
8898 public GroupedVerticalBarChart WithHeight(ElementHeight value)
8899 {
8900 this.Height = value;
8901 return this;
8902 }
8903
8904 public GroupedVerticalBarChart WithHorizontalAlignment(HorizontalAlignment value)
8905 {
8906 this.HorizontalAlignment = value;
8907 return this;
8908 }
8909
8910 public GroupedVerticalBarChart WithSpacing(Spacing value)
8911 {
8912 this.Spacing = value;
8913 return this;
8914 }
8915
8916 public GroupedVerticalBarChart WithTargetWidth(TargetWidth value)
8917 {
8918 this.TargetWidth = value;
8919 return this;
8920 }
8921
8922 public GroupedVerticalBarChart WithIsSortKey(bool value)
8923 {
8924 this.IsSortKey = value;
8925 return this;
8926 }
8927
8928 public GroupedVerticalBarChart WithTitle(string value)
8929 {
8930 this.Title = value;
8931 return this;
8932 }
8933
8934 public GroupedVerticalBarChart WithColorSet(ChartColorSet value)
8935 {
8936 this.ColorSet = value;
8937 return this;
8938 }
8939
8940 public GroupedVerticalBarChart WithXAxisTitle(string value)
8941 {
8942 this.XAxisTitle = value;
8943 return this;
8944 }
8945
8946 public GroupedVerticalBarChart WithYAxisTitle(string value)
8947 {
8948 this.YAxisTitle = value;
8949 return this;
8950 }
8951
8952 public GroupedVerticalBarChart WithColor(ChartColor value)
8953 {
8954 this.Color = value;
8955 return this;
8956 }
8957
8958 public GroupedVerticalBarChart WithStacked(bool value)
8959 {
8960 this.Stacked = value;
8961 return this;
8962 }
8963
8964 public GroupedVerticalBarChart WithData(params IList<GroupedVerticalBarChartData> value)
8965 {
8966 this.Data = value;
8967 return this;
8968 }
8969
8970 public GroupedVerticalBarChart WithShowBarValues(bool value)
8971 {
8972 this.ShowBarValues = value;
8973 return this;
8974 }
8975
8976 public GroupedVerticalBarChart WithGridArea(string value)
8977 {
8978 this.GridArea = value;
8979 return this;
8980 }
8981
8982 public GroupedVerticalBarChart WithFallback(IUnion<CardElement, FallbackElement> value)
8983 {
8984 this.Fallback = value;
8985 return this;
8986 }
8987}
8988
8989/// <summary>
8990/// Represents a series of data points.
8991/// </summary>
8992public class GroupedVerticalBarChartData : SerializableObject
8993{
8994 /// <summary>
8995 /// The legend of the chart.
8996 /// </summary>
8997 [JsonPropertyName("legend")]
8998 public string? Legend { get; set; }
8999
9000 /// <summary>
9001 /// The data points in the series.
9002 /// </summary>
9003 [JsonPropertyName("values")]
9004 public IList<BarChartDataValue>? Values { get; set; }
9005
9006 /// <summary>
9007 /// The color to use for all data points in the series. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
9008 /// </summary>
9009 [JsonPropertyName("color")]
9010 public ChartColor? Color { get; set; }
9011
9012 public GroupedVerticalBarChartData WithLegend(string value)
9013 {
9014 this.Legend = value;
9015 return this;
9016 }
9017
9018 public GroupedVerticalBarChartData WithValues(params IList<BarChartDataValue> value)
9019 {
9020 this.Values = value;
9021 return this;
9022 }
9023
9024 public GroupedVerticalBarChartData WithColor(ChartColor value)
9025 {
9026 this.Color = value;
9027 return this;
9028 }
9029}
9030
9031/// <summary>
9032/// A single data point in a bar chart.
9033/// </summary>
9034public class BarChartDataValue : SerializableObject
9035{
9036 /// <summary>
9037 /// The x axis value of the data point.
9038 /// </summary>
9039 [JsonPropertyName("x")]
9040 public string? X { get; set; }
9041
9042 /// <summary>
9043 /// The y axis value of the data point.
9044 /// </summary>
9045 [JsonPropertyName("y")]
9046 public float? Y { get; set; }
9047
9048 public BarChartDataValue WithX(string value)
9049 {
9050 this.X = value;
9051 return this;
9052 }
9053
9054 public BarChartDataValue WithY(float value)
9055 {
9056 this.Y = value;
9057 return this;
9058 }
9059}
9060
9061/// <summary>
9062/// A vertical bar chart.
9063/// </summary>
9064public class VerticalBarChart : CardElement
9065{
9066 /// <summary>
9067 /// Must be **Chart.VerticalBar**.
9068 /// </summary>
9069 [JsonPropertyName("type")]
9070 public string Type { get; } = "Chart.VerticalBar";
9071
9072 /// <summary>
9073 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
9074 /// </summary>
9075 [JsonPropertyName("id")]
9076 public string? Id { get; set; }
9077
9078 /// <summary>
9079 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
9080 /// </summary>
9081 [JsonPropertyName("requires")]
9082 public HostCapabilities? Requires { get; set; }
9083
9084 /// <summary>
9085 /// The locale associated with the element.
9086 /// </summary>
9087 [JsonPropertyName("lang")]
9088 public string? Lang { get; set; }
9089
9090 /// <summary>
9091 /// Controls the visibility of the element.
9092 /// </summary>
9093 [JsonPropertyName("isVisible")]
9094 public bool? IsVisible { get; set; }
9095
9096 /// <summary>
9097 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
9098 /// </summary>
9099 [JsonPropertyName("separator")]
9100 public bool? Separator { get; set; }
9101
9102 /// <summary>
9103 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
9104 /// </summary>
9105 [JsonPropertyName("height")]
9106 public ElementHeight? Height { get; set; }
9107
9108 /// <summary>
9109 /// Controls how the element should be horizontally aligned.
9110 /// </summary>
9111 [JsonPropertyName("horizontalAlignment")]
9112 public HorizontalAlignment? HorizontalAlignment { get; set; }
9113
9114 /// <summary>
9115 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
9116 /// </summary>
9117 [JsonPropertyName("spacing")]
9118 public Spacing? Spacing { get; set; }
9119
9120 /// <summary>
9121 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
9122 /// </summary>
9123 [JsonPropertyName("targetWidth")]
9124 public TargetWidth? TargetWidth { get; set; }
9125
9126 /// <summary>
9127 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
9128 /// </summary>
9129 [JsonPropertyName("isSortKey")]
9130 public bool? IsSortKey { get; set; }
9131
9132 /// <summary>
9133 /// The title of the chart.
9134 /// </summary>
9135 [JsonPropertyName("title")]
9136 public string? Title { get; set; }
9137
9138 /// <summary>
9139 /// The name of the set of colors to use to render the chart. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
9140 /// </summary>
9141 [JsonPropertyName("colorSet")]
9142 public ChartColorSet? ColorSet { get; set; }
9143
9144 /// <summary>
9145 /// The title of the x axis.
9146 /// </summary>
9147 [JsonPropertyName("xAxisTitle")]
9148 public string? XAxisTitle { get; set; }
9149
9150 /// <summary>
9151 /// The title of the y axis.
9152 /// </summary>
9153 [JsonPropertyName("yAxisTitle")]
9154 public string? YAxisTitle { get; set; }
9155
9156 /// <summary>
9157 /// The data to display in the chart.
9158 /// </summary>
9159 [JsonPropertyName("data")]
9160 public IList<VerticalBarChartDataValue>? Data { get; set; }
9161
9162 /// <summary>
9163 /// The color to use for all data points. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
9164 /// </summary>
9165 [JsonPropertyName("color")]
9166 public ChartColor? Color { get; set; }
9167
9168 /// <summary>
9169 /// Controls if the bar values should be displayed.
9170 /// </summary>
9171 [JsonPropertyName("showBarValues")]
9172 public bool? ShowBarValues { get; set; }
9173
9174 /// <summary>
9175 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
9176 /// </summary>
9177 [JsonPropertyName("grid.area")]
9178 public string? GridArea { get; set; }
9179
9180 /// <summary>
9181 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
9182 /// </summary>
9183 [JsonPropertyName("fallback")]
9184 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
9185
9186 public VerticalBarChart WithId(string value)
9187 {
9188 this.Id = value;
9189 return this;
9190 }
9191
9192 public VerticalBarChart WithRequires(HostCapabilities value)
9193 {
9194 this.Requires = value;
9195 return this;
9196 }
9197
9198 public VerticalBarChart WithLang(string value)
9199 {
9200 this.Lang = value;
9201 return this;
9202 }
9203
9204 public VerticalBarChart WithIsVisible(bool value)
9205 {
9206 this.IsVisible = value;
9207 return this;
9208 }
9209
9210 public VerticalBarChart WithSeparator(bool value)
9211 {
9212 this.Separator = value;
9213 return this;
9214 }
9215
9216 public VerticalBarChart WithHeight(ElementHeight value)
9217 {
9218 this.Height = value;
9219 return this;
9220 }
9221
9222 public VerticalBarChart WithHorizontalAlignment(HorizontalAlignment value)
9223 {
9224 this.HorizontalAlignment = value;
9225 return this;
9226 }
9227
9228 public VerticalBarChart WithSpacing(Spacing value)
9229 {
9230 this.Spacing = value;
9231 return this;
9232 }
9233
9234 public VerticalBarChart WithTargetWidth(TargetWidth value)
9235 {
9236 this.TargetWidth = value;
9237 return this;
9238 }
9239
9240 public VerticalBarChart WithIsSortKey(bool value)
9241 {
9242 this.IsSortKey = value;
9243 return this;
9244 }
9245
9246 public VerticalBarChart WithTitle(string value)
9247 {
9248 this.Title = value;
9249 return this;
9250 }
9251
9252 public VerticalBarChart WithColorSet(ChartColorSet value)
9253 {
9254 this.ColorSet = value;
9255 return this;
9256 }
9257
9258 public VerticalBarChart WithXAxisTitle(string value)
9259 {
9260 this.XAxisTitle = value;
9261 return this;
9262 }
9263
9264 public VerticalBarChart WithYAxisTitle(string value)
9265 {
9266 this.YAxisTitle = value;
9267 return this;
9268 }
9269
9270 public VerticalBarChart WithData(params IList<VerticalBarChartDataValue> value)
9271 {
9272 this.Data = value;
9273 return this;
9274 }
9275
9276 public VerticalBarChart WithColor(ChartColor value)
9277 {
9278 this.Color = value;
9279 return this;
9280 }
9281
9282 public VerticalBarChart WithShowBarValues(bool value)
9283 {
9284 this.ShowBarValues = value;
9285 return this;
9286 }
9287
9288 public VerticalBarChart WithGridArea(string value)
9289 {
9290 this.GridArea = value;
9291 return this;
9292 }
9293
9294 public VerticalBarChart WithFallback(IUnion<CardElement, FallbackElement> value)
9295 {
9296 this.Fallback = value;
9297 return this;
9298 }
9299}
9300
9301/// <summary>
9302/// Represents a data point in a vertical bar chart.
9303/// </summary>
9304public class VerticalBarChartDataValue : SerializableObject
9305{
9306 /// <summary>
9307 /// The x axis value of the data point.
9308 /// </summary>
9309 [JsonPropertyName("x")]
9310 public IUnion<string, float>? X { get; set; }
9311
9312 /// <summary>
9313 /// The y axis value of the data point.
9314 /// </summary>
9315 [JsonPropertyName("y")]
9316 public float? Y { get; set; }
9317
9318 /// <summary>
9319 /// The color to use for the bar associated with the data point. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
9320 /// </summary>
9321 [JsonPropertyName("color")]
9322 public ChartColor? Color { get; set; }
9323
9324 public VerticalBarChartDataValue WithX(IUnion<string, float> value)
9325 {
9326 this.X = value;
9327 return this;
9328 }
9329
9330 public VerticalBarChartDataValue WithY(float value)
9331 {
9332 this.Y = value;
9333 return this;
9334 }
9335
9336 public VerticalBarChartDataValue WithColor(ChartColor value)
9337 {
9338 this.Color = value;
9339 return this;
9340 }
9341}
9342
9343/// <summary>
9344/// A horizontal bar chart.
9345/// </summary>
9346public class HorizontalBarChart : CardElement
9347{
9348 /// <summary>
9349 /// Must be **Chart.HorizontalBar**.
9350 /// </summary>
9351 [JsonPropertyName("type")]
9352 public string Type { get; } = "Chart.HorizontalBar";
9353
9354 /// <summary>
9355 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
9356 /// </summary>
9357 [JsonPropertyName("id")]
9358 public string? Id { get; set; }
9359
9360 /// <summary>
9361 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
9362 /// </summary>
9363 [JsonPropertyName("requires")]
9364 public HostCapabilities? Requires { get; set; }
9365
9366 /// <summary>
9367 /// The locale associated with the element.
9368 /// </summary>
9369 [JsonPropertyName("lang")]
9370 public string? Lang { get; set; }
9371
9372 /// <summary>
9373 /// Controls the visibility of the element.
9374 /// </summary>
9375 [JsonPropertyName("isVisible")]
9376 public bool? IsVisible { get; set; }
9377
9378 /// <summary>
9379 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
9380 /// </summary>
9381 [JsonPropertyName("separator")]
9382 public bool? Separator { get; set; }
9383
9384 /// <summary>
9385 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
9386 /// </summary>
9387 [JsonPropertyName("height")]
9388 public ElementHeight? Height { get; set; }
9389
9390 /// <summary>
9391 /// Controls how the element should be horizontally aligned.
9392 /// </summary>
9393 [JsonPropertyName("horizontalAlignment")]
9394 public HorizontalAlignment? HorizontalAlignment { get; set; }
9395
9396 /// <summary>
9397 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
9398 /// </summary>
9399 [JsonPropertyName("spacing")]
9400 public Spacing? Spacing { get; set; }
9401
9402 /// <summary>
9403 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
9404 /// </summary>
9405 [JsonPropertyName("targetWidth")]
9406 public TargetWidth? TargetWidth { get; set; }
9407
9408 /// <summary>
9409 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
9410 /// </summary>
9411 [JsonPropertyName("isSortKey")]
9412 public bool? IsSortKey { get; set; }
9413
9414 /// <summary>
9415 /// The title of the chart.
9416 /// </summary>
9417 [JsonPropertyName("title")]
9418 public string? Title { get; set; }
9419
9420 /// <summary>
9421 /// The name of the set of colors to use to render the chart. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
9422 /// </summary>
9423 [JsonPropertyName("colorSet")]
9424 public ChartColorSet? ColorSet { get; set; }
9425
9426 /// <summary>
9427 /// The title of the x axis.
9428 /// </summary>
9429 [JsonPropertyName("xAxisTitle")]
9430 public string? XAxisTitle { get; set; }
9431
9432 /// <summary>
9433 /// The title of the y axis.
9434 /// </summary>
9435 [JsonPropertyName("yAxisTitle")]
9436 public string? YAxisTitle { get; set; }
9437
9438 /// <summary>
9439 /// The color to use for all data points. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
9440 /// </summary>
9441 [JsonPropertyName("color")]
9442 public ChartColor? Color { get; set; }
9443
9444 /// <summary>
9445 /// The data points in the chart.
9446 /// </summary>
9447 [JsonPropertyName("data")]
9448 public IList<HorizontalBarChartDataValue>? Data { get; set; }
9449
9450 /// <summary>
9451 /// Controls how the chart should be visually laid out.
9452 /// </summary>
9453 [JsonPropertyName("displayMode")]
9454 public HorizontalBarChartDisplayMode? DisplayMode { get; set; }
9455
9456 /// <summary>
9457 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
9458 /// </summary>
9459 [JsonPropertyName("grid.area")]
9460 public string? GridArea { get; set; }
9461
9462 /// <summary>
9463 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
9464 /// </summary>
9465 [JsonPropertyName("fallback")]
9466 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
9467
9468 public HorizontalBarChart WithId(string value)
9469 {
9470 this.Id = value;
9471 return this;
9472 }
9473
9474 public HorizontalBarChart WithRequires(HostCapabilities value)
9475 {
9476 this.Requires = value;
9477 return this;
9478 }
9479
9480 public HorizontalBarChart WithLang(string value)
9481 {
9482 this.Lang = value;
9483 return this;
9484 }
9485
9486 public HorizontalBarChart WithIsVisible(bool value)
9487 {
9488 this.IsVisible = value;
9489 return this;
9490 }
9491
9492 public HorizontalBarChart WithSeparator(bool value)
9493 {
9494 this.Separator = value;
9495 return this;
9496 }
9497
9498 public HorizontalBarChart WithHeight(ElementHeight value)
9499 {
9500 this.Height = value;
9501 return this;
9502 }
9503
9504 public HorizontalBarChart WithHorizontalAlignment(HorizontalAlignment value)
9505 {
9506 this.HorizontalAlignment = value;
9507 return this;
9508 }
9509
9510 public HorizontalBarChart WithSpacing(Spacing value)
9511 {
9512 this.Spacing = value;
9513 return this;
9514 }
9515
9516 public HorizontalBarChart WithTargetWidth(TargetWidth value)
9517 {
9518 this.TargetWidth = value;
9519 return this;
9520 }
9521
9522 public HorizontalBarChart WithIsSortKey(bool value)
9523 {
9524 this.IsSortKey = value;
9525 return this;
9526 }
9527
9528 public HorizontalBarChart WithTitle(string value)
9529 {
9530 this.Title = value;
9531 return this;
9532 }
9533
9534 public HorizontalBarChart WithColorSet(ChartColorSet value)
9535 {
9536 this.ColorSet = value;
9537 return this;
9538 }
9539
9540 public HorizontalBarChart WithXAxisTitle(string value)
9541 {
9542 this.XAxisTitle = value;
9543 return this;
9544 }
9545
9546 public HorizontalBarChart WithYAxisTitle(string value)
9547 {
9548 this.YAxisTitle = value;
9549 return this;
9550 }
9551
9552 public HorizontalBarChart WithColor(ChartColor value)
9553 {
9554 this.Color = value;
9555 return this;
9556 }
9557
9558 public HorizontalBarChart WithData(params IList<HorizontalBarChartDataValue> value)
9559 {
9560 this.Data = value;
9561 return this;
9562 }
9563
9564 public HorizontalBarChart WithDisplayMode(HorizontalBarChartDisplayMode value)
9565 {
9566 this.DisplayMode = value;
9567 return this;
9568 }
9569
9570 public HorizontalBarChart WithGridArea(string value)
9571 {
9572 this.GridArea = value;
9573 return this;
9574 }
9575
9576 public HorizontalBarChart WithFallback(IUnion<CardElement, FallbackElement> value)
9577 {
9578 this.Fallback = value;
9579 return this;
9580 }
9581}
9582
9583/// <summary>
9584/// Represents a single data point in a horizontal bar chart.
9585/// </summary>
9586public class HorizontalBarChartDataValue : SerializableObject
9587{
9588 /// <summary>
9589 /// The x axis value of the data point.
9590 /// </summary>
9591 [JsonPropertyName("x")]
9592 public string? X { get; set; }
9593
9594 /// <summary>
9595 /// The y axis value of the data point.
9596 /// </summary>
9597 [JsonPropertyName("y")]
9598 public float? Y { get; set; }
9599
9600 /// <summary>
9601 /// The color of the bar associated with the data point. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
9602 /// </summary>
9603 [JsonPropertyName("color")]
9604 public ChartColor? Color { get; set; }
9605
9606 public HorizontalBarChartDataValue WithX(string value)
9607 {
9608 this.X = value;
9609 return this;
9610 }
9611
9612 public HorizontalBarChartDataValue WithY(float value)
9613 {
9614 this.Y = value;
9615 return this;
9616 }
9617
9618 public HorizontalBarChartDataValue WithColor(ChartColor value)
9619 {
9620 this.Color = value;
9621 return this;
9622 }
9623}
9624
9625/// <summary>
9626/// A stacked horizontal bar chart.
9627/// </summary>
9628public class StackedHorizontalBarChart : CardElement
9629{
9630 /// <summary>
9631 /// Must be **Chart.HorizontalBar.Stacked**.
9632 /// </summary>
9633 [JsonPropertyName("type")]
9634 public string Type { get; } = "Chart.HorizontalBar.Stacked";
9635
9636 /// <summary>
9637 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
9638 /// </summary>
9639 [JsonPropertyName("id")]
9640 public string? Id { get; set; }
9641
9642 /// <summary>
9643 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
9644 /// </summary>
9645 [JsonPropertyName("requires")]
9646 public HostCapabilities? Requires { get; set; }
9647
9648 /// <summary>
9649 /// The locale associated with the element.
9650 /// </summary>
9651 [JsonPropertyName("lang")]
9652 public string? Lang { get; set; }
9653
9654 /// <summary>
9655 /// Controls the visibility of the element.
9656 /// </summary>
9657 [JsonPropertyName("isVisible")]
9658 public bool? IsVisible { get; set; }
9659
9660 /// <summary>
9661 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
9662 /// </summary>
9663 [JsonPropertyName("separator")]
9664 public bool? Separator { get; set; }
9665
9666 /// <summary>
9667 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
9668 /// </summary>
9669 [JsonPropertyName("height")]
9670 public ElementHeight? Height { get; set; }
9671
9672 /// <summary>
9673 /// Controls how the element should be horizontally aligned.
9674 /// </summary>
9675 [JsonPropertyName("horizontalAlignment")]
9676 public HorizontalAlignment? HorizontalAlignment { get; set; }
9677
9678 /// <summary>
9679 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
9680 /// </summary>
9681 [JsonPropertyName("spacing")]
9682 public Spacing? Spacing { get; set; }
9683
9684 /// <summary>
9685 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
9686 /// </summary>
9687 [JsonPropertyName("targetWidth")]
9688 public TargetWidth? TargetWidth { get; set; }
9689
9690 /// <summary>
9691 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
9692 /// </summary>
9693 [JsonPropertyName("isSortKey")]
9694 public bool? IsSortKey { get; set; }
9695
9696 /// <summary>
9697 /// The title of the chart.
9698 /// </summary>
9699 [JsonPropertyName("title")]
9700 public string? Title { get; set; }
9701
9702 /// <summary>
9703 /// The name of the set of colors to use to render the chart. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
9704 /// </summary>
9705 [JsonPropertyName("colorSet")]
9706 public ChartColorSet? ColorSet { get; set; }
9707
9708 /// <summary>
9709 /// The title of the x axis.
9710 /// </summary>
9711 [JsonPropertyName("xAxisTitle")]
9712 public string? XAxisTitle { get; set; }
9713
9714 /// <summary>
9715 /// The title of the y axis.
9716 /// </summary>
9717 [JsonPropertyName("yAxisTitle")]
9718 public string? YAxisTitle { get; set; }
9719
9720 /// <summary>
9721 /// The color to use for all data points. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
9722 /// </summary>
9723 [JsonPropertyName("color")]
9724 public ChartColor? Color { get; set; }
9725
9726 /// <summary>
9727 /// The data to display in the chart.
9728 /// </summary>
9729 [JsonPropertyName("data")]
9730 public IList<StackedHorizontalBarChartData>? Data { get; set; }
9731
9732 /// <summary>
9733 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
9734 /// </summary>
9735 [JsonPropertyName("grid.area")]
9736 public string? GridArea { get; set; }
9737
9738 /// <summary>
9739 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
9740 /// </summary>
9741 [JsonPropertyName("fallback")]
9742 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
9743
9744 public StackedHorizontalBarChart WithId(string value)
9745 {
9746 this.Id = value;
9747 return this;
9748 }
9749
9750 public StackedHorizontalBarChart WithRequires(HostCapabilities value)
9751 {
9752 this.Requires = value;
9753 return this;
9754 }
9755
9756 public StackedHorizontalBarChart WithLang(string value)
9757 {
9758 this.Lang = value;
9759 return this;
9760 }
9761
9762 public StackedHorizontalBarChart WithIsVisible(bool value)
9763 {
9764 this.IsVisible = value;
9765 return this;
9766 }
9767
9768 public StackedHorizontalBarChart WithSeparator(bool value)
9769 {
9770 this.Separator = value;
9771 return this;
9772 }
9773
9774 public StackedHorizontalBarChart WithHeight(ElementHeight value)
9775 {
9776 this.Height = value;
9777 return this;
9778 }
9779
9780 public StackedHorizontalBarChart WithHorizontalAlignment(HorizontalAlignment value)
9781 {
9782 this.HorizontalAlignment = value;
9783 return this;
9784 }
9785
9786 public StackedHorizontalBarChart WithSpacing(Spacing value)
9787 {
9788 this.Spacing = value;
9789 return this;
9790 }
9791
9792 public StackedHorizontalBarChart WithTargetWidth(TargetWidth value)
9793 {
9794 this.TargetWidth = value;
9795 return this;
9796 }
9797
9798 public StackedHorizontalBarChart WithIsSortKey(bool value)
9799 {
9800 this.IsSortKey = value;
9801 return this;
9802 }
9803
9804 public StackedHorizontalBarChart WithTitle(string value)
9805 {
9806 this.Title = value;
9807 return this;
9808 }
9809
9810 public StackedHorizontalBarChart WithColorSet(ChartColorSet value)
9811 {
9812 this.ColorSet = value;
9813 return this;
9814 }
9815
9816 public StackedHorizontalBarChart WithXAxisTitle(string value)
9817 {
9818 this.XAxisTitle = value;
9819 return this;
9820 }
9821
9822 public StackedHorizontalBarChart WithYAxisTitle(string value)
9823 {
9824 this.YAxisTitle = value;
9825 return this;
9826 }
9827
9828 public StackedHorizontalBarChart WithColor(ChartColor value)
9829 {
9830 this.Color = value;
9831 return this;
9832 }
9833
9834 public StackedHorizontalBarChart WithData(params IList<StackedHorizontalBarChartData> value)
9835 {
9836 this.Data = value;
9837 return this;
9838 }
9839
9840 public StackedHorizontalBarChart WithGridArea(string value)
9841 {
9842 this.GridArea = value;
9843 return this;
9844 }
9845
9846 public StackedHorizontalBarChart WithFallback(IUnion<CardElement, FallbackElement> value)
9847 {
9848 this.Fallback = value;
9849 return this;
9850 }
9851}
9852
9853/// <summary>
9854/// Defines the collection of data series to display in as a stacked horizontal bar chart.
9855/// </summary>
9856public class StackedHorizontalBarChartData : SerializableObject
9857{
9858 /// <summary>
9859 /// The title of the series.
9860 /// </summary>
9861 [JsonPropertyName("title")]
9862 public string? Title { get; set; }
9863
9864 /// <summary>
9865 /// The data points in the series.
9866 /// </summary>
9867 [JsonPropertyName("data")]
9868 public IList<StackedHorizontalBarChartDataPoint>? Data { get; set; }
9869
9870 public StackedHorizontalBarChartData WithTitle(string value)
9871 {
9872 this.Title = value;
9873 return this;
9874 }
9875
9876 public StackedHorizontalBarChartData WithData(params IList<StackedHorizontalBarChartDataPoint> value)
9877 {
9878 this.Data = value;
9879 return this;
9880 }
9881}
9882
9883/// <summary>
9884/// A data point in a series.
9885/// </summary>
9886public class StackedHorizontalBarChartDataPoint : SerializableObject
9887{
9888 /// <summary>
9889 /// The legend associated with the data point.
9890 /// </summary>
9891 [JsonPropertyName("legend")]
9892 public string? Legend { get; set; }
9893
9894 /// <summary>
9895 /// The value of the data point.
9896 /// </summary>
9897 [JsonPropertyName("value")]
9898 public float? Value { get; set; }
9899
9900 /// <summary>
9901 /// The color to use to render the bar associated with the data point. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
9902 /// </summary>
9903 [JsonPropertyName("color")]
9904 public ChartColor? Color { get; set; }
9905
9906 public StackedHorizontalBarChartDataPoint WithLegend(string value)
9907 {
9908 this.Legend = value;
9909 return this;
9910 }
9911
9912 public StackedHorizontalBarChartDataPoint WithValue(float value)
9913 {
9914 this.Value = value;
9915 return this;
9916 }
9917
9918 public StackedHorizontalBarChartDataPoint WithColor(ChartColor value)
9919 {
9920 this.Color = value;
9921 return this;
9922 }
9923}
9924
9925/// <summary>
9926/// A line chart.
9927/// </summary>
9928public class LineChart : CardElement
9929{
9930 /// <summary>
9931 /// Must be **Chart.Line**.
9932 /// </summary>
9933 [JsonPropertyName("type")]
9934 public string Type { get; } = "Chart.Line";
9935
9936 /// <summary>
9937 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
9938 /// </summary>
9939 [JsonPropertyName("id")]
9940 public string? Id { get; set; }
9941
9942 /// <summary>
9943 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
9944 /// </summary>
9945 [JsonPropertyName("requires")]
9946 public HostCapabilities? Requires { get; set; }
9947
9948 /// <summary>
9949 /// The locale associated with the element.
9950 /// </summary>
9951 [JsonPropertyName("lang")]
9952 public string? Lang { get; set; }
9953
9954 /// <summary>
9955 /// Controls the visibility of the element.
9956 /// </summary>
9957 [JsonPropertyName("isVisible")]
9958 public bool? IsVisible { get; set; }
9959
9960 /// <summary>
9961 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
9962 /// </summary>
9963 [JsonPropertyName("separator")]
9964 public bool? Separator { get; set; }
9965
9966 /// <summary>
9967 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
9968 /// </summary>
9969 [JsonPropertyName("height")]
9970 public ElementHeight? Height { get; set; }
9971
9972 /// <summary>
9973 /// Controls how the element should be horizontally aligned.
9974 /// </summary>
9975 [JsonPropertyName("horizontalAlignment")]
9976 public HorizontalAlignment? HorizontalAlignment { get; set; }
9977
9978 /// <summary>
9979 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
9980 /// </summary>
9981 [JsonPropertyName("spacing")]
9982 public Spacing? Spacing { get; set; }
9983
9984 /// <summary>
9985 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
9986 /// </summary>
9987 [JsonPropertyName("targetWidth")]
9988 public TargetWidth? TargetWidth { get; set; }
9989
9990 /// <summary>
9991 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
9992 /// </summary>
9993 [JsonPropertyName("isSortKey")]
9994 public bool? IsSortKey { get; set; }
9995
9996 /// <summary>
9997 /// The title of the chart.
9998 /// </summary>
9999 [JsonPropertyName("title")]
10000 public string? Title { get; set; }
10001
10002 /// <summary>
10003 /// The name of the set of colors to use to render the chart. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
10004 /// </summary>
10005 [JsonPropertyName("colorSet")]
10006 public ChartColorSet? ColorSet { get; set; }
10007
10008 /// <summary>
10009 /// The title of the x axis.
10010 /// </summary>
10011 [JsonPropertyName("xAxisTitle")]
10012 public string? XAxisTitle { get; set; }
10013
10014 /// <summary>
10015 /// The title of the y axis.
10016 /// </summary>
10017 [JsonPropertyName("yAxisTitle")]
10018 public string? YAxisTitle { get; set; }
10019
10020 /// <summary>
10021 /// The color to use for all data points. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
10022 /// </summary>
10023 [JsonPropertyName("color")]
10024 public ChartColor? Color { get; set; }
10025
10026 /// <summary>
10027 /// The data point series in the line chart.
10028 /// </summary>
10029 [JsonPropertyName("data")]
10030 public IList<LineChartData>? Data { get; set; }
10031
10032 /// <summary>
10033 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
10034 /// </summary>
10035 [JsonPropertyName("grid.area")]
10036 public string? GridArea { get; set; }
10037
10038 /// <summary>
10039 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
10040 /// </summary>
10041 [JsonPropertyName("fallback")]
10042 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
10043
10044 public LineChart WithId(string value)
10045 {
10046 this.Id = value;
10047 return this;
10048 }
10049
10050 public LineChart WithRequires(HostCapabilities value)
10051 {
10052 this.Requires = value;
10053 return this;
10054 }
10055
10056 public LineChart WithLang(string value)
10057 {
10058 this.Lang = value;
10059 return this;
10060 }
10061
10062 public LineChart WithIsVisible(bool value)
10063 {
10064 this.IsVisible = value;
10065 return this;
10066 }
10067
10068 public LineChart WithSeparator(bool value)
10069 {
10070 this.Separator = value;
10071 return this;
10072 }
10073
10074 public LineChart WithHeight(ElementHeight value)
10075 {
10076 this.Height = value;
10077 return this;
10078 }
10079
10080 public LineChart WithHorizontalAlignment(HorizontalAlignment value)
10081 {
10082 this.HorizontalAlignment = value;
10083 return this;
10084 }
10085
10086 public LineChart WithSpacing(Spacing value)
10087 {
10088 this.Spacing = value;
10089 return this;
10090 }
10091
10092 public LineChart WithTargetWidth(TargetWidth value)
10093 {
10094 this.TargetWidth = value;
10095 return this;
10096 }
10097
10098 public LineChart WithIsSortKey(bool value)
10099 {
10100 this.IsSortKey = value;
10101 return this;
10102 }
10103
10104 public LineChart WithTitle(string value)
10105 {
10106 this.Title = value;
10107 return this;
10108 }
10109
10110 public LineChart WithColorSet(ChartColorSet value)
10111 {
10112 this.ColorSet = value;
10113 return this;
10114 }
10115
10116 public LineChart WithXAxisTitle(string value)
10117 {
10118 this.XAxisTitle = value;
10119 return this;
10120 }
10121
10122 public LineChart WithYAxisTitle(string value)
10123 {
10124 this.YAxisTitle = value;
10125 return this;
10126 }
10127
10128 public LineChart WithColor(ChartColor value)
10129 {
10130 this.Color = value;
10131 return this;
10132 }
10133
10134 public LineChart WithData(params IList<LineChartData> value)
10135 {
10136 this.Data = value;
10137 return this;
10138 }
10139
10140 public LineChart WithGridArea(string value)
10141 {
10142 this.GridArea = value;
10143 return this;
10144 }
10145
10146 public LineChart WithFallback(IUnion<CardElement, FallbackElement> value)
10147 {
10148 this.Fallback = value;
10149 return this;
10150 }
10151}
10152
10153/// <summary>
10154/// Represents a collection of data points series in a line chart.
10155/// </summary>
10156public class LineChartData : SerializableObject
10157{
10158 /// <summary>
10159 /// The legend of the chart.
10160 /// </summary>
10161 [JsonPropertyName("legend")]
10162 public string? Legend { get; set; }
10163
10164 /// <summary>
10165 /// The data points in the series.
10166 /// </summary>
10167 [JsonPropertyName("values")]
10168 public IList<LineChartValue>? Values { get; set; }
10169
10170 /// <summary>
10171 /// The color all data points in the series. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
10172 /// </summary>
10173 [JsonPropertyName("color")]
10174 public ChartColor? Color { get; set; }
10175
10176 public LineChartData WithLegend(string value)
10177 {
10178 this.Legend = value;
10179 return this;
10180 }
10181
10182 public LineChartData WithValues(params IList<LineChartValue> value)
10183 {
10184 this.Values = value;
10185 return this;
10186 }
10187
10188 public LineChartData WithColor(ChartColor value)
10189 {
10190 this.Color = value;
10191 return this;
10192 }
10193}
10194
10195/// <summary>
10196/// Represents a single data point in a line chart.
10197/// </summary>
10198public class LineChartValue : SerializableObject
10199{
10200 /// <summary>
10201 /// The x axis value of the data point.
10202 ///
10203 /// If all x values of the x [Chart.Line](https://adaptivecards.microsoft.com/?topic=Chart.Line) are expressed as a number, or if all x values are expressed as a date string in the `YYYY-MM-DD` format, the chart will be rendered as a time series chart, i.e. x axis values will span across the minimum x value to maximum x value range.
10204 ///
10205 /// Otherwise, if x values are represented as a mix of numbers and strings or if at least one x value isn't in the `YYYY-MM-DD` format, the chart will be rendered as a categorical chart, i.e. x axis values will be displayed as categories.
10206 /// </summary>
10207 [JsonPropertyName("x")]
10208 public IUnion<float, string>? X { get; set; }
10209
10210 /// <summary>
10211 /// The y axis value of the data point.
10212 /// </summary>
10213 [JsonPropertyName("y")]
10214 public float? Y { get; set; }
10215
10216 public LineChartValue WithX(IUnion<float, string> value)
10217 {
10218 this.X = value;
10219 return this;
10220 }
10221
10222 public LineChartValue WithY(float value)
10223 {
10224 this.Y = value;
10225 return this;
10226 }
10227}
10228
10229/// <summary>
10230/// A gauge chart.
10231/// </summary>
10232public class GaugeChart : CardElement
10233{
10234 /// <summary>
10235 /// Must be **Chart.Gauge**.
10236 /// </summary>
10237 [JsonPropertyName("type")]
10238 public string Type { get; } = "Chart.Gauge";
10239
10240 /// <summary>
10241 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
10242 /// </summary>
10243 [JsonPropertyName("id")]
10244 public string? Id { get; set; }
10245
10246 /// <summary>
10247 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
10248 /// </summary>
10249 [JsonPropertyName("requires")]
10250 public HostCapabilities? Requires { get; set; }
10251
10252 /// <summary>
10253 /// The locale associated with the element.
10254 /// </summary>
10255 [JsonPropertyName("lang")]
10256 public string? Lang { get; set; }
10257
10258 /// <summary>
10259 /// Controls the visibility of the element.
10260 /// </summary>
10261 [JsonPropertyName("isVisible")]
10262 public bool? IsVisible { get; set; }
10263
10264 /// <summary>
10265 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
10266 /// </summary>
10267 [JsonPropertyName("separator")]
10268 public bool? Separator { get; set; }
10269
10270 /// <summary>
10271 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
10272 /// </summary>
10273 [JsonPropertyName("height")]
10274 public ElementHeight? Height { get; set; }
10275
10276 /// <summary>
10277 /// Controls how the element should be horizontally aligned.
10278 /// </summary>
10279 [JsonPropertyName("horizontalAlignment")]
10280 public HorizontalAlignment? HorizontalAlignment { get; set; }
10281
10282 /// <summary>
10283 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
10284 /// </summary>
10285 [JsonPropertyName("spacing")]
10286 public Spacing? Spacing { get; set; }
10287
10288 /// <summary>
10289 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
10290 /// </summary>
10291 [JsonPropertyName("targetWidth")]
10292 public TargetWidth? TargetWidth { get; set; }
10293
10294 /// <summary>
10295 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
10296 /// </summary>
10297 [JsonPropertyName("isSortKey")]
10298 public bool? IsSortKey { get; set; }
10299
10300 /// <summary>
10301 /// The title of the chart.
10302 /// </summary>
10303 [JsonPropertyName("title")]
10304 public string? Title { get; set; }
10305
10306 /// <summary>
10307 /// The name of the set of colors to use to render the chart. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
10308 /// </summary>
10309 [JsonPropertyName("colorSet")]
10310 public ChartColorSet? ColorSet { get; set; }
10311
10312 /// <summary>
10313 /// The minimum value of the gauge.
10314 /// </summary>
10315 [JsonPropertyName("min")]
10316 public float? Min { get; set; }
10317
10318 /// <summary>
10319 /// The maximum value of the gauge.
10320 /// </summary>
10321 [JsonPropertyName("max")]
10322 public float? Max { get; set; }
10323
10324 /// <summary>
10325 /// The sub-label of the gauge.
10326 /// </summary>
10327 [JsonPropertyName("subLabel")]
10328 public string? SubLabel { get; set; }
10329
10330 /// <summary>
10331 /// Controls if the min/max values should be displayed.
10332 /// </summary>
10333 [JsonPropertyName("showMinMax")]
10334 public bool? ShowMinMax { get; set; }
10335
10336 /// <summary>
10337 /// Controls if the legend should be displayed.
10338 /// </summary>
10339 [JsonPropertyName("showLegend")]
10340 public bool? ShowLegend { get; set; }
10341
10342 /// <summary>
10343 /// The segments to display in the gauge.
10344 /// </summary>
10345 [JsonPropertyName("segments")]
10346 public IList<GaugeChartLegend>? Segments { get; set; }
10347
10348 /// <summary>
10349 /// The value of the gauge.
10350 /// </summary>
10351 [JsonPropertyName("value")]
10352 public float? Value { get; set; }
10353
10354 /// <summary>
10355 /// The format used to display the gauge's value.
10356 /// </summary>
10357 [JsonPropertyName("valueFormat")]
10358 public GaugeChartValueFormat? ValueFormat { get; set; }
10359
10360 /// <summary>
10361 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
10362 /// </summary>
10363 [JsonPropertyName("grid.area")]
10364 public string? GridArea { get; set; }
10365
10366 /// <summary>
10367 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
10368 /// </summary>
10369 [JsonPropertyName("fallback")]
10370 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
10371
10372 public GaugeChart WithId(string value)
10373 {
10374 this.Id = value;
10375 return this;
10376 }
10377
10378 public GaugeChart WithRequires(HostCapabilities value)
10379 {
10380 this.Requires = value;
10381 return this;
10382 }
10383
10384 public GaugeChart WithLang(string value)
10385 {
10386 this.Lang = value;
10387 return this;
10388 }
10389
10390 public GaugeChart WithIsVisible(bool value)
10391 {
10392 this.IsVisible = value;
10393 return this;
10394 }
10395
10396 public GaugeChart WithSeparator(bool value)
10397 {
10398 this.Separator = value;
10399 return this;
10400 }
10401
10402 public GaugeChart WithHeight(ElementHeight value)
10403 {
10404 this.Height = value;
10405 return this;
10406 }
10407
10408 public GaugeChart WithHorizontalAlignment(HorizontalAlignment value)
10409 {
10410 this.HorizontalAlignment = value;
10411 return this;
10412 }
10413
10414 public GaugeChart WithSpacing(Spacing value)
10415 {
10416 this.Spacing = value;
10417 return this;
10418 }
10419
10420 public GaugeChart WithTargetWidth(TargetWidth value)
10421 {
10422 this.TargetWidth = value;
10423 return this;
10424 }
10425
10426 public GaugeChart WithIsSortKey(bool value)
10427 {
10428 this.IsSortKey = value;
10429 return this;
10430 }
10431
10432 public GaugeChart WithTitle(string value)
10433 {
10434 this.Title = value;
10435 return this;
10436 }
10437
10438 public GaugeChart WithColorSet(ChartColorSet value)
10439 {
10440 this.ColorSet = value;
10441 return this;
10442 }
10443
10444 public GaugeChart WithMin(float value)
10445 {
10446 this.Min = value;
10447 return this;
10448 }
10449
10450 public GaugeChart WithMax(float value)
10451 {
10452 this.Max = value;
10453 return this;
10454 }
10455
10456 public GaugeChart WithSubLabel(string value)
10457 {
10458 this.SubLabel = value;
10459 return this;
10460 }
10461
10462 public GaugeChart WithShowMinMax(bool value)
10463 {
10464 this.ShowMinMax = value;
10465 return this;
10466 }
10467
10468 public GaugeChart WithShowLegend(bool value)
10469 {
10470 this.ShowLegend = value;
10471 return this;
10472 }
10473
10474 public GaugeChart WithSegments(params IList<GaugeChartLegend> value)
10475 {
10476 this.Segments = value;
10477 return this;
10478 }
10479
10480 public GaugeChart WithValue(float value)
10481 {
10482 this.Value = value;
10483 return this;
10484 }
10485
10486 public GaugeChart WithValueFormat(GaugeChartValueFormat value)
10487 {
10488 this.ValueFormat = value;
10489 return this;
10490 }
10491
10492 public GaugeChart WithGridArea(string value)
10493 {
10494 this.GridArea = value;
10495 return this;
10496 }
10497
10498 public GaugeChart WithFallback(IUnion<CardElement, FallbackElement> value)
10499 {
10500 this.Fallback = value;
10501 return this;
10502 }
10503}
10504
10505/// <summary>
10506/// The legend of the chart.
10507/// </summary>
10508public class GaugeChartLegend : SerializableObject
10509{
10510 /// <summary>
10511 /// The size of the segment.
10512 /// </summary>
10513 [JsonPropertyName("size")]
10514 public float? Size { get; set; }
10515
10516 /// <summary>
10517 /// The legend text associated with the segment.
10518 /// </summary>
10519 [JsonPropertyName("legend")]
10520 public string? Legend { get; set; }
10521
10522 /// <summary>
10523 /// The color to use for the segment. See [Chart colors reference](https://adaptivecards.microsoft.com/?topic=chart-colors-reference).
10524 /// </summary>
10525 [JsonPropertyName("color")]
10526 public ChartColor? Color { get; set; }
10527
10528 public GaugeChartLegend WithSize(float value)
10529 {
10530 this.Size = value;
10531 return this;
10532 }
10533
10534 public GaugeChartLegend WithLegend(string value)
10535 {
10536 this.Legend = value;
10537 return this;
10538 }
10539
10540 public GaugeChartLegend WithColor(ChartColor value)
10541 {
10542 this.Color = value;
10543 return this;
10544 }
10545}
10546
10547/// <summary>
10548/// A formatted and syntax-colored code block.
10549/// </summary>
10550public class CodeBlock : CardElement
10551{
10552 /// <summary>
10553 /// Must be **CodeBlock**.
10554 /// </summary>
10555 [JsonPropertyName("type")]
10556 public string Type { get; } = "CodeBlock";
10557
10558 /// <summary>
10559 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
10560 /// </summary>
10561 [JsonPropertyName("id")]
10562 public string? Id { get; set; }
10563
10564 /// <summary>
10565 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
10566 /// </summary>
10567 [JsonPropertyName("requires")]
10568 public HostCapabilities? Requires { get; set; }
10569
10570 /// <summary>
10571 /// The locale associated with the element.
10572 /// </summary>
10573 [JsonPropertyName("lang")]
10574 public string? Lang { get; set; }
10575
10576 /// <summary>
10577 /// Controls the visibility of the element.
10578 /// </summary>
10579 [JsonPropertyName("isVisible")]
10580 public bool? IsVisible { get; set; }
10581
10582 /// <summary>
10583 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
10584 /// </summary>
10585 [JsonPropertyName("separator")]
10586 public bool? Separator { get; set; }
10587
10588 /// <summary>
10589 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
10590 /// </summary>
10591 [JsonPropertyName("height")]
10592 public ElementHeight? Height { get; set; }
10593
10594 /// <summary>
10595 /// Controls how the element should be horizontally aligned.
10596 /// </summary>
10597 [JsonPropertyName("horizontalAlignment")]
10598 public HorizontalAlignment? HorizontalAlignment { get; set; }
10599
10600 /// <summary>
10601 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
10602 /// </summary>
10603 [JsonPropertyName("spacing")]
10604 public Spacing? Spacing { get; set; }
10605
10606 /// <summary>
10607 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
10608 /// </summary>
10609 [JsonPropertyName("targetWidth")]
10610 public TargetWidth? TargetWidth { get; set; }
10611
10612 /// <summary>
10613 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
10614 /// </summary>
10615 [JsonPropertyName("isSortKey")]
10616 public bool? IsSortKey { get; set; }
10617
10618 /// <summary>
10619 /// The code snippet to display.
10620 /// </summary>
10621 [JsonPropertyName("codeSnippet")]
10622 public string? CodeSnippet { get; set; }
10623
10624 /// <summary>
10625 /// The language the code snippet is expressed in.
10626 /// </summary>
10627 [JsonPropertyName("language")]
10628 public CodeLanguage? Language { get; set; }
10629
10630 /// <summary>
10631 /// A number that represents the line in the file from where the code snippet was extracted.
10632 /// </summary>
10633 [JsonPropertyName("startLineNumber")]
10634 public float? StartLineNumber { get; set; }
10635
10636 /// <summary>
10637 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
10638 /// </summary>
10639 [JsonPropertyName("grid.area")]
10640 public string? GridArea { get; set; }
10641
10642 /// <summary>
10643 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
10644 /// </summary>
10645 [JsonPropertyName("fallback")]
10646 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
10647
10648 public CodeBlock WithId(string value)
10649 {
10650 this.Id = value;
10651 return this;
10652 }
10653
10654 public CodeBlock WithRequires(HostCapabilities value)
10655 {
10656 this.Requires = value;
10657 return this;
10658 }
10659
10660 public CodeBlock WithLang(string value)
10661 {
10662 this.Lang = value;
10663 return this;
10664 }
10665
10666 public CodeBlock WithIsVisible(bool value)
10667 {
10668 this.IsVisible = value;
10669 return this;
10670 }
10671
10672 public CodeBlock WithSeparator(bool value)
10673 {
10674 this.Separator = value;
10675 return this;
10676 }
10677
10678 public CodeBlock WithHeight(ElementHeight value)
10679 {
10680 this.Height = value;
10681 return this;
10682 }
10683
10684 public CodeBlock WithHorizontalAlignment(HorizontalAlignment value)
10685 {
10686 this.HorizontalAlignment = value;
10687 return this;
10688 }
10689
10690 public CodeBlock WithSpacing(Spacing value)
10691 {
10692 this.Spacing = value;
10693 return this;
10694 }
10695
10696 public CodeBlock WithTargetWidth(TargetWidth value)
10697 {
10698 this.TargetWidth = value;
10699 return this;
10700 }
10701
10702 public CodeBlock WithIsSortKey(bool value)
10703 {
10704 this.IsSortKey = value;
10705 return this;
10706 }
10707
10708 public CodeBlock WithCodeSnippet(string value)
10709 {
10710 this.CodeSnippet = value;
10711 return this;
10712 }
10713
10714 public CodeBlock WithLanguage(CodeLanguage value)
10715 {
10716 this.Language = value;
10717 return this;
10718 }
10719
10720 public CodeBlock WithStartLineNumber(float value)
10721 {
10722 this.StartLineNumber = value;
10723 return this;
10724 }
10725
10726 public CodeBlock WithGridArea(string value)
10727 {
10728 this.GridArea = value;
10729 return this;
10730 }
10731
10732 public CodeBlock WithFallback(IUnion<CardElement, FallbackElement> value)
10733 {
10734 this.Fallback = value;
10735 return this;
10736 }
10737}
10738
10739/// <summary>
10740/// Displays a user's information, including their profile picture.
10741/// </summary>
10742public class ComUserMicrosoftGraphComponent : CardElement
10743{
10744 /// <summary>
10745 /// Must be **Component**.
10746 /// </summary>
10747 [JsonPropertyName("type")]
10748 public string Type { get; } = "Component";
10749
10750 /// <summary>
10751 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
10752 /// </summary>
10753 [JsonPropertyName("id")]
10754 public string? Id { get; set; }
10755
10756 /// <summary>
10757 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
10758 /// </summary>
10759 [JsonPropertyName("requires")]
10760 public HostCapabilities? Requires { get; set; }
10761
10762 /// <summary>
10763 /// The locale associated with the element.
10764 /// </summary>
10765 [JsonPropertyName("lang")]
10766 public string? Lang { get; set; }
10767
10768 /// <summary>
10769 /// Controls the visibility of the element.
10770 /// </summary>
10771 [JsonPropertyName("isVisible")]
10772 public bool? IsVisible { get; set; }
10773
10774 /// <summary>
10775 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
10776 /// </summary>
10777 [JsonPropertyName("separator")]
10778 public bool? Separator { get; set; }
10779
10780 /// <summary>
10781 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
10782 /// </summary>
10783 [JsonPropertyName("height")]
10784 public ElementHeight? Height { get; set; }
10785
10786 /// <summary>
10787 /// Controls how the element should be horizontally aligned.
10788 /// </summary>
10789 [JsonPropertyName("horizontalAlignment")]
10790 public HorizontalAlignment? HorizontalAlignment { get; set; }
10791
10792 /// <summary>
10793 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
10794 /// </summary>
10795 [JsonPropertyName("spacing")]
10796 public Spacing? Spacing { get; set; }
10797
10798 /// <summary>
10799 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
10800 /// </summary>
10801 [JsonPropertyName("targetWidth")]
10802 public TargetWidth? TargetWidth { get; set; }
10803
10804 /// <summary>
10805 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
10806 /// </summary>
10807 [JsonPropertyName("isSortKey")]
10808 public bool? IsSortKey { get; set; }
10809
10810 /// <summary>
10811 /// Must be **graph.microsoft.com/user**.
10812 /// </summary>
10813 [JsonPropertyName("name")]
10814 public string Name { get; } = "graph.microsoft.com/user";
10815
10816 /// <summary>
10817 /// The properties of the user.
10818 /// </summary>
10819 [JsonPropertyName("properties")]
10820 public PersonaProperties? Properties { get; set; }
10821
10822 /// <summary>
10823 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
10824 /// </summary>
10825 [JsonPropertyName("grid.area")]
10826 public string? GridArea { get; set; }
10827
10828 /// <summary>
10829 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
10830 /// </summary>
10831 [JsonPropertyName("fallback")]
10832 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
10833
10834 public ComUserMicrosoftGraphComponent WithId(string value)
10835 {
10836 this.Id = value;
10837 return this;
10838 }
10839
10840 public ComUserMicrosoftGraphComponent WithRequires(HostCapabilities value)
10841 {
10842 this.Requires = value;
10843 return this;
10844 }
10845
10846 public ComUserMicrosoftGraphComponent WithLang(string value)
10847 {
10848 this.Lang = value;
10849 return this;
10850 }
10851
10852 public ComUserMicrosoftGraphComponent WithIsVisible(bool value)
10853 {
10854 this.IsVisible = value;
10855 return this;
10856 }
10857
10858 public ComUserMicrosoftGraphComponent WithSeparator(bool value)
10859 {
10860 this.Separator = value;
10861 return this;
10862 }
10863
10864 public ComUserMicrosoftGraphComponent WithHeight(ElementHeight value)
10865 {
10866 this.Height = value;
10867 return this;
10868 }
10869
10870 public ComUserMicrosoftGraphComponent WithHorizontalAlignment(HorizontalAlignment value)
10871 {
10872 this.HorizontalAlignment = value;
10873 return this;
10874 }
10875
10876 public ComUserMicrosoftGraphComponent WithSpacing(Spacing value)
10877 {
10878 this.Spacing = value;
10879 return this;
10880 }
10881
10882 public ComUserMicrosoftGraphComponent WithTargetWidth(TargetWidth value)
10883 {
10884 this.TargetWidth = value;
10885 return this;
10886 }
10887
10888 public ComUserMicrosoftGraphComponent WithIsSortKey(bool value)
10889 {
10890 this.IsSortKey = value;
10891 return this;
10892 }
10893
10894 public ComUserMicrosoftGraphComponent WithProperties(PersonaProperties value)
10895 {
10896 this.Properties = value;
10897 return this;
10898 }
10899
10900 public ComUserMicrosoftGraphComponent WithGridArea(string value)
10901 {
10902 this.GridArea = value;
10903 return this;
10904 }
10905
10906 public ComUserMicrosoftGraphComponent WithFallback(IUnion<CardElement, FallbackElement> value)
10907 {
10908 this.Fallback = value;
10909 return this;
10910 }
10911}
10912
10913/// <summary>
10914/// Represents the properties of a Persona component.
10915/// </summary>
10916public class PersonaProperties : SerializableObject
10917{
10918 /// <summary>
10919 /// The UPN of the persona.
10920 /// </summary>
10921 [JsonPropertyName("userPrincipalName")]
10922 public string? UserPrincipalName { get; set; }
10923
10924 /// <summary>
10925 /// The display name of the persona.
10926 /// </summary>
10927 [JsonPropertyName("displayName")]
10928 public string? DisplayName { get; set; }
10929
10930 public PersonaProperties WithUserPrincipalName(string value)
10931 {
10932 this.UserPrincipalName = value;
10933 return this;
10934 }
10935
10936 public PersonaProperties WithDisplayName(string value)
10937 {
10938 this.DisplayName = value;
10939 return this;
10940 }
10941}
10942
10943/// <summary>
10944/// Displays multiple users' information, including their profile pictures.
10945/// </summary>
10946public class ComUsersMicrosoftGraphComponent : CardElement
10947{
10948 /// <summary>
10949 /// Must be **Component**.
10950 /// </summary>
10951 [JsonPropertyName("type")]
10952 public string Type { get; } = "Component";
10953
10954 /// <summary>
10955 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
10956 /// </summary>
10957 [JsonPropertyName("id")]
10958 public string? Id { get; set; }
10959
10960 /// <summary>
10961 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
10962 /// </summary>
10963 [JsonPropertyName("requires")]
10964 public HostCapabilities? Requires { get; set; }
10965
10966 /// <summary>
10967 /// The locale associated with the element.
10968 /// </summary>
10969 [JsonPropertyName("lang")]
10970 public string? Lang { get; set; }
10971
10972 /// <summary>
10973 /// Controls the visibility of the element.
10974 /// </summary>
10975 [JsonPropertyName("isVisible")]
10976 public bool? IsVisible { get; set; }
10977
10978 /// <summary>
10979 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
10980 /// </summary>
10981 [JsonPropertyName("separator")]
10982 public bool? Separator { get; set; }
10983
10984 /// <summary>
10985 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
10986 /// </summary>
10987 [JsonPropertyName("height")]
10988 public ElementHeight? Height { get; set; }
10989
10990 /// <summary>
10991 /// Controls how the element should be horizontally aligned.
10992 /// </summary>
10993 [JsonPropertyName("horizontalAlignment")]
10994 public HorizontalAlignment? HorizontalAlignment { get; set; }
10995
10996 /// <summary>
10997 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
10998 /// </summary>
10999 [JsonPropertyName("spacing")]
11000 public Spacing? Spacing { get; set; }
11001
11002 /// <summary>
11003 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
11004 /// </summary>
11005 [JsonPropertyName("targetWidth")]
11006 public TargetWidth? TargetWidth { get; set; }
11007
11008 /// <summary>
11009 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
11010 /// </summary>
11011 [JsonPropertyName("isSortKey")]
11012 public bool? IsSortKey { get; set; }
11013
11014 /// <summary>
11015 /// Must be **graph.microsoft.com/users**.
11016 /// </summary>
11017 [JsonPropertyName("name")]
11018 public string Name { get; } = "graph.microsoft.com/users";
11019
11020 /// <summary>
11021 /// The properties of the set.
11022 /// </summary>
11023 [JsonPropertyName("properties")]
11024 public PersonaSetProperties? Properties { get; set; }
11025
11026 /// <summary>
11027 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
11028 /// </summary>
11029 [JsonPropertyName("grid.area")]
11030 public string? GridArea { get; set; }
11031
11032 /// <summary>
11033 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
11034 /// </summary>
11035 [JsonPropertyName("fallback")]
11036 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
11037
11038 public ComUsersMicrosoftGraphComponent WithId(string value)
11039 {
11040 this.Id = value;
11041 return this;
11042 }
11043
11044 public ComUsersMicrosoftGraphComponent WithRequires(HostCapabilities value)
11045 {
11046 this.Requires = value;
11047 return this;
11048 }
11049
11050 public ComUsersMicrosoftGraphComponent WithLang(string value)
11051 {
11052 this.Lang = value;
11053 return this;
11054 }
11055
11056 public ComUsersMicrosoftGraphComponent WithIsVisible(bool value)
11057 {
11058 this.IsVisible = value;
11059 return this;
11060 }
11061
11062 public ComUsersMicrosoftGraphComponent WithSeparator(bool value)
11063 {
11064 this.Separator = value;
11065 return this;
11066 }
11067
11068 public ComUsersMicrosoftGraphComponent WithHeight(ElementHeight value)
11069 {
11070 this.Height = value;
11071 return this;
11072 }
11073
11074 public ComUsersMicrosoftGraphComponent WithHorizontalAlignment(HorizontalAlignment value)
11075 {
11076 this.HorizontalAlignment = value;
11077 return this;
11078 }
11079
11080 public ComUsersMicrosoftGraphComponent WithSpacing(Spacing value)
11081 {
11082 this.Spacing = value;
11083 return this;
11084 }
11085
11086 public ComUsersMicrosoftGraphComponent WithTargetWidth(TargetWidth value)
11087 {
11088 this.TargetWidth = value;
11089 return this;
11090 }
11091
11092 public ComUsersMicrosoftGraphComponent WithIsSortKey(bool value)
11093 {
11094 this.IsSortKey = value;
11095 return this;
11096 }
11097
11098 public ComUsersMicrosoftGraphComponent WithProperties(PersonaSetProperties value)
11099 {
11100 this.Properties = value;
11101 return this;
11102 }
11103
11104 public ComUsersMicrosoftGraphComponent WithGridArea(string value)
11105 {
11106 this.GridArea = value;
11107 return this;
11108 }
11109
11110 public ComUsersMicrosoftGraphComponent WithFallback(IUnion<CardElement, FallbackElement> value)
11111 {
11112 this.Fallback = value;
11113 return this;
11114 }
11115}
11116
11117/// <summary>
11118/// Represents the properties of a PersonaSet component.
11119/// </summary>
11120public class PersonaSetProperties : SerializableObject
11121{
11122 /// <summary>
11123 /// The users a PersonaSet component should display.
11124 /// </summary>
11125 [JsonPropertyName("users")]
11126 public IList<PersonaProperties>? Users { get; set; }
11127
11128 public PersonaSetProperties WithUsers(params IList<PersonaProperties> value)
11129 {
11130 this.Users = value;
11131 return this;
11132 }
11133}
11134
11135/// <summary>
11136/// Displays information about a generic graph resource.
11137/// </summary>
11138public class ComResourceMicrosoftGraphComponent : CardElement
11139{
11140 /// <summary>
11141 /// Must be **Component**.
11142 /// </summary>
11143 [JsonPropertyName("type")]
11144 public string Type { get; } = "Component";
11145
11146 /// <summary>
11147 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
11148 /// </summary>
11149 [JsonPropertyName("id")]
11150 public string? Id { get; set; }
11151
11152 /// <summary>
11153 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
11154 /// </summary>
11155 [JsonPropertyName("requires")]
11156 public HostCapabilities? Requires { get; set; }
11157
11158 /// <summary>
11159 /// The locale associated with the element.
11160 /// </summary>
11161 [JsonPropertyName("lang")]
11162 public string? Lang { get; set; }
11163
11164 /// <summary>
11165 /// Controls the visibility of the element.
11166 /// </summary>
11167 [JsonPropertyName("isVisible")]
11168 public bool? IsVisible { get; set; }
11169
11170 /// <summary>
11171 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
11172 /// </summary>
11173 [JsonPropertyName("separator")]
11174 public bool? Separator { get; set; }
11175
11176 /// <summary>
11177 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
11178 /// </summary>
11179 [JsonPropertyName("height")]
11180 public ElementHeight? Height { get; set; }
11181
11182 /// <summary>
11183 /// Controls how the element should be horizontally aligned.
11184 /// </summary>
11185 [JsonPropertyName("horizontalAlignment")]
11186 public HorizontalAlignment? HorizontalAlignment { get; set; }
11187
11188 /// <summary>
11189 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
11190 /// </summary>
11191 [JsonPropertyName("spacing")]
11192 public Spacing? Spacing { get; set; }
11193
11194 /// <summary>
11195 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
11196 /// </summary>
11197 [JsonPropertyName("targetWidth")]
11198 public TargetWidth? TargetWidth { get; set; }
11199
11200 /// <summary>
11201 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
11202 /// </summary>
11203 [JsonPropertyName("isSortKey")]
11204 public bool? IsSortKey { get; set; }
11205
11206 /// <summary>
11207 /// Must be **graph.microsoft.com/resource**.
11208 /// </summary>
11209 [JsonPropertyName("name")]
11210 public string Name { get; } = "graph.microsoft.com/resource";
11211
11212 /// <summary>
11213 /// The properties of the resource.
11214 /// </summary>
11215 [JsonPropertyName("properties")]
11216 public ResourceProperties? Properties { get; set; }
11217
11218 /// <summary>
11219 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
11220 /// </summary>
11221 [JsonPropertyName("grid.area")]
11222 public string? GridArea { get; set; }
11223
11224 /// <summary>
11225 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
11226 /// </summary>
11227 [JsonPropertyName("fallback")]
11228 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
11229
11230 public ComResourceMicrosoftGraphComponent WithId(string value)
11231 {
11232 this.Id = value;
11233 return this;
11234 }
11235
11236 public ComResourceMicrosoftGraphComponent WithRequires(HostCapabilities value)
11237 {
11238 this.Requires = value;
11239 return this;
11240 }
11241
11242 public ComResourceMicrosoftGraphComponent WithLang(string value)
11243 {
11244 this.Lang = value;
11245 return this;
11246 }
11247
11248 public ComResourceMicrosoftGraphComponent WithIsVisible(bool value)
11249 {
11250 this.IsVisible = value;
11251 return this;
11252 }
11253
11254 public ComResourceMicrosoftGraphComponent WithSeparator(bool value)
11255 {
11256 this.Separator = value;
11257 return this;
11258 }
11259
11260 public ComResourceMicrosoftGraphComponent WithHeight(ElementHeight value)
11261 {
11262 this.Height = value;
11263 return this;
11264 }
11265
11266 public ComResourceMicrosoftGraphComponent WithHorizontalAlignment(HorizontalAlignment value)
11267 {
11268 this.HorizontalAlignment = value;
11269 return this;
11270 }
11271
11272 public ComResourceMicrosoftGraphComponent WithSpacing(Spacing value)
11273 {
11274 this.Spacing = value;
11275 return this;
11276 }
11277
11278 public ComResourceMicrosoftGraphComponent WithTargetWidth(TargetWidth value)
11279 {
11280 this.TargetWidth = value;
11281 return this;
11282 }
11283
11284 public ComResourceMicrosoftGraphComponent WithIsSortKey(bool value)
11285 {
11286 this.IsSortKey = value;
11287 return this;
11288 }
11289
11290 public ComResourceMicrosoftGraphComponent WithProperties(ResourceProperties value)
11291 {
11292 this.Properties = value;
11293 return this;
11294 }
11295
11296 public ComResourceMicrosoftGraphComponent WithGridArea(string value)
11297 {
11298 this.GridArea = value;
11299 return this;
11300 }
11301
11302 public ComResourceMicrosoftGraphComponent WithFallback(IUnion<CardElement, FallbackElement> value)
11303 {
11304 this.Fallback = value;
11305 return this;
11306 }
11307}
11308
11309/// <summary>
11310/// Represents the properties of a resource component.
11311/// </summary>
11312public class ResourceProperties : SerializableObject
11313{
11314 /// <summary>
11315 /// The Id of the resource.
11316 /// </summary>
11317 [JsonPropertyName("id")]
11318 public string? Id { get; set; }
11319
11320 /// <summary>
11321 /// The reference to the resource.
11322 /// </summary>
11323 [JsonPropertyName("resourceReference")]
11324 public IDictionary<string, string>? ResourceReference { get; set; }
11325
11326 /// <summary>
11327 /// The visualization of the resource.
11328 /// </summary>
11329 [JsonPropertyName("resourceVisualization")]
11330 public ResourceVisualization? ResourceVisualization { get; set; }
11331
11332 public ResourceProperties WithId(string value)
11333 {
11334 this.Id = value;
11335 return this;
11336 }
11337
11338 public ResourceProperties WithResourceReference(IDictionary<string, string> value)
11339 {
11340 this.ResourceReference = value;
11341 return this;
11342 }
11343
11344 public ResourceProperties WithResourceVisualization(ResourceVisualization value)
11345 {
11346 this.ResourceVisualization = value;
11347 return this;
11348 }
11349}
11350
11351/// <summary>
11352/// Represents a visualization of a resource.
11353/// </summary>
11354public class ResourceVisualization : SerializableObject
11355{
11356 /// <summary>
11357 /// The media associated with the resource.
11358 /// </summary>
11359 [JsonPropertyName("media")]
11360 public string? Media { get; set; }
11361
11362 public ResourceVisualization WithMedia(string value)
11363 {
11364 this.Media = value;
11365 return this;
11366 }
11367}
11368
11369/// <summary>
11370/// Displays information about a file resource.
11371/// </summary>
11372public class ComFileMicrosoftGraphComponent : CardElement
11373{
11374 /// <summary>
11375 /// Must be **Component**.
11376 /// </summary>
11377 [JsonPropertyName("type")]
11378 public string Type { get; } = "Component";
11379
11380 /// <summary>
11381 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
11382 /// </summary>
11383 [JsonPropertyName("id")]
11384 public string? Id { get; set; }
11385
11386 /// <summary>
11387 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
11388 /// </summary>
11389 [JsonPropertyName("requires")]
11390 public HostCapabilities? Requires { get; set; }
11391
11392 /// <summary>
11393 /// The locale associated with the element.
11394 /// </summary>
11395 [JsonPropertyName("lang")]
11396 public string? Lang { get; set; }
11397
11398 /// <summary>
11399 /// Controls the visibility of the element.
11400 /// </summary>
11401 [JsonPropertyName("isVisible")]
11402 public bool? IsVisible { get; set; }
11403
11404 /// <summary>
11405 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
11406 /// </summary>
11407 [JsonPropertyName("separator")]
11408 public bool? Separator { get; set; }
11409
11410 /// <summary>
11411 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
11412 /// </summary>
11413 [JsonPropertyName("height")]
11414 public ElementHeight? Height { get; set; }
11415
11416 /// <summary>
11417 /// Controls how the element should be horizontally aligned.
11418 /// </summary>
11419 [JsonPropertyName("horizontalAlignment")]
11420 public HorizontalAlignment? HorizontalAlignment { get; set; }
11421
11422 /// <summary>
11423 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
11424 /// </summary>
11425 [JsonPropertyName("spacing")]
11426 public Spacing? Spacing { get; set; }
11427
11428 /// <summary>
11429 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
11430 /// </summary>
11431 [JsonPropertyName("targetWidth")]
11432 public TargetWidth? TargetWidth { get; set; }
11433
11434 /// <summary>
11435 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
11436 /// </summary>
11437 [JsonPropertyName("isSortKey")]
11438 public bool? IsSortKey { get; set; }
11439
11440 /// <summary>
11441 /// Must be **graph.microsoft.com/file**.
11442 /// </summary>
11443 [JsonPropertyName("name")]
11444 public string Name { get; } = "graph.microsoft.com/file";
11445
11446 /// <summary>
11447 /// The properties of the file.
11448 /// </summary>
11449 [JsonPropertyName("properties")]
11450 public FileProperties? Properties { get; set; }
11451
11452 /// <summary>
11453 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
11454 /// </summary>
11455 [JsonPropertyName("grid.area")]
11456 public string? GridArea { get; set; }
11457
11458 /// <summary>
11459 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
11460 /// </summary>
11461 [JsonPropertyName("fallback")]
11462 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
11463
11464 public ComFileMicrosoftGraphComponent WithId(string value)
11465 {
11466 this.Id = value;
11467 return this;
11468 }
11469
11470 public ComFileMicrosoftGraphComponent WithRequires(HostCapabilities value)
11471 {
11472 this.Requires = value;
11473 return this;
11474 }
11475
11476 public ComFileMicrosoftGraphComponent WithLang(string value)
11477 {
11478 this.Lang = value;
11479 return this;
11480 }
11481
11482 public ComFileMicrosoftGraphComponent WithIsVisible(bool value)
11483 {
11484 this.IsVisible = value;
11485 return this;
11486 }
11487
11488 public ComFileMicrosoftGraphComponent WithSeparator(bool value)
11489 {
11490 this.Separator = value;
11491 return this;
11492 }
11493
11494 public ComFileMicrosoftGraphComponent WithHeight(ElementHeight value)
11495 {
11496 this.Height = value;
11497 return this;
11498 }
11499
11500 public ComFileMicrosoftGraphComponent WithHorizontalAlignment(HorizontalAlignment value)
11501 {
11502 this.HorizontalAlignment = value;
11503 return this;
11504 }
11505
11506 public ComFileMicrosoftGraphComponent WithSpacing(Spacing value)
11507 {
11508 this.Spacing = value;
11509 return this;
11510 }
11511
11512 public ComFileMicrosoftGraphComponent WithTargetWidth(TargetWidth value)
11513 {
11514 this.TargetWidth = value;
11515 return this;
11516 }
11517
11518 public ComFileMicrosoftGraphComponent WithIsSortKey(bool value)
11519 {
11520 this.IsSortKey = value;
11521 return this;
11522 }
11523
11524 public ComFileMicrosoftGraphComponent WithProperties(FileProperties value)
11525 {
11526 this.Properties = value;
11527 return this;
11528 }
11529
11530 public ComFileMicrosoftGraphComponent WithGridArea(string value)
11531 {
11532 this.GridArea = value;
11533 return this;
11534 }
11535
11536 public ComFileMicrosoftGraphComponent WithFallback(IUnion<CardElement, FallbackElement> value)
11537 {
11538 this.Fallback = value;
11539 return this;
11540 }
11541}
11542
11543/// <summary>
11544/// Represents the properties of a file component.
11545/// </summary>
11546public class FileProperties : SerializableObject
11547{
11548 /// <summary>
11549 /// The name of the file.
11550 /// </summary>
11551 [JsonPropertyName("name")]
11552 public string? Name { get; set; }
11553
11554 /// <summary>
11555 /// The file extension.
11556 /// </summary>
11557 [JsonPropertyName("extension")]
11558 public string? Extension { get; set; }
11559
11560 /// <summary>
11561 /// The URL of the file.
11562 /// </summary>
11563 [JsonPropertyName("url")]
11564 public string? Url { get; set; }
11565
11566 public FileProperties WithName(string value)
11567 {
11568 this.Name = value;
11569 return this;
11570 }
11571
11572 public FileProperties WithExtension(string value)
11573 {
11574 this.Extension = value;
11575 return this;
11576 }
11577
11578 public FileProperties WithUrl(string value)
11579 {
11580 this.Url = value;
11581 return this;
11582 }
11583}
11584
11585/// <summary>
11586/// Displays information about a calendar event.
11587/// </summary>
11588public class ComEventMicrosoftGraphComponent : CardElement
11589{
11590 /// <summary>
11591 /// Must be **Component**.
11592 /// </summary>
11593 [JsonPropertyName("type")]
11594 public string Type { get; } = "Component";
11595
11596 /// <summary>
11597 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
11598 /// </summary>
11599 [JsonPropertyName("id")]
11600 public string? Id { get; set; }
11601
11602 /// <summary>
11603 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
11604 /// </summary>
11605 [JsonPropertyName("requires")]
11606 public HostCapabilities? Requires { get; set; }
11607
11608 /// <summary>
11609 /// The locale associated with the element.
11610 /// </summary>
11611 [JsonPropertyName("lang")]
11612 public string? Lang { get; set; }
11613
11614 /// <summary>
11615 /// Controls the visibility of the element.
11616 /// </summary>
11617 [JsonPropertyName("isVisible")]
11618 public bool? IsVisible { get; set; }
11619
11620 /// <summary>
11621 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
11622 /// </summary>
11623 [JsonPropertyName("separator")]
11624 public bool? Separator { get; set; }
11625
11626 /// <summary>
11627 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
11628 /// </summary>
11629 [JsonPropertyName("height")]
11630 public ElementHeight? Height { get; set; }
11631
11632 /// <summary>
11633 /// Controls how the element should be horizontally aligned.
11634 /// </summary>
11635 [JsonPropertyName("horizontalAlignment")]
11636 public HorizontalAlignment? HorizontalAlignment { get; set; }
11637
11638 /// <summary>
11639 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
11640 /// </summary>
11641 [JsonPropertyName("spacing")]
11642 public Spacing? Spacing { get; set; }
11643
11644 /// <summary>
11645 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
11646 /// </summary>
11647 [JsonPropertyName("targetWidth")]
11648 public TargetWidth? TargetWidth { get; set; }
11649
11650 /// <summary>
11651 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
11652 /// </summary>
11653 [JsonPropertyName("isSortKey")]
11654 public bool? IsSortKey { get; set; }
11655
11656 /// <summary>
11657 /// Must be **graph.microsoft.com/event**.
11658 /// </summary>
11659 [JsonPropertyName("name")]
11660 public string Name { get; } = "graph.microsoft.com/event";
11661
11662 /// <summary>
11663 /// The properties of the event.
11664 /// </summary>
11665 [JsonPropertyName("properties")]
11666 public CalendarEventProperties? Properties { get; set; }
11667
11668 /// <summary>
11669 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
11670 /// </summary>
11671 [JsonPropertyName("grid.area")]
11672 public string? GridArea { get; set; }
11673
11674 /// <summary>
11675 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
11676 /// </summary>
11677 [JsonPropertyName("fallback")]
11678 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
11679
11680 public ComEventMicrosoftGraphComponent WithId(string value)
11681 {
11682 this.Id = value;
11683 return this;
11684 }
11685
11686 public ComEventMicrosoftGraphComponent WithRequires(HostCapabilities value)
11687 {
11688 this.Requires = value;
11689 return this;
11690 }
11691
11692 public ComEventMicrosoftGraphComponent WithLang(string value)
11693 {
11694 this.Lang = value;
11695 return this;
11696 }
11697
11698 public ComEventMicrosoftGraphComponent WithIsVisible(bool value)
11699 {
11700 this.IsVisible = value;
11701 return this;
11702 }
11703
11704 public ComEventMicrosoftGraphComponent WithSeparator(bool value)
11705 {
11706 this.Separator = value;
11707 return this;
11708 }
11709
11710 public ComEventMicrosoftGraphComponent WithHeight(ElementHeight value)
11711 {
11712 this.Height = value;
11713 return this;
11714 }
11715
11716 public ComEventMicrosoftGraphComponent WithHorizontalAlignment(HorizontalAlignment value)
11717 {
11718 this.HorizontalAlignment = value;
11719 return this;
11720 }
11721
11722 public ComEventMicrosoftGraphComponent WithSpacing(Spacing value)
11723 {
11724 this.Spacing = value;
11725 return this;
11726 }
11727
11728 public ComEventMicrosoftGraphComponent WithTargetWidth(TargetWidth value)
11729 {
11730 this.TargetWidth = value;
11731 return this;
11732 }
11733
11734 public ComEventMicrosoftGraphComponent WithIsSortKey(bool value)
11735 {
11736 this.IsSortKey = value;
11737 return this;
11738 }
11739
11740 public ComEventMicrosoftGraphComponent WithProperties(CalendarEventProperties value)
11741 {
11742 this.Properties = value;
11743 return this;
11744 }
11745
11746 public ComEventMicrosoftGraphComponent WithGridArea(string value)
11747 {
11748 this.GridArea = value;
11749 return this;
11750 }
11751
11752 public ComEventMicrosoftGraphComponent WithFallback(IUnion<CardElement, FallbackElement> value)
11753 {
11754 this.Fallback = value;
11755 return this;
11756 }
11757}
11758
11759/// <summary>
11760/// The properties of a calendar event.
11761/// </summary>
11762public class CalendarEventProperties : SerializableObject
11763{
11764 /// <summary>
11765 /// The ID of the event.
11766 /// </summary>
11767 [JsonPropertyName("id")]
11768 public string? Id { get; set; }
11769
11770 /// <summary>
11771 /// The title of the event.
11772 /// </summary>
11773 [JsonPropertyName("title")]
11774 public string? Title { get; set; }
11775
11776 /// <summary>
11777 /// The start date and time of the event.
11778 /// </summary>
11779 [JsonPropertyName("start")]
11780 public string? Start { get; set; }
11781
11782 /// <summary>
11783 /// The end date and time of the event.
11784 /// </summary>
11785 [JsonPropertyName("end")]
11786 public string? End { get; set; }
11787
11788 /// <summary>
11789 /// The status of the event.
11790 /// </summary>
11791 [JsonPropertyName("status")]
11792 public string? Status { get; set; }
11793
11794 /// <summary>
11795 /// The locations of the event.
11796 /// </summary>
11797 [JsonPropertyName("locations")]
11798 public IList<string>? Locations { get; set; }
11799
11800 /// <summary>
11801 /// The URL of the online meeting.
11802 /// </summary>
11803 [JsonPropertyName("onlineMeetingUrl")]
11804 public string? OnlineMeetingUrl { get; set; }
11805
11806 /// <summary>
11807 /// Indicates if the event is all day.
11808 /// </summary>
11809 [JsonPropertyName("isAllDay")]
11810 public bool? IsAllDay { get; set; }
11811
11812 /// <summary>
11813 /// The extension of the event.
11814 /// </summary>
11815 [JsonPropertyName("extension")]
11816 public string? Extension { get; set; }
11817
11818 /// <summary>
11819 /// The URL of the event.
11820 /// </summary>
11821 [JsonPropertyName("url")]
11822 public string? Url { get; set; }
11823
11824 /// <summary>
11825 /// The attendees of the event.
11826 /// </summary>
11827 [JsonPropertyName("attendees")]
11828 public IList<CalendarEventAttendee>? Attendees { get; set; }
11829
11830 /// <summary>
11831 /// The organizer of the event.
11832 /// </summary>
11833 [JsonPropertyName("organizer")]
11834 public CalendarEventAttendee? Organizer { get; set; }
11835
11836 public CalendarEventProperties WithId(string value)
11837 {
11838 this.Id = value;
11839 return this;
11840 }
11841
11842 public CalendarEventProperties WithTitle(string value)
11843 {
11844 this.Title = value;
11845 return this;
11846 }
11847
11848 public CalendarEventProperties WithStart(string value)
11849 {
11850 this.Start = value;
11851 return this;
11852 }
11853
11854 public CalendarEventProperties WithEnd(string value)
11855 {
11856 this.End = value;
11857 return this;
11858 }
11859
11860 public CalendarEventProperties WithStatus(string value)
11861 {
11862 this.Status = value;
11863 return this;
11864 }
11865
11866 public CalendarEventProperties WithLocations(params IList<string> value)
11867 {
11868 this.Locations = value;
11869 return this;
11870 }
11871
11872 public CalendarEventProperties WithOnlineMeetingUrl(string value)
11873 {
11874 this.OnlineMeetingUrl = value;
11875 return this;
11876 }
11877
11878 public CalendarEventProperties WithIsAllDay(bool value)
11879 {
11880 this.IsAllDay = value;
11881 return this;
11882 }
11883
11884 public CalendarEventProperties WithExtension(string value)
11885 {
11886 this.Extension = value;
11887 return this;
11888 }
11889
11890 public CalendarEventProperties WithUrl(string value)
11891 {
11892 this.Url = value;
11893 return this;
11894 }
11895
11896 public CalendarEventProperties WithAttendees(params IList<CalendarEventAttendee> value)
11897 {
11898 this.Attendees = value;
11899 return this;
11900 }
11901
11902 public CalendarEventProperties WithOrganizer(CalendarEventAttendee value)
11903 {
11904 this.Organizer = value;
11905 return this;
11906 }
11907}
11908
11909/// <summary>
11910/// Represents a calendar event attendee.
11911/// </summary>
11912public class CalendarEventAttendee : SerializableObject
11913{
11914 /// <summary>
11915 /// The name of the attendee.
11916 /// </summary>
11917 [JsonPropertyName("name")]
11918 public string? Name { get; set; }
11919
11920 /// <summary>
11921 /// The email address of the attendee.
11922 /// </summary>
11923 [JsonPropertyName("email")]
11924 public string? Email { get; set; }
11925
11926 /// <summary>
11927 /// The title of the attendee.
11928 /// </summary>
11929 [JsonPropertyName("title")]
11930 public string? Title { get; set; }
11931
11932 /// <summary>
11933 /// The type of the attendee.
11934 /// </summary>
11935 [JsonPropertyName("type")]
11936 public string? Type { get; set; }
11937
11938 /// <summary>
11939 /// The status of the attendee.
11940 /// </summary>
11941 [JsonPropertyName("status")]
11942 public string? Status { get; set; }
11943
11944 public CalendarEventAttendee WithName(string value)
11945 {
11946 this.Name = value;
11947 return this;
11948 }
11949
11950 public CalendarEventAttendee WithEmail(string value)
11951 {
11952 this.Email = value;
11953 return this;
11954 }
11955
11956 public CalendarEventAttendee WithTitle(string value)
11957 {
11958 this.Title = value;
11959 return this;
11960 }
11961
11962 public CalendarEventAttendee WithType(string value)
11963 {
11964 this.Type = value;
11965 return this;
11966 }
11967
11968 public CalendarEventAttendee WithStatus(string value)
11969 {
11970 this.Status = value;
11971 return this;
11972 }
11973}
11974
11975/// <summary>
11976/// A page inside a Carousel element.
11977/// </summary>
11978public class CarouselPage : CardElement
11979{
11980 /// <summary>
11981 /// Must be **CarouselPage**.
11982 /// </summary>
11983 [JsonPropertyName("type")]
11984 public string Type { get; } = "CarouselPage";
11985
11986 /// <summary>
11987 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
11988 /// </summary>
11989 [JsonPropertyName("id")]
11990 public string? Id { get; set; }
11991
11992 /// <summary>
11993 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
11994 /// </summary>
11995 [JsonPropertyName("requires")]
11996 public HostCapabilities? Requires { get; set; }
11997
11998 /// <summary>
11999 /// The locale associated with the element.
12000 /// </summary>
12001 [JsonPropertyName("lang")]
12002 public string? Lang { get; set; }
12003
12004 /// <summary>
12005 /// Controls the visibility of the element.
12006 /// </summary>
12007 [JsonPropertyName("isVisible")]
12008 public bool? IsVisible { get; set; }
12009
12010 /// <summary>
12011 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
12012 /// </summary>
12013 [JsonPropertyName("height")]
12014 public ElementHeight? Height { get; set; }
12015
12016 /// <summary>
12017 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
12018 /// </summary>
12019 [JsonPropertyName("targetWidth")]
12020 public TargetWidth? TargetWidth { get; set; }
12021
12022 /// <summary>
12023 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
12024 /// </summary>
12025 [JsonPropertyName("isSortKey")]
12026 public bool? IsSortKey { get; set; }
12027
12028 /// <summary>
12029 /// An Action that will be invoked when the element is tapped or clicked. Action.ShowCard is not supported.
12030 /// </summary>
12031 [JsonPropertyName("selectAction")]
12032 public Action? SelectAction { get; set; }
12033
12034 /// <summary>
12035 /// The style of the container. Container styles control the colors of the background, border and text inside the container, in such a way that contrast requirements are always met.
12036 /// </summary>
12037 [JsonPropertyName("style")]
12038 public ContainerStyle? Style { get; set; }
12039
12040 /// <summary>
12041 /// Controls if a border should be displayed around the container.
12042 /// </summary>
12043 [JsonPropertyName("showBorder")]
12044 public bool? ShowBorder { get; set; }
12045
12046 /// <summary>
12047 /// Controls if the container should have rounded corners.
12048 /// </summary>
12049 [JsonPropertyName("roundedCorners")]
12050 public bool? RoundedCorners { get; set; }
12051
12052 /// <summary>
12053 /// The layouts associated with the container. The container can dynamically switch from one layout to another as the card's width changes. See [Container layouts](https://adaptivecards.microsoft.com/?topic=container-layouts) for more details.
12054 /// </summary>
12055 [JsonPropertyName("layouts")]
12056 public IList<ContainerLayout>? Layouts { get; set; }
12057
12058 /// <summary>
12059 /// The minimum height, in pixels, of the container, in the `<number>px` format.
12060 /// </summary>
12061 [JsonPropertyName("minHeight")]
12062 public string? MinHeight { get; set; }
12063
12064 /// <summary>
12065 /// Defines the container's background image.
12066 /// </summary>
12067 [JsonPropertyName("backgroundImage")]
12068 public IUnion<string, BackgroundImage>? BackgroundImage { get; set; }
12069
12070 /// <summary>
12071 /// Controls how the container's content should be vertically aligned.
12072 /// </summary>
12073 [JsonPropertyName("verticalContentAlignment")]
12074 public VerticalAlignment? VerticalContentAlignment { get; set; }
12075
12076 /// <summary>
12077 /// Controls if the content of the card is to be rendered left-to-right or right-to-left.
12078 /// </summary>
12079 [JsonPropertyName("rtl")]
12080 public bool? Rtl { get; set; }
12081
12082 /// <summary>
12083 /// The maximum height, in pixels, of the container, in the `<number>px` format. When the content of a container exceeds the container's maximum height, a vertical scrollbar is displayed.
12084 /// </summary>
12085 [JsonPropertyName("maxHeight")]
12086 public string? MaxHeight { get; set; }
12087
12088 /// <summary>
12089 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
12090 /// </summary>
12091 [JsonPropertyName("grid.area")]
12092 public string? GridArea { get; set; }
12093
12094 /// <summary>
12095 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
12096 /// </summary>
12097 [JsonPropertyName("fallback")]
12098 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
12099
12100 /// <summary>
12101 /// The elements in the page.
12102 /// </summary>
12103 [JsonPropertyName("items")]
12104 public IList<CardElement>? Items { get; set; }
12105
12106 public CarouselPage(params IList<CardElement> items)
12107 {
12108 this.Items = items;
12109 }
12110
12111 public CarouselPage WithId(string value)
12112 {
12113 this.Id = value;
12114 return this;
12115 }
12116
12117 public CarouselPage WithRequires(HostCapabilities value)
12118 {
12119 this.Requires = value;
12120 return this;
12121 }
12122
12123 public CarouselPage WithLang(string value)
12124 {
12125 this.Lang = value;
12126 return this;
12127 }
12128
12129 public CarouselPage WithIsVisible(bool value)
12130 {
12131 this.IsVisible = value;
12132 return this;
12133 }
12134
12135 public CarouselPage WithHeight(ElementHeight value)
12136 {
12137 this.Height = value;
12138 return this;
12139 }
12140
12141 public CarouselPage WithTargetWidth(TargetWidth value)
12142 {
12143 this.TargetWidth = value;
12144 return this;
12145 }
12146
12147 public CarouselPage WithIsSortKey(bool value)
12148 {
12149 this.IsSortKey = value;
12150 return this;
12151 }
12152
12153 public CarouselPage WithSelectAction(Action value)
12154 {
12155 this.SelectAction = value;
12156 return this;
12157 }
12158
12159 public CarouselPage WithStyle(ContainerStyle value)
12160 {
12161 this.Style = value;
12162 return this;
12163 }
12164
12165 public CarouselPage WithShowBorder(bool value)
12166 {
12167 this.ShowBorder = value;
12168 return this;
12169 }
12170
12171 public CarouselPage WithRoundedCorners(bool value)
12172 {
12173 this.RoundedCorners = value;
12174 return this;
12175 }
12176
12177 public CarouselPage WithLayouts(params IList<ContainerLayout> value)
12178 {
12179 this.Layouts = value;
12180 return this;
12181 }
12182
12183 public CarouselPage WithMinHeight(string value)
12184 {
12185 this.MinHeight = value;
12186 return this;
12187 }
12188
12189 public CarouselPage WithBackgroundImage(IUnion<string, BackgroundImage> value)
12190 {
12191 this.BackgroundImage = value;
12192 return this;
12193 }
12194
12195 public CarouselPage WithVerticalContentAlignment(VerticalAlignment value)
12196 {
12197 this.VerticalContentAlignment = value;
12198 return this;
12199 }
12200
12201 public CarouselPage WithRtl(bool value)
12202 {
12203 this.Rtl = value;
12204 return this;
12205 }
12206
12207 public CarouselPage WithMaxHeight(string value)
12208 {
12209 this.MaxHeight = value;
12210 return this;
12211 }
12212
12213 public CarouselPage WithGridArea(string value)
12214 {
12215 this.GridArea = value;
12216 return this;
12217 }
12218
12219 public CarouselPage WithFallback(IUnion<CardElement, FallbackElement> value)
12220 {
12221 this.Fallback = value;
12222 return this;
12223 }
12224
12225 public CarouselPage WithItems(params IList<CardElement> value)
12226 {
12227 this.Items = value;
12228 return this;
12229 }
12230}
12231
12232/// <summary>
12233/// Represents a row of cells in a table.
12234/// </summary>
12235public class TableRow : CardElement
12236{
12237 /// <summary>
12238 /// Must be **TableRow**.
12239 /// </summary>
12240 [JsonPropertyName("type")]
12241 public string Type { get; } = "TableRow";
12242
12243 /// <summary>
12244 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
12245 /// </summary>
12246 [JsonPropertyName("id")]
12247 public string? Id { get; set; }
12248
12249 /// <summary>
12250 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
12251 /// </summary>
12252 [JsonPropertyName("requires")]
12253 public HostCapabilities? Requires { get; set; }
12254
12255 /// <summary>
12256 /// The locale associated with the element.
12257 /// </summary>
12258 [JsonPropertyName("lang")]
12259 public string? Lang { get; set; }
12260
12261 /// <summary>
12262 /// Controls the visibility of the element.
12263 /// </summary>
12264 [JsonPropertyName("isVisible")]
12265 public bool? IsVisible { get; set; }
12266
12267 /// <summary>
12268 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
12269 /// </summary>
12270 [JsonPropertyName("separator")]
12271 public bool? Separator { get; set; }
12272
12273 /// <summary>
12274 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
12275 /// </summary>
12276 [JsonPropertyName("height")]
12277 public ElementHeight? Height { get; set; }
12278
12279 /// <summary>
12280 /// Controls how the element should be horizontally aligned.
12281 /// </summary>
12282 [JsonPropertyName("horizontalAlignment")]
12283 public HorizontalAlignment? HorizontalAlignment { get; set; }
12284
12285 /// <summary>
12286 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
12287 /// </summary>
12288 [JsonPropertyName("spacing")]
12289 public Spacing? Spacing { get; set; }
12290
12291 /// <summary>
12292 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
12293 /// </summary>
12294 [JsonPropertyName("targetWidth")]
12295 public TargetWidth? TargetWidth { get; set; }
12296
12297 /// <summary>
12298 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
12299 /// </summary>
12300 [JsonPropertyName("isSortKey")]
12301 public bool? IsSortKey { get; set; }
12302
12303 /// <summary>
12304 /// Controls if a border should be displayed around the container.
12305 /// </summary>
12306 [JsonPropertyName("showBorder")]
12307 public bool? ShowBorder { get; set; }
12308
12309 /// <summary>
12310 /// Controls if the container should have rounded corners.
12311 /// </summary>
12312 [JsonPropertyName("roundedCorners")]
12313 public bool? RoundedCorners { get; set; }
12314
12315 /// <summary>
12316 /// The style of the container. Container styles control the colors of the background, border and text inside the container, in such a way that contrast requirements are always met.
12317 /// </summary>
12318 [JsonPropertyName("style")]
12319 public ContainerStyle? Style { get; set; }
12320
12321 /// <summary>
12322 /// Controls how the content of every cell in the row should be horizontally aligned by default. This property overrides the horizontalCellContentAlignment property of the table and columns.
12323 /// </summary>
12324 [JsonPropertyName("horizontalCellContentAlignment")]
12325 public HorizontalAlignment? HorizontalCellContentAlignment { get; set; }
12326
12327 /// <summary>
12328 /// Controls how the content of every cell in the row should be vertically aligned by default. This property overrides the verticalCellContentAlignment property of the table and columns.
12329 /// </summary>
12330 [JsonPropertyName("verticalCellContentAlignment")]
12331 public VerticalAlignment? VerticalCellContentAlignment { get; set; }
12332
12333 /// <summary>
12334 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
12335 /// </summary>
12336 [JsonPropertyName("grid.area")]
12337 public string? GridArea { get; set; }
12338
12339 /// <summary>
12340 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
12341 /// </summary>
12342 [JsonPropertyName("fallback")]
12343 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
12344
12345 /// <summary>
12346 /// The cells in the row.
12347 /// </summary>
12348 [JsonPropertyName("cells")]
12349 public IList<TableCell>? Cells { get; set; }
12350
12351 public TableRow WithId(string value)
12352 {
12353 this.Id = value;
12354 return this;
12355 }
12356
12357 public TableRow WithRequires(HostCapabilities value)
12358 {
12359 this.Requires = value;
12360 return this;
12361 }
12362
12363 public TableRow WithLang(string value)
12364 {
12365 this.Lang = value;
12366 return this;
12367 }
12368
12369 public TableRow WithIsVisible(bool value)
12370 {
12371 this.IsVisible = value;
12372 return this;
12373 }
12374
12375 public TableRow WithSeparator(bool value)
12376 {
12377 this.Separator = value;
12378 return this;
12379 }
12380
12381 public TableRow WithHeight(ElementHeight value)
12382 {
12383 this.Height = value;
12384 return this;
12385 }
12386
12387 public TableRow WithHorizontalAlignment(HorizontalAlignment value)
12388 {
12389 this.HorizontalAlignment = value;
12390 return this;
12391 }
12392
12393 public TableRow WithSpacing(Spacing value)
12394 {
12395 this.Spacing = value;
12396 return this;
12397 }
12398
12399 public TableRow WithTargetWidth(TargetWidth value)
12400 {
12401 this.TargetWidth = value;
12402 return this;
12403 }
12404
12405 public TableRow WithIsSortKey(bool value)
12406 {
12407 this.IsSortKey = value;
12408 return this;
12409 }
12410
12411 public TableRow WithShowBorder(bool value)
12412 {
12413 this.ShowBorder = value;
12414 return this;
12415 }
12416
12417 public TableRow WithRoundedCorners(bool value)
12418 {
12419 this.RoundedCorners = value;
12420 return this;
12421 }
12422
12423 public TableRow WithStyle(ContainerStyle value)
12424 {
12425 this.Style = value;
12426 return this;
12427 }
12428
12429 public TableRow WithHorizontalCellContentAlignment(HorizontalAlignment value)
12430 {
12431 this.HorizontalCellContentAlignment = value;
12432 return this;
12433 }
12434
12435 public TableRow WithVerticalCellContentAlignment(VerticalAlignment value)
12436 {
12437 this.VerticalCellContentAlignment = value;
12438 return this;
12439 }
12440
12441 public TableRow WithGridArea(string value)
12442 {
12443 this.GridArea = value;
12444 return this;
12445 }
12446
12447 public TableRow WithFallback(IUnion<CardElement, FallbackElement> value)
12448 {
12449 this.Fallback = value;
12450 return this;
12451 }
12452
12453 public TableRow WithCells(params IList<TableCell> value)
12454 {
12455 this.Cells = value;
12456 return this;
12457 }
12458}
12459
12460/// <summary>
12461/// Represents a cell in a table row.
12462/// </summary>
12463public class TableCell : CardElement
12464{
12465 /// <summary>
12466 /// Must be **TableCell**.
12467 /// </summary>
12468 [JsonPropertyName("type")]
12469 public string Type { get; } = "TableCell";
12470
12471 /// <summary>
12472 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
12473 /// </summary>
12474 [JsonPropertyName("id")]
12475 public string? Id { get; set; }
12476
12477 /// <summary>
12478 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
12479 /// </summary>
12480 [JsonPropertyName("requires")]
12481 public HostCapabilities? Requires { get; set; }
12482
12483 /// <summary>
12484 /// The locale associated with the element.
12485 /// </summary>
12486 [JsonPropertyName("lang")]
12487 public string? Lang { get; set; }
12488
12489 /// <summary>
12490 /// Controls the visibility of the element.
12491 /// </summary>
12492 [JsonPropertyName("isVisible")]
12493 public bool? IsVisible { get; set; }
12494
12495 /// <summary>
12496 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
12497 /// </summary>
12498 [JsonPropertyName("separator")]
12499 public bool? Separator { get; set; }
12500
12501 /// <summary>
12502 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
12503 /// </summary>
12504 [JsonPropertyName("height")]
12505 public ElementHeight? Height { get; set; }
12506
12507 /// <summary>
12508 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
12509 /// </summary>
12510 [JsonPropertyName("spacing")]
12511 public Spacing? Spacing { get; set; }
12512
12513 /// <summary>
12514 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
12515 /// </summary>
12516 [JsonPropertyName("targetWidth")]
12517 public TargetWidth? TargetWidth { get; set; }
12518
12519 /// <summary>
12520 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
12521 /// </summary>
12522 [JsonPropertyName("isSortKey")]
12523 public bool? IsSortKey { get; set; }
12524
12525 /// <summary>
12526 /// An Action that will be invoked when the element is tapped or clicked. Action.ShowCard is not supported.
12527 /// </summary>
12528 [JsonPropertyName("selectAction")]
12529 public Action? SelectAction { get; set; }
12530
12531 /// <summary>
12532 /// The style of the container. Container styles control the colors of the background, border and text inside the container, in such a way that contrast requirements are always met.
12533 /// </summary>
12534 [JsonPropertyName("style")]
12535 public ContainerStyle? Style { get; set; }
12536
12537 /// <summary>
12538 /// The layouts associated with the container. The container can dynamically switch from one layout to another as the card's width changes. See [Container layouts](https://adaptivecards.microsoft.com/?topic=container-layouts) for more details.
12539 /// </summary>
12540 [JsonPropertyName("layouts")]
12541 public IList<ContainerLayout>? Layouts { get; set; }
12542
12543 /// <summary>
12544 /// Controls if the container should bleed into its parent. A bleeding container extends into its parent's padding.
12545 /// </summary>
12546 [JsonPropertyName("bleed")]
12547 public bool? Bleed { get; set; }
12548
12549 /// <summary>
12550 /// The minimum height, in pixels, of the container, in the `<number>px` format.
12551 /// </summary>
12552 [JsonPropertyName("minHeight")]
12553 public string? MinHeight { get; set; }
12554
12555 /// <summary>
12556 /// Defines the container's background image.
12557 /// </summary>
12558 [JsonPropertyName("backgroundImage")]
12559 public IUnion<string, BackgroundImage>? BackgroundImage { get; set; }
12560
12561 /// <summary>
12562 /// Controls how the container's content should be vertically aligned.
12563 /// </summary>
12564 [JsonPropertyName("verticalContentAlignment")]
12565 public VerticalAlignment? VerticalContentAlignment { get; set; }
12566
12567 /// <summary>
12568 /// Controls if the content of the card is to be rendered left-to-right or right-to-left.
12569 /// </summary>
12570 [JsonPropertyName("rtl")]
12571 public bool? Rtl { get; set; }
12572
12573 /// <summary>
12574 /// The maximum height, in pixels, of the container, in the `<number>px` format. When the content of a container exceeds the container's maximum height, a vertical scrollbar is displayed.
12575 /// </summary>
12576 [JsonPropertyName("maxHeight")]
12577 public string? MaxHeight { get; set; }
12578
12579 /// <summary>
12580 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
12581 /// </summary>
12582 [JsonPropertyName("grid.area")]
12583 public string? GridArea { get; set; }
12584
12585 /// <summary>
12586 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
12587 /// </summary>
12588 [JsonPropertyName("fallback")]
12589 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
12590
12591 /// <summary>
12592 /// The items (elements) in the cell.
12593 /// </summary>
12594 [JsonPropertyName("items")]
12595 public IList<CardElement>? Items { get; set; }
12596
12597 public TableCell(params IList<CardElement> items)
12598 {
12599 this.Items = items;
12600 }
12601
12602 public TableCell WithId(string value)
12603 {
12604 this.Id = value;
12605 return this;
12606 }
12607
12608 public TableCell WithRequires(HostCapabilities value)
12609 {
12610 this.Requires = value;
12611 return this;
12612 }
12613
12614 public TableCell WithLang(string value)
12615 {
12616 this.Lang = value;
12617 return this;
12618 }
12619
12620 public TableCell WithIsVisible(bool value)
12621 {
12622 this.IsVisible = value;
12623 return this;
12624 }
12625
12626 public TableCell WithSeparator(bool value)
12627 {
12628 this.Separator = value;
12629 return this;
12630 }
12631
12632 public TableCell WithHeight(ElementHeight value)
12633 {
12634 this.Height = value;
12635 return this;
12636 }
12637
12638 public TableCell WithSpacing(Spacing value)
12639 {
12640 this.Spacing = value;
12641 return this;
12642 }
12643
12644 public TableCell WithTargetWidth(TargetWidth value)
12645 {
12646 this.TargetWidth = value;
12647 return this;
12648 }
12649
12650 public TableCell WithIsSortKey(bool value)
12651 {
12652 this.IsSortKey = value;
12653 return this;
12654 }
12655
12656 public TableCell WithSelectAction(Action value)
12657 {
12658 this.SelectAction = value;
12659 return this;
12660 }
12661
12662 public TableCell WithStyle(ContainerStyle value)
12663 {
12664 this.Style = value;
12665 return this;
12666 }
12667
12668 public TableCell WithLayouts(params IList<ContainerLayout> value)
12669 {
12670 this.Layouts = value;
12671 return this;
12672 }
12673
12674 public TableCell WithBleed(bool value)
12675 {
12676 this.Bleed = value;
12677 return this;
12678 }
12679
12680 public TableCell WithMinHeight(string value)
12681 {
12682 this.MinHeight = value;
12683 return this;
12684 }
12685
12686 public TableCell WithBackgroundImage(IUnion<string, BackgroundImage> value)
12687 {
12688 this.BackgroundImage = value;
12689 return this;
12690 }
12691
12692 public TableCell WithVerticalContentAlignment(VerticalAlignment value)
12693 {
12694 this.VerticalContentAlignment = value;
12695 return this;
12696 }
12697
12698 public TableCell WithRtl(bool value)
12699 {
12700 this.Rtl = value;
12701 return this;
12702 }
12703
12704 public TableCell WithMaxHeight(string value)
12705 {
12706 this.MaxHeight = value;
12707 return this;
12708 }
12709
12710 public TableCell WithGridArea(string value)
12711 {
12712 this.GridArea = value;
12713 return this;
12714 }
12715
12716 public TableCell WithFallback(IUnion<CardElement, FallbackElement> value)
12717 {
12718 this.Fallback = value;
12719 return this;
12720 }
12721
12722 public TableCell WithItems(params IList<CardElement> value)
12723 {
12724 this.Items = value;
12725 return this;
12726 }
12727}
12728
12729/// <summary>
12730/// A block of text inside a RichTextBlock element.
12731/// </summary>
12732public class TextRun : CardElement
12733{
12734 /// <summary>
12735 /// Must be **TextRun**.
12736 /// </summary>
12737 [JsonPropertyName("type")]
12738 public string Type { get; } = "TextRun";
12739
12740 /// <summary>
12741 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
12742 /// </summary>
12743 [JsonPropertyName("id")]
12744 public string? Id { get; set; }
12745
12746 /// <summary>
12747 /// The locale associated with the element.
12748 /// </summary>
12749 [JsonPropertyName("lang")]
12750 public string? Lang { get; set; }
12751
12752 /// <summary>
12753 /// Controls the visibility of the element.
12754 /// </summary>
12755 [JsonPropertyName("isVisible")]
12756 public bool? IsVisible { get; set; }
12757
12758 /// <summary>
12759 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
12760 /// </summary>
12761 [JsonPropertyName("isSortKey")]
12762 public bool? IsSortKey { get; set; }
12763
12764 /// <summary>
12765 /// The text to display. A subset of markdown is supported.
12766 /// </summary>
12767 [JsonPropertyName("text")]
12768 public string? Text { get; set; }
12769
12770 /// <summary>
12771 /// The size of the text.
12772 /// </summary>
12773 [JsonPropertyName("size")]
12774 public TextSize? Size { get; set; }
12775
12776 /// <summary>
12777 /// The weight of the text.
12778 /// </summary>
12779 [JsonPropertyName("weight")]
12780 public TextWeight? Weight { get; set; }
12781
12782 /// <summary>
12783 /// The color of the text.
12784 /// </summary>
12785 [JsonPropertyName("color")]
12786 public TextColor? Color { get; set; }
12787
12788 /// <summary>
12789 /// Controls whether the text should be renderer using a subtler variant of the select color.
12790 /// </summary>
12791 [JsonPropertyName("isSubtle")]
12792 public bool? IsSubtle { get; set; }
12793
12794 /// <summary>
12795 /// The type of font to use for rendering.
12796 /// </summary>
12797 [JsonPropertyName("fontType")]
12798 public FontType? FontType { get; set; }
12799
12800 /// <summary>
12801 /// Controls if the text should be italicized.
12802 /// </summary>
12803 [JsonPropertyName("italic")]
12804 public bool? Italic { get; set; }
12805
12806 /// <summary>
12807 /// Controls if the text should be struck through.
12808 /// </summary>
12809 [JsonPropertyName("strikethrough")]
12810 public bool? Strikethrough { get; set; }
12811
12812 /// <summary>
12813 /// Controls if the text should be highlighted.
12814 /// </summary>
12815 [JsonPropertyName("highlight")]
12816 public bool? Highlight { get; set; }
12817
12818 /// <summary>
12819 /// Controls if the text should be underlined.
12820 /// </summary>
12821 [JsonPropertyName("underline")]
12822 public bool? Underline { get; set; }
12823
12824 /// <summary>
12825 /// An Action that will be invoked when the text is tapped or clicked. Action.ShowCard is not supported.
12826 /// </summary>
12827 [JsonPropertyName("selectAction")]
12828 public Action? SelectAction { get; set; }
12829
12830 /// <summary>
12831 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
12832 /// </summary>
12833 [JsonPropertyName("grid.area")]
12834 public string? GridArea { get; set; }
12835
12836 /// <summary>
12837 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
12838 /// </summary>
12839 [JsonPropertyName("fallback")]
12840 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
12841
12842 public TextRun(string text)
12843 {
12844 this.Text = text;
12845 }
12846
12847 public TextRun WithId(string value)
12848 {
12849 this.Id = value;
12850 return this;
12851 }
12852
12853 public TextRun WithLang(string value)
12854 {
12855 this.Lang = value;
12856 return this;
12857 }
12858
12859 public TextRun WithIsVisible(bool value)
12860 {
12861 this.IsVisible = value;
12862 return this;
12863 }
12864
12865 public TextRun WithIsSortKey(bool value)
12866 {
12867 this.IsSortKey = value;
12868 return this;
12869 }
12870
12871 public TextRun WithText(string value)
12872 {
12873 this.Text = value;
12874 return this;
12875 }
12876
12877 public TextRun WithSize(TextSize value)
12878 {
12879 this.Size = value;
12880 return this;
12881 }
12882
12883 public TextRun WithWeight(TextWeight value)
12884 {
12885 this.Weight = value;
12886 return this;
12887 }
12888
12889 public TextRun WithColor(TextColor value)
12890 {
12891 this.Color = value;
12892 return this;
12893 }
12894
12895 public TextRun WithIsSubtle(bool value)
12896 {
12897 this.IsSubtle = value;
12898 return this;
12899 }
12900
12901 public TextRun WithFontType(FontType value)
12902 {
12903 this.FontType = value;
12904 return this;
12905 }
12906
12907 public TextRun WithItalic(bool value)
12908 {
12909 this.Italic = value;
12910 return this;
12911 }
12912
12913 public TextRun WithStrikethrough(bool value)
12914 {
12915 this.Strikethrough = value;
12916 return this;
12917 }
12918
12919 public TextRun WithHighlight(bool value)
12920 {
12921 this.Highlight = value;
12922 return this;
12923 }
12924
12925 public TextRun WithUnderline(bool value)
12926 {
12927 this.Underline = value;
12928 return this;
12929 }
12930
12931 public TextRun WithSelectAction(Action value)
12932 {
12933 this.SelectAction = value;
12934 return this;
12935 }
12936
12937 public TextRun WithGridArea(string value)
12938 {
12939 this.GridArea = value;
12940 return this;
12941 }
12942
12943 public TextRun WithFallback(IUnion<CardElement, FallbackElement> value)
12944 {
12945 this.Fallback = value;
12946 return this;
12947 }
12948}
12949
12950/// <summary>
12951/// A column in a ColumnSet element.
12952/// </summary>
12953public class Column : CardElement
12954{
12955 /// <summary>
12956 /// Optional. If specified, must be **Column**.
12957 /// </summary>
12958 [JsonPropertyName("type")]
12959 public string Type { get; } = "Column";
12960
12961 /// <summary>
12962 /// A unique identifier for the element or action. Input elements must have an id, otherwise they will not be validated and their values will not be sent to the Bot.
12963 /// </summary>
12964 [JsonPropertyName("id")]
12965 public string? Id { get; set; }
12966
12967 /// <summary>
12968 /// A list of capabilities the element requires the host application to support. If the host application doesn't support at least one of the listed capabilities, the element is not rendered (or its fallback is rendered if provided).
12969 /// </summary>
12970 [JsonPropertyName("requires")]
12971 public HostCapabilities? Requires { get; set; }
12972
12973 /// <summary>
12974 /// The locale associated with the element.
12975 /// </summary>
12976 [JsonPropertyName("lang")]
12977 public string? Lang { get; set; }
12978
12979 /// <summary>
12980 /// Controls the visibility of the element.
12981 /// </summary>
12982 [JsonPropertyName("isVisible")]
12983 public bool? IsVisible { get; set; }
12984
12985 /// <summary>
12986 /// Controls whether a separator line should be displayed above the element to visually separate it from the previous element. No separator will be displayed for the first element in a container, even if this property is set to true.
12987 /// </summary>
12988 [JsonPropertyName("separator")]
12989 public bool? Separator { get; set; }
12990
12991 /// <summary>
12992 /// The height of the element. When set to stretch, the element will use the remaining vertical space in its container.
12993 /// </summary>
12994 [JsonPropertyName("height")]
12995 public ElementHeight? Height { get; set; }
12996
12997 /// <summary>
12998 /// Controls how the element should be horizontally aligned.
12999 /// </summary>
13000 [JsonPropertyName("horizontalAlignment")]
13001 public HorizontalAlignment? HorizontalAlignment { get; set; }
13002
13003 /// <summary>
13004 /// Controls the amount of space between this element and the previous one. No space will be added for the first element in a container.
13005 /// </summary>
13006 [JsonPropertyName("spacing")]
13007 public Spacing? Spacing { get; set; }
13008
13009 /// <summary>
13010 /// Controls for which card width the element should be displayed. If targetWidth isn't specified, the element is rendered at all card widths. Using targetWidth makes it possible to author responsive cards that adapt their layout to the available horizontal space. For more details, see [Responsive layout](https://adaptivecards.microsoft.com/?topic=responsive-layout).
13011 /// </summary>
13012 [JsonPropertyName("targetWidth")]
13013 public TargetWidth? TargetWidth { get; set; }
13014
13015 /// <summary>
13016 /// Controls whether the element should be used as a sort key by elements that allow sorting across a collection of elements.
13017 /// </summary>
13018 [JsonPropertyName("isSortKey")]
13019 public bool? IsSortKey { get; set; }
13020
13021 /// <summary>
13022 /// An Action that will be invoked when the element is tapped or clicked. Action.ShowCard is not supported.
13023 /// </summary>
13024 [JsonPropertyName("selectAction")]
13025 public Action? SelectAction { get; set; }
13026
13027 /// <summary>
13028 /// The style of the container. Container styles control the colors of the background, border and text inside the container, in such a way that contrast requirements are always met.
13029 /// </summary>
13030 [JsonPropertyName("style")]
13031 public ContainerStyle? Style { get; set; }
13032
13033 /// <summary>
13034 /// Controls if a border should be displayed around the container.
13035 /// </summary>
13036 [JsonPropertyName("showBorder")]
13037 public bool? ShowBorder { get; set; }
13038
13039 /// <summary>
13040 /// Controls if the container should have rounded corners.
13041 /// </summary>
13042 [JsonPropertyName("roundedCorners")]
13043 public bool? RoundedCorners { get; set; }
13044
13045 /// <summary>
13046 /// The layouts associated with the container. The container can dynamically switch from one layout to another as the card's width changes. See [Container layouts](https://adaptivecards.microsoft.com/?topic=container-layouts) for more details.
13047 /// </summary>
13048 [JsonPropertyName("layouts")]
13049 public IList<ContainerLayout>? Layouts { get; set; }
13050
13051 /// <summary>
13052 /// Controls if the container should bleed into its parent. A bleeding container extends into its parent's padding.
13053 /// </summary>
13054 [JsonPropertyName("bleed")]
13055 public bool? Bleed { get; set; }
13056
13057 /// <summary>
13058 /// The minimum height, in pixels, of the container, in the `<number>px` format.
13059 /// </summary>
13060 [JsonPropertyName("minHeight")]
13061 public string? MinHeight { get; set; }
13062
13063 /// <summary>
13064 /// Defines the container's background image.
13065 /// </summary>
13066 [JsonPropertyName("backgroundImage")]
13067 public IUnion<string, BackgroundImage>? BackgroundImage { get; set; }
13068
13069 /// <summary>
13070 /// Controls how the container's content should be vertically aligned.
13071 /// </summary>
13072 [JsonPropertyName("verticalContentAlignment")]
13073 public VerticalAlignment? VerticalContentAlignment { get; set; }
13074
13075 /// <summary>
13076 /// Controls if the content of the card is to be rendered left-to-right or right-to-left.
13077 /// </summary>
13078 [JsonPropertyName("rtl")]
13079 public bool? Rtl { get; set; }
13080
13081 /// <summary>
13082 /// The maximum height, in pixels, of the container, in the `<number>px` format. When the content of a container exceeds the container's maximum height, a vertical scrollbar is displayed.
13083 /// </summary>
13084 [JsonPropertyName("maxHeight")]
13085 public string? MaxHeight { get; set; }
13086
13087 /// <summary>
13088 /// The width of the column. If expressed as a number, represents the relative weight of the column in the set. If expressed as a string, `auto` will automatically adjust the column's width according to its content, `stretch` will make the column use the remaining horizontal space (shared with other columns with width set to `stretch`) and using the `<number>px` format will give the column an explicit width in pixels.
13089 /// </summary>
13090 [JsonPropertyName("width")]
13091 public IUnion<string, float>? Width { get; set; }
13092
13093 /// <summary>
13094 /// The area of a Layout.AreaGrid layout in which an element should be displayed.
13095 /// </summary>
13096 [JsonPropertyName("grid.area")]
13097 public string? GridArea { get; set; }
13098
13099 /// <summary>
13100 /// An alternate element to render if the type of this one is unsupported or if the host application doesn't support all the capabilities specified in the requires property.
13101 /// </summary>
13102 [JsonPropertyName("fallback")]
13103 public IUnion<CardElement, FallbackElement>? Fallback { get; set; }
13104
13105 /// <summary>
13106 /// The elements in the column.
13107 /// </summary>
13108 [JsonPropertyName("items")]
13109 public IList<CardElement>? Items { get; set; }
13110
13111 public Column(params IList<CardElement> items)
13112 {
13113 this.Items = items;
13114 }
13115
13116 public Column WithId(string value)
13117 {
13118 this.Id = value;
13119 return this;
13120 }
13121
13122 public Column WithRequires(HostCapabilities value)
13123 {
13124 this.Requires = value;
13125 return this;
13126 }
13127
13128 public Column WithLang(string value)
13129 {
13130 this.Lang = value;
13131 return this;
13132 }
13133
13134 public Column WithIsVisible(bool value)
13135 {
13136 this.IsVisible = value;
13137 return this;
13138 }
13139
13140 public Column WithSeparator(bool value)
13141 {
13142 this.Separator = value;
13143 return this;
13144 }
13145
13146 public Column WithHeight(ElementHeight value)
13147 {
13148 this.Height = value;
13149 return this;
13150 }
13151
13152 public Column WithHorizontalAlignment(HorizontalAlignment value)
13153 {
13154 this.HorizontalAlignment = value;
13155 return this;
13156 }
13157
13158 public Column WithSpacing(Spacing value)
13159 {
13160 this.Spacing = value;
13161 return this;
13162 }
13163
13164 public Column WithTargetWidth(TargetWidth value)
13165 {
13166 this.TargetWidth = value;
13167 return this;
13168 }
13169
13170 public Column WithIsSortKey(bool value)
13171 {
13172 this.IsSortKey = value;
13173 return this;
13174 }
13175
13176 public Column WithSelectAction(Action value)
13177 {
13178 this.SelectAction = value;
13179 return this;
13180 }
13181
13182 public Column WithStyle(ContainerStyle value)
13183 {
13184 this.Style = value;
13185 return this;
13186 }
13187
13188 public Column WithShowBorder(bool value)
13189 {
13190 this.ShowBorder = value;
13191 return this;
13192 }
13193
13194 public Column WithRoundedCorners(bool value)
13195 {
13196 this.RoundedCorners = value;
13197 return this;
13198 }
13199
13200 public Column WithLayouts(params IList<ContainerLayout> value)
13201 {
13202 this.Layouts = value;
13203 return this;
13204 }
13205
13206 public Column WithBleed(bool value)
13207 {
13208 this.Bleed = value;
13209 return this;
13210 }
13211
13212 public Column WithMinHeight(string value)
13213 {
13214 this.MinHeight = value;
13215 return this;
13216 }
13217
13218 public Column WithBackgroundImage(IUnion<string, BackgroundImage> value)
13219 {
13220 this.BackgroundImage = value;
13221 return this;
13222 }
13223
13224 public Column WithVerticalContentAlignment(VerticalAlignment value)
13225 {
13226 this.VerticalContentAlignment = value;
13227 return this;
13228 }
13229
13230 public Column WithRtl(bool value)
13231 {
13232 this.Rtl = value;
13233 return this;
13234 }
13235
13236 public Column WithMaxHeight(string value)
13237 {
13238 this.MaxHeight = value;
13239 return this;
13240 }
13241
13242 public Column WithWidth(IUnion<string, float> value)
13243 {
13244 this.Width = value;
13245 return this;
13246 }
13247
13248 public Column WithGridArea(string value)
13249 {
13250 this.GridArea = value;
13251 return this;
13252 }
13253
13254 public Column WithFallback(IUnion<CardElement, FallbackElement> value)
13255 {
13256 this.Fallback = value;
13257 return this;
13258 }
13259
13260 public Column WithItems(params IList<CardElement> value)
13261 {
13262 this.Items = value;
13263 return this;
13264 }
13265}