Update api spec (#127)

* YOYO NEW API SPEC!

* bump version

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* some fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes #128

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* mypy fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2023-08-30 15:59:51 -07:00
committed by GitHub
parent d737fb4e8f
commit 8162fa1964
154 changed files with 6664 additions and 1581 deletions

View File

@ -2,22 +2,25 @@ from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.base64data import Base64Data
from ..types import UNSET, Unset
DO = TypeVar("DO", bound="ExportFile")
ET = TypeVar("ET", bound="ExportFile")
@attr.s(auto_attribs=True)
class ExportFile:
"""A file to be exported to the client.""" # noqa: E501
contents: Union[Unset, str] = UNSET
contents: Union[Unset, Base64Data] = UNSET
name: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
contents = self.contents
contents: Union[Unset, str] = UNSET
if not isinstance(self.contents, Unset):
contents = self.contents.get_encoded()
name = self.name
field_dict: Dict[str, Any] = {}
@ -31,9 +34,14 @@ class ExportFile:
return field_dict
@classmethod
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET:
d = src_dict.copy()
contents = d.pop("contents", UNSET)
_contents = d.pop("contents", UNSET)
contents: Union[Unset, Base64Data]
if isinstance(_contents, Unset):
contents = UNSET
else:
contents = Base64Data(bytes(_contents, "utf-8"))
name = d.pop("name", UNSET)