# -*- 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 DeleteRecord(object):
    deleted = attr.ib(type=bool, default=None, metadata={'json': 'deleted'})
    record_id = attr.ib(type=str, default=None, metadata={'json': 'record_id'})


@to_json_decorator
@attr.s
class Person(object):
    id = attr.ib(type=str, default=None, metadata={'json': 'id'})
    name = attr.ib(type=str, default=None, metadata={'json': 'name'})
    en_name = attr.ib(type=str, default=None, metadata={'json': 'en_name'})
    email = attr.ib(type=str, default=None, metadata={'json': 'email'})


@to_json_decorator
@attr.s
class App(object):
    app_token = attr.ib(type=str, default=None, metadata={'json': 'app_token'})
    revision = attr.ib(type=int, default=None, metadata={'json': 'revision'})


@to_json_decorator
@attr.s
class AppTable(object):
    table_id = attr.ib(type=str, default=None, metadata={'json': 'table_id'})
    revision = attr.ib(type=int, default=None, metadata={'json': 'revision'})


@to_json_decorator
@attr.s
class AppTableField(object):
    field_id = attr.ib(type=str, default=None, metadata={'json': 'field_id'})
    field_name = attr.ib(type=str, default=None, metadata={'json': 'field_name'})
    type = attr.ib(type=int, default=None, metadata={'json': 'type'})
    property = attr.ib(type=Any, default=None, metadata={'json': 'property'})


@to_json_decorator
@attr.s
class AppTableRecord(object):
    record_id = attr.ib(type=str, default=None, metadata={'json': 'record_id'})
    fields = attr.ib(type=Dict[str, Any], default=None, metadata={'json': 'fields'})


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



@to_json_decorator
@attr.s
class AppTableRecordBatchDeleteReqBody(object):
    records = attr.ib(type=List[str], default=None, metadata={'json': 'records'})


@attr.s
class AppTableRecordBatchDeleteResult(object):
    records = attr.ib(type=List[DeleteRecord], default=None, metadata={'json': 'records'})


@to_json_decorator
@attr.s
class AppTableRecordBatchCreateReqBody(object):
    records = attr.ib(type=List[AppTableRecord], default=None, metadata={'json': 'records'})


@attr.s
class AppTableRecordBatchCreateResult(object):
    records = attr.ib(type=List[AppTableRecord], default=None, metadata={'json': 'records'})



@attr.s
class AppTableRecordGetResult(object):
    record = attr.ib(type=AppTableRecord, default=None, metadata={'json': 'record'})



@attr.s
class AppTableRecordUpdateResult(object):
    record = attr.ib(type=AppTableRecord, default=None, metadata={'json': 'record'})





@attr.s
class AppTableRecordListResult(object):
    has_more = attr.ib(type=bool, default=None, metadata={'json': 'has_more'})
    page_token = attr.ib(type=str, default=None, metadata={'json': 'page_token'})
    items = attr.ib(type=List[AppTableRecord], default=None, metadata={'json': 'items'})


@to_json_decorator
@attr.s
class AppTableRecordBatchUpdateReqBody(object):
    records = attr.ib(type=List[AppTableRecord], default=None, metadata={'json': 'records'})


@attr.s
class AppTableRecordBatchUpdateResult(object):
    records = attr.ib(type=List[AppTableRecord], default=None, metadata={'json': 'records'})



@attr.s
class AppTableRecordCreateResult(object):
    record = attr.ib(type=AppTableRecord, default=None, metadata={'json': 'record'})



@attr.s
class AppGetResult(object):
    app = attr.ib(type=App, default=None, metadata={'json': 'app'})



@attr.s
class AppTableListResult(object):
    has_more = attr.ib(type=bool, default=None, metadata={'json': 'has_more'})
    page_token = attr.ib(type=str, default=None, metadata={'json': 'page_token'})
    items = attr.ib(type=List[AppTable], default=None, metadata={'json': 'items'})



@attr.s
class AppTableFieldListResult(object):
    has_more = attr.ib(type=bool, default=None, metadata={'json': 'has_more'})
    page_token = attr.ib(type=str, default=None, metadata={'json': 'page_token'})
    items = attr.ib(type=List[AppTableField], default=None, metadata={'json': 'items'})