diff --git a/webknossos/webknossos/client/_generated/models/__init__.py b/webknossos/webknossos/client/_generated/models/__init__.py index 4d26b0150..3e2107114 100644 --- a/webknossos/webknossos/client/_generated/models/__init__.py +++ b/webknossos/webknossos/client/_generated/models/__init__.py @@ -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 @@ -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 ( @@ -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 @@ -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 ( @@ -276,9 +291,11 @@ "AnnotationInfosByTaskIdResponse200ItemTracingStore", "AnnotationInfosByTaskIdResponse200ItemUser", "AnnotationInfosByTaskIdResponse200ItemUserTeamsItem", + "AnnotationPrivateLinkParams", "BuildInfoResponse200", "BuildInfoResponse200Webknossos", "BuildInfoResponse200WebknossosWrap", + "CancelUploadInformation", "CreatePrivateLinkJsonBody", "CreateProjectJsonBody", "CurrentUserInfoResponse200", @@ -309,12 +326,19 @@ "DatastoreListResponse200Item", "FolderTreeResponse200Item", "GenerateTokenForDataStoreResponse200", + "Instant", + "JsObject", + "JsObjectUnderlying", + "JsObjectValue", + "JsValue", + "LinkedLayerIdentifier", "ProjectInfoByIdResponse200", "ProjectInfoByIdResponse200Owner", "ProjectInfoByIdResponse200OwnerTeamsItem", "ProjectInfoByNameResponse200", "ProjectInfoByNameResponse200Owner", "ProjectInfoByNameResponse200OwnerTeamsItem", + "ReserveUploadInformation", "ShortLinkByKeyResponse200", "TaskCreateFromFilesJsonBody", "TaskInfoResponse200", @@ -330,7 +354,13 @@ "TaskInfosByProjectIdResponse200ItemTypeSettings", "TaskInfosByProjectIdResponse200ItemTypeSettingsResolutionRestrictions", "TeamListResponse200Item", + "Tuple2", + "Tuple21", + "Tuple22", + "Tuple2StringJsValue", "UpdatePrivateLinkJsonBody", + "UploadInformation", + "UploadInformationNeedsConversion", "UserInfoByIdResponse200", "UserInfoByIdResponse200Experiences", "UserInfoByIdResponse200NovelUserExperienceInfos", diff --git a/webknossos/webknossos/client/_generated/models/annotation_private_link_params.py b/webknossos/webknossos/client/_generated/models/annotation_private_link_params.py new file mode 100644 index 000000000..cbe3d932a --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/annotation_private_link_params.py @@ -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 diff --git a/webknossos/webknossos/client/_generated/models/cancel_upload_information.py b/webknossos/webknossos/client/_generated/models/cancel_upload_information.py new file mode 100644 index 000000000..ad5a891d1 --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/cancel_upload_information.py @@ -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 diff --git a/webknossos/webknossos/client/_generated/models/instant.py b/webknossos/webknossos/client/_generated/models/instant.py new file mode 100644 index 000000000..1dfb838b6 --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/instant.py @@ -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 diff --git a/webknossos/webknossos/client/_generated/models/js_object.py b/webknossos/webknossos/client/_generated/models/js_object.py new file mode 100644 index 000000000..115ec2a26 --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/js_object.py @@ -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 diff --git a/webknossos/webknossos/client/_generated/models/js_object_underlying.py b/webknossos/webknossos/client/_generated/models/js_object_underlying.py new file mode 100644 index 000000000..6296fa0f8 --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/js_object_underlying.py @@ -0,0 +1,59 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar + +import attr + +if TYPE_CHECKING: + from ..models.js_value import JsValue + + +T = TypeVar("T", bound="JsObjectUnderlying") + + +@attr.s(auto_attribs=True) +class JsObjectUnderlying: + """ """ + + additional_properties: Dict[str, "JsValue"] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + pass + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.js_value import JsValue + + d = src_dict.copy() + js_object_underlying = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = JsValue.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + js_object_underlying.additional_properties = additional_properties + return js_object_underlying + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> "JsValue": + return self.additional_properties[key] + + def __setitem__(self, key: str, value: "JsValue") -> 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 diff --git a/webknossos/webknossos/client/_generated/models/js_object_value.py b/webknossos/webknossos/client/_generated/models/js_object_value.py new file mode 100644 index 000000000..fbd5fb318 --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/js_object_value.py @@ -0,0 +1,59 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar + +import attr + +if TYPE_CHECKING: + from ..models.js_value import JsValue + + +T = TypeVar("T", bound="JsObjectValue") + + +@attr.s(auto_attribs=True) +class JsObjectValue: + """ """ + + additional_properties: Dict[str, "JsValue"] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + pass + + field_dict: Dict[str, Any] = {} + for prop_name, prop in self.additional_properties.items(): + field_dict[prop_name] = prop.to_dict() + + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.js_value import JsValue + + d = src_dict.copy() + js_object_value = cls() + + additional_properties = {} + for prop_name, prop_dict in d.items(): + additional_property = JsValue.from_dict(prop_dict) + + additional_properties[prop_name] = additional_property + + js_object_value.additional_properties = additional_properties + return js_object_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> "JsValue": + return self.additional_properties[key] + + def __setitem__(self, key: str, value: "JsValue") -> 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 diff --git a/webknossos/webknossos/client/_generated/models/js_value.py b/webknossos/webknossos/client/_generated/models/js_value.py new file mode 100644 index 000000000..241252355 --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/js_value.py @@ -0,0 +1,43 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="JsValue") + + +@attr.s(auto_attribs=True) +class JsValue: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + js_value = cls() + + js_value.additional_properties = d + return js_value + + @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 diff --git a/webknossos/webknossos/client/_generated/models/linked_layer_identifier.py b/webknossos/webknossos/client/_generated/models/linked_layer_identifier.py new file mode 100644 index 000000000..ce4d5d8ea --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/linked_layer_identifier.py @@ -0,0 +1,81 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="LinkedLayerIdentifier") + + +@attr.s(auto_attribs=True) +class LinkedLayerIdentifier: + """ + Attributes: + organization_name (str): + data_set_name (str): + layer_name (str): + new_layer_name (Union[Unset, str]): + """ + + organization_name: str + data_set_name: str + layer_name: str + new_layer_name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + organization_name = self.organization_name + data_set_name = self.data_set_name + layer_name = self.layer_name + new_layer_name = self.new_layer_name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "organizationName": organization_name, + "dataSetName": data_set_name, + "layerName": layer_name, + } + ) + if new_layer_name is not UNSET: + field_dict["newLayerName"] = new_layer_name + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + organization_name = d.pop("organizationName") + + data_set_name = d.pop("dataSetName") + + layer_name = d.pop("layerName") + + new_layer_name = d.pop("newLayerName", UNSET) + + linked_layer_identifier = cls( + organization_name=organization_name, + data_set_name=data_set_name, + layer_name=layer_name, + new_layer_name=new_layer_name, + ) + + linked_layer_identifier.additional_properties = d + return linked_layer_identifier + + @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 diff --git a/webknossos/webknossos/client/_generated/models/reserve_upload_information.py b/webknossos/webknossos/client/_generated/models/reserve_upload_information.py new file mode 100644 index 000000000..6a166e016 --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/reserve_upload_information.py @@ -0,0 +1,124 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.linked_layer_identifier import LinkedLayerIdentifier + + +T = TypeVar("T", bound="ReserveUploadInformation") + + +@attr.s(auto_attribs=True) +class ReserveUploadInformation: + """ + Attributes: + upload_id (str): + name (str): + organization (str): + total_file_count (int): + initial_teams (List[str]): + layers_to_link (Union[Unset, List['LinkedLayerIdentifier']]): + folder_id (Union[Unset, str]): + """ + + upload_id: str + name: str + organization: str + total_file_count: int + initial_teams: List[str] + layers_to_link: Union[Unset, List["LinkedLayerIdentifier"]] = UNSET + folder_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + upload_id = self.upload_id + name = self.name + organization = self.organization + total_file_count = self.total_file_count + initial_teams = self.initial_teams + + layers_to_link: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.layers_to_link, Unset): + layers_to_link = [] + for layers_to_link_item_data in self.layers_to_link: + layers_to_link_item = layers_to_link_item_data.to_dict() + + layers_to_link.append(layers_to_link_item) + + folder_id = self.folder_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "uploadId": upload_id, + "name": name, + "organization": organization, + "totalFileCount": total_file_count, + "initialTeams": initial_teams, + } + ) + if layers_to_link is not UNSET: + field_dict["layersToLink"] = layers_to_link + if folder_id is not UNSET: + field_dict["folderId"] = folder_id + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.linked_layer_identifier import LinkedLayerIdentifier + + d = src_dict.copy() + upload_id = d.pop("uploadId") + + name = d.pop("name") + + organization = d.pop("organization") + + total_file_count = d.pop("totalFileCount") + + initial_teams = cast(List[str], d.pop("initialTeams")) + + layers_to_link = [] + _layers_to_link = d.pop("layersToLink", UNSET) + for layers_to_link_item_data in _layers_to_link or []: + layers_to_link_item = LinkedLayerIdentifier.from_dict( + layers_to_link_item_data + ) + + layers_to_link.append(layers_to_link_item) + + folder_id = d.pop("folderId", UNSET) + + reserve_upload_information = cls( + upload_id=upload_id, + name=name, + organization=organization, + total_file_count=total_file_count, + initial_teams=initial_teams, + layers_to_link=layers_to_link, + folder_id=folder_id, + ) + + reserve_upload_information.additional_properties = d + return reserve_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 diff --git a/webknossos/webknossos/client/_generated/models/tuple_2.py b/webknossos/webknossos/client/_generated/models/tuple_2.py new file mode 100644 index 000000000..adaa48e8f --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/tuple_2.py @@ -0,0 +1,73 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar + +import attr + +if TYPE_CHECKING: + from ..models.tuple_21 import Tuple21 + from ..models.tuple_22 import Tuple22 + + +T = TypeVar("T", bound="Tuple2") + + +@attr.s(auto_attribs=True) +class Tuple2: + """ + Attributes: + field_1 (Tuple21): + field_2 (Tuple22): + """ + + field_1: "Tuple21" + field_2: "Tuple22" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_1 = self.field_1.to_dict() + + field_2 = self.field_2.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "_1": field_1, + "_2": field_2, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.tuple_21 import Tuple21 + from ..models.tuple_22 import Tuple22 + + d = src_dict.copy() + field_1 = Tuple21.from_dict(d.pop("_1")) + + field_2 = Tuple22.from_dict(d.pop("_2")) + + tuple_2 = cls( + field_1=field_1, + field_2=field_2, + ) + + tuple_2.additional_properties = d + return tuple_2 + + @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 diff --git a/webknossos/webknossos/client/_generated/models/tuple_21.py b/webknossos/webknossos/client/_generated/models/tuple_21.py new file mode 100644 index 000000000..e4725e1a5 --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/tuple_21.py @@ -0,0 +1,43 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="Tuple21") + + +@attr.s(auto_attribs=True) +class Tuple21: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + tuple_21 = cls() + + tuple_21.additional_properties = d + return tuple_21 + + @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 diff --git a/webknossos/webknossos/client/_generated/models/tuple_22.py b/webknossos/webknossos/client/_generated/models/tuple_22.py new file mode 100644 index 000000000..752120b5d --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/tuple_22.py @@ -0,0 +1,43 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="Tuple22") + + +@attr.s(auto_attribs=True) +class Tuple22: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + tuple_22 = cls() + + tuple_22.additional_properties = d + return tuple_22 + + @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 diff --git a/webknossos/webknossos/client/_generated/models/tuple_2_string_js_value.py b/webknossos/webknossos/client/_generated/models/tuple_2_string_js_value.py new file mode 100644 index 000000000..d7cfa17b1 --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/tuple_2_string_js_value.py @@ -0,0 +1,70 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar + +import attr + +if TYPE_CHECKING: + from ..models.js_value import JsValue + + +T = TypeVar("T", bound="Tuple2StringJsValue") + + +@attr.s(auto_attribs=True) +class Tuple2StringJsValue: + """ + Attributes: + field_1 (str): + field_2 (JsValue): + """ + + field_1: str + field_2: "JsValue" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_1 = self.field_1 + field_2 = self.field_2.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "_1": field_1, + "_2": field_2, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.js_value import JsValue + + d = src_dict.copy() + field_1 = d.pop("_1") + + field_2 = JsValue.from_dict(d.pop("_2")) + + tuple_2_string_js_value = cls( + field_1=field_1, + field_2=field_2, + ) + + tuple_2_string_js_value.additional_properties = d + return tuple_2_string_js_value + + @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 diff --git a/webknossos/webknossos/client/_generated/models/upload_information.py b/webknossos/webknossos/client/_generated/models/upload_information.py new file mode 100644 index 000000000..f358e0bcd --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/upload_information.py @@ -0,0 +1,86 @@ +from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.upload_information_needs_conversion import ( + UploadInformationNeedsConversion, + ) + + +T = TypeVar("T", bound="UploadInformation") + + +@attr.s(auto_attribs=True) +class UploadInformation: + """ + Attributes: + upload_id (str): + needs_conversion (Union[Unset, UploadInformationNeedsConversion]): + """ + + upload_id: str + needs_conversion: Union[Unset, "UploadInformationNeedsConversion"] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + upload_id = self.upload_id + needs_conversion: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.needs_conversion, Unset): + needs_conversion = self.needs_conversion.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "uploadId": upload_id, + } + ) + if needs_conversion is not UNSET: + field_dict["needsConversion"] = needs_conversion + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.upload_information_needs_conversion import ( + UploadInformationNeedsConversion, + ) + + d = src_dict.copy() + upload_id = d.pop("uploadId") + + _needs_conversion = d.pop("needsConversion", UNSET) + needs_conversion: Union[Unset, UploadInformationNeedsConversion] + if isinstance(_needs_conversion, Unset): + needs_conversion = UNSET + else: + needs_conversion = UploadInformationNeedsConversion.from_dict( + _needs_conversion + ) + + upload_information = cls( + upload_id=upload_id, + needs_conversion=needs_conversion, + ) + + upload_information.additional_properties = d + return 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 diff --git a/webknossos/webknossos/client/_generated/models/upload_information_needs_conversion.py b/webknossos/webknossos/client/_generated/models/upload_information_needs_conversion.py new file mode 100644 index 000000000..305e94117 --- /dev/null +++ b/webknossos/webknossos/client/_generated/models/upload_information_needs_conversion.py @@ -0,0 +1,43 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +T = TypeVar("T", bound="UploadInformationNeedsConversion") + + +@attr.s(auto_attribs=True) +class UploadInformationNeedsConversion: + """ """ + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + upload_information_needs_conversion = cls() + + upload_information_needs_conversion.additional_properties = d + return upload_information_needs_conversion + + @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