Update api spec (#162)

* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2023-11-27 16:01:20 -08:00
committed by GitHub
parent 4f29f55190
commit 6b2fe3decb
287 changed files with 22901 additions and 24513 deletions

View File

@ -7,69 +7,70 @@ from ..types import UNSET, Unset
SB = TypeVar("SB", bound="AiPluginApi")
@attr.s(auto_attribs=True)
class AiPluginApi:
""" AI plugin api information. """ # noqa: E501
is_user_authenticated: Union[Unset, bool] = False
type: Union[Unset, AiPluginApiType] = UNSET
url: Union[Unset, str] = UNSET
"""AI plugin api information.""" # noqa: E501
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
is_user_authenticated: Union[Unset, bool] = False
type: Union[Unset, AiPluginApiType] = UNSET
url: Union[Unset, str] = UNSET
def to_dict(self) -> Dict[str, Any]:
is_user_authenticated = self.is_user_authenticated
if not isinstance(self.type, Unset):
type = self.type
url = self.url
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if is_user_authenticated is not UNSET:
field_dict['is_user_authenticated'] = is_user_authenticated
if type is not UNSET:
field_dict['type'] = type
if url is not UNSET:
field_dict['url'] = url
def to_dict(self) -> Dict[str, Any]:
is_user_authenticated = self.is_user_authenticated
if not isinstance(self.type, Unset):
type = self.type
url = self.url
return field_dict
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if is_user_authenticated is not UNSET:
field_dict["is_user_authenticated"] = is_user_authenticated
if type is not UNSET:
field_dict["type"] = type
if url is not UNSET:
field_dict["url"] = url
@classmethod
def from_dict(cls: Type[SB], src_dict: Dict[str, Any]) -> SB:
d = src_dict.copy()
is_user_authenticated = d.pop("is_user_authenticated", UNSET)
return field_dict
_type = d.pop("type", UNSET)
type: Union[Unset, AiPluginApiType]
if isinstance(_type, Unset):
type = UNSET
else:
type = _type # type: ignore[arg-type]
@classmethod
def from_dict(cls: Type[SB], src_dict: Dict[str, Any]) -> SB:
d = src_dict.copy()
is_user_authenticated = d.pop("is_user_authenticated", UNSET)
url = d.pop("url", UNSET)
_type = d.pop("type", UNSET)
type: Union[Unset, AiPluginApiType]
if isinstance(_type, Unset):
type = UNSET
else:
type = _type # type: ignore[arg-type]
url = d.pop("url", UNSET)
ai_plugin_api = cls(
is_user_authenticated= is_user_authenticated,
type= type,
url= url,
)
ai_plugin_api = cls(
is_user_authenticated=is_user_authenticated,
type=type,
url=url,
)
ai_plugin_api.additional_properties = d
return ai_plugin_api
ai_plugin_api.additional_properties = d
return ai_plugin_api
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __delitem__(self, key: str) -> None:
del self.additional_properties[key]
def __contains__(self, key: str) -> bool:
return key in self.additional_properties
def __contains__(self, key: str) -> bool:
return key in self.additional_properties