# 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 .enum import Enum


class SignatureTemplateCommonFieldInfo(object):
    _types = {
        "source": Enum,
        "apiname": str,
    }

    def __init__(self, d=None):
        self.source: Optional[Enum] = None
        self.apiname: Optional[str] = None
        init(self, d, self._types)

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


class SignatureTemplateCommonFieldInfoBuilder(object):
    def __init__(self) -> None:
        self._signature_template_common_field_info = SignatureTemplateCommonFieldInfo()

    def source(self, source: Enum) -> "SignatureTemplateCommonFieldInfoBuilder":
        self._signature_template_common_field_info.source = source
        return self

    def apiname(self, apiname: str) -> "SignatureTemplateCommonFieldInfoBuilder":
        self._signature_template_common_field_info.apiname = apiname
        return self

    def build(self) -> "SignatureTemplateCommonFieldInfo":
        return self._signature_template_common_field_info
