# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .driving_entity import DrivingEntity


class DrvingLicense(object):
    _types = {
        "entities": List[DrivingEntity],
    }

    def __init__(self, d=None):
        self.entities: Optional[List[DrivingEntity]] = None
        init(self, d, self._types)

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


class DrvingLicenseBuilder(object):
    def __init__(self) -> None:
        self._drving_license = DrvingLicense()

    def entities(self, entities: List[DrivingEntity]) -> "DrvingLicenseBuilder":
        self._drving_license.entities = entities
        return self

    def build(self) -> "DrvingLicense":
        return self._drving_license
