# 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 AntiCheatConfig(object):
    _types = {
        "intercept_suspected_cheat_punch": bool,
        "check_cheat_software_punch": bool,
        "check_buddy_punch": bool,
        "check_simulate_wifi_punch": bool,
        "check_change_device_punch": bool,
        "allow_change_device_num": int,
        "suspected_cheat_handle_method": int,
    }

    def __init__(self, d=None):
        self.intercept_suspected_cheat_punch: Optional[bool] = None
        self.check_cheat_software_punch: Optional[bool] = None
        self.check_buddy_punch: Optional[bool] = None
        self.check_simulate_wifi_punch: Optional[bool] = None
        self.check_change_device_punch: Optional[bool] = None
        self.allow_change_device_num: Optional[int] = None
        self.suspected_cheat_handle_method: Optional[int] = None
        init(self, d, self._types)

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


class AntiCheatConfigBuilder(object):
    def __init__(self) -> None:
        self._anti_cheat_config = AntiCheatConfig()

    def intercept_suspected_cheat_punch(self, intercept_suspected_cheat_punch: bool) -> "AntiCheatConfigBuilder":
        self._anti_cheat_config.intercept_suspected_cheat_punch = intercept_suspected_cheat_punch
        return self

    def check_cheat_software_punch(self, check_cheat_software_punch: bool) -> "AntiCheatConfigBuilder":
        self._anti_cheat_config.check_cheat_software_punch = check_cheat_software_punch
        return self

    def check_buddy_punch(self, check_buddy_punch: bool) -> "AntiCheatConfigBuilder":
        self._anti_cheat_config.check_buddy_punch = check_buddy_punch
        return self

    def check_simulate_wifi_punch(self, check_simulate_wifi_punch: bool) -> "AntiCheatConfigBuilder":
        self._anti_cheat_config.check_simulate_wifi_punch = check_simulate_wifi_punch
        return self

    def check_change_device_punch(self, check_change_device_punch: bool) -> "AntiCheatConfigBuilder":
        self._anti_cheat_config.check_change_device_punch = check_change_device_punch
        return self

    def allow_change_device_num(self, allow_change_device_num: int) -> "AntiCheatConfigBuilder":
        self._anti_cheat_config.allow_change_device_num = allow_change_device_num
        return self

    def suspected_cheat_handle_method(self, suspected_cheat_handle_method: int) -> "AntiCheatConfigBuilder":
        self._anti_cheat_config.suspected_cheat_handle_method = suspected_cheat_handle_method
        return self

    def build(self) -> "AntiCheatConfig":
        return self._anti_cheat_config
