127 lines
4.8 KiB
Python
127 lines
4.8 KiB
Python
# Code generated by Lark OpenAPI.
|
|
|
|
from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
|
|
from lark_oapi.core.construct import init
|
|
from .collection_data_period import CollectionDataPeriod
|
|
from .collection_item_value import CollectionItemValue
|
|
from .collection_template_snapshot import CollectionTemplateSnapshot
|
|
from .employee_info import EmployeeInfo
|
|
from .employee_info import EmployeeInfo
|
|
from .calendar_period import CalendarPeriod
|
|
|
|
|
|
class CollectionData(object):
|
|
_types = {
|
|
"id": str,
|
|
"collection_type": int,
|
|
"data_period": CollectionDataPeriod,
|
|
"currency_id": str,
|
|
"currency_code": str,
|
|
"collection_item_values": List[CollectionItemValue],
|
|
"template_snapshot": CollectionTemplateSnapshot,
|
|
"created_at": str,
|
|
"modified_at": str,
|
|
"creator_info": EmployeeInfo,
|
|
"modifier_info": EmployeeInfo,
|
|
"calendar_period": CalendarPeriod,
|
|
"effective_time": str,
|
|
"source_activity_id": str,
|
|
"status": int,
|
|
"related_data_id": str,
|
|
}
|
|
|
|
def __init__(self, d=None):
|
|
self.id: Optional[str] = None
|
|
self.collection_type: Optional[int] = None
|
|
self.data_period: Optional[CollectionDataPeriod] = None
|
|
self.currency_id: Optional[str] = None
|
|
self.currency_code: Optional[str] = None
|
|
self.collection_item_values: Optional[List[CollectionItemValue]] = None
|
|
self.template_snapshot: Optional[CollectionTemplateSnapshot] = None
|
|
self.created_at: Optional[str] = None
|
|
self.modified_at: Optional[str] = None
|
|
self.creator_info: Optional[EmployeeInfo] = None
|
|
self.modifier_info: Optional[EmployeeInfo] = None
|
|
self.calendar_period: Optional[CalendarPeriod] = None
|
|
self.effective_time: Optional[str] = None
|
|
self.source_activity_id: Optional[str] = None
|
|
self.status: Optional[int] = None
|
|
self.related_data_id: Optional[str] = None
|
|
init(self, d, self._types)
|
|
|
|
@staticmethod
|
|
def builder() -> "CollectionDataBuilder":
|
|
return CollectionDataBuilder()
|
|
|
|
|
|
class CollectionDataBuilder(object):
|
|
def __init__(self) -> None:
|
|
self._collection_data = CollectionData()
|
|
|
|
def id(self, id: str) -> "CollectionDataBuilder":
|
|
self._collection_data.id = id
|
|
return self
|
|
|
|
def collection_type(self, collection_type: int) -> "CollectionDataBuilder":
|
|
self._collection_data.collection_type = collection_type
|
|
return self
|
|
|
|
def data_period(self, data_period: CollectionDataPeriod) -> "CollectionDataBuilder":
|
|
self._collection_data.data_period = data_period
|
|
return self
|
|
|
|
def currency_id(self, currency_id: str) -> "CollectionDataBuilder":
|
|
self._collection_data.currency_id = currency_id
|
|
return self
|
|
|
|
def currency_code(self, currency_code: str) -> "CollectionDataBuilder":
|
|
self._collection_data.currency_code = currency_code
|
|
return self
|
|
|
|
def collection_item_values(self, collection_item_values: List[CollectionItemValue]) -> "CollectionDataBuilder":
|
|
self._collection_data.collection_item_values = collection_item_values
|
|
return self
|
|
|
|
def template_snapshot(self, template_snapshot: CollectionTemplateSnapshot) -> "CollectionDataBuilder":
|
|
self._collection_data.template_snapshot = template_snapshot
|
|
return self
|
|
|
|
def created_at(self, created_at: str) -> "CollectionDataBuilder":
|
|
self._collection_data.created_at = created_at
|
|
return self
|
|
|
|
def modified_at(self, modified_at: str) -> "CollectionDataBuilder":
|
|
self._collection_data.modified_at = modified_at
|
|
return self
|
|
|
|
def creator_info(self, creator_info: EmployeeInfo) -> "CollectionDataBuilder":
|
|
self._collection_data.creator_info = creator_info
|
|
return self
|
|
|
|
def modifier_info(self, modifier_info: EmployeeInfo) -> "CollectionDataBuilder":
|
|
self._collection_data.modifier_info = modifier_info
|
|
return self
|
|
|
|
def calendar_period(self, calendar_period: CalendarPeriod) -> "CollectionDataBuilder":
|
|
self._collection_data.calendar_period = calendar_period
|
|
return self
|
|
|
|
def effective_time(self, effective_time: str) -> "CollectionDataBuilder":
|
|
self._collection_data.effective_time = effective_time
|
|
return self
|
|
|
|
def source_activity_id(self, source_activity_id: str) -> "CollectionDataBuilder":
|
|
self._collection_data.source_activity_id = source_activity_id
|
|
return self
|
|
|
|
def status(self, status: int) -> "CollectionDataBuilder":
|
|
self._collection_data.status = status
|
|
return self
|
|
|
|
def related_data_id(self, related_data_id: str) -> "CollectionDataBuilder":
|
|
self._collection_data.related_data_id = related_data_id
|
|
return self
|
|
|
|
def build(self) -> "CollectionData":
|
|
return self._collection_data
|