Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/webexpythonsdk/models/cards/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
"""

from webexpythonsdk.models.cards.adaptive_card_component import (
AdaptiveCardComponent
)
from webexpythonsdk.models.cards.cards import (
AdaptiveCard
AdaptiveCardComponent,
)
from webexpythonsdk.models.cards.cards import AdaptiveCard
from webexpythonsdk.models.cards.card_elements import (
TextBlock,
Image,
Expand Down
34 changes: 9 additions & 25 deletions src/webexpythonsdk/models/cards/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ def __init__(

super().__init__(
serializable_properties=[
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
Expand All @@ -164,9 +162,7 @@ def __init__(
"iconUrl",
"id",
"style",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"requires",
],
)
Expand Down Expand Up @@ -246,7 +242,7 @@ def __init__(
str,
object,
),
optional=True
optional=True,
)

validate_input(
Expand Down Expand Up @@ -315,9 +311,7 @@ def __init__(

super().__init__(
serializable_properties=[
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
Expand All @@ -327,9 +321,7 @@ def __init__(
"iconUrl",
"id",
"style",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"requires",
],
)
Expand Down Expand Up @@ -461,19 +453,15 @@ def __init__(
super().__init__(
serializable_properties=[
"card",
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
"title",
"iconUrl",
"id",
"style",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"requires",
],
)
Expand Down Expand Up @@ -608,19 +596,15 @@ def __init__(
super().__init__(
serializable_properties=[
"targetElements",
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
"title",
"iconUrl",
"id",
"style",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"requires",
],
)
Expand Down
32 changes: 8 additions & 24 deletions src/webexpythonsdk/models/cards/card_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@ def __init__(

super().__init__(
serializable_properties=[
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
Expand All @@ -282,9 +280,7 @@ def __init__(
"size",
"weight",
"wrap",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"separator",
"spacing",
Expand Down Expand Up @@ -531,9 +527,7 @@ def __init__(
super().__init__(
serializable_properties=[
"selectAction",
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
Expand All @@ -545,9 +539,7 @@ def __init__(
"size",
"style",
"width",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"separator",
"spacing",
"id",
Expand Down Expand Up @@ -726,17 +718,13 @@ def __init__(
super().__init__(
serializable_properties=[
"sources",
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
"poster",
"altText",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"separator",
"spacing",
Expand Down Expand Up @@ -954,16 +942,12 @@ def __init__(
super().__init__(
serializable_properties=[
"inlines",
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
"horizontalAlignment",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"separator",
"spacing",
Expand Down
6 changes: 4 additions & 2 deletions src/webexpythonsdk/models/cards/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ def __init__(
"actions",
"selectAction",
*(
["backgroundImage"] if hasattr(backgroundImage, "to_dict")
["backgroundImage"]
if hasattr(backgroundImage, "to_dict")
else []
),
],
Expand All @@ -228,7 +229,8 @@ def __init__(
"version",
"fallbackText",
*(
[] if hasattr(backgroundImage, "to_dict")
[]
if hasattr(backgroundImage, "to_dict")
else ["backgroundImage"]
),
"minHeight",
Expand Down
64 changes: 22 additions & 42 deletions src/webexpythonsdk/models/cards/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,11 @@ def __init__(
super().__init__(
serializable_properties=[
"actions",
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"separator",
"spacing",
Expand Down Expand Up @@ -455,26 +451,24 @@ def __init__(
"items",
"selectAction",
*(
["backgroundImage"] if hasattr(backgroundImage, "to_dict")
["backgroundImage"]
if hasattr(backgroundImage, "to_dict")
else []
),
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
"style",
"verticalContentAlignment",
"bleed",
*(
[] if hasattr(backgroundImage, "to_dict")
[]
if hasattr(backgroundImage, "to_dict")
else ["backgroundImage"]
),
"minHeight",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"separator",
"spacing",
Expand Down Expand Up @@ -504,7 +498,7 @@ def __init__(
minHeight: str = None,
horizontalAlignment: OPTIONS.HorizontalAlignment = None,
fallback: object = None,
height: OPTIONS.BlockElementHeight=None,
height: OPTIONS.BlockElementHeight = None,
separator: bool = None,
spacing: OPTIONS.Spacing = None,
id: str = None,
Expand Down Expand Up @@ -698,19 +692,15 @@ def __init__(
serializable_properties=[
"columns",
"selectAction",
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
"style",
"bleed",
"minHeight",
"horizontalAlignment",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"separator",
"spacing",
Expand Down Expand Up @@ -959,24 +949,22 @@ def __init__(
serializable_properties=[
"items",
*(
["backgroundImage"] if hasattr(backgroundImage, "to_dict")
["backgroundImage"]
if hasattr(backgroundImage, "to_dict")
else []
),
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
"selectAction",
],
simple_properties=[
"type",
*(
[] if hasattr(backgroundImage, "to_dict")
[]
if hasattr(backgroundImage, "to_dict")
else ["backgroundImage"]
),
"bleed",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"minHeight",
"separator",
"spacing",
Expand Down Expand Up @@ -1135,15 +1123,11 @@ def __init__(
super().__init__(
serializable_properties=[
"facts",
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"separator",
"id",
Expand Down Expand Up @@ -1215,7 +1199,7 @@ def __init__(
height: OPTIONS.BlockElementHeight = None,
separator: bool = None,
spacing: OPTIONS.Spacing = None,
id: str = None,
id: str = None,
isVisible: bool = True,
requires: dict[str, str] = None,
):
Expand Down Expand Up @@ -1357,16 +1341,12 @@ def __init__(
super().__init__(
serializable_properties=[
"images",
*(
["fallback"] if hasattr(fallback, "to_dict") else []
),
*(["fallback"] if hasattr(fallback, "to_dict") else []),
],
simple_properties=[
"type",
"imageSize",
*(
[] if hasattr(fallback, "to_dict") else ["fallback"]
),
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"separator",
"spacing",
Expand Down
Loading