# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init
from .eco_exam_create_event_mobile import EcoExamCreateEventMobile


class EcoExamCreateEventCandidateInfo(object):
    _types = {
        "name": str,
        "mobile": EcoExamCreateEventMobile,
        "email": str,
    }

    def __init__(self, d=None):
        self.name: Optional[str] = None
        self.mobile: Optional[EcoExamCreateEventMobile] = None
        self.email: Optional[str] = None
        init(self, d, self._types)

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


class EcoExamCreateEventCandidateInfoBuilder(object):
    def __init__(self) -> None:
        self._eco_exam_create_event_candidate_info = EcoExamCreateEventCandidateInfo()

    def name(self, name: str) -> "EcoExamCreateEventCandidateInfoBuilder":
        self._eco_exam_create_event_candidate_info.name = name
        return self

    def mobile(self, mobile: EcoExamCreateEventMobile) -> "EcoExamCreateEventCandidateInfoBuilder":
        self._eco_exam_create_event_candidate_info.mobile = mobile
        return self

    def email(self, email: str) -> "EcoExamCreateEventCandidateInfoBuilder":
        self._eco_exam_create_event_candidate_info.email = email
        return self

    def build(self) -> "EcoExamCreateEventCandidateInfo":
        return self._eco_exam_create_event_candidate_info
