# -*- coding: utf-8 -*-
# Generated by https://github.com/connectrpc/connect-python.  DO NOT EDIT!
# source: chatto/api/v1/voice_calls.proto

from collections.abc import AsyncGenerator, AsyncIterator, Iterable, Iterator, Mapping
from typing import Protocol

from connectrpc.client import ConnectClient, ConnectClientSync
from connectrpc.code import Code
from connectrpc.compression import Compression
from connectrpc.errors import ConnectError
from connectrpc.interceptor import Interceptor, InterceptorSync
from connectrpc.method import IdempotencyLevel, MethodInfo
from connectrpc.request import Headers, RequestContext
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
import chatto.api.v1.voice_calls_pb2 as chatto_dot_api_dot_v1_dot_voice__calls__pb2


class VoiceCallService(Protocol):
    async def list_active_calls(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def get_active_call(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def batch_get_active_calls(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def list_call_participants(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def join_call(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def get_call_token(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def leave_call(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")


class VoiceCallServiceASGIApplication(ConnectASGIApplication[VoiceCallService]):
    def __init__(self, service: VoiceCallService | AsyncGenerator[VoiceCallService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None:
        super().__init__(
            service=service,
            endpoints=lambda svc: {
                "/chatto.api.v1.VoiceCallService/ListActiveCalls": Endpoint.unary(
                    method=MethodInfo(
                        name="ListActiveCalls",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.list_active_calls,
                ),
                "/chatto.api.v1.VoiceCallService/GetActiveCall": Endpoint.unary(
                    method=MethodInfo(
                        name="GetActiveCall",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.get_active_call,
                ),
                "/chatto.api.v1.VoiceCallService/BatchGetActiveCalls": Endpoint.unary(
                    method=MethodInfo(
                        name="BatchGetActiveCalls",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.batch_get_active_calls,
                ),
                "/chatto.api.v1.VoiceCallService/ListCallParticipants": Endpoint.unary(
                    method=MethodInfo(
                        name="ListCallParticipants",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.list_call_participants,
                ),
                "/chatto.api.v1.VoiceCallService/JoinCall": Endpoint.unary(
                    method=MethodInfo(
                        name="JoinCall",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.join_call,
                ),
                "/chatto.api.v1.VoiceCallService/GetCallToken": Endpoint.unary(
                    method=MethodInfo(
                        name="GetCallToken",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.get_call_token,
                ),
                "/chatto.api.v1.VoiceCallService/LeaveCall": Endpoint.unary(
                    method=MethodInfo(
                        name="LeaveCall",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.leave_call,
                ),
            },
            interceptors=interceptors,
            read_max_bytes=read_max_bytes,
            compressions=compressions,
        )

    @property
    def path(self) -> str:
        """Returns the URL path to mount the application to when serving multiple applications."""
        return "/chatto.api.v1.VoiceCallService"


class VoiceCallServiceClient(ConnectClient):
    async def list_active_calls(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ListActiveCalls",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def get_active_call(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetActiveCall",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def batch_get_active_calls(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="BatchGetActiveCalls",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def list_call_participants(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ListCallParticipants",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def join_call(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="JoinCall",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def get_call_token(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetCallToken",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def leave_call(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="LeaveCall",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )


class VoiceCallServiceSync(Protocol):
    def list_active_calls(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def get_active_call(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def batch_get_active_calls(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def list_call_participants(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def join_call(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def get_call_token(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def leave_call(self, request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallRequest, ctx: RequestContext) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")


class VoiceCallServiceWSGIApplication(ConnectWSGIApplication):
    def __init__(self, service: VoiceCallServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None:
        super().__init__(
            endpoints={
                "/chatto.api.v1.VoiceCallService/ListActiveCalls": EndpointSync.unary(
                    method=MethodInfo(
                        name="ListActiveCalls",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.list_active_calls,
                ),
                "/chatto.api.v1.VoiceCallService/GetActiveCall": EndpointSync.unary(
                    method=MethodInfo(
                        name="GetActiveCall",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.get_active_call,
                ),
                "/chatto.api.v1.VoiceCallService/BatchGetActiveCalls": EndpointSync.unary(
                    method=MethodInfo(
                        name="BatchGetActiveCalls",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.batch_get_active_calls,
                ),
                "/chatto.api.v1.VoiceCallService/ListCallParticipants": EndpointSync.unary(
                    method=MethodInfo(
                        name="ListCallParticipants",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.list_call_participants,
                ),
                "/chatto.api.v1.VoiceCallService/JoinCall": EndpointSync.unary(
                    method=MethodInfo(
                        name="JoinCall",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.join_call,
                ),
                "/chatto.api.v1.VoiceCallService/GetCallToken": EndpointSync.unary(
                    method=MethodInfo(
                        name="GetCallToken",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.get_call_token,
                ),
                "/chatto.api.v1.VoiceCallService/LeaveCall": EndpointSync.unary(
                    method=MethodInfo(
                        name="LeaveCall",
                        service_name="chatto.api.v1.VoiceCallService",
                        input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallRequest,
                        output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.leave_call,
                ),
            },
            interceptors=interceptors,
            read_max_bytes=read_max_bytes,
            compressions=compressions,
        )

    @property
    def path(self) -> str:
        """Returns the URL path to mount the application to when serving multiple applications."""
        return "/chatto.api.v1.VoiceCallService"


class VoiceCallServiceClientSync(ConnectClientSync):
    def list_active_calls(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ListActiveCalls",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListActiveCallsResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def get_active_call(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetActiveCall",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetActiveCallResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def batch_get_active_calls(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="BatchGetActiveCalls",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.BatchGetActiveCallsResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def list_call_participants(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ListCallParticipants",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.ListCallParticipantsResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def join_call(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="JoinCall",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.JoinCallResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def get_call_token(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetCallToken",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.GetCallTokenResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def leave_call(
        self,
        request: chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="LeaveCall",
                service_name="chatto.api.v1.VoiceCallService",
                input=chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallRequest,
                output=chatto_dot_api_dot_v1_dot_voice__calls__pb2.LeaveCallResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
