# 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 .train_invoice import TrainInvoice


class RecognizeTrainInvoiceResponseBody(object):
    _types = {
        "train_invoices": List[TrainInvoice],
    }

    def __init__(self, d=None):
        self.train_invoices: Optional[List[TrainInvoice]] = None
        init(self, d, self._types)

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


class RecognizeTrainInvoiceResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._recognize_train_invoice_response_body = RecognizeTrainInvoiceResponseBody()

    def train_invoices(self, train_invoices: List[TrainInvoice]) -> "RecognizeTrainInvoiceResponseBodyBuilder":
        self._recognize_train_invoice_response_body.train_invoices = train_invoices
        return self

    def build(self) -> "RecognizeTrainInvoiceResponseBody":
        return self._recognize_train_invoice_response_body
