# 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 AbnormalReasonElement(object):
    _types = {
        "tag": str,
        "text": str,
        "href": str,
    }

    def __init__(self, d=None):
        self.tag: Optional[str] = None
        self.text: Optional[str] = None
        self.href: Optional[str] = None
        init(self, d, self._types)

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


class AbnormalReasonElementBuilder(object):
    def __init__(self) -> None:
        self._abnormal_reason_element = AbnormalReasonElement()

    def tag(self, tag: str) -> "AbnormalReasonElementBuilder":
        self._abnormal_reason_element.tag = tag
        return self

    def text(self, text: str) -> "AbnormalReasonElementBuilder":
        self._abnormal_reason_element.text = text
        return self

    def href(self, href: str) -> "AbnormalReasonElementBuilder":
        self._abnormal_reason_element.href = href
        return self

    def build(self) -> "AbnormalReasonElement":
        return self._abnormal_reason_element
