# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2

import p2sro_manager_pb2 as p2sro__manager__pb2


class P2SROManagerStub(object):
    """Missing associated documentation comment in .proto file."""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.CheckNumPlayers = channel.unary_unary(
            '/P2SROManager/CheckNumPlayers',
            request_serializer=p2sro__manager__pb2.NumPlayers.SerializeToString,
            response_deserializer=p2sro__manager__pb2.Confirmation.FromString,
        )
        self.GetManagerMetaData = channel.unary_unary(
            '/P2SROManager/GetManagerMetaData',
            request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            response_deserializer=p2sro__manager__pb2.Metadata.FromString,
        )
        self.GetLogDir = channel.unary_unary(
            '/P2SROManager/GetLogDir',
            request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            response_deserializer=p2sro__manager__pb2.String.FromString,
        )
        self.ClaimNewActivePolicyForPlayer = channel.unary_unary(
            '/P2SROManager/ClaimNewActivePolicyForPlayer',
            request_serializer=p2sro__manager__pb2.NewActivePolicyRequest.SerializeToString,
            response_deserializer=p2sro__manager__pb2.PolicySpecJson.FromString,
        )
        self.SubmitNewActivePolicyMetadata = channel.unary_unary(
            '/P2SROManager/SubmitNewActivePolicyMetadata',
            request_serializer=p2sro__manager__pb2.PolicyMetadataRequest.SerializeToString,
            response_deserializer=p2sro__manager__pb2.PolicySpecJson.FromString,
        )
        self.CanActivePolicyBeSetAsFixedNow = channel.unary_unary(
            '/P2SROManager/CanActivePolicyBeSetAsFixedNow',
            request_serializer=p2sro__manager__pb2.PlayerAndPolicyNum.SerializeToString,
            response_deserializer=p2sro__manager__pb2.Confirmation.FromString,
        )
        self.IsPolicyFixed = channel.unary_unary(
            '/P2SROManager/IsPolicyFixed',
            request_serializer=p2sro__manager__pb2.PlayerAndPolicyNum.SerializeToString,
            response_deserializer=p2sro__manager__pb2.Confirmation.FromString,
        )
        self.SetActivePolicyAsFixed = channel.unary_unary(
            '/P2SROManager/SetActivePolicyAsFixed',
            request_serializer=p2sro__manager__pb2.PolicyMetadataRequest.SerializeToString,
            response_deserializer=p2sro__manager__pb2.PolicySpecJson.FromString,
        )
        self.GetCopyOfLatestData = channel.unary_unary(
            '/P2SROManager/GetCopyOfLatestData',
            request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            response_deserializer=p2sro__manager__pb2.P2SROStatusResponse.FromString,
        )
        self.SubmitEmpiricalPayoffResult = channel.unary_unary(
            '/P2SROManager/SubmitEmpiricalPayoffResult',
            request_serializer=p2sro__manager__pb2.PayoffResult.SerializeToString,
            response_deserializer=p2sro__manager__pb2.Confirmation.FromString,
        )
        self.RequestExternalEval = channel.unary_unary(
            '/P2SROManager/RequestExternalEval',
            request_serializer=p2sro__manager__pb2.EvalRequest.SerializeToString,
            response_deserializer=p2sro__manager__pb2.Confirmation.FromString,
        )


class P2SROManagerServicer(object):
    """Missing associated documentation comment in .proto file."""

    def CheckNumPlayers(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 GetManagerMetaData(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 GetLogDir(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 ClaimNewActivePolicyForPlayer(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 SubmitNewActivePolicyMetadata(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 CanActivePolicyBeSetAsFixedNow(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 IsPolicyFixed(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 SetActivePolicyAsFixed(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 GetCopyOfLatestData(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 SubmitEmpiricalPayoffResult(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 RequestExternalEval(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_P2SROManagerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'CheckNumPlayers': grpc.unary_unary_rpc_method_handler(
            servicer.CheckNumPlayers,
            request_deserializer=p2sro__manager__pb2.NumPlayers.FromString,
            response_serializer=p2sro__manager__pb2.Confirmation.SerializeToString,
        ),
        'GetManagerMetaData': grpc.unary_unary_rpc_method_handler(
            servicer.GetManagerMetaData,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            response_serializer=p2sro__manager__pb2.Metadata.SerializeToString,
        ),
        'GetLogDir': grpc.unary_unary_rpc_method_handler(
            servicer.GetLogDir,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            response_serializer=p2sro__manager__pb2.String.SerializeToString,
        ),
        'ClaimNewActivePolicyForPlayer': grpc.unary_unary_rpc_method_handler(
            servicer.ClaimNewActivePolicyForPlayer,
            request_deserializer=p2sro__manager__pb2.NewActivePolicyRequest.FromString,
            response_serializer=p2sro__manager__pb2.PolicySpecJson.SerializeToString,
        ),
        'SubmitNewActivePolicyMetadata': grpc.unary_unary_rpc_method_handler(
            servicer.SubmitNewActivePolicyMetadata,
            request_deserializer=p2sro__manager__pb2.PolicyMetadataRequest.FromString,
            response_serializer=p2sro__manager__pb2.PolicySpecJson.SerializeToString,
        ),
        'CanActivePolicyBeSetAsFixedNow': grpc.unary_unary_rpc_method_handler(
            servicer.CanActivePolicyBeSetAsFixedNow,
            request_deserializer=p2sro__manager__pb2.PlayerAndPolicyNum.FromString,
            response_serializer=p2sro__manager__pb2.Confirmation.SerializeToString,
        ),
        'IsPolicyFixed': grpc.unary_unary_rpc_method_handler(
            servicer.IsPolicyFixed,
            request_deserializer=p2sro__manager__pb2.PlayerAndPolicyNum.FromString,
            response_serializer=p2sro__manager__pb2.Confirmation.SerializeToString,
        ),
        'SetActivePolicyAsFixed': grpc.unary_unary_rpc_method_handler(
            servicer.SetActivePolicyAsFixed,
            request_deserializer=p2sro__manager__pb2.PolicyMetadataRequest.FromString,
            response_serializer=p2sro__manager__pb2.PolicySpecJson.SerializeToString,
        ),
        'GetCopyOfLatestData': grpc.unary_unary_rpc_method_handler(
            servicer.GetCopyOfLatestData,
            request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            response_serializer=p2sro__manager__pb2.P2SROStatusResponse.SerializeToString,
        ),
        'SubmitEmpiricalPayoffResult': grpc.unary_unary_rpc_method_handler(
            servicer.SubmitEmpiricalPayoffResult,
            request_deserializer=p2sro__manager__pb2.PayoffResult.FromString,
            response_serializer=p2sro__manager__pb2.Confirmation.SerializeToString,
        ),
        'RequestExternalEval': grpc.unary_unary_rpc_method_handler(
            servicer.RequestExternalEval,
            request_deserializer=p2sro__manager__pb2.EvalRequest.FromString,
            response_serializer=p2sro__manager__pb2.Confirmation.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'P2SROManager', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


# This class is part of an EXPERIMENTAL API.
class P2SROManager(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def CheckNumPlayers(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, '/P2SROManager/CheckNumPlayers',
                                             p2sro__manager__pb2.NumPlayers.SerializeToString,
                                             p2sro__manager__pb2.Confirmation.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetManagerMetaData(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, '/P2SROManager/GetManagerMetaData',
                                             google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                                             p2sro__manager__pb2.Metadata.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetLogDir(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, '/P2SROManager/GetLogDir',
                                             google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                                             p2sro__manager__pb2.String.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ClaimNewActivePolicyForPlayer(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, '/P2SROManager/ClaimNewActivePolicyForPlayer',
                                             p2sro__manager__pb2.NewActivePolicyRequest.SerializeToString,
                                             p2sro__manager__pb2.PolicySpecJson.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SubmitNewActivePolicyMetadata(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, '/P2SROManager/SubmitNewActivePolicyMetadata',
                                             p2sro__manager__pb2.PolicyMetadataRequest.SerializeToString,
                                             p2sro__manager__pb2.PolicySpecJson.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CanActivePolicyBeSetAsFixedNow(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, '/P2SROManager/CanActivePolicyBeSetAsFixedNow',
                                             p2sro__manager__pb2.PlayerAndPolicyNum.SerializeToString,
                                             p2sro__manager__pb2.Confirmation.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def IsPolicyFixed(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, '/P2SROManager/IsPolicyFixed',
                                             p2sro__manager__pb2.PlayerAndPolicyNum.SerializeToString,
                                             p2sro__manager__pb2.Confirmation.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetActivePolicyAsFixed(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, '/P2SROManager/SetActivePolicyAsFixed',
                                             p2sro__manager__pb2.PolicyMetadataRequest.SerializeToString,
                                             p2sro__manager__pb2.PolicySpecJson.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetCopyOfLatestData(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, '/P2SROManager/GetCopyOfLatestData',
                                             google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                                             p2sro__manager__pb2.P2SROStatusResponse.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SubmitEmpiricalPayoffResult(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, '/P2SROManager/SubmitEmpiricalPayoffResult',
                                             p2sro__manager__pb2.PayoffResult.SerializeToString,
                                             p2sro__manager__pb2.Confirmation.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RequestExternalEval(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, '/P2SROManager/RequestExternalEval',
                                             p2sro__manager__pb2.EvalRequest.SerializeToString,
                                             p2sro__manager__pb2.Confirmation.FromString,
                                             options, channel_credentials,
                                             insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
