# 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 .company_version_data import CompanyVersionData
from .enum import Enum
from .enum import Enum
from .i18n import I18n
from .enum import Enum
from .i18n import I18n
from .currency import Currency
from .phone_number_and_area_code import PhoneNumberAndAreaCode
from .phone_number_and_area_code import PhoneNumberAndAreaCode
from .i18n import I18n
from .i18n import I18n
from .address import Address
from .address import Address


class CompanyTimeline(object):
    _types = {
        "company_version_data": List[CompanyVersionData],
        "type": Enum,
        "industry_list": List[Enum],
        "legal_representative": List[I18n],
        "post_code": str,
        "tax_payer_id": str,
        "confidential": bool,
        "sub_type_list": List[Enum],
        "branch_company": bool,
        "primary_manager": List[I18n],
        "currency": Currency,
        "phone": PhoneNumberAndAreaCode,
        "fax": PhoneNumberAndAreaCode,
        "registered_office_address": List[I18n],
        "office_address": List[I18n],
        "registered_office_address_info": Address,
        "office_address_info": Address,
    }

    def __init__(self, d=None):
        self.company_version_data: Optional[List[CompanyVersionData]] = None
        self.type: Optional[Enum] = None
        self.industry_list: Optional[List[Enum]] = None
        self.legal_representative: Optional[List[I18n]] = None
        self.post_code: Optional[str] = None
        self.tax_payer_id: Optional[str] = None
        self.confidential: Optional[bool] = None
        self.sub_type_list: Optional[List[Enum]] = None
        self.branch_company: Optional[bool] = None
        self.primary_manager: Optional[List[I18n]] = None
        self.currency: Optional[Currency] = None
        self.phone: Optional[PhoneNumberAndAreaCode] = None
        self.fax: Optional[PhoneNumberAndAreaCode] = None
        self.registered_office_address: Optional[List[I18n]] = None
        self.office_address: Optional[List[I18n]] = None
        self.registered_office_address_info: Optional[Address] = None
        self.office_address_info: Optional[Address] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "CompanyTimelineBuilder":
        return CompanyTimelineBuilder()


class CompanyTimelineBuilder(object):
    def __init__(self) -> None:
        self._company_timeline = CompanyTimeline()

    def company_version_data(self, company_version_data: List[CompanyVersionData]) -> "CompanyTimelineBuilder":
        self._company_timeline.company_version_data = company_version_data
        return self

    def type(self, type: Enum) -> "CompanyTimelineBuilder":
        self._company_timeline.type = type
        return self

    def industry_list(self, industry_list: List[Enum]) -> "CompanyTimelineBuilder":
        self._company_timeline.industry_list = industry_list
        return self

    def legal_representative(self, legal_representative: List[I18n]) -> "CompanyTimelineBuilder":
        self._company_timeline.legal_representative = legal_representative
        return self

    def post_code(self, post_code: str) -> "CompanyTimelineBuilder":
        self._company_timeline.post_code = post_code
        return self

    def tax_payer_id(self, tax_payer_id: str) -> "CompanyTimelineBuilder":
        self._company_timeline.tax_payer_id = tax_payer_id
        return self

    def confidential(self, confidential: bool) -> "CompanyTimelineBuilder":
        self._company_timeline.confidential = confidential
        return self

    def sub_type_list(self, sub_type_list: List[Enum]) -> "CompanyTimelineBuilder":
        self._company_timeline.sub_type_list = sub_type_list
        return self

    def branch_company(self, branch_company: bool) -> "CompanyTimelineBuilder":
        self._company_timeline.branch_company = branch_company
        return self

    def primary_manager(self, primary_manager: List[I18n]) -> "CompanyTimelineBuilder":
        self._company_timeline.primary_manager = primary_manager
        return self

    def currency(self, currency: Currency) -> "CompanyTimelineBuilder":
        self._company_timeline.currency = currency
        return self

    def phone(self, phone: PhoneNumberAndAreaCode) -> "CompanyTimelineBuilder":
        self._company_timeline.phone = phone
        return self

    def fax(self, fax: PhoneNumberAndAreaCode) -> "CompanyTimelineBuilder":
        self._company_timeline.fax = fax
        return self

    def registered_office_address(self, registered_office_address: List[I18n]) -> "CompanyTimelineBuilder":
        self._company_timeline.registered_office_address = registered_office_address
        return self

    def office_address(self, office_address: List[I18n]) -> "CompanyTimelineBuilder":
        self._company_timeline.office_address = office_address
        return self

    def registered_office_address_info(self, registered_office_address_info: Address) -> "CompanyTimelineBuilder":
        self._company_timeline.registered_office_address_info = registered_office_address_info
        return self

    def office_address_info(self, office_address_info: Address) -> "CompanyTimelineBuilder":
        self._company_timeline.office_address_info = office_address_info
        return self

    def build(self) -> "CompanyTimeline":
        return self._company_timeline
