Open canvas instance snapshot.
| 726 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 727 | @dataclass |
| 728 | class OpenCanvasInstance: |
| 729 | """Open canvas instance snapshot.""" |
| 730 | |
| 731 | canvas_id: str |
| 732 | """Provider-local canvas identifier""" |
| 733 | |
| 734 | extension_id: str |
| 735 | """Owning provider identifier""" |
| 736 | |
| 737 | instance_id: str |
| 738 | """Stable caller-supplied canvas instance identifier""" |
| 739 | |
| 740 | extension_name: str | None = None |
| 741 | """Owning extension display name, when available""" |
| 742 | |
| 743 | input: Any = None |
| 744 | """Input supplied when the instance was opened""" |
| 745 | |
| 746 | status: str | None = None |
| 747 | """Provider-supplied status text""" |
| 748 | |
| 749 | title: str | None = None |
| 750 | """Rendered title""" |
| 751 | |
| 752 | url: str | None = None |
| 753 | """URL for web-rendered canvases""" |
| 754 | |
| 755 | @staticmethod |
| 756 | def from_dict(obj: Any) -> 'OpenCanvasInstance': |
| 757 | assert isinstance(obj, dict) |
| 758 | canvas_id = from_str(obj.get("canvasId")) |
| 759 | extension_id = from_str(obj.get("extensionId")) |
| 760 | instance_id = from_str(obj.get("instanceId")) |
| 761 | extension_name = from_union([from_str, from_none], obj.get("extensionName")) |
| 762 | input = obj.get("input") |
| 763 | status = from_union([from_str, from_none], obj.get("status")) |
| 764 | title = from_union([from_str, from_none], obj.get("title")) |
| 765 | url = from_union([from_str, from_none], obj.get("url")) |
| 766 | return OpenCanvasInstance(canvas_id, extension_id, instance_id, extension_name, input, status, title, url) |
| 767 | |
| 768 | def to_dict(self) -> dict: |
| 769 | result: dict = {} |
| 770 | result["canvasId"] = from_str(self.canvas_id) |
| 771 | result["extensionId"] = from_str(self.extension_id) |
| 772 | result["instanceId"] = from_str(self.instance_id) |
| 773 | if self.extension_name is not None: |
| 774 | result["extensionName"] = from_union([from_str, from_none], self.extension_name) |
| 775 | if self.input is not None: |
| 776 | result["input"] = self.input |
| 777 | if self.status is not None: |
| 778 | result["status"] = from_union([from_str, from_none], self.status) |
| 779 | if self.title is not None: |
| 780 | result["title"] = from_union([from_str, from_none], self.title) |
| 781 | if self.url is not None: |
| 782 | result["url"] = from_union([from_str, from_none], self.url) |
| 783 | return result |
| 784 | |
| 785 | # Experimental: this type is part of an experimental API and may change or be removed. |
no outgoing calls
searching dependent graphs…