# -*- coding: utf-8 -*-
# Generated by https://github.com/verloop/twirpy/protoc-gen-twirpy.  DO NOT EDIT!
# source: detection.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 LanguageDetectionServer(TwirpServer):

	def __init__(self, *args, service, server_path_prefix="/twirp"):
		super().__init__(service=service)
		self._prefix = F"{server_path_prefix}/.LanguageDetection"
		self._endpoints = {
			"GetPrediction": Endpoint(
				service_name="LanguageDetection",
				name="GetPrediction",
				function=getattr(service, "GetPrediction"),
				input=_sym_db.GetSymbol("GetPredictionRequest"),
				output=_sym_db.GetSymbol("GetPredictionResponse"),
			),
		}

class LanguageDetectionClient(TwirpClient):

	def GetPrediction(self, *args, ctx, request, server_path_prefix="/twirp", **kwargs):
		return self._make_request(
			url=F"{server_path_prefix}/.LanguageDetection/GetPrediction",
			ctx=ctx,
			request=request,
			response_obj=_sym_db.GetSymbol("GetPredictionResponse"),
			**kwargs,
		)
