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

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

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


class CustomFieldsBuilder(object):
    def __init__(self) -> None:
        self._custom_fields = CustomFields()

    def key(self, key: str) -> "CustomFieldsBuilder":
        self._custom_fields.key = key
        return self

    def label(self, label: str) -> "CustomFieldsBuilder":
        self._custom_fields.label = label
        return self

    def type(self, type: str) -> "CustomFieldsBuilder":
        self._custom_fields.type = type
        return self

    def value(self, value: str) -> "CustomFieldsBuilder":
        self._custom_fields.value = value
        return self

    def build(self) -> "CustomFields":
        return self._custom_fields
