# 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 .qr_code_dimension import QrCodeDimension
from .qr_code_value import QrCodeValue


class QrCodeDimensionValue(object):
    _types = {
        "dimension": QrCodeDimension,
        "value": QrCodeValue,
    }

    def __init__(self, d=None):
        self.dimension: Optional[QrCodeDimension] = None
        self.value: Optional[QrCodeValue] = None
        init(self, d, self._types)

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


class QrCodeDimensionValueBuilder(object):
    def __init__(self) -> None:
        self._qr_code_dimension_value = QrCodeDimensionValue()

    def dimension(self, dimension: QrCodeDimension) -> "QrCodeDimensionValueBuilder":
        self._qr_code_dimension_value.dimension = dimension
        return self

    def value(self, value: QrCodeValue) -> "QrCodeDimensionValueBuilder":
        self._qr_code_dimension_value.value = value
        return self

    def build(self) -> "QrCodeDimensionValue":
        return self._qr_code_dimension_value
