1
0
mirror of https://github.com/quay/quay.git synced 2025-04-18 10:44:06 +03:00
quay/buildman/buildman_pb/buildman_pb2_grpc.py
Harish Govindarajulu a2f02db8ca
deps: bump protobuf (PROJQUAY-7970) (#3331)
* deps: bump protobuf (PROJQUAY-7970)

Signedoff-by: harishsurf <hgovinda@redhat.com>

* Regenerate .proto buildman_pb2*.py files

Bumping protobuf to 5.28.2 requires regenerating python files
from .proto file

* Bump grpcio + fix import

* Add generated buildman_pb2.pyi file

* Add ignore type check for import

* Fix black + isort formatting
2024-11-25 11:23:22 +05:30

340 lines
11 KiB
Python

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import warnings
import grpc
import buildman.buildman_pb.buildman_pb2 as buildman__pb2
GRPC_GENERATED_VERSION = "1.67.0"
GRPC_VERSION = grpc.__version__
_version_not_supported = False
try:
from grpc._utilities import first_version_is_lower # type: ignore
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
if _version_not_supported:
raise RuntimeError(
f"The grpc package installed is at version {GRPC_VERSION},"
+ " but the generated code in buildman_pb2_grpc.py depends on"
+ f" grpcio>={GRPC_GENERATED_VERSION}."
+ f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}"
+ f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}."
)
class BuildManagerStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Ping = channel.unary_unary(
"/buildman_pb.BuildManager/Ping",
request_serializer=buildman__pb2.PingRequest.SerializeToString,
response_deserializer=buildman__pb2.PingReply.FromString,
_registered_method=True,
)
self.RegisterBuildJob = channel.unary_unary(
"/buildman_pb.BuildManager/RegisterBuildJob",
request_serializer=buildman__pb2.BuildJobArgs.SerializeToString,
response_deserializer=buildman__pb2.BuildPack.FromString,
_registered_method=True,
)
self.Heartbeat = channel.stream_stream(
"/buildman_pb.BuildManager/Heartbeat",
request_serializer=buildman__pb2.HeartbeatRequest.SerializeToString,
response_deserializer=buildman__pb2.HeartbeatResponse.FromString,
_registered_method=True,
)
self.SetPhase = channel.unary_unary(
"/buildman_pb.BuildManager/SetPhase",
request_serializer=buildman__pb2.SetPhaseRequest.SerializeToString,
response_deserializer=buildman__pb2.SetPhaseResponse.FromString,
_registered_method=True,
)
self.LogMessage = channel.stream_stream(
"/buildman_pb.BuildManager/LogMessage",
request_serializer=buildman__pb2.LogMessageRequest.SerializeToString,
response_deserializer=buildman__pb2.LogMessageResponse.FromString,
_registered_method=True,
)
self.DetermineCachedTag = channel.unary_unary(
"/buildman_pb.BuildManager/DetermineCachedTag",
request_serializer=buildman__pb2.CachedTagRequest.SerializeToString,
response_deserializer=buildman__pb2.CachedTag.FromString,
_registered_method=True,
)
class BuildManagerServicer(object):
"""Missing associated documentation comment in .proto file."""
def Ping(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def RegisterBuildJob(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def Heartbeat(self, request_iterator, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def SetPhase(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def LogMessage(self, request_iterator, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def DetermineCachedTag(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!")
def add_BuildManagerServicer_to_server(servicer, server):
rpc_method_handlers = {
"Ping": grpc.unary_unary_rpc_method_handler(
servicer.Ping,
request_deserializer=buildman__pb2.PingRequest.FromString,
response_serializer=buildman__pb2.PingReply.SerializeToString,
),
"RegisterBuildJob": grpc.unary_unary_rpc_method_handler(
servicer.RegisterBuildJob,
request_deserializer=buildman__pb2.BuildJobArgs.FromString,
response_serializer=buildman__pb2.BuildPack.SerializeToString,
),
"Heartbeat": grpc.stream_stream_rpc_method_handler(
servicer.Heartbeat,
request_deserializer=buildman__pb2.HeartbeatRequest.FromString,
response_serializer=buildman__pb2.HeartbeatResponse.SerializeToString,
),
"SetPhase": grpc.unary_unary_rpc_method_handler(
servicer.SetPhase,
request_deserializer=buildman__pb2.SetPhaseRequest.FromString,
response_serializer=buildman__pb2.SetPhaseResponse.SerializeToString,
),
"LogMessage": grpc.stream_stream_rpc_method_handler(
servicer.LogMessage,
request_deserializer=buildman__pb2.LogMessageRequest.FromString,
response_serializer=buildman__pb2.LogMessageResponse.SerializeToString,
),
"DetermineCachedTag": grpc.unary_unary_rpc_method_handler(
servicer.DetermineCachedTag,
request_deserializer=buildman__pb2.CachedTagRequest.FromString,
response_serializer=buildman__pb2.CachedTag.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
"buildman_pb.BuildManager", rpc_method_handlers
)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers("buildman_pb.BuildManager", rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class BuildManager(object):
"""Missing associated documentation comment in .proto file."""
@staticmethod
def Ping(
request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None,
):
return grpc.experimental.unary_unary(
request,
target,
"/buildman_pb.BuildManager/Ping",
buildman__pb2.PingRequest.SerializeToString,
buildman__pb2.PingReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True,
)
@staticmethod
def RegisterBuildJob(
request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None,
):
return grpc.experimental.unary_unary(
request,
target,
"/buildman_pb.BuildManager/RegisterBuildJob",
buildman__pb2.BuildJobArgs.SerializeToString,
buildman__pb2.BuildPack.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True,
)
@staticmethod
def Heartbeat(
request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None,
):
return grpc.experimental.stream_stream(
request_iterator,
target,
"/buildman_pb.BuildManager/Heartbeat",
buildman__pb2.HeartbeatRequest.SerializeToString,
buildman__pb2.HeartbeatResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True,
)
@staticmethod
def SetPhase(
request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None,
):
return grpc.experimental.unary_unary(
request,
target,
"/buildman_pb.BuildManager/SetPhase",
buildman__pb2.SetPhaseRequest.SerializeToString,
buildman__pb2.SetPhaseResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True,
)
@staticmethod
def LogMessage(
request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None,
):
return grpc.experimental.stream_stream(
request_iterator,
target,
"/buildman_pb.BuildManager/LogMessage",
buildman__pb2.LogMessageRequest.SerializeToString,
buildman__pb2.LogMessageResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True,
)
@staticmethod
def DetermineCachedTag(
request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None,
):
return grpc.experimental.unary_unary(
request,
target,
"/buildman_pb.BuildManager/DetermineCachedTag",
buildman__pb2.CachedTagRequest.SerializeToString,
buildman__pb2.CachedTag.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True,
)