Changed API project name
This commit is contained in:
45
photosapi_client/models/__init__.py
Normal file
45
photosapi_client/models/__init__.py
Normal file
@@ -0,0 +1,45 @@
|
||||
""" Contains all the data models used in inputs/outputs """
|
||||
|
||||
from .album import Album
|
||||
from .album_modified import AlbumModified
|
||||
from .body_login_for_access_token_token_post import BodyLoginForAccessTokenTokenPost
|
||||
from .body_photo_upload_albums_album_photos_post import BodyPhotoUploadAlbumsAlbumPhotosPost
|
||||
from .body_user_create_users_post import BodyUserCreateUsersPost
|
||||
from .body_user_delete_users_me_delete import BodyUserDeleteUsersMeDelete
|
||||
from .body_video_upload_albums_album_videos_post import BodyVideoUploadAlbumsAlbumVideosPost
|
||||
from .http_validation_error import HTTPValidationError
|
||||
from .photo import Photo
|
||||
from .photo_public import PhotoPublic
|
||||
from .photo_search import PhotoSearch
|
||||
from .search_results_album import SearchResultsAlbum
|
||||
from .search_results_photo import SearchResultsPhoto
|
||||
from .search_results_video import SearchResultsVideo
|
||||
from .token import Token
|
||||
from .user import User
|
||||
from .validation_error import ValidationError
|
||||
from .video import Video
|
||||
from .video_public import VideoPublic
|
||||
from .video_search import VideoSearch
|
||||
|
||||
__all__ = (
|
||||
"Album",
|
||||
"AlbumModified",
|
||||
"BodyLoginForAccessTokenTokenPost",
|
||||
"BodyPhotoUploadAlbumsAlbumPhotosPost",
|
||||
"BodyUserCreateUsersPost",
|
||||
"BodyUserDeleteUsersMeDelete",
|
||||
"BodyVideoUploadAlbumsAlbumVideosPost",
|
||||
"HTTPValidationError",
|
||||
"Photo",
|
||||
"PhotoPublic",
|
||||
"PhotoSearch",
|
||||
"SearchResultsAlbum",
|
||||
"SearchResultsPhoto",
|
||||
"SearchResultsVideo",
|
||||
"Token",
|
||||
"User",
|
||||
"ValidationError",
|
||||
"Video",
|
||||
"VideoPublic",
|
||||
"VideoSearch",
|
||||
)
|
71
photosapi_client/models/album.py
Normal file
71
photosapi_client/models/album.py
Normal file
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="Album")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Album:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
name (str):
|
||||
title (str):
|
||||
"""
|
||||
|
||||
id: str
|
||||
name: str
|
||||
title: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
id = self.id
|
||||
name = self.name
|
||||
title = self.title
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"name": name,
|
||||
"title": title,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
name = d.pop("name")
|
||||
|
||||
title = d.pop("title")
|
||||
|
||||
album = cls(
|
||||
id=id,
|
||||
name=name,
|
||||
title=title,
|
||||
)
|
||||
|
||||
album.additional_properties = d
|
||||
return album
|
||||
|
||||
@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
|
74
photosapi_client/models/album_modified.py
Normal file
74
photosapi_client/models/album_modified.py
Normal file
@@ -0,0 +1,74 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="AlbumModified")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class AlbumModified:
|
||||
"""
|
||||
Attributes:
|
||||
name (str):
|
||||
title (str):
|
||||
cover (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
name: str
|
||||
title: str
|
||||
cover: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
name = self.name
|
||||
title = self.title
|
||||
cover = self.cover
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"name": name,
|
||||
"title": title,
|
||||
}
|
||||
)
|
||||
if cover is not UNSET:
|
||||
field_dict["cover"] = cover
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
name = d.pop("name")
|
||||
|
||||
title = d.pop("title")
|
||||
|
||||
cover = d.pop("cover", UNSET)
|
||||
|
||||
album_modified = cls(
|
||||
name=name,
|
||||
title=title,
|
||||
cover=cover,
|
||||
)
|
||||
|
||||
album_modified.additional_properties = d
|
||||
return album_modified
|
||||
|
||||
@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
|
@@ -0,0 +1,98 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="BodyLoginForAccessTokenTokenPost")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class BodyLoginForAccessTokenTokenPost:
|
||||
"""
|
||||
Attributes:
|
||||
username (str):
|
||||
password (str):
|
||||
grant_type (Union[Unset, str]):
|
||||
scope (Union[Unset, str]): Default: ''.
|
||||
client_id (Union[Unset, str]):
|
||||
client_secret (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
username: str
|
||||
password: str
|
||||
grant_type: Union[Unset, str] = UNSET
|
||||
scope: Union[Unset, str] = ""
|
||||
client_id: Union[Unset, str] = UNSET
|
||||
client_secret: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
username = self.username
|
||||
password = self.password
|
||||
grant_type = self.grant_type
|
||||
scope = self.scope
|
||||
client_id = self.client_id
|
||||
client_secret = self.client_secret
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"username": username,
|
||||
"password": password,
|
||||
}
|
||||
)
|
||||
if grant_type is not UNSET:
|
||||
field_dict["grant_type"] = grant_type
|
||||
if scope is not UNSET:
|
||||
field_dict["scope"] = scope
|
||||
if client_id is not UNSET:
|
||||
field_dict["client_id"] = client_id
|
||||
if client_secret is not UNSET:
|
||||
field_dict["client_secret"] = client_secret
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
username = d.pop("username")
|
||||
|
||||
password = d.pop("password")
|
||||
|
||||
grant_type = d.pop("grant_type", UNSET)
|
||||
|
||||
scope = d.pop("scope", UNSET)
|
||||
|
||||
client_id = d.pop("client_id", UNSET)
|
||||
|
||||
client_secret = d.pop("client_secret", UNSET)
|
||||
|
||||
body_login_for_access_token_token_post = cls(
|
||||
username=username,
|
||||
password=password,
|
||||
grant_type=grant_type,
|
||||
scope=scope,
|
||||
client_id=client_id,
|
||||
client_secret=client_secret,
|
||||
)
|
||||
|
||||
body_login_for_access_token_token_post.additional_properties = d
|
||||
return body_login_for_access_token_token_post
|
||||
|
||||
@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
|
@@ -0,0 +1,75 @@
|
||||
from io import BytesIO
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import File
|
||||
|
||||
T = TypeVar("T", bound="BodyPhotoUploadAlbumsAlbumPhotosPost")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class BodyPhotoUploadAlbumsAlbumPhotosPost:
|
||||
"""
|
||||
Attributes:
|
||||
file (File):
|
||||
"""
|
||||
|
||||
file: File
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
file = self.file.to_tuple()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"file": file,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> Dict[str, Any]:
|
||||
file = self.file.to_tuple()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(
|
||||
{key: (None, str(value).encode(), "text/plain") for key, value in self.additional_properties.items()}
|
||||
)
|
||||
field_dict.update(
|
||||
{
|
||||
"file": file,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
file = File(payload=BytesIO(d.pop("file")))
|
||||
|
||||
body_photo_upload_albums_album_photos_post = cls(
|
||||
file=file,
|
||||
)
|
||||
|
||||
body_photo_upload_albums_album_photos_post.additional_properties = d
|
||||
return body_photo_upload_albums_album_photos_post
|
||||
|
||||
@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
|
71
photosapi_client/models/body_user_create_users_post.py
Normal file
71
photosapi_client/models/body_user_create_users_post.py
Normal file
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="BodyUserCreateUsersPost")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class BodyUserCreateUsersPost:
|
||||
"""
|
||||
Attributes:
|
||||
user (str):
|
||||
email (str):
|
||||
password (str):
|
||||
"""
|
||||
|
||||
user: str
|
||||
email: str
|
||||
password: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
user = self.user
|
||||
email = self.email
|
||||
password = self.password
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"user": user,
|
||||
"email": email,
|
||||
"password": password,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
user = d.pop("user")
|
||||
|
||||
email = d.pop("email")
|
||||
|
||||
password = d.pop("password")
|
||||
|
||||
body_user_create_users_post = cls(
|
||||
user=user,
|
||||
email=email,
|
||||
password=password,
|
||||
)
|
||||
|
||||
body_user_create_users_post.additional_properties = d
|
||||
return body_user_create_users_post
|
||||
|
||||
@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
|
57
photosapi_client/models/body_user_delete_users_me_delete.py
Normal file
57
photosapi_client/models/body_user_delete_users_me_delete.py
Normal file
@@ -0,0 +1,57 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="BodyUserDeleteUsersMeDelete")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class BodyUserDeleteUsersMeDelete:
|
||||
"""
|
||||
Attributes:
|
||||
password (str):
|
||||
"""
|
||||
|
||||
password: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
password = self.password
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"password": password,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
password = d.pop("password")
|
||||
|
||||
body_user_delete_users_me_delete = cls(
|
||||
password=password,
|
||||
)
|
||||
|
||||
body_user_delete_users_me_delete.additional_properties = d
|
||||
return body_user_delete_users_me_delete
|
||||
|
||||
@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
|
@@ -0,0 +1,75 @@
|
||||
from io import BytesIO
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import File
|
||||
|
||||
T = TypeVar("T", bound="BodyVideoUploadAlbumsAlbumVideosPost")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class BodyVideoUploadAlbumsAlbumVideosPost:
|
||||
"""
|
||||
Attributes:
|
||||
file (File):
|
||||
"""
|
||||
|
||||
file: File
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
file = self.file.to_tuple()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"file": file,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
def to_multipart(self) -> Dict[str, Any]:
|
||||
file = self.file.to_tuple()
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(
|
||||
{key: (None, str(value).encode(), "text/plain") for key, value in self.additional_properties.items()}
|
||||
)
|
||||
field_dict.update(
|
||||
{
|
||||
"file": file,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
file = File(payload=BytesIO(d.pop("file")))
|
||||
|
||||
body_video_upload_albums_album_videos_post = cls(
|
||||
file=file,
|
||||
)
|
||||
|
||||
body_video_upload_albums_album_videos_post.additional_properties = d
|
||||
return body_video_upload_albums_album_videos_post
|
||||
|
||||
@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
|
74
photosapi_client/models/http_validation_error.py
Normal file
74
photosapi_client/models/http_validation_error.py
Normal file
@@ -0,0 +1,74 @@
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.validation_error import ValidationError
|
||||
|
||||
|
||||
T = TypeVar("T", bound="HTTPValidationError")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class HTTPValidationError:
|
||||
"""
|
||||
Attributes:
|
||||
detail (Union[Unset, List['ValidationError']]):
|
||||
"""
|
||||
|
||||
detail: Union[Unset, List["ValidationError"]] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
detail: Union[Unset, List[Dict[str, Any]]] = UNSET
|
||||
if not isinstance(self.detail, Unset):
|
||||
detail = []
|
||||
for detail_item_data in self.detail:
|
||||
detail_item = detail_item_data.to_dict()
|
||||
|
||||
detail.append(detail_item)
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if detail is not UNSET:
|
||||
field_dict["detail"] = detail
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.validation_error import ValidationError
|
||||
|
||||
d = src_dict.copy()
|
||||
detail = []
|
||||
_detail = d.pop("detail", UNSET)
|
||||
for detail_item_data in _detail or []:
|
||||
detail_item = ValidationError.from_dict(detail_item_data)
|
||||
|
||||
detail.append(detail_item)
|
||||
|
||||
http_validation_error = cls(
|
||||
detail=detail,
|
||||
)
|
||||
|
||||
http_validation_error.additional_properties = d
|
||||
return http_validation_error
|
||||
|
||||
@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
|
78
photosapi_client/models/photo.py
Normal file
78
photosapi_client/models/photo.py
Normal file
@@ -0,0 +1,78 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="Photo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Photo:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
album (str):
|
||||
hash_ (str):
|
||||
filename (str):
|
||||
"""
|
||||
|
||||
id: str
|
||||
album: str
|
||||
hash_: str
|
||||
filename: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
id = self.id
|
||||
album = self.album
|
||||
hash_ = self.hash_
|
||||
filename = self.filename
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"album": album,
|
||||
"hash": hash_,
|
||||
"filename": filename,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
album = d.pop("album")
|
||||
|
||||
hash_ = d.pop("hash")
|
||||
|
||||
filename = d.pop("filename")
|
||||
|
||||
photo = cls(
|
||||
id=id,
|
||||
album=album,
|
||||
hash_=hash_,
|
||||
filename=filename,
|
||||
)
|
||||
|
||||
photo.additional_properties = d
|
||||
return photo
|
||||
|
||||
@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
|
71
photosapi_client/models/photo_public.py
Normal file
71
photosapi_client/models/photo_public.py
Normal file
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="PhotoPublic")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PhotoPublic:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
caption (str):
|
||||
filename (str):
|
||||
"""
|
||||
|
||||
id: str
|
||||
caption: str
|
||||
filename: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
id = self.id
|
||||
caption = self.caption
|
||||
filename = self.filename
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"caption": caption,
|
||||
"filename": filename,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
caption = d.pop("caption")
|
||||
|
||||
filename = d.pop("filename")
|
||||
|
||||
photo_public = cls(
|
||||
id=id,
|
||||
caption=caption,
|
||||
filename=filename,
|
||||
)
|
||||
|
||||
photo_public.additional_properties = d
|
||||
return photo_public
|
||||
|
||||
@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
|
74
photosapi_client/models/photo_search.py
Normal file
74
photosapi_client/models/photo_search.py
Normal file
@@ -0,0 +1,74 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="PhotoSearch")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PhotoSearch:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
filename (str):
|
||||
caption (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
id: str
|
||||
filename: str
|
||||
caption: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
id = self.id
|
||||
filename = self.filename
|
||||
caption = self.caption
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"filename": filename,
|
||||
}
|
||||
)
|
||||
if caption is not UNSET:
|
||||
field_dict["caption"] = caption
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
filename = d.pop("filename")
|
||||
|
||||
caption = d.pop("caption", UNSET)
|
||||
|
||||
photo_search = cls(
|
||||
id=id,
|
||||
filename=filename,
|
||||
caption=caption,
|
||||
)
|
||||
|
||||
photo_search.additional_properties = d
|
||||
return photo_search
|
||||
|
||||
@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
|
83
photosapi_client/models/search_results_album.py
Normal file
83
photosapi_client/models/search_results_album.py
Normal file
@@ -0,0 +1,83 @@
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.album import Album
|
||||
|
||||
|
||||
T = TypeVar("T", bound="SearchResultsAlbum")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class SearchResultsAlbum:
|
||||
"""
|
||||
Attributes:
|
||||
results (List['Album']):
|
||||
next_page (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
results: List["Album"]
|
||||
next_page: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
next_page = self.next_page
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_page is not UNSET:
|
||||
field_dict["next_page"] = next_page
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.album import Album
|
||||
|
||||
d = src_dict.copy()
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = Album.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
next_page = d.pop("next_page", UNSET)
|
||||
|
||||
search_results_album = cls(
|
||||
results=results,
|
||||
next_page=next_page,
|
||||
)
|
||||
|
||||
search_results_album.additional_properties = d
|
||||
return search_results_album
|
||||
|
||||
@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
|
83
photosapi_client/models/search_results_photo.py
Normal file
83
photosapi_client/models/search_results_photo.py
Normal file
@@ -0,0 +1,83 @@
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.photo_search import PhotoSearch
|
||||
|
||||
|
||||
T = TypeVar("T", bound="SearchResultsPhoto")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class SearchResultsPhoto:
|
||||
"""
|
||||
Attributes:
|
||||
results (List['PhotoSearch']):
|
||||
next_page (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
results: List["PhotoSearch"]
|
||||
next_page: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
next_page = self.next_page
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_page is not UNSET:
|
||||
field_dict["next_page"] = next_page
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.photo_search import PhotoSearch
|
||||
|
||||
d = src_dict.copy()
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = PhotoSearch.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
next_page = d.pop("next_page", UNSET)
|
||||
|
||||
search_results_photo = cls(
|
||||
results=results,
|
||||
next_page=next_page,
|
||||
)
|
||||
|
||||
search_results_photo.additional_properties = d
|
||||
return search_results_photo
|
||||
|
||||
@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
|
83
photosapi_client/models/search_results_video.py
Normal file
83
photosapi_client/models/search_results_video.py
Normal file
@@ -0,0 +1,83 @@
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..models.video_search import VideoSearch
|
||||
|
||||
|
||||
T = TypeVar("T", bound="SearchResultsVideo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class SearchResultsVideo:
|
||||
"""
|
||||
Attributes:
|
||||
results (List['VideoSearch']):
|
||||
next_page (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
results: List["VideoSearch"]
|
||||
next_page: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
results = []
|
||||
for results_item_data in self.results:
|
||||
results_item = results_item_data.to_dict()
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
next_page = self.next_page
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"results": results,
|
||||
}
|
||||
)
|
||||
if next_page is not UNSET:
|
||||
field_dict["next_page"] = next_page
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
from ..models.video_search import VideoSearch
|
||||
|
||||
d = src_dict.copy()
|
||||
results = []
|
||||
_results = d.pop("results")
|
||||
for results_item_data in _results:
|
||||
results_item = VideoSearch.from_dict(results_item_data)
|
||||
|
||||
results.append(results_item)
|
||||
|
||||
next_page = d.pop("next_page", UNSET)
|
||||
|
||||
search_results_video = cls(
|
||||
results=results,
|
||||
next_page=next_page,
|
||||
)
|
||||
|
||||
search_results_video.additional_properties = d
|
||||
return search_results_video
|
||||
|
||||
@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
photosapi_client/models/token.py
Normal file
64
photosapi_client/models/token.py
Normal file
@@ -0,0 +1,64 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="Token")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Token:
|
||||
"""
|
||||
Attributes:
|
||||
access_token (str):
|
||||
token_type (str):
|
||||
"""
|
||||
|
||||
access_token: str
|
||||
token_type: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
access_token = self.access_token
|
||||
token_type = self.token_type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"access_token": access_token,
|
||||
"token_type": token_type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
access_token = d.pop("access_token")
|
||||
|
||||
token_type = d.pop("token_type")
|
||||
|
||||
token = cls(
|
||||
access_token=access_token,
|
||||
token_type=token_type,
|
||||
)
|
||||
|
||||
token.additional_properties = d
|
||||
return token
|
||||
|
||||
@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
|
75
photosapi_client/models/user.py
Normal file
75
photosapi_client/models/user.py
Normal file
@@ -0,0 +1,75 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="User")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class User:
|
||||
"""
|
||||
Attributes:
|
||||
user (str):
|
||||
email (Union[Unset, str]):
|
||||
disabled (Union[Unset, bool]):
|
||||
"""
|
||||
|
||||
user: str
|
||||
email: Union[Unset, str] = UNSET
|
||||
disabled: Union[Unset, bool] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
user = self.user
|
||||
email = self.email
|
||||
disabled = self.disabled
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"user": user,
|
||||
}
|
||||
)
|
||||
if email is not UNSET:
|
||||
field_dict["email"] = email
|
||||
if disabled is not UNSET:
|
||||
field_dict["disabled"] = disabled
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
user = d.pop("user")
|
||||
|
||||
email = d.pop("email", UNSET)
|
||||
|
||||
disabled = d.pop("disabled", UNSET)
|
||||
|
||||
user = cls(
|
||||
user=user,
|
||||
email=email,
|
||||
disabled=disabled,
|
||||
)
|
||||
|
||||
user.additional_properties = d
|
||||
return user
|
||||
|
||||
@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
|
87
photosapi_client/models/validation_error.py
Normal file
87
photosapi_client/models/validation_error.py
Normal file
@@ -0,0 +1,87 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="ValidationError")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ValidationError:
|
||||
"""
|
||||
Attributes:
|
||||
loc (List[Union[int, str]]):
|
||||
msg (str):
|
||||
type (str):
|
||||
"""
|
||||
|
||||
loc: List[Union[int, str]]
|
||||
msg: str
|
||||
type: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
loc = []
|
||||
for loc_item_data in self.loc:
|
||||
loc_item: Union[int, str]
|
||||
|
||||
loc_item = loc_item_data
|
||||
|
||||
loc.append(loc_item)
|
||||
|
||||
msg = self.msg
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"loc": loc,
|
||||
"msg": msg,
|
||||
"type": type,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
loc = []
|
||||
_loc = d.pop("loc")
|
||||
for loc_item_data in _loc:
|
||||
|
||||
def _parse_loc_item(data: object) -> Union[int, str]:
|
||||
return cast(Union[int, str], data)
|
||||
|
||||
loc_item = _parse_loc_item(loc_item_data)
|
||||
|
||||
loc.append(loc_item)
|
||||
|
||||
msg = d.pop("msg")
|
||||
|
||||
type = d.pop("type")
|
||||
|
||||
validation_error = cls(
|
||||
loc=loc,
|
||||
msg=msg,
|
||||
type=type,
|
||||
)
|
||||
|
||||
validation_error.additional_properties = d
|
||||
return validation_error
|
||||
|
||||
@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
|
78
photosapi_client/models/video.py
Normal file
78
photosapi_client/models/video.py
Normal file
@@ -0,0 +1,78 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="Video")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Video:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
album (str):
|
||||
hash_ (str):
|
||||
filename (str):
|
||||
"""
|
||||
|
||||
id: str
|
||||
album: str
|
||||
hash_: str
|
||||
filename: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
id = self.id
|
||||
album = self.album
|
||||
hash_ = self.hash_
|
||||
filename = self.filename
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"album": album,
|
||||
"hash": hash_,
|
||||
"filename": filename,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
album = d.pop("album")
|
||||
|
||||
hash_ = d.pop("hash")
|
||||
|
||||
filename = d.pop("filename")
|
||||
|
||||
video = cls(
|
||||
id=id,
|
||||
album=album,
|
||||
hash_=hash_,
|
||||
filename=filename,
|
||||
)
|
||||
|
||||
video.additional_properties = d
|
||||
return video
|
||||
|
||||
@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
|
71
photosapi_client/models/video_public.py
Normal file
71
photosapi_client/models/video_public.py
Normal file
@@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar
|
||||
|
||||
import attr
|
||||
|
||||
T = TypeVar("T", bound="VideoPublic")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class VideoPublic:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
caption (str):
|
||||
filename (str):
|
||||
"""
|
||||
|
||||
id: str
|
||||
caption: str
|
||||
filename: str
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
id = self.id
|
||||
caption = self.caption
|
||||
filename = self.filename
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"caption": caption,
|
||||
"filename": filename,
|
||||
}
|
||||
)
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
caption = d.pop("caption")
|
||||
|
||||
filename = d.pop("filename")
|
||||
|
||||
video_public = cls(
|
||||
id=id,
|
||||
caption=caption,
|
||||
filename=filename,
|
||||
)
|
||||
|
||||
video_public.additional_properties = d
|
||||
return video_public
|
||||
|
||||
@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
|
74
photosapi_client/models/video_search.py
Normal file
74
photosapi_client/models/video_search.py
Normal file
@@ -0,0 +1,74 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="VideoSearch")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class VideoSearch:
|
||||
"""
|
||||
Attributes:
|
||||
id (str):
|
||||
filename (str):
|
||||
caption (Union[Unset, str]):
|
||||
"""
|
||||
|
||||
id: str
|
||||
filename: str
|
||||
caption: Union[Unset, str] = UNSET
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
id = self.id
|
||||
filename = self.filename
|
||||
caption = self.caption
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update(
|
||||
{
|
||||
"id": id,
|
||||
"filename": filename,
|
||||
}
|
||||
)
|
||||
if caption is not UNSET:
|
||||
field_dict["caption"] = caption
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
id = d.pop("id")
|
||||
|
||||
filename = d.pop("filename")
|
||||
|
||||
caption = d.pop("caption", UNSET)
|
||||
|
||||
video_search = cls(
|
||||
id=id,
|
||||
filename=filename,
|
||||
caption=caption,
|
||||
)
|
||||
|
||||
video_search.additional_properties = d
|
||||
return video_search
|
||||
|
||||
@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
|
Reference in New Issue
Block a user