# 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 DmpField(object):
    _types = {
        "key": str,
        "value": str,
        "type": int,
    }

    def __init__(self, d=None):
        self.key: Optional[str] = None
        self.value: Optional[str] = None
        self.type: Optional[int] = None
        init(self, d, self._types)

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


class DmpFieldBuilder(object):
    def __init__(self) -> None:
        self._dmp_field = DmpField()

    def key(self, key: str) -> "DmpFieldBuilder":
        self._dmp_field.key = key
        return self

    def value(self, value: str) -> "DmpFieldBuilder":
        self._dmp_field.value = value
        return self

    def type(self, type: int) -> "DmpFieldBuilder":
        self._dmp_field.type = type
        return self

    def build(self) -> "DmpField":
        return self._dmp_field
