# 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 .operation_log_entity_field import OperationLogEntityField


class OperationLogEntity(object):
    _types = {
        "opt_type": str,
        "fields": List[OperationLogEntityField],
        "employment_id": str,
    }

    def __init__(self, d=None):
        self.opt_type: Optional[str] = None
        self.fields: Optional[List[OperationLogEntityField]] = None
        self.employment_id: Optional[str] = None
        init(self, d, self._types)

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


class OperationLogEntityBuilder(object):
    def __init__(self) -> None:
        self._operation_log_entity = OperationLogEntity()

    def opt_type(self, opt_type: str) -> "OperationLogEntityBuilder":
        self._operation_log_entity.opt_type = opt_type
        return self

    def fields(self, fields: List[OperationLogEntityField]) -> "OperationLogEntityBuilder":
        self._operation_log_entity.fields = fields
        return self

    def employment_id(self, employment_id: str) -> "OperationLogEntityBuilder":
        self._operation_log_entity.employment_id = employment_id
        return self

    def build(self) -> "OperationLogEntity":
        return self._operation_log_entity
