# Copyright (c) 2017-2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# fmt: off
# isort: skip_file

import builtins as _builtins, typing as _typing

import grpc as _grpc
from grpc import aio as _grpc_aio

from .topology_manager_write_service_pb2 import AdditionSuccess, AuthorizationSuccess, DomainParametersChangeAuthorization, IdentifierDelegationAuthorization, MediatorDomainStateAuthorization, NamespaceDelegationAuthorization, OwnerToKeyMappingAuthorization, ParticipantDomainStateAuthorization, PartyToParticipantAuthorization, SignedTopologyTransactionAddition, VettedPackagesAuthorization

__all__ = [
    "TopologyManagerWriteServiceStub",
]


# noinspection PyPep8Naming,DuplicatedCode
class TopologyManagerWriteServiceStub:
    @classmethod  # type: ignore
    @_typing.overload
    def __new__(cls, channel: _grpc.Channel) -> _TopologyManagerWriteServiceBlockingStub: ...  # type: ignore
    @classmethod  # type: ignore
    @_typing.overload
    def __new__(cls, channel: _grpc_aio.Channel) -> _TopologyManagerWriteServiceAsyncStub: ...  # type: ignore
    def AuthorizePartyToParticipant(self, __1: PartyToParticipantAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AuthorizationSuccess, _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]]: ...
    def AuthorizeOwnerToKeyMapping(self, __1: OwnerToKeyMappingAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AuthorizationSuccess, _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]]: ...
    def AuthorizeNamespaceDelegation(self, __1: NamespaceDelegationAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AuthorizationSuccess, _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]]: ...
    def AuthorizeIdentifierDelegation(self, __1: IdentifierDelegationAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AuthorizationSuccess, _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]]: ...
    def AuthorizeVettedPackages(self, __1: VettedPackagesAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AuthorizationSuccess, _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]]: ...
    def AuthorizeDomainParametersChange(self, __1: DomainParametersChangeAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AuthorizationSuccess, _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]]: ...
    def AuthorizeParticipantDomainState(self, __1: ParticipantDomainStateAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AuthorizationSuccess, _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]]: ...
    def AuthorizeMediatorDomainState(self, __1: MediatorDomainStateAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AuthorizationSuccess, _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]]: ...
    def AddSignedTopologyTransaction(self, __1: SignedTopologyTransactionAddition, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _typing.Union[AdditionSuccess, _grpc_aio.UnaryUnaryCall[_typing.Any, AdditionSuccess]]: ...

# noinspection PyPep8Naming,DuplicatedCode
class _TopologyManagerWriteServiceBlockingStub(TopologyManagerWriteServiceStub):
    def AuthorizePartyToParticipant(self, __1: PartyToParticipantAuthorization, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> AuthorizationSuccess: ...
    def AuthorizeOwnerToKeyMapping(self, __1: OwnerToKeyMappingAuthorization, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> AuthorizationSuccess: ...
    def AuthorizeNamespaceDelegation(self, __1: NamespaceDelegationAuthorization, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> AuthorizationSuccess: ...
    def AuthorizeIdentifierDelegation(self, __1: IdentifierDelegationAuthorization, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> AuthorizationSuccess: ...
    def AuthorizeVettedPackages(self, __1: VettedPackagesAuthorization, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> AuthorizationSuccess: ...
    def AuthorizeDomainParametersChange(self, __1: DomainParametersChangeAuthorization, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> AuthorizationSuccess: ...
    def AuthorizeParticipantDomainState(self, __1: ParticipantDomainStateAuthorization, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> AuthorizationSuccess: ...
    def AuthorizeMediatorDomainState(self, __1: MediatorDomainStateAuthorization, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> AuthorizationSuccess: ...
    def AddSignedTopologyTransaction(self, __1: SignedTopologyTransactionAddition, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_typing.Tuple[_typing.Tuple[str, _typing.Union[str, bytes]], ...]] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> AdditionSuccess: ...

# noinspection PyPep8Naming,DuplicatedCode
class _TopologyManagerWriteServiceAsyncStub(TopologyManagerWriteServiceStub):
    def AuthorizePartyToParticipant(self, __1: PartyToParticipantAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]: ...  # type: ignore
    def AuthorizeOwnerToKeyMapping(self, __1: OwnerToKeyMappingAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]: ...  # type: ignore
    def AuthorizeNamespaceDelegation(self, __1: NamespaceDelegationAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]: ...  # type: ignore
    def AuthorizeIdentifierDelegation(self, __1: IdentifierDelegationAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]: ...  # type: ignore
    def AuthorizeVettedPackages(self, __1: VettedPackagesAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]: ...  # type: ignore
    def AuthorizeDomainParametersChange(self, __1: DomainParametersChangeAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]: ...  # type: ignore
    def AuthorizeParticipantDomainState(self, __1: ParticipantDomainStateAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]: ...  # type: ignore
    def AuthorizeMediatorDomainState(self, __1: MediatorDomainStateAuthorization, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, AuthorizationSuccess]: ...  # type: ignore
    def AddSignedTopologyTransaction(self, __1: SignedTopologyTransactionAddition, *, timeout: _typing.Optional[float] = ..., metadata: _typing.Optional[_grpc_aio.Metadata] = ..., credentials: _typing.Optional[_grpc.CallCredentials] = ..., wait_for_ready: _typing.Optional[bool] = ..., compression: _typing.Optional[_grpc.Compression] = ...) -> _grpc_aio.UnaryUnaryCall[_typing.Any, AdditionSuccess]: ...  # type: ignore
