# 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 yandex.cloud.clouddesktop.v1 import desktop_pb2 as yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__pb2
from yandex.cloud.clouddesktop.v1 import desktop_service_pb2 as yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2

GRPC_GENERATED_VERSION = '1.70.0'
GRPC_VERSION = grpc.__version__
_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:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in yandex/cloud/clouddesktop/v1/desktop_service_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 DesktopServiceStub(object):
    """A set of methods for managing desktop resources.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/Get',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.GetDesktopRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__pb2.Desktop.FromString,
                _registered_method=True)
        self.GetRdpFile = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/GetRdpFile',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.GetRdpFileRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.RdpFileResponse.FromString,
                _registered_method=True)
        self.List = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/List',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopsResponse.FromString,
                _registered_method=True)
        self.ListOperations = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/ListOperations',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopOperationsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopOperationsResponse.FromString,
                _registered_method=True)
        self.Create = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/Create',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.CreateDesktopRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.UpdateProperties = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/UpdateProperties',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.UpdatePropertiesRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.Delete = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/Delete',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.DeleteDesktopRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.ResetPassword = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/ResetPassword',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ResetPasswordRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ResetPasswordResponse.FromString,
                _registered_method=True)
        self.Restart = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/Restart',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.RestartRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.Update = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/Update',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.UpdateRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.Start = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/Start',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.StartRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)
        self.Stop = channel.unary_unary(
                '/yandex.cloud.clouddesktop.v1.api.DesktopService/Stop',
                request_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.StopRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                _registered_method=True)


class DesktopServiceServicer(object):
    """A set of methods for managing desktop resources.
    """

    def Get(self, request, context):
        """Returns the specified desktop resource.

        To get the list of available desktops, make a [List] request.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetRdpFile(self, request, context):
        """Returns a RDP file for the specified desktop.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Retrieves the list of desktop resources.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListOperations(self, request, context):
        """Returns list of the operations for the specified desktop.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Create(self, request, context):
        """Creates desktop in the specified folder.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateProperties(self, request, context):
        """Updates desktop properties.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Deletes the specified desktop.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ResetPassword(self, request, context):
        """Reset password
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Restart(self, request, context):
        """Restart the specified desktop.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """Sync desktop with group configuration
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Start(self, request, context):
        """Start the specified desktop.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Stop(self, request, context):
        """Stop the specified desktop.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DesktopServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.GetDesktopRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__pb2.Desktop.SerializeToString,
            ),
            'GetRdpFile': grpc.unary_unary_rpc_method_handler(
                    servicer.GetRdpFile,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.GetRdpFileRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.RdpFileResponse.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopsResponse.SerializeToString,
            ),
            'ListOperations': grpc.unary_unary_rpc_method_handler(
                    servicer.ListOperations,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopOperationsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopOperationsResponse.SerializeToString,
            ),
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.CreateDesktopRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'UpdateProperties': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateProperties,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.UpdatePropertiesRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.DeleteDesktopRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'ResetPassword': grpc.unary_unary_rpc_method_handler(
                    servicer.ResetPassword,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ResetPasswordRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ResetPasswordResponse.SerializeToString,
            ),
            'Restart': grpc.unary_unary_rpc_method_handler(
                    servicer.Restart,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.RestartRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.UpdateRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Start': grpc.unary_unary_rpc_method_handler(
                    servicer.Start,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.StartRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Stop': grpc.unary_unary_rpc_method_handler(
                    servicer.Stop,
                    request_deserializer=yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.StopRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.clouddesktop.v1.api.DesktopService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('yandex.cloud.clouddesktop.v1.api.DesktopService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class DesktopService(object):
    """A set of methods for managing desktop resources.
    """

    @staticmethod
    def Get(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/Get',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.GetDesktopRequest.SerializeToString,
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__pb2.Desktop.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetRdpFile(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/GetRdpFile',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.GetRdpFileRequest.SerializeToString,
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.RdpFileResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def List(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/List',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopsRequest.SerializeToString,
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListOperations(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/ListOperations',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopOperationsRequest.SerializeToString,
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ListDesktopOperationsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Create(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/Create',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.CreateDesktopRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateProperties(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/UpdateProperties',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.UpdatePropertiesRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Delete(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/Delete',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.DeleteDesktopRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResetPassword(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/ResetPassword',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ResetPasswordRequest.SerializeToString,
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.ResetPasswordResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Restart(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/Restart',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.RestartRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Update(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/Update',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.UpdateRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Start(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/Start',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.StartRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Stop(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,
            '/yandex.cloud.clouddesktop.v1.api.DesktopService/Stop',
            yandex_dot_cloud_dot_clouddesktop_dot_v1_dot_desktop__service__pb2.StopRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
