# 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 RuntimeLogTag(object):
    _types = {
        "key": str,
        "value": str,
        "value_type": str,
        "uri": str,
        "attachs": Dict[str, str],
    }

    def __init__(self, d=None):
        self.key: Optional[str] = None
        self.value: Optional[str] = None
        self.value_type: Optional[str] = None
        self.uri: Optional[str] = None
        self.attachs: Optional[Dict[str, str]] = None
        init(self, d, self._types)

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


class RuntimeLogTagBuilder(object):
    def __init__(self) -> None:
        self._runtime_log_tag = RuntimeLogTag()

    def key(self, key: str) -> "RuntimeLogTagBuilder":
        self._runtime_log_tag.key = key
        return self

    def value(self, value: str) -> "RuntimeLogTagBuilder":
        self._runtime_log_tag.value = value
        return self

    def value_type(self, value_type: str) -> "RuntimeLogTagBuilder":
        self._runtime_log_tag.value_type = value_type
        return self

    def uri(self, uri: str) -> "RuntimeLogTagBuilder":
        self._runtime_log_tag.uri = uri
        return self

    def attachs(self, attachs: Dict[str, str]) -> "RuntimeLogTagBuilder":
        self._runtime_log_tag.attachs = attachs
        return self

    def build(self) -> "RuntimeLogTag":
        return self._runtime_log_tag
