# 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 .i18n import I18n
from .country_region import CountryRegion


class PayGroup(object):
    _types = {
        "pay_group_id": str,
        "name": I18n,
        "code": str,
        "status": str,
        "country_region": CountryRegion,
    }

    def __init__(self, d=None):
        self.pay_group_id: Optional[str] = None
        self.name: Optional[I18n] = None
        self.code: Optional[str] = None
        self.status: Optional[str] = None
        self.country_region: Optional[CountryRegion] = None
        init(self, d, self._types)

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


class PayGroupBuilder(object):
    def __init__(self) -> None:
        self._pay_group = PayGroup()

    def pay_group_id(self, pay_group_id: str) -> "PayGroupBuilder":
        self._pay_group.pay_group_id = pay_group_id
        return self

    def name(self, name: I18n) -> "PayGroupBuilder":
        self._pay_group.name = name
        return self

    def code(self, code: str) -> "PayGroupBuilder":
        self._pay_group.code = code
        return self

    def status(self, status: str) -> "PayGroupBuilder":
        self._pay_group.status = status
        return self

    def country_region(self, country_region: CountryRegion) -> "PayGroupBuilder":
        self._pay_group.country_region = country_region
        return self

    def build(self) -> "PayGroup":
        return self._pay_group
