Skip to content

Extra material

ExtraMaterial

Bases: BaseFormItem

Supplementary material to the feedback.

Source code in pygsuite/forms/generated/extra_material.py
class ExtraMaterial(BaseFormItem):
    """
    Supplementary material to the feedback.
    """

    def __init__(  # noqa: C901
        self,
        link: Optional["TextLink"] = None,
        video: Optional["VideoLink"] = None,
        object_info: Optional[Dict] = None,
    ):
        generated: Dict = {}

        if link is not None:

            generated["link"] = link._info
        if video is not None:

            generated["video"] = video._info
        object_info = object_info or generated
        super().__init__(object_info=object_info)

    @property
    def link(self) -> "TextLink":
        return TextLink(object_info=self._info.get("link"))

    @link.setter
    def link(self, value: "TextLink"):
        if self._info.get("link", None) == value:
            return
        self._info["link"] = value

    @property
    def video(self) -> "VideoLink":
        return VideoLink(object_info=self._info.get("video"))

    @video.setter
    def video(self, value: "VideoLink"):
        if self._info.get("video", None) == value:
            return
        self._info["video"] = value