"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""

import abc
import collections.abc
import grpc
import grpc.aio
import typing
import yandex.cloud.operation.operation_pb2
import yandex.cloud.vpc.v1.security_group_pb2
import yandex.cloud.vpc.v1.security_group_service_pb2

_T = typing.TypeVar("_T")

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext):  # type: ignore[misc, type-arg]
    ...

class SecurityGroupServiceStub:
    """A set of methods for managing SecurityGroup resources."""

    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    Get: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.GetSecurityGroupRequest,
        yandex.cloud.vpc.v1.security_group_pb2.SecurityGroup,
    ]
    """Returns the specified SecurityGroup resource.

    To get the list of all available SecurityGroup resources, make a [List] request.
    """

    List: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupsRequest,
        yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupsResponse,
    ]
    """Retrieves the list of SecurityGroup resources in the specified folder."""

    Create: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.CreateSecurityGroupRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a security group in the specified folder and network."""

    Update: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.UpdateSecurityGroupRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified security group.
    Method starts an asynchronous operation that can be cancelled while it is in progress.
    """

    UpdateRules: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.UpdateSecurityGroupRulesRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the rules of the specified security group."""

    UpdateRule: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.UpdateSecurityGroupRuleRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified rule."""

    Delete: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.DeleteSecurityGroupRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified security group."""

    Move: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.MoveSecurityGroupRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Moves security groups to another folder."""

    ListOperations: grpc.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupOperationsRequest,
        yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupOperationsResponse,
    ]
    """Lists operations for the specified security groups."""

class SecurityGroupServiceAsyncStub:
    """A set of methods for managing SecurityGroup resources."""

    Get: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.GetSecurityGroupRequest,
        yandex.cloud.vpc.v1.security_group_pb2.SecurityGroup,
    ]
    """Returns the specified SecurityGroup resource.

    To get the list of all available SecurityGroup resources, make a [List] request.
    """

    List: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupsRequest,
        yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupsResponse,
    ]
    """Retrieves the list of SecurityGroup resources in the specified folder."""

    Create: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.CreateSecurityGroupRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Creates a security group in the specified folder and network."""

    Update: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.UpdateSecurityGroupRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified security group.
    Method starts an asynchronous operation that can be cancelled while it is in progress.
    """

    UpdateRules: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.UpdateSecurityGroupRulesRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the rules of the specified security group."""

    UpdateRule: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.UpdateSecurityGroupRuleRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Updates the specified rule."""

    Delete: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.DeleteSecurityGroupRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Deletes the specified security group."""

    Move: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.MoveSecurityGroupRequest,
        yandex.cloud.operation.operation_pb2.Operation,
    ]
    """Moves security groups to another folder."""

    ListOperations: grpc.aio.UnaryUnaryMultiCallable[
        yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupOperationsRequest,
        yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupOperationsResponse,
    ]
    """Lists operations for the specified security groups."""

class SecurityGroupServiceServicer(metaclass=abc.ABCMeta):
    """A set of methods for managing SecurityGroup resources."""

    @abc.abstractmethod
    def Get(
        self,
        request: yandex.cloud.vpc.v1.security_group_service_pb2.GetSecurityGroupRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.vpc.v1.security_group_pb2.SecurityGroup, collections.abc.Awaitable[yandex.cloud.vpc.v1.security_group_pb2.SecurityGroup]]:
        """Returns the specified SecurityGroup resource.

        To get the list of all available SecurityGroup resources, make a [List] request.
        """

    @abc.abstractmethod
    def List(
        self,
        request: yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupsResponse, collections.abc.Awaitable[yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupsResponse]]:
        """Retrieves the list of SecurityGroup resources in the specified folder."""

    @abc.abstractmethod
    def Create(
        self,
        request: yandex.cloud.vpc.v1.security_group_service_pb2.CreateSecurityGroupRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Creates a security group in the specified folder and network."""

    @abc.abstractmethod
    def Update(
        self,
        request: yandex.cloud.vpc.v1.security_group_service_pb2.UpdateSecurityGroupRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified security group.
        Method starts an asynchronous operation that can be cancelled while it is in progress.
        """

    @abc.abstractmethod
    def UpdateRules(
        self,
        request: yandex.cloud.vpc.v1.security_group_service_pb2.UpdateSecurityGroupRulesRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the rules of the specified security group."""

    @abc.abstractmethod
    def UpdateRule(
        self,
        request: yandex.cloud.vpc.v1.security_group_service_pb2.UpdateSecurityGroupRuleRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Updates the specified rule."""

    @abc.abstractmethod
    def Delete(
        self,
        request: yandex.cloud.vpc.v1.security_group_service_pb2.DeleteSecurityGroupRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Deletes the specified security group."""

    @abc.abstractmethod
    def Move(
        self,
        request: yandex.cloud.vpc.v1.security_group_service_pb2.MoveSecurityGroupRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.operation.operation_pb2.Operation, collections.abc.Awaitable[yandex.cloud.operation.operation_pb2.Operation]]:
        """Moves security groups to another folder."""

    @abc.abstractmethod
    def ListOperations(
        self,
        request: yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupOperationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupOperationsResponse, collections.abc.Awaitable[yandex.cloud.vpc.v1.security_group_service_pb2.ListSecurityGroupOperationsResponse]]:
        """Lists operations for the specified security groups."""

def add_SecurityGroupServiceServicer_to_server(servicer: SecurityGroupServiceServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
