Skip to content

Commit

Permalink
Re-generate client with new swagger json (#944)
Browse files Browse the repository at this point in the history
* re-generate client with new swagger json

* use right l4_sample version
  • Loading branch information
fm3 authored Sep 26, 2023
1 parent eee7de9 commit 12f992d
Show file tree
Hide file tree
Showing 16 changed files with 1,047 additions and 0 deletions.
30 changes: 30 additions & 0 deletions webknossos/webknossos/client/_generated/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@
from .annotation_infos_by_task_id_response_200_item_user_teams_item import (
AnnotationInfosByTaskIdResponse200ItemUserTeamsItem,
)
from .annotation_private_link_params import AnnotationPrivateLinkParams
from .build_info_response_200 import BuildInfoResponse200
from .build_info_response_200_webknossos import BuildInfoResponse200Webknossos
from .build_info_response_200_webknossos_wrap import BuildInfoResponse200WebknossosWrap
from .cancel_upload_information import CancelUploadInformation
from .create_private_link_json_body import CreatePrivateLinkJsonBody
from .create_project_json_body import CreateProjectJsonBody
from .current_user_info_response_200 import CurrentUserInfoResponse200
Expand Down Expand Up @@ -166,6 +168,12 @@
from .generate_token_for_data_store_response_200 import (
GenerateTokenForDataStoreResponse200,
)
from .instant import Instant
from .js_object import JsObject
from .js_object_underlying import JsObjectUnderlying
from .js_object_value import JsObjectValue
from .js_value import JsValue
from .linked_layer_identifier import LinkedLayerIdentifier
from .project_info_by_id_response_200 import ProjectInfoByIdResponse200
from .project_info_by_id_response_200_owner import ProjectInfoByIdResponse200Owner
from .project_info_by_id_response_200_owner_teams_item import (
Expand All @@ -176,6 +184,7 @@
from .project_info_by_name_response_200_owner_teams_item import (
ProjectInfoByNameResponse200OwnerTeamsItem,
)
from .reserve_upload_information import ReserveUploadInformation
from .short_link_by_key_response_200 import ShortLinkByKeyResponse200
from .task_create_from_files_json_body import TaskCreateFromFilesJsonBody
from .task_info_response_200 import TaskInfoResponse200
Expand Down Expand Up @@ -207,7 +216,13 @@
TaskInfosByProjectIdResponse200ItemTypeSettingsResolutionRestrictions,
)
from .team_list_response_200_item import TeamListResponse200Item
from .tuple_2 import Tuple2
from .tuple_2_string_js_value import Tuple2StringJsValue
from .tuple_21 import Tuple21
from .tuple_22 import Tuple22
from .update_private_link_json_body import UpdatePrivateLinkJsonBody
from .upload_information import UploadInformation
from .upload_information_needs_conversion import UploadInformationNeedsConversion
from .user_info_by_id_response_200 import UserInfoByIdResponse200
from .user_info_by_id_response_200_experiences import UserInfoByIdResponse200Experiences
from .user_info_by_id_response_200_novel_user_experience_infos import (
Expand Down Expand Up @@ -276,9 +291,11 @@
"AnnotationInfosByTaskIdResponse200ItemTracingStore",
"AnnotationInfosByTaskIdResponse200ItemUser",
"AnnotationInfosByTaskIdResponse200ItemUserTeamsItem",
"AnnotationPrivateLinkParams",
"BuildInfoResponse200",
"BuildInfoResponse200Webknossos",
"BuildInfoResponse200WebknossosWrap",
"CancelUploadInformation",
"CreatePrivateLinkJsonBody",
"CreateProjectJsonBody",
"CurrentUserInfoResponse200",
Expand Down Expand Up @@ -309,12 +326,19 @@
"DatastoreListResponse200Item",
"FolderTreeResponse200Item",
"GenerateTokenForDataStoreResponse200",
"Instant",
"JsObject",
"JsObjectUnderlying",
"JsObjectValue",
"JsValue",
"LinkedLayerIdentifier",
"ProjectInfoByIdResponse200",
"ProjectInfoByIdResponse200Owner",
"ProjectInfoByIdResponse200OwnerTeamsItem",
"ProjectInfoByNameResponse200",
"ProjectInfoByNameResponse200Owner",
"ProjectInfoByNameResponse200OwnerTeamsItem",
"ReserveUploadInformation",
"ShortLinkByKeyResponse200",
"TaskCreateFromFilesJsonBody",
"TaskInfoResponse200",
Expand All @@ -330,7 +354,13 @@
"TaskInfosByProjectIdResponse200ItemTypeSettings",
"TaskInfosByProjectIdResponse200ItemTypeSettingsResolutionRestrictions",
"TeamListResponse200Item",
"Tuple2",
"Tuple21",
"Tuple22",
"Tuple2StringJsValue",
"UpdatePrivateLinkJsonBody",
"UploadInformation",
"UploadInformationNeedsConversion",
"UserInfoByIdResponse200",
"UserInfoByIdResponse200Experiences",
"UserInfoByIdResponse200NovelUserExperienceInfos",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union

import attr

from ..types import UNSET, Unset

if TYPE_CHECKING:
from ..models.instant import Instant


T = TypeVar("T", bound="AnnotationPrivateLinkParams")


@attr.s(auto_attribs=True)
class AnnotationPrivateLinkParams:
"""
Attributes:
annotation (str):
expiration_date_time (Union[Unset, Instant]):
"""

annotation: str
expiration_date_time: Union[Unset, "Instant"] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

def to_dict(self) -> Dict[str, Any]:
annotation = self.annotation
expiration_date_time: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.expiration_date_time, Unset):
expiration_date_time = self.expiration_date_time.to_dict()

field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"annotation": annotation,
}
)
if expiration_date_time is not UNSET:
field_dict["expirationDateTime"] = expiration_date_time

return field_dict

@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
from ..models.instant import Instant

d = src_dict.copy()
annotation = d.pop("annotation")

_expiration_date_time = d.pop("expirationDateTime", UNSET)
expiration_date_time: Union[Unset, Instant]
if isinstance(_expiration_date_time, Unset):
expiration_date_time = UNSET
else:
expiration_date_time = Instant.from_dict(_expiration_date_time)

annotation_private_link_params = cls(
annotation=annotation,
expiration_date_time=expiration_date_time,
)

annotation_private_link_params.additional_properties = d
return annotation_private_link_params

@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 __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value

def __delitem__(self, key: str) -> None:
del self.additional_properties[key]

def __contains__(self, key: str) -> bool:
return key in self.additional_properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
from typing import Any, Dict, List, Type, TypeVar

import attr

T = TypeVar("T", bound="CancelUploadInformation")


@attr.s(auto_attribs=True)
class CancelUploadInformation:
"""
Attributes:
upload_id (str):
"""

upload_id: str
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

def to_dict(self) -> Dict[str, Any]:
upload_id = self.upload_id

field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"uploadId": upload_id,
}
)

return field_dict

@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
upload_id = d.pop("uploadId")

cancel_upload_information = cls(
upload_id=upload_id,
)

cancel_upload_information.additional_properties = d
return cancel_upload_information

@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 __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value

def __delitem__(self, key: str) -> None:
del self.additional_properties[key]

def __contains__(self, key: str) -> bool:
return key in self.additional_properties
64 changes: 64 additions & 0 deletions webknossos/webknossos/client/_generated/models/instant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
from typing import Any, Dict, List, Type, TypeVar

import attr

T = TypeVar("T", bound="Instant")


@attr.s(auto_attribs=True)
class Instant:
"""
Attributes:
epoch_millis (int):
past (bool):
"""

epoch_millis: int
past: bool
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

def to_dict(self) -> Dict[str, Any]:
epoch_millis = self.epoch_millis
past = self.past

field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"epochMillis": epoch_millis,
"past": past,
}
)

return field_dict

@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
epoch_millis = d.pop("epochMillis")

past = d.pop("past")

instant = cls(
epoch_millis=epoch_millis,
past=past,
)

instant.additional_properties = d
return instant

@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 __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value

def __delitem__(self, key: str) -> None:
del self.additional_properties[key]

def __contains__(self, key: str) -> bool:
return key in self.additional_properties
92 changes: 92 additions & 0 deletions webknossos/webknossos/client/_generated/models/js_object.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar

import attr

if TYPE_CHECKING:
from ..models.js_object_underlying import JsObjectUnderlying
from ..models.js_object_value import JsObjectValue
from ..models.tuple_2_string_js_value import Tuple2StringJsValue


T = TypeVar("T", bound="JsObject")


@attr.s(auto_attribs=True)
class JsObject:
"""
Attributes:
underlying (JsObjectUnderlying):
fields (List['Tuple2StringJsValue']):
value (JsObjectValue):
"""

underlying: "JsObjectUnderlying"
fields: List["Tuple2StringJsValue"]
value: "JsObjectValue"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)

def to_dict(self) -> Dict[str, Any]:
underlying = self.underlying.to_dict()

fields = []
for fields_item_data in self.fields:
fields_item = fields_item_data.to_dict()

fields.append(fields_item)

value = self.value.to_dict()

field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"underlying": underlying,
"fields": fields,
"value": value,
}
)

return field_dict

@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
from ..models.js_object_underlying import JsObjectUnderlying
from ..models.js_object_value import JsObjectValue
from ..models.tuple_2_string_js_value import Tuple2StringJsValue

d = src_dict.copy()
underlying = JsObjectUnderlying.from_dict(d.pop("underlying"))

fields = []
_fields = d.pop("fields")
for fields_item_data in _fields:
fields_item = Tuple2StringJsValue.from_dict(fields_item_data)

fields.append(fields_item)

value = JsObjectValue.from_dict(d.pop("value"))

js_object = cls(
underlying=underlying,
fields=fields,
value=value,
)

js_object.additional_properties = d
return js_object

@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 __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value

def __delitem__(self, key: str) -> None:
del self.additional_properties[key]

def __contains__(self, key: str) -> bool:
return key in self.additional_properties
Loading

0 comments on commit 12f992d

Please sign in to comment.