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

from union.internal.workspace import workspace_definition_payload_pb2 as workspace_dot_workspace__definition__payload__pb2


class WorkspaceRegistryServiceStub(object):
    """WorkspaceRegistryService defines the inventory service for creating and fetching workspace definitions.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateWorkspaceDefinition = channel.unary_unary(
                '/cloudidl.workspace.WorkspaceRegistryService/CreateWorkspaceDefinition',
                request_serializer=workspace_dot_workspace__definition__payload__pb2.CreateWorkspaceDefinitionRequest.SerializeToString,
                response_deserializer=workspace_dot_workspace__definition__payload__pb2.CreateWorkspaceDefinitionResponse.FromString,
                )
        self.GetWorkspaceDefinition = channel.unary_unary(
                '/cloudidl.workspace.WorkspaceRegistryService/GetWorkspaceDefinition',
                request_serializer=workspace_dot_workspace__definition__payload__pb2.GetWorkspaceDefinitionRequest.SerializeToString,
                response_deserializer=workspace_dot_workspace__definition__payload__pb2.GetWorkspaceDefinitionResponse.FromString,
                )
        self.UpdateWorkspaceDefinitionEntity = channel.unary_unary(
                '/cloudidl.workspace.WorkspaceRegistryService/UpdateWorkspaceDefinitionEntity',
                request_serializer=workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionEntityRequest.SerializeToString,
                response_deserializer=workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionEntityResponse.FromString,
                )
        self.UpdateWorkspaceDefinition = channel.unary_unary(
                '/cloudidl.workspace.WorkspaceRegistryService/UpdateWorkspaceDefinition',
                request_serializer=workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionRequest.SerializeToString,
                response_deserializer=workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionResponse.FromString,
                )
        self.ListWorkspaceDefinitionEntities = channel.unary_unary(
                '/cloudidl.workspace.WorkspaceRegistryService/ListWorkspaceDefinitionEntities',
                request_serializer=workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionEntitiesRequest.SerializeToString,
                response_deserializer=workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionEntitiesResponse.FromString,
                )
        self.ListWorkspaceDefinitions = channel.unary_unary(
                '/cloudidl.workspace.WorkspaceRegistryService/ListWorkspaceDefinitions',
                request_serializer=workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionsRequest.SerializeToString,
                response_deserializer=workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionsResponse.FromString,
                )


class WorkspaceRegistryServiceServicer(object):
    """WorkspaceRegistryService defines the inventory service for creating and fetching workspace definitions.
    """

    def CreateWorkspaceDefinition(self, request, context):
        """CreateWorkspaceDefinition creates a new workspace definition.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetWorkspaceDefinition(self, request, context):
        """GetWorkspaceDefinition fetches a workspace definition by its ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateWorkspaceDefinitionEntity(self, request, context):
        """UpdateWorkspaceDefinitionEntity updates an existing workspace definition entity.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateWorkspaceDefinition(self, request, context):
        """UpdateWorkspaceDefinition updates an existing workspace definition.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListWorkspaceDefinitionEntities(self, request, context):
        """ListWorkspaceDefinitionEntities fetches all workspace definition entities for a given organization and project.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListWorkspaceDefinitions(self, request, context):
        """ListWorkspaceDefinitions fetches all workspace definitions for a given organization and project.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_WorkspaceRegistryServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateWorkspaceDefinition': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateWorkspaceDefinition,
                    request_deserializer=workspace_dot_workspace__definition__payload__pb2.CreateWorkspaceDefinitionRequest.FromString,
                    response_serializer=workspace_dot_workspace__definition__payload__pb2.CreateWorkspaceDefinitionResponse.SerializeToString,
            ),
            'GetWorkspaceDefinition': grpc.unary_unary_rpc_method_handler(
                    servicer.GetWorkspaceDefinition,
                    request_deserializer=workspace_dot_workspace__definition__payload__pb2.GetWorkspaceDefinitionRequest.FromString,
                    response_serializer=workspace_dot_workspace__definition__payload__pb2.GetWorkspaceDefinitionResponse.SerializeToString,
            ),
            'UpdateWorkspaceDefinitionEntity': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateWorkspaceDefinitionEntity,
                    request_deserializer=workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionEntityRequest.FromString,
                    response_serializer=workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionEntityResponse.SerializeToString,
            ),
            'UpdateWorkspaceDefinition': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateWorkspaceDefinition,
                    request_deserializer=workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionRequest.FromString,
                    response_serializer=workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionResponse.SerializeToString,
            ),
            'ListWorkspaceDefinitionEntities': grpc.unary_unary_rpc_method_handler(
                    servicer.ListWorkspaceDefinitionEntities,
                    request_deserializer=workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionEntitiesRequest.FromString,
                    response_serializer=workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionEntitiesResponse.SerializeToString,
            ),
            'ListWorkspaceDefinitions': grpc.unary_unary_rpc_method_handler(
                    servicer.ListWorkspaceDefinitions,
                    request_deserializer=workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionsRequest.FromString,
                    response_serializer=workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cloudidl.workspace.WorkspaceRegistryService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class WorkspaceRegistryService(object):
    """WorkspaceRegistryService defines the inventory service for creating and fetching workspace definitions.
    """

    @staticmethod
    def CreateWorkspaceDefinition(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, '/cloudidl.workspace.WorkspaceRegistryService/CreateWorkspaceDefinition',
            workspace_dot_workspace__definition__payload__pb2.CreateWorkspaceDefinitionRequest.SerializeToString,
            workspace_dot_workspace__definition__payload__pb2.CreateWorkspaceDefinitionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetWorkspaceDefinition(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, '/cloudidl.workspace.WorkspaceRegistryService/GetWorkspaceDefinition',
            workspace_dot_workspace__definition__payload__pb2.GetWorkspaceDefinitionRequest.SerializeToString,
            workspace_dot_workspace__definition__payload__pb2.GetWorkspaceDefinitionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateWorkspaceDefinitionEntity(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, '/cloudidl.workspace.WorkspaceRegistryService/UpdateWorkspaceDefinitionEntity',
            workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionEntityRequest.SerializeToString,
            workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionEntityResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateWorkspaceDefinition(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, '/cloudidl.workspace.WorkspaceRegistryService/UpdateWorkspaceDefinition',
            workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionRequest.SerializeToString,
            workspace_dot_workspace__definition__payload__pb2.UpdateWorkspaceDefinitionResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListWorkspaceDefinitionEntities(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, '/cloudidl.workspace.WorkspaceRegistryService/ListWorkspaceDefinitionEntities',
            workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionEntitiesRequest.SerializeToString,
            workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionEntitiesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListWorkspaceDefinitions(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, '/cloudidl.workspace.WorkspaceRegistryService/ListWorkspaceDefinitions',
            workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionsRequest.SerializeToString,
            workspace_dot_workspace__definition__payload__pb2.ListWorkspaceDefinitionsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
