# 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 Security(object):
    _types = {
        "allowed_ips": List[str],
        "h5_trusted_domains": List[str],
    }

    def __init__(self, d=None):
        self.allowed_ips: Optional[List[str]] = None
        self.h5_trusted_domains: Optional[List[str]] = None
        init(self, d, self._types)

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


class SecurityBuilder(object):
    def __init__(self) -> None:
        self._security = Security()

    def allowed_ips(self, allowed_ips: List[str]) -> "SecurityBuilder":
        self._security.allowed_ips = allowed_ips
        return self

    def h5_trusted_domains(self, h5_trusted_domains: List[str]) -> "SecurityBuilder":
        self._security.h5_trusted_domains = h5_trusted_domains
        return self

    def build(self) -> "Security":
        return self._security
