# 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.compute.v1 import platform_pb2 as nebius_dot_compute_dot_v1_dot_platform__pb2
from nebius.api.nebius.compute.v1 import platform_service_pb2 as nebius_dot_compute_dot_v1_dot_platform__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetByName = channel.unary_unary(
                '/nebius.compute.v1.PlatformService/GetByName',
                request_serializer=nebius_dot_common_dot_v1_dot_metadata__pb2.GetByNameRequest.SerializeToString,
                response_deserializer=nebius_dot_compute_dot_v1_dot_platform__pb2.Platform.FromString,
                )
        self.List = channel.unary_unary(
                '/nebius.compute.v1.PlatformService/List',
                request_serializer=nebius_dot_compute_dot_v1_dot_platform__service__pb2.ListPlatformsRequest.SerializeToString,
                response_deserializer=nebius_dot_compute_dot_v1_dot_platform__service__pb2.ListPlatformsResponse.FromString,
                )


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

    def GetByName(self, request, context):
        """Retrieves detailed information about a specific compute platform 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 compute platforms within a specified parent.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_PlatformServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            '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_platform__pb2.Platform.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=nebius_dot_compute_dot_v1_dot_platform__service__pb2.ListPlatformsRequest.FromString,
                    response_serializer=nebius_dot_compute_dot_v1_dot_platform__service__pb2.ListPlatformsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nebius.compute.v1.PlatformService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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.PlatformService/GetByName',
            nebius_dot_common_dot_v1_dot_metadata__pb2.GetByNameRequest.SerializeToString,
            nebius_dot_compute_dot_v1_dot_platform__pb2.Platform.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.PlatformService/List',
            nebius_dot_compute_dot_v1_dot_platform__service__pb2.ListPlatformsRequest.SerializeToString,
            nebius_dot_compute_dot_v1_dot_platform__service__pb2.ListPlatformsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
