# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .signature_custom_field_value import SignatureCustomFieldValue


class SignatureCustomFieldV2(object):
    _types = {
        "key": str,
        "value": SignatureCustomFieldValue,
    }

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

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


class SignatureCustomFieldV2Builder(object):
    def __init__(self) -> None:
        self._signature_custom_field_v2 = SignatureCustomFieldV2()

    def key(self, key: str) -> "SignatureCustomFieldV2Builder":
        self._signature_custom_field_v2.key = key
        return self

    def value(self, value: SignatureCustomFieldValue) -> "SignatureCustomFieldV2Builder":
        self._signature_custom_field_v2.value = value
        return self

    def build(self) -> "SignatureCustomFieldV2":
        return self._signature_custom_field_v2
