# -*- coding: utf-8 -*-
# Generated by https://github.com/verloop/twirpy/protoc-gen-twirpy.  DO NOT EDIT!
# source: webhook/webhook.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 MirrorServiceServer(TwirpServer):
    def __init__(self, *args, service, server_path_prefix="/twirp"):
        super().__init__(service=service)
        self._prefix = f"{server_path_prefix}/marketplace.redhat.com.package.certification.MirrorService"
        self._endpoints = {
            "NewOperatorBundles": Endpoint(
                service_name="MirrorService",
                name="NewOperatorBundles",
                function=getattr(service, "NewOperatorBundles"),
                input=_sym_db.GetSymbol(
                    "marketplace.redhat.com.package.certification.NewOperatorBundlesRequest"
                ),
                output=_sym_db.GetSymbol("google.protobuf.Empty"),
            ),
        }


class MirrorServiceClient(TwirpClient):
    def NewOperatorBundles(
        self, *args, ctx, request, server_path_prefix="/twirp", **kwargs
    ):
        return self._make_request(
            url=f"{server_path_prefix}/marketplace.redhat.com.package.certification.MirrorService/NewOperatorBundles",
            ctx=ctx,
            request=request,
            response_obj=_sym_db.GetSymbol("google.protobuf.Empty"),
            **kwargs,
        )
