#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements. See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership. The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License. You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing,
#   software distributed under the License is distributed on an
#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#   KIND, either express or implied. See the License for the
#   specific language governing permissions and limitations
#   under the License.

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

import custos.server.integration.AgentManagementService_pb2 as AgentManagementService__pb2
import custos.server.core.IamAdminService_pb2 as IamAdminService__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.enableAgents = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/enableAgents',
                request_serializer=IamAdminService__pb2.AgentClientMetadata.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.configureAgentClient = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/configureAgentClient',
                request_serializer=IamAdminService__pb2.AgentClientMetadata.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.addRolesToClient = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/addRolesToClient',
                request_serializer=IamAdminService__pb2.AddRolesRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.registerAndEnableAgent = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/registerAndEnableAgent',
                request_serializer=IamAdminService__pb2.RegisterUserRequest.SerializeToString,
                response_deserializer=AgentManagementService__pb2.AgentRegistrationResponse.FromString,
                )
        self.getAgent = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/getAgent',
                request_serializer=AgentManagementService__pb2.AgentSearchRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.Agent.FromString,
                )
        self.deleteAgent = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/deleteAgent',
                request_serializer=AgentManagementService__pb2.AgentSearchRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.disableAgent = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/disableAgent',
                request_serializer=AgentManagementService__pb2.AgentSearchRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.enableAgent = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/enableAgent',
                request_serializer=AgentManagementService__pb2.AgentSearchRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.addAgentAttributes = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/addAgentAttributes',
                request_serializer=IamAdminService__pb2.AddUserAttributesRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.deleteAgentAttributes = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/deleteAgentAttributes',
                request_serializer=IamAdminService__pb2.DeleteUserAttributeRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.addRolesToAgent = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/addRolesToAgent',
                request_serializer=IamAdminService__pb2.AddUserRolesRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.deleteRolesFromAgent = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/deleteRolesFromAgent',
                request_serializer=IamAdminService__pb2.DeleteUserRolesRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.addProtocolMapper = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/addProtocolMapper',
                request_serializer=IamAdminService__pb2.AddProtocolMapperRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )
        self.getAllAgents = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/getAllAgents',
                request_serializer=IamAdminService__pb2.GetAllResources.SerializeToString,
                response_deserializer=IamAdminService__pb2.GetAllResourcesResponse.FromString,
                )
        self.synchronizeAgentDBs = channel.unary_unary(
                '/org.apache.custos.agent.management.service.AgentManagementService/synchronizeAgentDBs',
                request_serializer=AgentManagementService__pb2.SynchronizeAgentDBRequest.SerializeToString,
                response_deserializer=IamAdminService__pb2.OperationStatus.FromString,
                )


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

    def enableAgents(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 configureAgentClient(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 addRolesToClient(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 registerAndEnableAgent(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 getAgent(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 deleteAgent(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 disableAgent(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 enableAgent(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 addAgentAttributes(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 deleteAgentAttributes(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 addRolesToAgent(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 deleteRolesFromAgent(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 addProtocolMapper(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 getAllAgents(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 synchronizeAgentDBs(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_AgentManagementServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'enableAgents': grpc.unary_unary_rpc_method_handler(
                    servicer.enableAgents,
                    request_deserializer=IamAdminService__pb2.AgentClientMetadata.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'configureAgentClient': grpc.unary_unary_rpc_method_handler(
                    servicer.configureAgentClient,
                    request_deserializer=IamAdminService__pb2.AgentClientMetadata.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'addRolesToClient': grpc.unary_unary_rpc_method_handler(
                    servicer.addRolesToClient,
                    request_deserializer=IamAdminService__pb2.AddRolesRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'registerAndEnableAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.registerAndEnableAgent,
                    request_deserializer=IamAdminService__pb2.RegisterUserRequest.FromString,
                    response_serializer=AgentManagementService__pb2.AgentRegistrationResponse.SerializeToString,
            ),
            'getAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.getAgent,
                    request_deserializer=AgentManagementService__pb2.AgentSearchRequest.FromString,
                    response_serializer=IamAdminService__pb2.Agent.SerializeToString,
            ),
            'deleteAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteAgent,
                    request_deserializer=AgentManagementService__pb2.AgentSearchRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'disableAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.disableAgent,
                    request_deserializer=AgentManagementService__pb2.AgentSearchRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'enableAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.enableAgent,
                    request_deserializer=AgentManagementService__pb2.AgentSearchRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'addAgentAttributes': grpc.unary_unary_rpc_method_handler(
                    servicer.addAgentAttributes,
                    request_deserializer=IamAdminService__pb2.AddUserAttributesRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'deleteAgentAttributes': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteAgentAttributes,
                    request_deserializer=IamAdminService__pb2.DeleteUserAttributeRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'addRolesToAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.addRolesToAgent,
                    request_deserializer=IamAdminService__pb2.AddUserRolesRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'deleteRolesFromAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteRolesFromAgent,
                    request_deserializer=IamAdminService__pb2.DeleteUserRolesRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'addProtocolMapper': grpc.unary_unary_rpc_method_handler(
                    servicer.addProtocolMapper,
                    request_deserializer=IamAdminService__pb2.AddProtocolMapperRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'getAllAgents': grpc.unary_unary_rpc_method_handler(
                    servicer.getAllAgents,
                    request_deserializer=IamAdminService__pb2.GetAllResources.FromString,
                    response_serializer=IamAdminService__pb2.GetAllResourcesResponse.SerializeToString,
            ),
            'synchronizeAgentDBs': grpc.unary_unary_rpc_method_handler(
                    servicer.synchronizeAgentDBs,
                    request_deserializer=AgentManagementService__pb2.SynchronizeAgentDBRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.apache.custos.agent.management.service.AgentManagementService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def enableAgents(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, '/org.apache.custos.agent.management.service.AgentManagementService/enableAgents',
            IamAdminService__pb2.AgentClientMetadata.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def configureAgentClient(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, '/org.apache.custos.agent.management.service.AgentManagementService/configureAgentClient',
            IamAdminService__pb2.AgentClientMetadata.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def addRolesToClient(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, '/org.apache.custos.agent.management.service.AgentManagementService/addRolesToClient',
            IamAdminService__pb2.AddRolesRequest.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def registerAndEnableAgent(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, '/org.apache.custos.agent.management.service.AgentManagementService/registerAndEnableAgent',
            IamAdminService__pb2.RegisterUserRequest.SerializeToString,
            AgentManagementService__pb2.AgentRegistrationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getAgent(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, '/org.apache.custos.agent.management.service.AgentManagementService/getAgent',
            AgentManagementService__pb2.AgentSearchRequest.SerializeToString,
            IamAdminService__pb2.Agent.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def deleteAgent(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, '/org.apache.custos.agent.management.service.AgentManagementService/deleteAgent',
            AgentManagementService__pb2.AgentSearchRequest.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def disableAgent(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, '/org.apache.custos.agent.management.service.AgentManagementService/disableAgent',
            AgentManagementService__pb2.AgentSearchRequest.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def enableAgent(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, '/org.apache.custos.agent.management.service.AgentManagementService/enableAgent',
            AgentManagementService__pb2.AgentSearchRequest.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def addAgentAttributes(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, '/org.apache.custos.agent.management.service.AgentManagementService/addAgentAttributes',
            IamAdminService__pb2.AddUserAttributesRequest.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def deleteAgentAttributes(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, '/org.apache.custos.agent.management.service.AgentManagementService/deleteAgentAttributes',
            IamAdminService__pb2.DeleteUserAttributeRequest.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def addRolesToAgent(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, '/org.apache.custos.agent.management.service.AgentManagementService/addRolesToAgent',
            IamAdminService__pb2.AddUserRolesRequest.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def deleteRolesFromAgent(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, '/org.apache.custos.agent.management.service.AgentManagementService/deleteRolesFromAgent',
            IamAdminService__pb2.DeleteUserRolesRequest.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def addProtocolMapper(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, '/org.apache.custos.agent.management.service.AgentManagementService/addProtocolMapper',
            IamAdminService__pb2.AddProtocolMapperRequest.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getAllAgents(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, '/org.apache.custos.agent.management.service.AgentManagementService/getAllAgents',
            IamAdminService__pb2.GetAllResources.SerializeToString,
            IamAdminService__pb2.GetAllResourcesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def synchronizeAgentDBs(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, '/org.apache.custos.agent.management.service.AgentManagementService/synchronizeAgentDBs',
            AgentManagementService__pb2.SynchronizeAgentDBRequest.SerializeToString,
            IamAdminService__pb2.OperationStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
