# 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.vpc.v1 import network_pb2 as yandex_dot_cloud_dot_vpc_dot_v1_dot_network__pb2
from yandex.cloud.vpc.v1 import network_service_pb2 as yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2


class NetworkServiceStub(object):
    """A set of methods for managing Network resources.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/yandex.cloud.vpc.v1.NetworkService/Get',
                request_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.GetNetworkRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__pb2.Network.FromString,
                )
        self.List = channel.unary_unary(
                '/yandex.cloud.vpc.v1.NetworkService/List',
                request_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworksRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworksResponse.FromString,
                )
        self.Create = channel.unary_unary(
                '/yandex.cloud.vpc.v1.NetworkService/Create',
                request_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.CreateNetworkRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Update = channel.unary_unary(
                '/yandex.cloud.vpc.v1.NetworkService/Update',
                request_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.UpdateNetworkRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Delete = channel.unary_unary(
                '/yandex.cloud.vpc.v1.NetworkService/Delete',
                request_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.DeleteNetworkRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.ListSubnets = channel.unary_unary(
                '/yandex.cloud.vpc.v1.NetworkService/ListSubnets',
                request_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSubnetsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSubnetsResponse.FromString,
                )
        self.ListSecurityGroups = channel.unary_unary(
                '/yandex.cloud.vpc.v1.NetworkService/ListSecurityGroups',
                request_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSecurityGroupsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSecurityGroupsResponse.FromString,
                )
        self.ListRouteTables = channel.unary_unary(
                '/yandex.cloud.vpc.v1.NetworkService/ListRouteTables',
                request_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkRouteTablesRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkRouteTablesResponse.FromString,
                )
        self.ListOperations = channel.unary_unary(
                '/yandex.cloud.vpc.v1.NetworkService/ListOperations',
                request_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkOperationsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkOperationsResponse.FromString,
                )
        self.Move = channel.unary_unary(
                '/yandex.cloud.vpc.v1.NetworkService/Move',
                request_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.MoveNetworkRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )


class NetworkServiceServicer(object):
    """A set of methods for managing Network resources.
    """

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

        Get the list of available Network resources by making 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 Network resources in the specified folder.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Create(self, request, context):
        """Creates a network in the specified folder using the data specified in the request.
        Method starts an asynchronous operation that can be cancelled while it is in progress.
        """
        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 network.
        Method starts an asynchronous operation that can be cancelled while it is in progress.
        """
        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 network.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListSubnets(self, request, context):
        """Lists subnets from the specified network.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListSecurityGroups(self, request, context):
        """Lists security groups from the specified network.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListRouteTables(self, request, context):
        """Lists route tables from the specified network.
        """
        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 network.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Move(self, request, context):
        """Move network to another folder.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_NetworkServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.GetNetworkRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__pb2.Network.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworksRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworksResponse.SerializeToString,
            ),
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.CreateNetworkRequest.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_vpc_dot_v1_dot_network__service__pb2.UpdateNetworkRequest.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_vpc_dot_v1_dot_network__service__pb2.DeleteNetworkRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'ListSubnets': grpc.unary_unary_rpc_method_handler(
                    servicer.ListSubnets,
                    request_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSubnetsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSubnetsResponse.SerializeToString,
            ),
            'ListSecurityGroups': grpc.unary_unary_rpc_method_handler(
                    servicer.ListSecurityGroups,
                    request_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSecurityGroupsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSecurityGroupsResponse.SerializeToString,
            ),
            'ListRouteTables': grpc.unary_unary_rpc_method_handler(
                    servicer.ListRouteTables,
                    request_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkRouteTablesRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkRouteTablesResponse.SerializeToString,
            ),
            'ListOperations': grpc.unary_unary_rpc_method_handler(
                    servicer.ListOperations,
                    request_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkOperationsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkOperationsResponse.SerializeToString,
            ),
            'Move': grpc.unary_unary_rpc_method_handler(
                    servicer.Move,
                    request_deserializer=yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.MoveNetworkRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.vpc.v1.NetworkService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class NetworkService(object):
    """A set of methods for managing Network 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.vpc.v1.NetworkService/Get',
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.GetNetworkRequest.SerializeToString,
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__pb2.Network.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.vpc.v1.NetworkService/List',
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworksRequest.SerializeToString,
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworksResponse.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.vpc.v1.NetworkService/Create',
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.CreateNetworkRequest.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.vpc.v1.NetworkService/Update',
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.UpdateNetworkRequest.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.vpc.v1.NetworkService/Delete',
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.DeleteNetworkRequest.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 ListSubnets(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.vpc.v1.NetworkService/ListSubnets',
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSubnetsRequest.SerializeToString,
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSubnetsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListSecurityGroups(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.vpc.v1.NetworkService/ListSecurityGroups',
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSecurityGroupsRequest.SerializeToString,
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkSecurityGroupsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListRouteTables(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.vpc.v1.NetworkService/ListRouteTables',
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkRouteTablesRequest.SerializeToString,
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkRouteTablesResponse.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.vpc.v1.NetworkService/ListOperations',
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkOperationsRequest.SerializeToString,
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.ListNetworkOperationsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Move(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.vpc.v1.NetworkService/Move',
            yandex_dot_cloud_dot_vpc_dot_v1_dot_network__service__pb2.MoveNetworkRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
