# -*- coding: utf-8 -*-
# Generated by https://github.com/verloop/twirpy/protoc-gen-twirpy.  DO NOT EDIT!
# source: livekit_ingress.proto

from google.protobuf import symbol_database as _symbol_database
from twirp.base import Endpoint
from twirp.client import TwirpClient
from twirp.server import TwirpServer

_sym_db = _symbol_database.Default()


class IngressServer(TwirpServer):
    def __init__(self, *args, service, server_path_prefix="/twirp"):
        super().__init__(service=service)
        self._prefix = f"{server_path_prefix}/livekit.Ingress"
        self._endpoints = {
            "CreateIngress": Endpoint(
                service_name="Ingress",
                name="CreateIngress",
                function=getattr(service, "CreateIngress"),
                input=_sym_db.GetSymbol("livekit.CreateIngressRequest"),
                output=_sym_db.GetSymbol("livekit.IngressInfo"),
            ),
            "UpdateIngress": Endpoint(
                service_name="Ingress",
                name="UpdateIngress",
                function=getattr(service, "UpdateIngress"),
                input=_sym_db.GetSymbol("livekit.UpdateIngressRequest"),
                output=_sym_db.GetSymbol("livekit.IngressInfo"),
            ),
            "ListIngress": Endpoint(
                service_name="Ingress",
                name="ListIngress",
                function=getattr(service, "ListIngress"),
                input=_sym_db.GetSymbol("livekit.ListIngressRequest"),
                output=_sym_db.GetSymbol("livekit.ListIngressResponse"),
            ),
            "DeleteIngress": Endpoint(
                service_name="Ingress",
                name="DeleteIngress",
                function=getattr(service, "DeleteIngress"),
                input=_sym_db.GetSymbol("livekit.DeleteIngressRequest"),
                output=_sym_db.GetSymbol("livekit.IngressInfo"),
            ),
        }


class IngressClient(TwirpClient):
    def CreateIngress(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
        return self._make_request(
            url=f"{server_path_prefix}/livekit.Ingress/CreateIngress",
            ctx=ctx,
            request=request,
            response_obj=_sym_db.GetSymbol("livekit.IngressInfo"),
            **kwargs,
        )

    def UpdateIngress(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
        return self._make_request(
            url=f"{server_path_prefix}/livekit.Ingress/UpdateIngress",
            ctx=ctx,
            request=request,
            response_obj=_sym_db.GetSymbol("livekit.IngressInfo"),
            **kwargs,
        )

    def ListIngress(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
        return self._make_request(
            url=f"{server_path_prefix}/livekit.Ingress/ListIngress",
            ctx=ctx,
            request=request,
            response_obj=_sym_db.GetSymbol("livekit.ListIngressResponse"),
            **kwargs,
        )

    def DeleteIngress(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
        return self._make_request(
            url=f"{server_path_prefix}/livekit.Ingress/DeleteIngress",
            ctx=ctx,
            request=request,
            response_obj=_sym_db.GetSymbol("livekit.IngressInfo"),
            **kwargs,
        )
