1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
# generated by datamodel-codegen:
# filename: not_real_string.json
# timestamp: 2019-07-26T00:00:00+00:00
from __future__ import annotations
from typing import List, Optional
from pydantic import BaseModel, Field, constr
class Tweet(BaseModel):
author_id: Optional[str] = None
class Users(BaseModel):
__root__: List[str]
class FileRequest(BaseModel):
file_hash: constr(regex=r'^[a-fA-F\d]{32}$', min_length=32, max_length=32) = Field(
..., description='For file'
)
class ImageRequest(BaseModel):
image_hash: Optional[
constr(regex=r'^[a-fA-F\d]{32}$', min_length=64, max_length=64)
] = Field(None, description='For image')
class FileHashes(BaseModel):
__root__: List[constr(regex=r'^[a-fA-F\d]{32}$', min_length=32, max_length=32)]
|