# 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 .write_user_group_scope_fail_user_data import WriteUserGroupScopeFailUserData


class WriteUserGroupScopeData(object):
    _types = {
        "success_user_ids": List[str],
        "fail_user_datas": List[WriteUserGroupScopeFailUserData],
    }

    def __init__(self, d=None):
        self.success_user_ids: Optional[List[str]] = None
        self.fail_user_datas: Optional[List[WriteUserGroupScopeFailUserData]] = None
        init(self, d, self._types)

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


class WriteUserGroupScopeDataBuilder(object):
    def __init__(self) -> None:
        self._write_user_group_scope_data = WriteUserGroupScopeData()

    def success_user_ids(self, success_user_ids: List[str]) -> "WriteUserGroupScopeDataBuilder":
        self._write_user_group_scope_data.success_user_ids = success_user_ids
        return self

    def fail_user_datas(self,
                        fail_user_datas: List[WriteUserGroupScopeFailUserData]) -> "WriteUserGroupScopeDataBuilder":
        self._write_user_group_scope_data.fail_user_datas = fail_user_datas
        return self

    def build(self) -> "WriteUserGroupScopeData":
        return self._write_user_group_scope_data
