microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
aamirj/StackOverflowTest

Branches

Tags

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

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Cards/Core.cs

14023lines · modecode

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