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

from google.protobuf import symbol_database as _symbol_database

from twirp.base import Endpoint
from twirp.server import TwirpServer
from twirp.client import TwirpClient

_sym_db = _symbol_database.Default()

class SignalServerServer(TwirpServer):

	def __init__(self, *args, service, server_path_prefix="/twirp"):
		super().__init__(service=service)
		self._prefix = F"{server_path_prefix}/stream.video.sfu.signal.SignalServer"
		self._endpoints = {
			"SetPublisher": Endpoint(
				service_name="SignalServer",
				name="SetPublisher",
				function=getattr(service, "SetPublisher"),
				input=_sym_db.GetSymbol("stream.video.sfu.signal.SetPublisherRequest"),
				output=_sym_db.GetSymbol("stream.video.sfu.signal.SetPublisherResponse"),
			),
			"SendAnswer": Endpoint(
				service_name="SignalServer",
				name="SendAnswer",
				function=getattr(service, "SendAnswer"),
				input=_sym_db.GetSymbol("stream.video.sfu.signal.SendAnswerRequest"),
				output=_sym_db.GetSymbol("stream.video.sfu.signal.SendAnswerResponse"),
			),
			"IceTrickle": Endpoint(
				service_name="SignalServer",
				name="IceTrickle",
				function=getattr(service, "IceTrickle"),
				input=_sym_db.GetSymbol("stream.video.sfu.models.ICETrickle"),
				output=_sym_db.GetSymbol("stream.video.sfu.signal.ICETrickleResponse"),
			),
			"UpdateSubscriptions": Endpoint(
				service_name="SignalServer",
				name="UpdateSubscriptions",
				function=getattr(service, "UpdateSubscriptions"),
				input=_sym_db.GetSymbol("stream.video.sfu.signal.UpdateSubscriptionsRequest"),
				output=_sym_db.GetSymbol("stream.video.sfu.signal.UpdateSubscriptionsResponse"),
			),
			"UpdateMuteState": Endpoint(
				service_name="SignalServer",
				name="UpdateMuteState",
				function=getattr(service, "UpdateMuteState"),
				input=_sym_db.GetSymbol("stream.video.sfu.signal.UpdateMuteStateRequest"),
				output=_sym_db.GetSymbol("stream.video.sfu.signal.UpdateMuteStateResponse"),
			),
			"RequestVideoQuality": Endpoint(
				service_name="SignalServer",
				name="RequestVideoQuality",
				function=getattr(service, "RequestVideoQuality"),
				input=_sym_db.GetSymbol("stream.video.sfu.signal.UpdateVideoQualityRequest"),
				output=_sym_db.GetSymbol("stream.video.sfu.signal.UpdateVideoQualityResponse"),
			),
		}

class SignalServerClient(TwirpClient):

	def SetPublisher(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
		return self._make_request(
			url=F"{server_path_prefix}/stream.video.sfu.signal.SignalServer/SetPublisher",
			ctx=ctx,
			request=request,
			response_obj=_sym_db.GetSymbol("stream.video.sfu.signal.SetPublisherResponse"),
			**kwargs,
		)

	def SendAnswer(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
		return self._make_request(
			url=F"{server_path_prefix}/stream.video.sfu.signal.SignalServer/SendAnswer",
			ctx=ctx,
			request=request,
			response_obj=_sym_db.GetSymbol("stream.video.sfu.signal.SendAnswerResponse"),
			**kwargs,
		)

	def IceTrickle(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
		return self._make_request(
			url=F"{server_path_prefix}/stream.video.sfu.signal.SignalServer/IceTrickle",
			ctx=ctx,
			request=request,
			response_obj=_sym_db.GetSymbol("stream.video.sfu.signal.ICETrickleResponse"),
			**kwargs,
		)

	def UpdateSubscriptions(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
		return self._make_request(
			url=F"{server_path_prefix}/stream.video.sfu.signal.SignalServer/UpdateSubscriptions",
			ctx=ctx,
			request=request,
			response_obj=_sym_db.GetSymbol("stream.video.sfu.signal.UpdateSubscriptionsResponse"),
			**kwargs,
		)

	def UpdateMuteState(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
		return self._make_request(
			url=F"{server_path_prefix}/stream.video.sfu.signal.SignalServer/UpdateMuteState",
			ctx=ctx,
			request=request,
			response_obj=_sym_db.GetSymbol("stream.video.sfu.signal.UpdateMuteStateResponse"),
			**kwargs,
		)

	def RequestVideoQuality(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
		return self._make_request(
			url=F"{server_path_prefix}/stream.video.sfu.signal.SignalServer/RequestVideoQuality",
			ctx=ctx,
			request=request,
			response_obj=_sym_db.GetSymbol("stream.video.sfu.signal.UpdateVideoQualityResponse"),
			**kwargs,
		)
