Skip to content

Update containers.py #258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2025
Merged
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
71 changes: 71 additions & 0 deletions src/webexpythonsdk/models/cards/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def __init__(
actions: list[object],
fallback: object = None,
height: OPTIONS.BlockElementHeight = None,
horizontalAlignment: OPTIONS.HorizontalAlignment = None,
separator: bool = None,
spacing: OPTIONS.Spacing = None,
id: str = None,
Expand All @@ -77,6 +78,13 @@ def __init__(
height (BlockElementHeight, Optional): Specifies the height of the
element. **_Defaults to None._** Allowed value(s):
BlockElementHeight.AUTO or BlockElementHeight.STRETCH
horizontalAlignment (HorizontalAlignment, Optional): Controls the
horizontal alignment of the ColumnSet. When not specified, the
value of horizontalAlignment is inherited from the parent
container. If no parent container has horizontalAlignment set,
it defaults to Left. Allowed value(s):
HorizontalAlignment.LEFT, HorizontalAlignment.CENTER, or
HorizontalAlignment.RIGHT
separator (bool, Optional): When true, draw a separating line at
the top of the element. **_Defaults to None._**
spacing (Spacing, Optional): Controls the amount of spacing
Expand Down Expand Up @@ -142,6 +150,12 @@ def __init__(
optional=True,
)

validate_input(
horizontalAlignment,
OPTIONS.HorizontalAlignment,
optional=True,
)

check_type(
separator,
bool,
Expand Down Expand Up @@ -177,6 +191,7 @@ def __init__(
self.actions = actions
self.fallback = fallback
self.height = height
self.horizontalAlignment = horizontalAlignment
self.separator = separator
self.spacing = spacing
self.id = id
Expand All @@ -192,6 +207,7 @@ def __init__(
"type",
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"horizontalAlignment",
"separator",
"spacing",
"id",
Expand Down Expand Up @@ -221,6 +237,7 @@ def __init__(
minHeight: str = None,
fallback: object = None,
height: OPTIONS.BlockElementHeight = None,
horizontalAlignment: OPTIONS.HorizontalAlignment = None,
separator: bool = None,
spacing: OPTIONS.Spacing = None,
id: str = None,
Expand Down Expand Up @@ -275,6 +292,13 @@ def __init__(
height (BlockElementHeight, Optional): Specifies the height of the
element. **_Defaults to None._** Allowed value(s):
BlockElementHeight.AUTO or BlockElementHeight.STRETCH
horizontalAlignment (HorizontalAlignment, Optional): Controls the
horizontal alignment of the ColumnSet. When not specified, the
value of horizontalAlignment is inherited from the parent
container. If no parent container has horizontalAlignment set,
it defaults to Left. Allowed value(s):
HorizontalAlignment.LEFT, HorizontalAlignment.CENTER, or
HorizontalAlignment.RIGHT
separator (bool, Optional): When true, draw a separating line at
the top of the element. **_Defaults to None._**
spacing (Spacing, Optional): Controls the amount of spacing
Expand Down Expand Up @@ -399,6 +423,12 @@ def __init__(
optional=True,
)

validate_input(
horizontalAlignment,
OPTIONS.HorizontalAlignment,
optional=True,
)

check_type(
separator,
bool,
Expand Down Expand Up @@ -440,6 +470,7 @@ def __init__(
self.minHeight = minHeight
self.fallback = fallback
self.height = height
self.horizontalAlignment = horizontalAlignment
self.separator = separator
self.spacing = spacing
self.id = id
Expand Down Expand Up @@ -547,6 +578,13 @@ def __init__(
height (BlockElementHeight, Optional): Specifies the height of the
element. **_Defaults to None._** Allowed value(s):
BlockElementHeight.AUTO or BlockElementHeight.STRETCH
horizontalAlignment (HorizontalAlignment, Optional): Controls the
horizontal alignment of the ColumnSet. When not specified, the
value of horizontalAlignment is inherited from the parent
container. If no parent container has horizontalAlignment set,
it defaults to Left. Allowed value(s):
HorizontalAlignment.LEFT, HorizontalAlignment.CENTER, or
HorizontalAlignment.RIGHT
separator (bool, Optional): When true, draw a separating line at
the top of the element. **_Defaults to None._**
spacing (Spacing, Optional): Controls the amount of spacing
Expand Down Expand Up @@ -702,6 +740,7 @@ def __init__(
"horizontalAlignment",
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"horizontalAlignment",
"separator",
"spacing",
"id",
Expand All @@ -726,6 +765,7 @@ def __init__(
backgroundImage: object = None,
bleed: bool = None,
fallback: object = None,
horizontalAlignment: OPTIONS.HorizontalAlignment = None,
minHeight: str = None,
separator: bool = None,
spacing: OPTIONS.Spacing = None,
Expand Down Expand Up @@ -761,6 +801,13 @@ def __init__(
Note: "drop" causes this element to be dropped immediately
when unknown elements are encountered. The unknown element
doesn't bubble up any higher.
horizontalAlignment (HorizontalAlignment, Optional): Controls the
horizontal alignment of the ColumnSet. When not specified, the
value of horizontalAlignment is inherited from the parent
container. If no parent container has horizontalAlignment set,
it defaults to Left. Allowed value(s):
HorizontalAlignment.LEFT, HorizontalAlignment.CENTER, or
HorizontalAlignment.RIGHT
minHeight (str, Optional): Specifies the minimum height of the
container in pixels, like "80px". **_Defaults to None._**
separator (bool, Optional): When true, draw a separating line at
Expand Down Expand Up @@ -861,6 +908,12 @@ def __init__(
optional=True,
)

validate_input(
horizontalAlignment,
OPTIONS.HorizontalAlignment,
optional=True,
)

check_type(
minHeight,
str,
Expand Down Expand Up @@ -934,6 +987,7 @@ def __init__(
self.backgroundImage = backgroundImage
self.bleed = bleed
self.fallback = fallback
self.horizontalAlignment = horizontalAlignment
self.minHeight = minHeight
self.separator = separator
self.spacing = spacing
Expand Down Expand Up @@ -965,6 +1019,7 @@ def __init__(
),
"bleed",
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"horizontalAlignment",
"minHeight",
"separator",
"spacing",
Expand Down Expand Up @@ -1197,6 +1252,7 @@ def __init__(
imageSize: OPTIONS.ImageSize = OPTIONS.ImageSize.MEDIUM,
fallback: object = None,
height: OPTIONS.BlockElementHeight = None,
horizontalAlignment: OPTIONS.HorizontalAlignment = None,
separator: bool = None,
spacing: OPTIONS.Spacing = None,
id: str = None,
Expand Down Expand Up @@ -1230,6 +1286,13 @@ def __init__(
height (BlockElementHeight, Optional): Specifies the height of the
element. **_Defaults to None._** Allowed value(s):
BlockElementHeight.AUTO or BlockElementHeight.STRETCH
horizontalAlignment (HorizontalAlignment, Optional): Controls the
horizontal alignment of the ColumnSet. When not specified, the
value of horizontalAlignment is inherited from the parent
container. If no parent container has horizontalAlignment set,
it defaults to Left. Allowed value(s):
HorizontalAlignment.LEFT, HorizontalAlignment.CENTER, or
HorizontalAlignment.RIGHT
separator (bool, Optional): When true, draw a separating line at
the top of the element. **_Defaults to None._**
spacing (Spacing, Optional): Controls the amount of spacing
Expand Down Expand Up @@ -1296,6 +1359,12 @@ def __init__(
optional=True,
)

validate_input(
horizontalAlignment,
OPTIONS.HorizontalAlignment,
optional=True,
)

check_type(
separator,
bool,
Expand Down Expand Up @@ -1332,6 +1401,7 @@ def __init__(
self.imageSize = imageSize
self.fallback = fallback
self.height = height
self.horizontalAlignment = horizontalAlignment
self.separator = separator
self.spacing = spacing
self.id = id
Expand All @@ -1348,6 +1418,7 @@ def __init__(
"imageSize",
*([] if hasattr(fallback, "to_dict") else ["fallback"]),
"height",
"horizontalAlignment",
"separator",
"spacing",
"id",
Expand Down