# 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 CollectionItemValue(object):
    _types = {
        "item_id": str,
        "value": str,
        "field_type": int,
        "currency_id": str,
        "currency_code": str,
    }

    def __init__(self, d=None):
        self.item_id: Optional[str] = None
        self.value: Optional[str] = None
        self.field_type: Optional[int] = None
        self.currency_id: Optional[str] = None
        self.currency_code: Optional[str] = None
        init(self, d, self._types)

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


class CollectionItemValueBuilder(object):
    def __init__(self) -> None:
        self._collection_item_value = CollectionItemValue()

    def item_id(self, item_id: str) -> "CollectionItemValueBuilder":
        self._collection_item_value.item_id = item_id
        return self

    def value(self, value: str) -> "CollectionItemValueBuilder":
        self._collection_item_value.value = value
        return self

    def field_type(self, field_type: int) -> "CollectionItemValueBuilder":
        self._collection_item_value.field_type = field_type
        return self

    def currency_id(self, currency_id: str) -> "CollectionItemValueBuilder":
        self._collection_item_value.currency_id = currency_id
        return self

    def currency_code(self, currency_code: str) -> "CollectionItemValueBuilder":
        self._collection_item_value.currency_code = currency_code
        return self

    def build(self) -> "CollectionItemValue":
        return self._collection_item_value
