# 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 .user_id import UserId


class ApplicationEventOwner(object):
    _types = {
        "type": int,
        "name": str,
        "help_desk": str,
        "email": str,
        "phone": str,
        "owner_id": UserId,
        "customer_service_account": str,
    }

    def __init__(self, d=None):
        self.type: Optional[int] = None
        self.name: Optional[str] = None
        self.help_desk: Optional[str] = None
        self.email: Optional[str] = None
        self.phone: Optional[str] = None
        self.owner_id: Optional[UserId] = None
        self.customer_service_account: Optional[str] = None
        init(self, d, self._types)

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


class ApplicationEventOwnerBuilder(object):
    def __init__(self) -> None:
        self._application_event_owner = ApplicationEventOwner()

    def type(self, type: int) -> "ApplicationEventOwnerBuilder":
        self._application_event_owner.type = type
        return self

    def name(self, name: str) -> "ApplicationEventOwnerBuilder":
        self._application_event_owner.name = name
        return self

    def help_desk(self, help_desk: str) -> "ApplicationEventOwnerBuilder":
        self._application_event_owner.help_desk = help_desk
        return self

    def email(self, email: str) -> "ApplicationEventOwnerBuilder":
        self._application_event_owner.email = email
        return self

    def phone(self, phone: str) -> "ApplicationEventOwnerBuilder":
        self._application_event_owner.phone = phone
        return self

    def owner_id(self, owner_id: UserId) -> "ApplicationEventOwnerBuilder":
        self._application_event_owner.owner_id = owner_id
        return self

    def customer_service_account(self, customer_service_account: str) -> "ApplicationEventOwnerBuilder":
        self._application_event_owner.customer_service_account = customer_service_account
        return self

    def build(self) -> "ApplicationEventOwner":
        return self._application_event_owner
