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

from yandex.cloud.iam.v1 import service_control_pb2 as yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__pb2
from yandex.cloud.iam.v1 import service_control_service_pb2 as yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2


class ServiceControlServiceStub(object):
    """A set of methods for managing Service resources.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/yandex.cloud.iam.v1.ServiceControlService/Get',
                request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.GetServiceRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__pb2.Service.FromString,
                )
        self.List = channel.unary_unary(
                '/yandex.cloud.iam.v1.ServiceControlService/List',
                request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.ListServicesRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.ListServicesResponse.FromString,
                )
        self.Enable = channel.unary_unary(
                '/yandex.cloud.iam.v1.ServiceControlService/Enable',
                request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.EnableServiceRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Disable = channel.unary_unary(
                '/yandex.cloud.iam.v1.ServiceControlService/Disable',
                request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.DisableServiceRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.ResolveAgent = channel.unary_unary(
                '/yandex.cloud.iam.v1.ServiceControlService/ResolveAgent',
                request_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.ResolveServiceAgentRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__pb2.ServiceAgent.FromString,
                )


class ServiceControlServiceServicer(object):
    """A set of methods for managing Service resources.
    """

    def Get(self, request, context):
        """Returns the Service information in the specified resource container.

        To get the list of available Services, make a [List] request.
        """
        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 Service in the specified resource container.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Enable(self, request, context):
        """Enable a service in the specified resource container.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Disable(self, request, context):
        """Disable a service in the specified resource container.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ResolveAgent(self, request, context):
        """Resolve agent service account for the service in the specified resource container.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ServiceControlServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.GetServiceRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__pb2.Service.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.ListServicesRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.ListServicesResponse.SerializeToString,
            ),
            'Enable': grpc.unary_unary_rpc_method_handler(
                    servicer.Enable,
                    request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.EnableServiceRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Disable': grpc.unary_unary_rpc_method_handler(
                    servicer.Disable,
                    request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.DisableServiceRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'ResolveAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.ResolveAgent,
                    request_deserializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.ResolveServiceAgentRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__pb2.ServiceAgent.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.iam.v1.ServiceControlService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ServiceControlService(object):
    """A set of methods for managing Service 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.iam.v1.ServiceControlService/Get',
            yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.GetServiceRequest.SerializeToString,
            yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__pb2.Service.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, '/yandex.cloud.iam.v1.ServiceControlService/List',
            yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.ListServicesRequest.SerializeToString,
            yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.ListServicesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Enable(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.iam.v1.ServiceControlService/Enable',
            yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.EnableServiceRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Disable(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.iam.v1.ServiceControlService/Disable',
            yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.DisableServiceRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ResolveAgent(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.iam.v1.ServiceControlService/ResolveAgent',
            yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__service__pb2.ResolveServiceAgentRequest.SerializeToString,
            yandex_dot_cloud_dot_iam_dot_v1_dot_service__control__pb2.ServiceAgent.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
