microsoft/teams.net

Public

mirrored from https://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
feature/launch-settings-samples

Branches

Tags

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

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Cards/Core.cs

13268lines · modecode

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