# -*- coding: utf-8 -*-
# Generated by https://github.com/connectrpc/connect-python.  DO NOT EDIT!
# source: chatto/admin/v1/room_layout.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.admin.v1.room_layout_pb2 as chatto_dot_admin_dot_v1_dot_room__layout__pb2


class AdminRoomLayoutService(Protocol):
    async def list_room_groups(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def create_room_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def update_room_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def delete_room_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def reorder_room_groups(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def move_room_to_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def reorder_sidebar_items_in_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def create_sidebar_link(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def update_sidebar_link(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def delete_sidebar_link(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")

    async def move_sidebar_link_to_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")


class AdminRoomLayoutServiceASGIApplication(ConnectASGIApplication[AdminRoomLayoutService]):
    def __init__(self, service: AdminRoomLayoutService | AsyncGenerator[AdminRoomLayoutService], *, interceptors: Iterable[Interceptor]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None:
        super().__init__(
            service=service,
            endpoints=lambda svc: {
                "/chatto.admin.v1.AdminRoomLayoutService/ListRoomGroups": Endpoint.unary(
                    method=MethodInfo(
                        name="ListRoomGroups",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.list_room_groups,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/CreateRoomGroup": Endpoint.unary(
                    method=MethodInfo(
                        name="CreateRoomGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.create_room_group,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/UpdateRoomGroup": Endpoint.unary(
                    method=MethodInfo(
                        name="UpdateRoomGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.update_room_group,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/DeleteRoomGroup": Endpoint.unary(
                    method=MethodInfo(
                        name="DeleteRoomGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.delete_room_group,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/ReorderRoomGroups": Endpoint.unary(
                    method=MethodInfo(
                        name="ReorderRoomGroups",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.reorder_room_groups,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/MoveRoomToGroup": Endpoint.unary(
                    method=MethodInfo(
                        name="MoveRoomToGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.move_room_to_group,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/ReorderSidebarItemsInGroup": Endpoint.unary(
                    method=MethodInfo(
                        name="ReorderSidebarItemsInGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.reorder_sidebar_items_in_group,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/CreateSidebarLink": Endpoint.unary(
                    method=MethodInfo(
                        name="CreateSidebarLink",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.create_sidebar_link,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/UpdateSidebarLink": Endpoint.unary(
                    method=MethodInfo(
                        name="UpdateSidebarLink",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.update_sidebar_link,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/DeleteSidebarLink": Endpoint.unary(
                    method=MethodInfo(
                        name="DeleteSidebarLink",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.delete_sidebar_link,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/MoveSidebarLinkToGroup": Endpoint.unary(
                    method=MethodInfo(
                        name="MoveSidebarLinkToGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.move_sidebar_link_to_group,
                ),
            },
            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.admin.v1.AdminRoomLayoutService"


class AdminRoomLayoutServiceClient(ConnectClient):
    async def list_room_groups(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ListRoomGroups",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def create_room_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="CreateRoomGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def update_room_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateRoomGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def delete_room_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="DeleteRoomGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def reorder_room_groups(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ReorderRoomGroups",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def move_room_to_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="MoveRoomToGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def reorder_sidebar_items_in_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ReorderSidebarItemsInGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def create_sidebar_link(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="CreateSidebarLink",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def update_sidebar_link(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateSidebarLink",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def delete_sidebar_link(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="DeleteSidebarLink",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def move_sidebar_link_to_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="MoveSidebarLinkToGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )


class AdminRoomLayoutServiceSync(Protocol):
    def list_room_groups(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def create_room_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def update_room_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def delete_room_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def reorder_room_groups(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def move_room_to_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def reorder_sidebar_items_in_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def create_sidebar_link(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def update_sidebar_link(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def delete_sidebar_link(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")
    def move_sidebar_link_to_group(self, request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupRequest, ctx: RequestContext) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupResponse:
        raise ConnectError(Code.UNIMPLEMENTED, "Not implemented")


class AdminRoomLayoutServiceWSGIApplication(ConnectWSGIApplication):
    def __init__(self, service: AdminRoomLayoutServiceSync, interceptors: Iterable[InterceptorSync]=(), read_max_bytes: int | None = None, compressions: Iterable[Compression] | None = None) -> None:
        super().__init__(
            endpoints={
                "/chatto.admin.v1.AdminRoomLayoutService/ListRoomGroups": EndpointSync.unary(
                    method=MethodInfo(
                        name="ListRoomGroups",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.list_room_groups,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/CreateRoomGroup": EndpointSync.unary(
                    method=MethodInfo(
                        name="CreateRoomGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.create_room_group,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/UpdateRoomGroup": EndpointSync.unary(
                    method=MethodInfo(
                        name="UpdateRoomGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.update_room_group,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/DeleteRoomGroup": EndpointSync.unary(
                    method=MethodInfo(
                        name="DeleteRoomGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.delete_room_group,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/ReorderRoomGroups": EndpointSync.unary(
                    method=MethodInfo(
                        name="ReorderRoomGroups",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.reorder_room_groups,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/MoveRoomToGroup": EndpointSync.unary(
                    method=MethodInfo(
                        name="MoveRoomToGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.move_room_to_group,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/ReorderSidebarItemsInGroup": EndpointSync.unary(
                    method=MethodInfo(
                        name="ReorderSidebarItemsInGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.reorder_sidebar_items_in_group,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/CreateSidebarLink": EndpointSync.unary(
                    method=MethodInfo(
                        name="CreateSidebarLink",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.create_sidebar_link,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/UpdateSidebarLink": EndpointSync.unary(
                    method=MethodInfo(
                        name="UpdateSidebarLink",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.update_sidebar_link,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/DeleteSidebarLink": EndpointSync.unary(
                    method=MethodInfo(
                        name="DeleteSidebarLink",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.delete_sidebar_link,
                ),
                "/chatto.admin.v1.AdminRoomLayoutService/MoveSidebarLinkToGroup": EndpointSync.unary(
                    method=MethodInfo(
                        name="MoveSidebarLinkToGroup",
                        service_name="chatto.admin.v1.AdminRoomLayoutService",
                        input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupRequest,
                        output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.move_sidebar_link_to_group,
                ),
            },
            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.admin.v1.AdminRoomLayoutService"


class AdminRoomLayoutServiceClientSync(ConnectClientSync):
    def list_room_groups(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ListRoomGroups",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ListRoomGroupsResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def create_room_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="CreateRoomGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateRoomGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def update_room_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateRoomGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateRoomGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def delete_room_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="DeleteRoomGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteRoomGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def reorder_room_groups(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ReorderRoomGroups",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderRoomGroupsResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def move_room_to_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="MoveRoomToGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveRoomToGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def reorder_sidebar_items_in_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ReorderSidebarItemsInGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.ReorderSidebarItemsInGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def create_sidebar_link(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="CreateSidebarLink",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.CreateSidebarLinkResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def update_sidebar_link(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateSidebarLink",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.UpdateSidebarLinkResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def delete_sidebar_link(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="DeleteSidebarLink",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.DeleteSidebarLinkResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    def move_sidebar_link_to_group(
        self,
        request: chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="MoveSidebarLinkToGroup",
                service_name="chatto.admin.v1.AdminRoomLayoutService",
                input=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupRequest,
                output=chatto_dot_admin_dot_v1_dot_room__layout__pb2.MoveSidebarLinkToGroupResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
