# 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.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2
from yandex.cloud.organizationmanager.v1.saml import federation_pb2 as yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__pb2
from yandex.cloud.organizationmanager.v1.saml import federation_service_pb2 as yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2


class FederationServiceStub(object):
    """A set of methods for managing federations.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.saml.FederationService/Get',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.GetFederationRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__pb2.Federation.FromString,
                )
        self.List = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.saml.FederationService/List',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationsResponse.FromString,
                )
        self.Create = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.saml.FederationService/Create',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.CreateFederationRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Update = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.saml.FederationService/Update',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.UpdateFederationRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Delete = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.saml.FederationService/Delete',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.DeleteFederationRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.AddUserAccounts = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.saml.FederationService/AddUserAccounts',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.AddFederatedUserAccountsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.ListUserAccounts = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.saml.FederationService/ListUserAccounts',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederatedUserAccountsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederatedUserAccountsResponse.FromString,
                )
        self.ListOperations = channel.unary_unary(
                '/yandex.cloud.organizationmanager.v1.saml.FederationService/ListOperations',
                request_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationOperationsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationOperationsResponse.FromString,
                )


class FederationServiceServicer(object):
    """A set of methods for managing federations.
    """

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

        To get the list of available federations, 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 federations in the specified organization.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def Update(self, request, context):
        """Updates the specified federation.
        """
        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 federation.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddUserAccounts(self, request, context):
        """Adds users to the specified federation.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListUserAccounts(self, request, context):
        """Lists users for the specified federation.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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


def add_FederationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.GetFederationRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__pb2.Federation.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationsResponse.SerializeToString,
            ),
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.CreateFederationRequest.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_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.UpdateFederationRequest.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_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.DeleteFederationRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'AddUserAccounts': grpc.unary_unary_rpc_method_handler(
                    servicer.AddUserAccounts,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.AddFederatedUserAccountsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'ListUserAccounts': grpc.unary_unary_rpc_method_handler(
                    servicer.ListUserAccounts,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederatedUserAccountsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederatedUserAccountsResponse.SerializeToString,
            ),
            'ListOperations': grpc.unary_unary_rpc_method_handler(
                    servicer.ListOperations,
                    request_deserializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationOperationsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationOperationsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.organizationmanager.v1.saml.FederationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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.organizationmanager.v1.saml.FederationService/Get',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.GetFederationRequest.SerializeToString,
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__pb2.Federation.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.organizationmanager.v1.saml.FederationService/List',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationsRequest.SerializeToString,
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationsResponse.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, '/yandex.cloud.organizationmanager.v1.saml.FederationService/Create',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.CreateFederationRequest.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 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.organizationmanager.v1.saml.FederationService/Update',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.UpdateFederationRequest.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 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.organizationmanager.v1.saml.FederationService/Delete',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.DeleteFederationRequest.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 AddUserAccounts(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.organizationmanager.v1.saml.FederationService/AddUserAccounts',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.AddFederatedUserAccountsRequest.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 ListUserAccounts(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.organizationmanager.v1.saml.FederationService/ListUserAccounts',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederatedUserAccountsRequest.SerializeToString,
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederatedUserAccountsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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.organizationmanager.v1.saml.FederationService/ListOperations',
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationOperationsRequest.SerializeToString,
            yandex_dot_cloud_dot_organizationmanager_dot_v1_dot_saml_dot_federation__service__pb2.ListFederationOperationsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
