# -*- coding: UTF-8 -*-
# Code generated by lark suite oapi sdk gen

from typing import List, Dict, Any
from ....utils.dt import to_json_decorator
import attr




@to_json_decorator
@attr.s
class File(object):
    file_token = attr.ib(type=str, default=None, metadata={'json': 'file_token'})
    file_name = attr.ib(type=str, default=None, metadata={'json': 'file_name'})
    size = attr.ib(type=int, default=None, metadata={'json': 'size'})
    mime_type = attr.ib(type=str, default=None, metadata={'json': 'mime_type'})


@to_json_decorator
@attr.s
class Media(object):
    file_token = attr.ib(type=str, default=None, metadata={'json': 'file_token'})
    file_name = attr.ib(type=str, default=None, metadata={'json': 'file_name'})
    size = attr.ib(type=int, default=None, metadata={'json': 'size'})
    mime_type = attr.ib(type=str, default=None, metadata={'json': 'mime_type'})


@to_json_decorator
@attr.s
class TmpDownloadUrl(object):
    file_token = attr.ib(type=str, default=None, metadata={'json': 'file_token'})
    tmp_download_url = attr.ib(type=str, default=None, metadata={'json': 'tmp_download_url'})


@to_json_decorator
@attr.s
class UploadInfo(object):
    file_name = attr.ib(type=str, default=None, metadata={'json': 'file_name'})
    parent_type = attr.ib(type=str, default=None, metadata={'json': 'parent_type'})
    parent_node = attr.ib(type=str, default=None, metadata={'json': 'parent_node'})
    size = attr.ib(type=int, default=None, metadata={'json': 'size'})


@to_json_decorator
@attr.s
class UserId(object):
    user_id = attr.ib(type=str, default=None, metadata={'json': 'user_id'})
    open_id = attr.ib(type=str, default=None, metadata={'json': 'open_id'})
    union_id = attr.ib(type=str, default=None, metadata={'json': 'union_id'})




@attr.s
class MediaBatchGetTmpDownloadUrlResult(object):
    tmp_download_urls = attr.ib(type=List[TmpDownloadUrl], default=None, metadata={'json': 'tmp_download_urls'})



@attr.s
class MediaUploadAllResult(object):
    file_token = attr.ib(type=str, default=None, metadata={'json': 'file_token'})



@attr.s
class FileUploadAllResult(object):
    file_token = attr.ib(type=str, default=None, metadata={'json': 'file_token'})


@to_json_decorator
@attr.s
class FileUploadFinishReqBody(object):
    upload_id = attr.ib(type=str, default=None, metadata={'json': 'upload_id'})
    block_num = attr.ib(type=int, default=None, metadata={'json': 'block_num'})


@attr.s
class FileUploadFinishResult(object):
    file_token = attr.ib(type=str, default=None, metadata={'json': 'file_token'})


@to_json_decorator
@attr.s
class MediaUploadFinishReqBody(object):
    upload_id = attr.ib(type=str, default=None, metadata={'json': 'upload_id'})
    block_num = attr.ib(type=int, default=None, metadata={'json': 'block_num'})


@attr.s
class MediaUploadFinishResult(object):
    file_token = attr.ib(type=str, default=None, metadata={'json': 'file_token'})







@attr.s
class FileUploadPrepareResult(object):
    upload_id = attr.ib(type=str, default=None, metadata={'json': 'upload_id'})
    block_size = attr.ib(type=int, default=None, metadata={'json': 'block_size'})
    block_num = attr.ib(type=int, default=None, metadata={'json': 'block_num'})



@attr.s
class MediaUploadPrepareResult(object):
    upload_id = attr.ib(type=str, default=None, metadata={'json': 'upload_id'})
    block_size = attr.ib(type=int, default=None, metadata={'json': 'block_size'})
    block_num = attr.ib(type=int, default=None, metadata={'json': 'block_num'})