# 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.capacity.v1 import capacity_block_group_pb2 as nebius_dot_capacity_dot_v1_dot_capacity__block__group__pb2
from nebius.api.nebius.capacity.v1 import capacity_block_group_service_pb2 as nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2


class CapacityBlockGroupServiceStub(object):
    """Capacity Block Group service provides read access to Capacity Block Groups resources.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/nebius.capacity.v1.CapacityBlockGroupService/Get',
                request_serializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.GetCapacityBlockGroupRequest.SerializeToString,
                response_deserializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__pb2.CapacityBlockGroup.FromString,
                )
        self.GetByResourceAffinity = channel.unary_unary(
                '/nebius.capacity.v1.CapacityBlockGroupService/GetByResourceAffinity',
                request_serializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.GetCapacityBlockGroupByResourceAffinityRequest.SerializeToString,
                response_deserializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__pb2.CapacityBlockGroup.FromString,
                )
        self.List = channel.unary_unary(
                '/nebius.capacity.v1.CapacityBlockGroupService/List',
                request_serializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupsRequest.SerializeToString,
                response_deserializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupsResponse.FromString,
                )
        self.ListResources = channel.unary_unary(
                '/nebius.capacity.v1.CapacityBlockGroupService/ListResources',
                request_serializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupResourcesRequest.SerializeToString,
                response_deserializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupResourcesResponse.FromString,
                )


class CapacityBlockGroupServiceServicer(object):
    """Capacity Block Group service provides read access to Capacity Block Groups resources.
    """

    def Get(self, request, context):
        """Get Capacity Block Group by its ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetByResourceAffinity(self, request, context):
        """Get Capacity Block Group by its specification.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """List all Capacity Block Groups for the specified Tenant.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListResources(self, request, context):
        """List virtual machines instances' IDs that occupy a Capacity Block Group by its ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CapacityBlockGroupServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.GetCapacityBlockGroupRequest.FromString,
                    response_serializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__pb2.CapacityBlockGroup.SerializeToString,
            ),
            'GetByResourceAffinity': grpc.unary_unary_rpc_method_handler(
                    servicer.GetByResourceAffinity,
                    request_deserializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.GetCapacityBlockGroupByResourceAffinityRequest.FromString,
                    response_serializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__pb2.CapacityBlockGroup.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupsRequest.FromString,
                    response_serializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupsResponse.SerializeToString,
            ),
            'ListResources': grpc.unary_unary_rpc_method_handler(
                    servicer.ListResources,
                    request_deserializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupResourcesRequest.FromString,
                    response_serializer=nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupResourcesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nebius.capacity.v1.CapacityBlockGroupService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class CapacityBlockGroupService(object):
    """Capacity Block Group service provides read access to Capacity Block Groups 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, '/nebius.capacity.v1.CapacityBlockGroupService/Get',
            nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.GetCapacityBlockGroupRequest.SerializeToString,
            nebius_dot_capacity_dot_v1_dot_capacity__block__group__pb2.CapacityBlockGroup.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetByResourceAffinity(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.capacity.v1.CapacityBlockGroupService/GetByResourceAffinity',
            nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.GetCapacityBlockGroupByResourceAffinityRequest.SerializeToString,
            nebius_dot_capacity_dot_v1_dot_capacity__block__group__pb2.CapacityBlockGroup.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.capacity.v1.CapacityBlockGroupService/List',
            nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupsRequest.SerializeToString,
            nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListResources(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.capacity.v1.CapacityBlockGroupService/ListResources',
            nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupResourcesRequest.SerializeToString,
            nebius_dot_capacity_dot_v1_dot_capacity__block__group__service__pb2.ListCapacityBlockGroupResourcesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
