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

from nebius.api.nebius.common.v1 import metadata_pb2 as nebius_dot_common_dot_v1_dot_metadata__pb2
from nebius.api.nebius.common.v1 import operation_pb2 as nebius_dot_common_dot_v1_dot_operation__pb2
from nebius.api.nebius.common.v1 import operation_service_pb2 as nebius_dot_common_dot_v1_dot_operation__service__pb2
from nebius.api.nebius.compute.v1 import instance_pb2 as nebius_dot_compute_dot_v1_dot_instance__pb2
from nebius.api.nebius.compute.v1 import instance_service_pb2 as nebius_dot_compute_dot_v1_dot_instance__service__pb2
from nebius.api.nebius.compute.v1 import operation_service_pb2 as nebius_dot_compute_dot_v1_dot_operation__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/nebius.compute.v1.InstanceService/Get',
                request_serializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.GetInstanceRequest.SerializeToString,
                response_deserializer=nebius_dot_compute_dot_v1_dot_instance__pb2.Instance.FromString,
                )
        self.GetByName = channel.unary_unary(
                '/nebius.compute.v1.InstanceService/GetByName',
                request_serializer=nebius_dot_common_dot_v1_dot_metadata__pb2.GetByNameRequest.SerializeToString,
                response_deserializer=nebius_dot_compute_dot_v1_dot_instance__pb2.Instance.FromString,
                )
        self.List = channel.unary_unary(
                '/nebius.compute.v1.InstanceService/List',
                request_serializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.ListInstancesRequest.SerializeToString,
                response_deserializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.ListInstancesResponse.FromString,
                )
        self.Create = channel.unary_unary(
                '/nebius.compute.v1.InstanceService/Create',
                request_serializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.CreateInstanceRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.Update = channel.unary_unary(
                '/nebius.compute.v1.InstanceService/Update',
                request_serializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.UpdateInstanceRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.Delete = channel.unary_unary(
                '/nebius.compute.v1.InstanceService/Delete',
                request_serializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.DeleteInstanceRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.Start = channel.unary_unary(
                '/nebius.compute.v1.InstanceService/Start',
                request_serializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.StartInstanceRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.Stop = channel.unary_unary(
                '/nebius.compute.v1.InstanceService/Stop',
                request_serializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.StopInstanceRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.ListOperationsByParent = channel.unary_unary(
                '/nebius.compute.v1.InstanceService/ListOperationsByParent',
                request_serializer=nebius_dot_compute_dot_v1_dot_operation__service__pb2.ListOperationsByParentRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__service__pb2.ListOperationsResponse.FromString,
                )


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

    def Get(self, request, context):
        """Retrieves detailed information about a specific VM instance by its ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetByName(self, request, context):
        """Retrieves detailed information about a specific VM instance by its parent and name.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Lists all VM instances within a specified parent.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Create(self, request, context):
        """Creates a new VM instance based on the provided specification.
        For details, see https://docs.nebius.com/compute/virtual-machines/manage
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """Updates an existing VM instance with new configuration parameters.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Deletes a VM instance by its ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Start(self, request, context):
        """Starts a stopped VM instance.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Stop(self, request, context):
        """Stops a running VM instance.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListOperationsByParent(self, request, context):
        """Lists all operations that were performed within a specific parent resource.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_InstanceServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.GetInstanceRequest.FromString,
                    response_serializer=nebius_dot_compute_dot_v1_dot_instance__pb2.Instance.SerializeToString,
            ),
            'GetByName': grpc.unary_unary_rpc_method_handler(
                    servicer.GetByName,
                    request_deserializer=nebius_dot_common_dot_v1_dot_metadata__pb2.GetByNameRequest.FromString,
                    response_serializer=nebius_dot_compute_dot_v1_dot_instance__pb2.Instance.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.ListInstancesRequest.FromString,
                    response_serializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.ListInstancesResponse.SerializeToString,
            ),
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.CreateInstanceRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.UpdateInstanceRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.DeleteInstanceRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Start': grpc.unary_unary_rpc_method_handler(
                    servicer.Start,
                    request_deserializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.StartInstanceRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Stop': grpc.unary_unary_rpc_method_handler(
                    servicer.Stop,
                    request_deserializer=nebius_dot_compute_dot_v1_dot_instance__service__pb2.StopInstanceRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'ListOperationsByParent': grpc.unary_unary_rpc_method_handler(
                    servicer.ListOperationsByParent,
                    request_deserializer=nebius_dot_compute_dot_v1_dot_operation__service__pb2.ListOperationsByParentRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__service__pb2.ListOperationsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nebius.compute.v1.InstanceService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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, '/nebius.compute.v1.InstanceService/Get',
            nebius_dot_compute_dot_v1_dot_instance__service__pb2.GetInstanceRequest.SerializeToString,
            nebius_dot_compute_dot_v1_dot_instance__pb2.Instance.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetByName(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, '/nebius.compute.v1.InstanceService/GetByName',
            nebius_dot_common_dot_v1_dot_metadata__pb2.GetByNameRequest.SerializeToString,
            nebius_dot_compute_dot_v1_dot_instance__pb2.Instance.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/nebius.compute.v1.InstanceService/List',
            nebius_dot_compute_dot_v1_dot_instance__service__pb2.ListInstancesRequest.SerializeToString,
            nebius_dot_compute_dot_v1_dot_instance__service__pb2.ListInstancesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/nebius.compute.v1.InstanceService/Create',
            nebius_dot_compute_dot_v1_dot_instance__service__pb2.CreateInstanceRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/nebius.compute.v1.InstanceService/Update',
            nebius_dot_compute_dot_v1_dot_instance__service__pb2.UpdateInstanceRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/nebius.compute.v1.InstanceService/Delete',
            nebius_dot_compute_dot_v1_dot_instance__service__pb2.DeleteInstanceRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/nebius.compute.v1.InstanceService/Start',
            nebius_dot_compute_dot_v1_dot_instance__service__pb2.StartInstanceRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/nebius.compute.v1.InstanceService/Stop',
            nebius_dot_compute_dot_v1_dot_instance__service__pb2.StopInstanceRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListOperationsByParent(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, '/nebius.compute.v1.InstanceService/ListOperationsByParent',
            nebius_dot_compute_dot_v1_dot_operation__service__pb2.ListOperationsByParentRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__service__pb2.ListOperationsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
