# 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 CoverOption(object):
    _types = {
        "bus_type": int,
        "platform": int,
        "width": str,
        "height": str,
        "policy": int,
    }

    def __init__(self, d=None):
        self.bus_type: Optional[int] = None
        self.platform: Optional[int] = None
        self.width: Optional[str] = None
        self.height: Optional[str] = None
        self.policy: Optional[int] = None
        init(self, d, self._types)

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


class CoverOptionBuilder(object):
    def __init__(self) -> None:
        self._cover_option = CoverOption()

    def bus_type(self, bus_type: int) -> "CoverOptionBuilder":
        self._cover_option.bus_type = bus_type
        return self

    def platform(self, platform: int) -> "CoverOptionBuilder":
        self._cover_option.platform = platform
        return self

    def width(self, width: str) -> "CoverOptionBuilder":
        self._cover_option.width = width
        return self

    def height(self, height: str) -> "CoverOptionBuilder":
        self._cover_option.height = height
        return self

    def policy(self, policy: int) -> "CoverOptionBuilder":
        self._cover_option.policy = policy
        return self

    def build(self) -> "CoverOption":
        return self._cover_option
