# 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 AgencySupplierTalentProtectTime(object):
    _types = {
        "day": int,
        "use_default": bool,
        "forever": bool,
    }

    def __init__(self, d=None):
        self.day: Optional[int] = None
        self.use_default: Optional[bool] = None
        self.forever: Optional[bool] = None
        init(self, d, self._types)

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


class AgencySupplierTalentProtectTimeBuilder(object):
    def __init__(self) -> None:
        self._agency_supplier_talent_protect_time = AgencySupplierTalentProtectTime()

    def day(self, day: int) -> "AgencySupplierTalentProtectTimeBuilder":
        self._agency_supplier_talent_protect_time.day = day
        return self

    def use_default(self, use_default: bool) -> "AgencySupplierTalentProtectTimeBuilder":
        self._agency_supplier_talent_protect_time.use_default = use_default
        return self

    def forever(self, forever: bool) -> "AgencySupplierTalentProtectTimeBuilder":
        self._agency_supplier_talent_protect_time.forever = forever
        return self

    def build(self) -> "AgencySupplierTalentProtectTime":
        return self._agency_supplier_talent_protect_time
