Skip to content

Commit 5e90be6

Browse files
authored
Update cards.py (#260)
Updated cards.py to include style of type OPTIONS.ContainerStyle for the AdaptiveCard class. Also included associated validations and comments.
2 parents 7f0d57f + f6a7ce0 commit 5e90be6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/webexpythonsdk/models/cards/cards.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def __init__(
6161
backgroundImage: object = None,
6262
minHeight: str = None,
6363
speak: str = None,
64+
style: OPTIONS.ContainerStyle = None,
6465
lang: str = None,
6566
verticalContentAlignment: OPTIONS.VerticalContentAlignment = None,
6667
):
@@ -94,6 +95,11 @@ def __init__(
9495
speak (str, Optional): Specifies what should be spoken for this
9596
entire card. This is simple text or SSML fragment. **_Defaults
9697
to None._**
98+
style (ContainerStyle, Optional): Style hint for Container.
99+
**_Defaults to None._**Allowed value(s):
100+
ContainerStyle.DEFAULT, ContainerStyle.EMPHASIS,
101+
ContainerStyle.GOOD, ContainerStyle.ATTENTION,
102+
ContainerStyle.WARNING, or ContainerStyle.ACCENT
97103
lang (str, Optional): The 2-letter ISO-639-1 language used in the
98104
card. Used to localize any date/time functions. **_Defaults to
99105
None._**
@@ -184,6 +190,12 @@ def __init__(
184190
optional=True,
185191
)
186192

193+
validate_input(
194+
style,
195+
OPTIONS.ContainerStyle,
196+
optional=True,
197+
)
198+
187199
check_type(
188200
lang,
189201
str,
@@ -210,6 +222,7 @@ def __init__(
210222
self.backgroundImage = backgroundImage
211223
self.minHeight = minHeight
212224
self.speak = speak
225+
self.style = style
213226
self.lang = lang
214227
self.verticalContentAlignment = verticalContentAlignment
215228

@@ -235,6 +248,7 @@ def __init__(
235248
),
236249
"minHeight",
237250
"speak",
251+
"style",
238252
"lang",
239253
"verticalContentAlignment",
240254
],

0 commit comments

Comments
 (0)