# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class ExportJob(object):
    _types = {
        "file_extension": str,
        "token": str,
        "type": str,
        "file_name": str,
        "file_token": str,
        "job_error_msg": str,
        "job_status": int,
    }

    def __init__(self, d=None):
        self.file_extension: Optional[str] = None
        self.token: Optional[str] = None
        self.type: Optional[str] = None
        self.file_name: Optional[str] = None
        self.file_token: Optional[str] = None
        self.job_error_msg: Optional[str] = None
        self.job_status: Optional[int] = None
        init(self, d, self._types)

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


class ExportJobBuilder(object):
    def __init__(self) -> None:
        self._export_job = ExportJob()

    def file_extension(self, file_extension: str) -> "ExportJobBuilder":
        self._export_job.file_extension = file_extension
        return self

    def token(self, token: str) -> "ExportJobBuilder":
        self._export_job.token = token
        return self

    def type(self, type: str) -> "ExportJobBuilder":
        self._export_job.type = type
        return self

    def file_name(self, file_name: str) -> "ExportJobBuilder":
        self._export_job.file_name = file_name
        return self

    def file_token(self, file_token: str) -> "ExportJobBuilder":
        self._export_job.file_token = file_token
        return self

    def job_error_msg(self, job_error_msg: str) -> "ExportJobBuilder":
        self._export_job.job_error_msg = job_error_msg
        return self

    def job_status(self, job_status: int) -> "ExportJobBuilder":
        self._export_job.job_status = job_status
        return self

    def build(self) -> "ExportJob":
        return self._export_job
