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

from depot_client.api.depot.core.v1 import project_pb2 as depot_dot_core_dot_v1_dot_project__pb2

GRPC_GENERATED_VERSION = '1.64.0'
GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.65.0'
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    warnings.warn(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in depot/core/v1/project_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}.'
        + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
        + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
        RuntimeWarning
    )


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListProjects = channel.unary_unary(
                '/depot.core.v1.ProjectService/ListProjects',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.ListProjectsRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.ListProjectsResponse.FromString,
                _registered_method=True)
        self.GetProject = channel.unary_unary(
                '/depot.core.v1.ProjectService/GetProject',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.GetProjectRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.GetProjectResponse.FromString,
                _registered_method=True)
        self.CreateProject = channel.unary_unary(
                '/depot.core.v1.ProjectService/CreateProject',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.CreateProjectRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.CreateProjectResponse.FromString,
                _registered_method=True)
        self.UpdateProject = channel.unary_unary(
                '/depot.core.v1.ProjectService/UpdateProject',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.UpdateProjectRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.UpdateProjectResponse.FromString,
                _registered_method=True)
        self.DeleteProject = channel.unary_unary(
                '/depot.core.v1.ProjectService/DeleteProject',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.DeleteProjectRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.DeleteProjectResponse.FromString,
                _registered_method=True)
        self.ResetProject = channel.unary_unary(
                '/depot.core.v1.ProjectService/ResetProject',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.ResetProjectRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.ResetProjectResponse.FromString,
                _registered_method=True)
        self.ListTrustPolicies = channel.unary_unary(
                '/depot.core.v1.ProjectService/ListTrustPolicies',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.ListTrustPoliciesRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.ListTrustPoliciesResponse.FromString,
                _registered_method=True)
        self.AddTrustPolicy = channel.unary_unary(
                '/depot.core.v1.ProjectService/AddTrustPolicy',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.AddTrustPolicyRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.AddTrustPolicyResponse.FromString,
                _registered_method=True)
        self.RemoveTrustPolicy = channel.unary_unary(
                '/depot.core.v1.ProjectService/RemoveTrustPolicy',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.RemoveTrustPolicyRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.RemoveTrustPolicyResponse.FromString,
                _registered_method=True)
        self.ListTokens = channel.unary_unary(
                '/depot.core.v1.ProjectService/ListTokens',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.ListTokensRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.ListTokensResponse.FromString,
                _registered_method=True)
        self.CreateToken = channel.unary_unary(
                '/depot.core.v1.ProjectService/CreateToken',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.CreateTokenRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.CreateTokenResponse.FromString,
                _registered_method=True)
        self.UpdateToken = channel.unary_unary(
                '/depot.core.v1.ProjectService/UpdateToken',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.UpdateTokenRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.UpdateTokenResponse.FromString,
                _registered_method=True)
        self.DeleteToken = channel.unary_unary(
                '/depot.core.v1.ProjectService/DeleteToken',
                request_serializer=depot_dot_core_dot_v1_dot_project__pb2.DeleteTokenRequest.SerializeToString,
                response_deserializer=depot_dot_core_dot_v1_dot_project__pb2.DeleteTokenResponse.FromString,
                _registered_method=True)


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

    def ListProjects(self, request, context):
        """List all projects
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetProject(self, request, context):
        """Get a project
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateProject(self, request, context):
        """Create a new project
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateProject(self, request, context):
        """Update a project
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteProject(self, request, context):
        """Delete a project
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ResetProject(self, request, context):
        """Reset a project will terminate all machines and delete all cached data.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListTrustPolicies(self, request, context):
        """List project's trust policies.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddTrustPolicy(self, request, context):
        """Add a trust policy to a project.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveTrustPolicy(self, request, context):
        """Remove a trust policy from a project.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListTokens(self, request, context):
        """List project's API tokens.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateToken(self, request, context):
        """Create a project API token.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateToken(self, request, context):
        """Create a project API token.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteToken(self, request, context):
        """Delete project API token.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ProjectServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListProjects': grpc.unary_unary_rpc_method_handler(
                    servicer.ListProjects,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.ListProjectsRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.ListProjectsResponse.SerializeToString,
            ),
            'GetProject': grpc.unary_unary_rpc_method_handler(
                    servicer.GetProject,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.GetProjectRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.GetProjectResponse.SerializeToString,
            ),
            'CreateProject': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateProject,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.CreateProjectRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.CreateProjectResponse.SerializeToString,
            ),
            'UpdateProject': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateProject,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.UpdateProjectRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.UpdateProjectResponse.SerializeToString,
            ),
            'DeleteProject': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteProject,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.DeleteProjectRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.DeleteProjectResponse.SerializeToString,
            ),
            'ResetProject': grpc.unary_unary_rpc_method_handler(
                    servicer.ResetProject,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.ResetProjectRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.ResetProjectResponse.SerializeToString,
            ),
            'ListTrustPolicies': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTrustPolicies,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.ListTrustPoliciesRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.ListTrustPoliciesResponse.SerializeToString,
            ),
            'AddTrustPolicy': grpc.unary_unary_rpc_method_handler(
                    servicer.AddTrustPolicy,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.AddTrustPolicyRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.AddTrustPolicyResponse.SerializeToString,
            ),
            'RemoveTrustPolicy': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveTrustPolicy,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.RemoveTrustPolicyRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.RemoveTrustPolicyResponse.SerializeToString,
            ),
            'ListTokens': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTokens,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.ListTokensRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.ListTokensResponse.SerializeToString,
            ),
            'CreateToken': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateToken,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.CreateTokenRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.CreateTokenResponse.SerializeToString,
            ),
            'UpdateToken': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateToken,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.UpdateTokenRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.UpdateTokenResponse.SerializeToString,
            ),
            'DeleteToken': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteToken,
                    request_deserializer=depot_dot_core_dot_v1_dot_project__pb2.DeleteTokenRequest.FromString,
                    response_serializer=depot_dot_core_dot_v1_dot_project__pb2.DeleteTokenResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'depot.core.v1.ProjectService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('depot.core.v1.ProjectService', rpc_method_handlers)


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

    @staticmethod
    def ListProjects(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,
            '/depot.core.v1.ProjectService/ListProjects',
            depot_dot_core_dot_v1_dot_project__pb2.ListProjectsRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.ListProjectsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetProject(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,
            '/depot.core.v1.ProjectService/GetProject',
            depot_dot_core_dot_v1_dot_project__pb2.GetProjectRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.GetProjectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateProject(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,
            '/depot.core.v1.ProjectService/CreateProject',
            depot_dot_core_dot_v1_dot_project__pb2.CreateProjectRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.CreateProjectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateProject(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,
            '/depot.core.v1.ProjectService/UpdateProject',
            depot_dot_core_dot_v1_dot_project__pb2.UpdateProjectRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.UpdateProjectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteProject(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,
            '/depot.core.v1.ProjectService/DeleteProject',
            depot_dot_core_dot_v1_dot_project__pb2.DeleteProjectRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.DeleteProjectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResetProject(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,
            '/depot.core.v1.ProjectService/ResetProject',
            depot_dot_core_dot_v1_dot_project__pb2.ResetProjectRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.ResetProjectResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListTrustPolicies(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,
            '/depot.core.v1.ProjectService/ListTrustPolicies',
            depot_dot_core_dot_v1_dot_project__pb2.ListTrustPoliciesRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.ListTrustPoliciesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AddTrustPolicy(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,
            '/depot.core.v1.ProjectService/AddTrustPolicy',
            depot_dot_core_dot_v1_dot_project__pb2.AddTrustPolicyRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.AddTrustPolicyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RemoveTrustPolicy(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,
            '/depot.core.v1.ProjectService/RemoveTrustPolicy',
            depot_dot_core_dot_v1_dot_project__pb2.RemoveTrustPolicyRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.RemoveTrustPolicyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListTokens(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,
            '/depot.core.v1.ProjectService/ListTokens',
            depot_dot_core_dot_v1_dot_project__pb2.ListTokensRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.ListTokensResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateToken(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,
            '/depot.core.v1.ProjectService/CreateToken',
            depot_dot_core_dot_v1_dot_project__pb2.CreateTokenRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.CreateTokenResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateToken(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,
            '/depot.core.v1.ProjectService/UpdateToken',
            depot_dot_core_dot_v1_dot_project__pb2.UpdateTokenRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.UpdateTokenResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteToken(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,
            '/depot.core.v1.ProjectService/DeleteToken',
            depot_dot_core_dot_v1_dot_project__pb2.DeleteTokenRequest.SerializeToString,
            depot_dot_core_dot_v1_dot_project__pb2.DeleteTokenResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
