# Generated from soulfire/instance.proto. DO NOT EDIT.
# Generated by protoc-gen-connectrpc-py v0.11.1 with parameter "protobuf=google".
# ruff: noqa: PGH004
# ruff: noqa
# fmt: off

from __future__ import annotations

from typing import Protocol, TYPE_CHECKING

from connectrpc.client import ConnectClient, ConnectClientSync
from connectrpc.code import Code
from connectrpc.compat import google_protobuf_binary_codec, google_protobuf_codecs
from connectrpc.compression.gzip import GzipCompression
from connectrpc.errors import ConnectError
from connectrpc.method import IdempotencyLevel, MethodInfo
from connectrpc.protocol import ProtocolType
from connectrpc.server import ConnectASGIApplication, ConnectWSGIApplication, Endpoint, EndpointSync
from pyqwest import Client, SyncClient

from .instance_pb2 import DeleteAccountMetadataEntryRequest, DeleteAccountMetadataEntryResponse, DeleteInstanceMetadataEntryRequest, DeleteInstanceMetadataEntryResponse, GetAccountMetadataRequest, GetAccountMetadataResponse, GetInstanceMetadataRequest, GetInstanceMetadataResponse, InstanceAddAccountRequest, InstanceAddAccountResponse, InstanceAddAccountsBatchRequest, InstanceAddAccountsBatchResponse, InstanceAddProxiesBatchRequest, InstanceAddProxiesBatchResponse, InstanceAddProxyRequest, InstanceAddProxyResponse, InstanceAuditLogRequest, InstanceAuditLogResponse, InstanceCreateRequest, InstanceCreateResponse, InstanceDeleteRequest, InstanceDeleteResponse, InstanceInfoRequest, InstanceInfoResponse, InstanceListRequest, InstanceListResponse, InstanceRemoveAccountRequest, InstanceRemoveAccountResponse, InstanceRemoveAccountsBatchRequest, InstanceRemoveAccountsBatchResponse, InstanceRemoveProxiesBatchRequest, InstanceRemoveProxiesBatchResponse, InstanceRemoveProxyRequest, InstanceRemoveProxyResponse, InstanceUpdateAccountRequest, InstanceUpdateAccountResponse, InstanceUpdateConfigEntryRequest, InstanceUpdateConfigEntryResponse, InstanceUpdateConfigRequest, InstanceUpdateConfigResponse, InstanceUpdateMetaRequest, InstanceUpdateMetaResponse, InstanceUpdateProxyRequest, InstanceUpdateProxyResponse, SetAccountMetadataEntryRequest, SetAccountMetadataEntryResponse, SetInstanceMetadataEntryRequest, SetInstanceMetadataEntryResponse

if TYPE_CHECKING:
    from collections.abc import AsyncGenerator, Iterable, Mapping

    from connectrpc.codec import Codec
    from connectrpc.compression import Compression
    from connectrpc.interceptor import Interceptor, InterceptorSync
    from connectrpc.request import Headers, RequestContext



_DEFAULT_CODECS = google_protobuf_codecs()
_PROTO_BINARY_CODEC = google_protobuf_binary_codec()
_GZIP_COMPRESSION = GzipCompression()

class InstanceService(Protocol):
    async def create_instance(self, request: InstanceCreateRequest, ctx: RequestContext[InstanceCreateRequest, InstanceCreateResponse]) -> InstanceCreateResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def delete_instance(self, request: InstanceDeleteRequest, ctx: RequestContext[InstanceDeleteRequest, InstanceDeleteResponse]) -> InstanceDeleteResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def list_instances(self, request: InstanceListRequest, ctx: RequestContext[InstanceListRequest, InstanceListResponse]) -> InstanceListResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def get_instance_info(self, request: InstanceInfoRequest, ctx: RequestContext[InstanceInfoRequest, InstanceInfoResponse]) -> InstanceInfoResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def update_instance_meta(self, request: InstanceUpdateMetaRequest, ctx: RequestContext[InstanceUpdateMetaRequest, InstanceUpdateMetaResponse]) -> InstanceUpdateMetaResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def update_instance_config(self, request: InstanceUpdateConfigRequest, ctx: RequestContext[InstanceUpdateConfigRequest, InstanceUpdateConfigResponse]) -> InstanceUpdateConfigResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def update_instance_config_entry(self, request: InstanceUpdateConfigEntryRequest, ctx: RequestContext[InstanceUpdateConfigEntryRequest, InstanceUpdateConfigEntryResponse]) -> InstanceUpdateConfigEntryResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def add_instance_account(self, request: InstanceAddAccountRequest, ctx: RequestContext[InstanceAddAccountRequest, InstanceAddAccountResponse]) -> InstanceAddAccountResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def remove_instance_account(self, request: InstanceRemoveAccountRequest, ctx: RequestContext[InstanceRemoveAccountRequest, InstanceRemoveAccountResponse]) -> InstanceRemoveAccountResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def update_instance_account(self, request: InstanceUpdateAccountRequest, ctx: RequestContext[InstanceUpdateAccountRequest, InstanceUpdateAccountResponse]) -> InstanceUpdateAccountResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def add_instance_accounts_batch(self, request: InstanceAddAccountsBatchRequest, ctx: RequestContext[InstanceAddAccountsBatchRequest, InstanceAddAccountsBatchResponse]) -> InstanceAddAccountsBatchResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def remove_instance_accounts_batch(self, request: InstanceRemoveAccountsBatchRequest, ctx: RequestContext[InstanceRemoveAccountsBatchRequest, InstanceRemoveAccountsBatchResponse]) -> InstanceRemoveAccountsBatchResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def add_instance_proxy(self, request: InstanceAddProxyRequest, ctx: RequestContext[InstanceAddProxyRequest, InstanceAddProxyResponse]) -> InstanceAddProxyResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def remove_instance_proxy(self, request: InstanceRemoveProxyRequest, ctx: RequestContext[InstanceRemoveProxyRequest, InstanceRemoveProxyResponse]) -> InstanceRemoveProxyResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def update_instance_proxy(self, request: InstanceUpdateProxyRequest, ctx: RequestContext[InstanceUpdateProxyRequest, InstanceUpdateProxyResponse]) -> InstanceUpdateProxyResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def add_instance_proxies_batch(self, request: InstanceAddProxiesBatchRequest, ctx: RequestContext[InstanceAddProxiesBatchRequest, InstanceAddProxiesBatchResponse]) -> InstanceAddProxiesBatchResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def remove_instance_proxies_batch(self, request: InstanceRemoveProxiesBatchRequest, ctx: RequestContext[InstanceRemoveProxiesBatchRequest, InstanceRemoveProxiesBatchResponse]) -> InstanceRemoveProxiesBatchResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def get_audit_log(self, request: InstanceAuditLogRequest, ctx: RequestContext[InstanceAuditLogRequest, InstanceAuditLogResponse]) -> InstanceAuditLogResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def get_account_metadata(self, request: GetAccountMetadataRequest, ctx: RequestContext[GetAccountMetadataRequest, GetAccountMetadataResponse]) -> GetAccountMetadataResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def set_account_metadata_entry(self, request: SetAccountMetadataEntryRequest, ctx: RequestContext[SetAccountMetadataEntryRequest, SetAccountMetadataEntryResponse]) -> SetAccountMetadataEntryResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def delete_account_metadata_entry(self, request: DeleteAccountMetadataEntryRequest, ctx: RequestContext[DeleteAccountMetadataEntryRequest, DeleteAccountMetadataEntryResponse]) -> DeleteAccountMetadataEntryResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def get_instance_metadata(self, request: GetInstanceMetadataRequest, ctx: RequestContext[GetInstanceMetadataRequest, GetInstanceMetadataResponse]) -> GetInstanceMetadataResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def set_instance_metadata_entry(self, request: SetInstanceMetadataEntryRequest, ctx: RequestContext[SetInstanceMetadataEntryRequest, SetInstanceMetadataEntryResponse]) -> SetInstanceMetadataEntryResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    async def delete_instance_metadata_entry(self, request: DeleteInstanceMetadataEntryRequest, ctx: RequestContext[DeleteInstanceMetadataEntryRequest, DeleteInstanceMetadataEntryResponse]) -> DeleteInstanceMetadataEntryResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')


class InstanceServiceASGIApplication(ConnectASGIApplication[InstanceService]):
    def __init__(
        self,
        service: InstanceService | AsyncGenerator[InstanceService],
        *,
        interceptors: Iterable[Interceptor] = (),
        read_max_bytes: int | None = None,
        compressions: Iterable[Compression] | None = None,
        codecs: Iterable[Codec] | None = _DEFAULT_CODECS,
    ) -> None:
        super().__init__(
            service=service,
            endpoints=lambda svc: {
                "/soulfire.v1.InstanceService/CreateInstance": Endpoint.unary(
                    method=MethodInfo(
                        name="CreateInstance",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceCreateRequest,
                        output=InstanceCreateResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.create_instance,
                ),
                "/soulfire.v1.InstanceService/DeleteInstance": Endpoint.unary(
                    method=MethodInfo(
                        name="DeleteInstance",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceDeleteRequest,
                        output=InstanceDeleteResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.delete_instance,
                ),
                "/soulfire.v1.InstanceService/ListInstances": Endpoint.unary(
                    method=MethodInfo(
                        name="ListInstances",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceListRequest,
                        output=InstanceListResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.list_instances,
                ),
                "/soulfire.v1.InstanceService/GetInstanceInfo": Endpoint.unary(
                    method=MethodInfo(
                        name="GetInstanceInfo",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceInfoRequest,
                        output=InstanceInfoResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.get_instance_info,
                ),
                "/soulfire.v1.InstanceService/UpdateInstanceMeta": Endpoint.unary(
                    method=MethodInfo(
                        name="UpdateInstanceMeta",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceUpdateMetaRequest,
                        output=InstanceUpdateMetaResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.update_instance_meta,
                ),
                "/soulfire.v1.InstanceService/UpdateInstanceConfig": Endpoint.unary(
                    method=MethodInfo(
                        name="UpdateInstanceConfig",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceUpdateConfigRequest,
                        output=InstanceUpdateConfigResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.update_instance_config,
                ),
                "/soulfire.v1.InstanceService/UpdateInstanceConfigEntry": Endpoint.unary(
                    method=MethodInfo(
                        name="UpdateInstanceConfigEntry",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceUpdateConfigEntryRequest,
                        output=InstanceUpdateConfigEntryResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.update_instance_config_entry,
                ),
                "/soulfire.v1.InstanceService/AddInstanceAccount": Endpoint.unary(
                    method=MethodInfo(
                        name="AddInstanceAccount",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceAddAccountRequest,
                        output=InstanceAddAccountResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.add_instance_account,
                ),
                "/soulfire.v1.InstanceService/RemoveInstanceAccount": Endpoint.unary(
                    method=MethodInfo(
                        name="RemoveInstanceAccount",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceRemoveAccountRequest,
                        output=InstanceRemoveAccountResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.remove_instance_account,
                ),
                "/soulfire.v1.InstanceService/UpdateInstanceAccount": Endpoint.unary(
                    method=MethodInfo(
                        name="UpdateInstanceAccount",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceUpdateAccountRequest,
                        output=InstanceUpdateAccountResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.update_instance_account,
                ),
                "/soulfire.v1.InstanceService/AddInstanceAccountsBatch": Endpoint.unary(
                    method=MethodInfo(
                        name="AddInstanceAccountsBatch",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceAddAccountsBatchRequest,
                        output=InstanceAddAccountsBatchResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.add_instance_accounts_batch,
                ),
                "/soulfire.v1.InstanceService/RemoveInstanceAccountsBatch": Endpoint.unary(
                    method=MethodInfo(
                        name="RemoveInstanceAccountsBatch",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceRemoveAccountsBatchRequest,
                        output=InstanceRemoveAccountsBatchResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.remove_instance_accounts_batch,
                ),
                "/soulfire.v1.InstanceService/AddInstanceProxy": Endpoint.unary(
                    method=MethodInfo(
                        name="AddInstanceProxy",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceAddProxyRequest,
                        output=InstanceAddProxyResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.add_instance_proxy,
                ),
                "/soulfire.v1.InstanceService/RemoveInstanceProxy": Endpoint.unary(
                    method=MethodInfo(
                        name="RemoveInstanceProxy",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceRemoveProxyRequest,
                        output=InstanceRemoveProxyResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.remove_instance_proxy,
                ),
                "/soulfire.v1.InstanceService/UpdateInstanceProxy": Endpoint.unary(
                    method=MethodInfo(
                        name="UpdateInstanceProxy",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceUpdateProxyRequest,
                        output=InstanceUpdateProxyResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.update_instance_proxy,
                ),
                "/soulfire.v1.InstanceService/AddInstanceProxiesBatch": Endpoint.unary(
                    method=MethodInfo(
                        name="AddInstanceProxiesBatch",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceAddProxiesBatchRequest,
                        output=InstanceAddProxiesBatchResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.add_instance_proxies_batch,
                ),
                "/soulfire.v1.InstanceService/RemoveInstanceProxiesBatch": Endpoint.unary(
                    method=MethodInfo(
                        name="RemoveInstanceProxiesBatch",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceRemoveProxiesBatchRequest,
                        output=InstanceRemoveProxiesBatchResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.remove_instance_proxies_batch,
                ),
                "/soulfire.v1.InstanceService/GetAuditLog": Endpoint.unary(
                    method=MethodInfo(
                        name="GetAuditLog",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceAuditLogRequest,
                        output=InstanceAuditLogResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.get_audit_log,
                ),
                "/soulfire.v1.InstanceService/GetAccountMetadata": Endpoint.unary(
                    method=MethodInfo(
                        name="GetAccountMetadata",
                        service_name="soulfire.v1.InstanceService",
                        input=GetAccountMetadataRequest,
                        output=GetAccountMetadataResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.get_account_metadata,
                ),
                "/soulfire.v1.InstanceService/SetAccountMetadataEntry": Endpoint.unary(
                    method=MethodInfo(
                        name="SetAccountMetadataEntry",
                        service_name="soulfire.v1.InstanceService",
                        input=SetAccountMetadataEntryRequest,
                        output=SetAccountMetadataEntryResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.set_account_metadata_entry,
                ),
                "/soulfire.v1.InstanceService/DeleteAccountMetadataEntry": Endpoint.unary(
                    method=MethodInfo(
                        name="DeleteAccountMetadataEntry",
                        service_name="soulfire.v1.InstanceService",
                        input=DeleteAccountMetadataEntryRequest,
                        output=DeleteAccountMetadataEntryResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.delete_account_metadata_entry,
                ),
                "/soulfire.v1.InstanceService/GetInstanceMetadata": Endpoint.unary(
                    method=MethodInfo(
                        name="GetInstanceMetadata",
                        service_name="soulfire.v1.InstanceService",
                        input=GetInstanceMetadataRequest,
                        output=GetInstanceMetadataResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.get_instance_metadata,
                ),
                "/soulfire.v1.InstanceService/SetInstanceMetadataEntry": Endpoint.unary(
                    method=MethodInfo(
                        name="SetInstanceMetadataEntry",
                        service_name="soulfire.v1.InstanceService",
                        input=SetInstanceMetadataEntryRequest,
                        output=SetInstanceMetadataEntryResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.set_instance_metadata_entry,
                ),
                "/soulfire.v1.InstanceService/DeleteInstanceMetadataEntry": Endpoint.unary(
                    method=MethodInfo(
                        name="DeleteInstanceMetadataEntry",
                        service_name="soulfire.v1.InstanceService",
                        input=DeleteInstanceMetadataEntryRequest,
                        output=DeleteInstanceMetadataEntryResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=svc.delete_instance_metadata_entry,
                ),
            },
            interceptors=interceptors,
            read_max_bytes=read_max_bytes,
            compressions=compressions,
            codecs=codecs,
        )

    @property
    def path(self) -> str:
        """Returns the URL path to mount the application to when serving multiple applications."""
        return "/soulfire.v1.InstanceService"


class InstanceServiceClient(ConnectClient):
    def __init__(
        self,
        address: str,
        *,
        codec: Codec | None = _PROTO_BINARY_CODEC,
        protocol: ProtocolType = ProtocolType.CONNECT,
        accept_compression: Iterable[Compression] | None = None,
        send_compression: Compression | None = _GZIP_COMPRESSION,
        timeout_ms: int | None = None,
        read_max_bytes: int | None = None,
        interceptors: Iterable[Interceptor] = (),
        http_client: Client | None = None,
    ) -> None:
        super().__init__(
            address=address,
            codec=codec,
            protocol=protocol,
            accept_compression=accept_compression,
            send_compression=send_compression,
            timeout_ms=timeout_ms,
            read_max_bytes=read_max_bytes,
            interceptors=interceptors,
            http_client=http_client,
        )
    async def create_instance(
        self,
        request: InstanceCreateRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceCreateResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="CreateInstance",
                service_name="soulfire.v1.InstanceService",
                input=InstanceCreateRequest,
                output=InstanceCreateResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def delete_instance(
        self,
        request: InstanceDeleteRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceDeleteResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="DeleteInstance",
                service_name="soulfire.v1.InstanceService",
                input=InstanceDeleteRequest,
                output=InstanceDeleteResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def list_instances(
        self,
        request: InstanceListRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceListResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ListInstances",
                service_name="soulfire.v1.InstanceService",
                input=InstanceListRequest,
                output=InstanceListResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def get_instance_info(
        self,
        request: InstanceInfoRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceInfoResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetInstanceInfo",
                service_name="soulfire.v1.InstanceService",
                input=InstanceInfoRequest,
                output=InstanceInfoResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def update_instance_meta(
        self,
        request: InstanceUpdateMetaRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceUpdateMetaResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateInstanceMeta",
                service_name="soulfire.v1.InstanceService",
                input=InstanceUpdateMetaRequest,
                output=InstanceUpdateMetaResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def update_instance_config(
        self,
        request: InstanceUpdateConfigRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceUpdateConfigResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateInstanceConfig",
                service_name="soulfire.v1.InstanceService",
                input=InstanceUpdateConfigRequest,
                output=InstanceUpdateConfigResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def update_instance_config_entry(
        self,
        request: InstanceUpdateConfigEntryRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceUpdateConfigEntryResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateInstanceConfigEntry",
                service_name="soulfire.v1.InstanceService",
                input=InstanceUpdateConfigEntryRequest,
                output=InstanceUpdateConfigEntryResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def add_instance_account(
        self,
        request: InstanceAddAccountRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceAddAccountResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="AddInstanceAccount",
                service_name="soulfire.v1.InstanceService",
                input=InstanceAddAccountRequest,
                output=InstanceAddAccountResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def remove_instance_account(
        self,
        request: InstanceRemoveAccountRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceRemoveAccountResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="RemoveInstanceAccount",
                service_name="soulfire.v1.InstanceService",
                input=InstanceRemoveAccountRequest,
                output=InstanceRemoveAccountResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def update_instance_account(
        self,
        request: InstanceUpdateAccountRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceUpdateAccountResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateInstanceAccount",
                service_name="soulfire.v1.InstanceService",
                input=InstanceUpdateAccountRequest,
                output=InstanceUpdateAccountResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def add_instance_accounts_batch(
        self,
        request: InstanceAddAccountsBatchRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceAddAccountsBatchResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="AddInstanceAccountsBatch",
                service_name="soulfire.v1.InstanceService",
                input=InstanceAddAccountsBatchRequest,
                output=InstanceAddAccountsBatchResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def remove_instance_accounts_batch(
        self,
        request: InstanceRemoveAccountsBatchRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceRemoveAccountsBatchResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="RemoveInstanceAccountsBatch",
                service_name="soulfire.v1.InstanceService",
                input=InstanceRemoveAccountsBatchRequest,
                output=InstanceRemoveAccountsBatchResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def add_instance_proxy(
        self,
        request: InstanceAddProxyRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceAddProxyResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="AddInstanceProxy",
                service_name="soulfire.v1.InstanceService",
                input=InstanceAddProxyRequest,
                output=InstanceAddProxyResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def remove_instance_proxy(
        self,
        request: InstanceRemoveProxyRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceRemoveProxyResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="RemoveInstanceProxy",
                service_name="soulfire.v1.InstanceService",
                input=InstanceRemoveProxyRequest,
                output=InstanceRemoveProxyResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def update_instance_proxy(
        self,
        request: InstanceUpdateProxyRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceUpdateProxyResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateInstanceProxy",
                service_name="soulfire.v1.InstanceService",
                input=InstanceUpdateProxyRequest,
                output=InstanceUpdateProxyResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def add_instance_proxies_batch(
        self,
        request: InstanceAddProxiesBatchRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceAddProxiesBatchResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="AddInstanceProxiesBatch",
                service_name="soulfire.v1.InstanceService",
                input=InstanceAddProxiesBatchRequest,
                output=InstanceAddProxiesBatchResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def remove_instance_proxies_batch(
        self,
        request: InstanceRemoveProxiesBatchRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceRemoveProxiesBatchResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="RemoveInstanceProxiesBatch",
                service_name="soulfire.v1.InstanceService",
                input=InstanceRemoveProxiesBatchRequest,
                output=InstanceRemoveProxiesBatchResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def get_audit_log(
        self,
        request: InstanceAuditLogRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceAuditLogResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetAuditLog",
                service_name="soulfire.v1.InstanceService",
                input=InstanceAuditLogRequest,
                output=InstanceAuditLogResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def get_account_metadata(
        self,
        request: GetAccountMetadataRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> GetAccountMetadataResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetAccountMetadata",
                service_name="soulfire.v1.InstanceService",
                input=GetAccountMetadataRequest,
                output=GetAccountMetadataResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def set_account_metadata_entry(
        self,
        request: SetAccountMetadataEntryRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> SetAccountMetadataEntryResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="SetAccountMetadataEntry",
                service_name="soulfire.v1.InstanceService",
                input=SetAccountMetadataEntryRequest,
                output=SetAccountMetadataEntryResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def delete_account_metadata_entry(
        self,
        request: DeleteAccountMetadataEntryRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> DeleteAccountMetadataEntryResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="DeleteAccountMetadataEntry",
                service_name="soulfire.v1.InstanceService",
                input=DeleteAccountMetadataEntryRequest,
                output=DeleteAccountMetadataEntryResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def get_instance_metadata(
        self,
        request: GetInstanceMetadataRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> GetInstanceMetadataResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetInstanceMetadata",
                service_name="soulfire.v1.InstanceService",
                input=GetInstanceMetadataRequest,
                output=GetInstanceMetadataResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def set_instance_metadata_entry(
        self,
        request: SetInstanceMetadataEntryRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> SetInstanceMetadataEntryResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="SetInstanceMetadataEntry",
                service_name="soulfire.v1.InstanceService",
                input=SetInstanceMetadataEntryRequest,
                output=SetInstanceMetadataEntryResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

    async def delete_instance_metadata_entry(
        self,
        request: DeleteInstanceMetadataEntryRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> DeleteInstanceMetadataEntryResponse:
        return await self.execute_unary(
            request=request,
            method=MethodInfo(
                name="DeleteInstanceMetadataEntry",
                service_name="soulfire.v1.InstanceService",
                input=DeleteInstanceMetadataEntryRequest,
                output=DeleteInstanceMetadataEntryResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )

class InstanceServiceSync(Protocol):
    def create_instance(self, request: InstanceCreateRequest, ctx: RequestContext[InstanceCreateRequest, InstanceCreateResponse]) -> InstanceCreateResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def delete_instance(self, request: InstanceDeleteRequest, ctx: RequestContext[InstanceDeleteRequest, InstanceDeleteResponse]) -> InstanceDeleteResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def list_instances(self, request: InstanceListRequest, ctx: RequestContext[InstanceListRequest, InstanceListResponse]) -> InstanceListResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def get_instance_info(self, request: InstanceInfoRequest, ctx: RequestContext[InstanceInfoRequest, InstanceInfoResponse]) -> InstanceInfoResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def update_instance_meta(self, request: InstanceUpdateMetaRequest, ctx: RequestContext[InstanceUpdateMetaRequest, InstanceUpdateMetaResponse]) -> InstanceUpdateMetaResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def update_instance_config(self, request: InstanceUpdateConfigRequest, ctx: RequestContext[InstanceUpdateConfigRequest, InstanceUpdateConfigResponse]) -> InstanceUpdateConfigResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def update_instance_config_entry(self, request: InstanceUpdateConfigEntryRequest, ctx: RequestContext[InstanceUpdateConfigEntryRequest, InstanceUpdateConfigEntryResponse]) -> InstanceUpdateConfigEntryResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def add_instance_account(self, request: InstanceAddAccountRequest, ctx: RequestContext[InstanceAddAccountRequest, InstanceAddAccountResponse]) -> InstanceAddAccountResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def remove_instance_account(self, request: InstanceRemoveAccountRequest, ctx: RequestContext[InstanceRemoveAccountRequest, InstanceRemoveAccountResponse]) -> InstanceRemoveAccountResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def update_instance_account(self, request: InstanceUpdateAccountRequest, ctx: RequestContext[InstanceUpdateAccountRequest, InstanceUpdateAccountResponse]) -> InstanceUpdateAccountResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def add_instance_accounts_batch(self, request: InstanceAddAccountsBatchRequest, ctx: RequestContext[InstanceAddAccountsBatchRequest, InstanceAddAccountsBatchResponse]) -> InstanceAddAccountsBatchResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def remove_instance_accounts_batch(self, request: InstanceRemoveAccountsBatchRequest, ctx: RequestContext[InstanceRemoveAccountsBatchRequest, InstanceRemoveAccountsBatchResponse]) -> InstanceRemoveAccountsBatchResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def add_instance_proxy(self, request: InstanceAddProxyRequest, ctx: RequestContext[InstanceAddProxyRequest, InstanceAddProxyResponse]) -> InstanceAddProxyResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def remove_instance_proxy(self, request: InstanceRemoveProxyRequest, ctx: RequestContext[InstanceRemoveProxyRequest, InstanceRemoveProxyResponse]) -> InstanceRemoveProxyResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def update_instance_proxy(self, request: InstanceUpdateProxyRequest, ctx: RequestContext[InstanceUpdateProxyRequest, InstanceUpdateProxyResponse]) -> InstanceUpdateProxyResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def add_instance_proxies_batch(self, request: InstanceAddProxiesBatchRequest, ctx: RequestContext[InstanceAddProxiesBatchRequest, InstanceAddProxiesBatchResponse]) -> InstanceAddProxiesBatchResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def remove_instance_proxies_batch(self, request: InstanceRemoveProxiesBatchRequest, ctx: RequestContext[InstanceRemoveProxiesBatchRequest, InstanceRemoveProxiesBatchResponse]) -> InstanceRemoveProxiesBatchResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def get_audit_log(self, request: InstanceAuditLogRequest, ctx: RequestContext[InstanceAuditLogRequest, InstanceAuditLogResponse]) -> InstanceAuditLogResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def get_account_metadata(self, request: GetAccountMetadataRequest, ctx: RequestContext[GetAccountMetadataRequest, GetAccountMetadataResponse]) -> GetAccountMetadataResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def set_account_metadata_entry(self, request: SetAccountMetadataEntryRequest, ctx: RequestContext[SetAccountMetadataEntryRequest, SetAccountMetadataEntryResponse]) -> SetAccountMetadataEntryResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def delete_account_metadata_entry(self, request: DeleteAccountMetadataEntryRequest, ctx: RequestContext[DeleteAccountMetadataEntryRequest, DeleteAccountMetadataEntryResponse]) -> DeleteAccountMetadataEntryResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def get_instance_metadata(self, request: GetInstanceMetadataRequest, ctx: RequestContext[GetInstanceMetadataRequest, GetInstanceMetadataResponse]) -> GetInstanceMetadataResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def set_instance_metadata_entry(self, request: SetInstanceMetadataEntryRequest, ctx: RequestContext[SetInstanceMetadataEntryRequest, SetInstanceMetadataEntryResponse]) -> SetInstanceMetadataEntryResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')

    def delete_instance_metadata_entry(self, request: DeleteInstanceMetadataEntryRequest, ctx: RequestContext[DeleteInstanceMetadataEntryRequest, DeleteInstanceMetadataEntryResponse]) -> DeleteInstanceMetadataEntryResponse:
        raise ConnectError(Code.UNIMPLEMENTED, 'Not implemented')


class InstanceServiceWSGIApplication(ConnectWSGIApplication):
    def __init__(
        self,
        service: InstanceServiceSync,
        interceptors: Iterable[InterceptorSync] = (),
        read_max_bytes: int | None = None,
        compressions: Iterable[Compression] | None = None,
        codecs: Iterable[Codec] | None = _DEFAULT_CODECS,
    ) -> None:
        super().__init__(
            endpoints={
                "/soulfire.v1.InstanceService/CreateInstance": EndpointSync.unary(
                    method=MethodInfo(
                        name="CreateInstance",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceCreateRequest,
                        output=InstanceCreateResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.create_instance,
                ),
                "/soulfire.v1.InstanceService/DeleteInstance": EndpointSync.unary(
                    method=MethodInfo(
                        name="DeleteInstance",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceDeleteRequest,
                        output=InstanceDeleteResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.delete_instance,
                ),
                "/soulfire.v1.InstanceService/ListInstances": EndpointSync.unary(
                    method=MethodInfo(
                        name="ListInstances",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceListRequest,
                        output=InstanceListResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.list_instances,
                ),
                "/soulfire.v1.InstanceService/GetInstanceInfo": EndpointSync.unary(
                    method=MethodInfo(
                        name="GetInstanceInfo",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceInfoRequest,
                        output=InstanceInfoResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.get_instance_info,
                ),
                "/soulfire.v1.InstanceService/UpdateInstanceMeta": EndpointSync.unary(
                    method=MethodInfo(
                        name="UpdateInstanceMeta",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceUpdateMetaRequest,
                        output=InstanceUpdateMetaResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.update_instance_meta,
                ),
                "/soulfire.v1.InstanceService/UpdateInstanceConfig": EndpointSync.unary(
                    method=MethodInfo(
                        name="UpdateInstanceConfig",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceUpdateConfigRequest,
                        output=InstanceUpdateConfigResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.update_instance_config,
                ),
                "/soulfire.v1.InstanceService/UpdateInstanceConfigEntry": EndpointSync.unary(
                    method=MethodInfo(
                        name="UpdateInstanceConfigEntry",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceUpdateConfigEntryRequest,
                        output=InstanceUpdateConfigEntryResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.update_instance_config_entry,
                ),
                "/soulfire.v1.InstanceService/AddInstanceAccount": EndpointSync.unary(
                    method=MethodInfo(
                        name="AddInstanceAccount",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceAddAccountRequest,
                        output=InstanceAddAccountResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.add_instance_account,
                ),
                "/soulfire.v1.InstanceService/RemoveInstanceAccount": EndpointSync.unary(
                    method=MethodInfo(
                        name="RemoveInstanceAccount",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceRemoveAccountRequest,
                        output=InstanceRemoveAccountResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.remove_instance_account,
                ),
                "/soulfire.v1.InstanceService/UpdateInstanceAccount": EndpointSync.unary(
                    method=MethodInfo(
                        name="UpdateInstanceAccount",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceUpdateAccountRequest,
                        output=InstanceUpdateAccountResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.update_instance_account,
                ),
                "/soulfire.v1.InstanceService/AddInstanceAccountsBatch": EndpointSync.unary(
                    method=MethodInfo(
                        name="AddInstanceAccountsBatch",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceAddAccountsBatchRequest,
                        output=InstanceAddAccountsBatchResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.add_instance_accounts_batch,
                ),
                "/soulfire.v1.InstanceService/RemoveInstanceAccountsBatch": EndpointSync.unary(
                    method=MethodInfo(
                        name="RemoveInstanceAccountsBatch",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceRemoveAccountsBatchRequest,
                        output=InstanceRemoveAccountsBatchResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.remove_instance_accounts_batch,
                ),
                "/soulfire.v1.InstanceService/AddInstanceProxy": EndpointSync.unary(
                    method=MethodInfo(
                        name="AddInstanceProxy",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceAddProxyRequest,
                        output=InstanceAddProxyResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.add_instance_proxy,
                ),
                "/soulfire.v1.InstanceService/RemoveInstanceProxy": EndpointSync.unary(
                    method=MethodInfo(
                        name="RemoveInstanceProxy",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceRemoveProxyRequest,
                        output=InstanceRemoveProxyResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.remove_instance_proxy,
                ),
                "/soulfire.v1.InstanceService/UpdateInstanceProxy": EndpointSync.unary(
                    method=MethodInfo(
                        name="UpdateInstanceProxy",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceUpdateProxyRequest,
                        output=InstanceUpdateProxyResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.update_instance_proxy,
                ),
                "/soulfire.v1.InstanceService/AddInstanceProxiesBatch": EndpointSync.unary(
                    method=MethodInfo(
                        name="AddInstanceProxiesBatch",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceAddProxiesBatchRequest,
                        output=InstanceAddProxiesBatchResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.add_instance_proxies_batch,
                ),
                "/soulfire.v1.InstanceService/RemoveInstanceProxiesBatch": EndpointSync.unary(
                    method=MethodInfo(
                        name="RemoveInstanceProxiesBatch",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceRemoveProxiesBatchRequest,
                        output=InstanceRemoveProxiesBatchResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.remove_instance_proxies_batch,
                ),
                "/soulfire.v1.InstanceService/GetAuditLog": EndpointSync.unary(
                    method=MethodInfo(
                        name="GetAuditLog",
                        service_name="soulfire.v1.InstanceService",
                        input=InstanceAuditLogRequest,
                        output=InstanceAuditLogResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.get_audit_log,
                ),
                "/soulfire.v1.InstanceService/GetAccountMetadata": EndpointSync.unary(
                    method=MethodInfo(
                        name="GetAccountMetadata",
                        service_name="soulfire.v1.InstanceService",
                        input=GetAccountMetadataRequest,
                        output=GetAccountMetadataResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.get_account_metadata,
                ),
                "/soulfire.v1.InstanceService/SetAccountMetadataEntry": EndpointSync.unary(
                    method=MethodInfo(
                        name="SetAccountMetadataEntry",
                        service_name="soulfire.v1.InstanceService",
                        input=SetAccountMetadataEntryRequest,
                        output=SetAccountMetadataEntryResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.set_account_metadata_entry,
                ),
                "/soulfire.v1.InstanceService/DeleteAccountMetadataEntry": EndpointSync.unary(
                    method=MethodInfo(
                        name="DeleteAccountMetadataEntry",
                        service_name="soulfire.v1.InstanceService",
                        input=DeleteAccountMetadataEntryRequest,
                        output=DeleteAccountMetadataEntryResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.delete_account_metadata_entry,
                ),
                "/soulfire.v1.InstanceService/GetInstanceMetadata": EndpointSync.unary(
                    method=MethodInfo(
                        name="GetInstanceMetadata",
                        service_name="soulfire.v1.InstanceService",
                        input=GetInstanceMetadataRequest,
                        output=GetInstanceMetadataResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.get_instance_metadata,
                ),
                "/soulfire.v1.InstanceService/SetInstanceMetadataEntry": EndpointSync.unary(
                    method=MethodInfo(
                        name="SetInstanceMetadataEntry",
                        service_name="soulfire.v1.InstanceService",
                        input=SetInstanceMetadataEntryRequest,
                        output=SetInstanceMetadataEntryResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.set_instance_metadata_entry,
                ),
                "/soulfire.v1.InstanceService/DeleteInstanceMetadataEntry": EndpointSync.unary(
                    method=MethodInfo(
                        name="DeleteInstanceMetadataEntry",
                        service_name="soulfire.v1.InstanceService",
                        input=DeleteInstanceMetadataEntryRequest,
                        output=DeleteInstanceMetadataEntryResponse,
                        idempotency_level=IdempotencyLevel.UNKNOWN,
                    ),
                    function=service.delete_instance_metadata_entry,
                ),
            },
            interceptors=interceptors,
            read_max_bytes=read_max_bytes,
            compressions=compressions,
            codecs=codecs,
        )

    @property
    def path(self) -> str:
        """Returns the URL path to mount the application to when serving multiple applications."""
        return "/soulfire.v1.InstanceService"


class InstanceServiceClientSync(ConnectClientSync):
    def __init__(
        self,
        address: str,
        *,
        codec: Codec | None = _PROTO_BINARY_CODEC,
        protocol: ProtocolType = ProtocolType.CONNECT,
        accept_compression: Iterable[Compression] | None = None,
        send_compression: Compression | None = _GZIP_COMPRESSION,
        timeout_ms: int | None = None,
        read_max_bytes: int | None = None,
        interceptors: Iterable[InterceptorSync] = (),
        http_client: SyncClient | None = None,
    ) -> None:
        super().__init__(
            address=address,
            codec=codec,
            protocol=protocol,
            accept_compression=accept_compression,
            send_compression=send_compression,
            timeout_ms=timeout_ms,
            read_max_bytes=read_max_bytes,
            interceptors=interceptors,
            http_client=http_client,
        )
    def create_instance(
        self,
        request: InstanceCreateRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceCreateResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="CreateInstance",
                service_name="soulfire.v1.InstanceService",
                input=InstanceCreateRequest,
                output=InstanceCreateResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def delete_instance(
        self,
        request: InstanceDeleteRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceDeleteResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="DeleteInstance",
                service_name="soulfire.v1.InstanceService",
                input=InstanceDeleteRequest,
                output=InstanceDeleteResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def list_instances(
        self,
        request: InstanceListRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceListResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="ListInstances",
                service_name="soulfire.v1.InstanceService",
                input=InstanceListRequest,
                output=InstanceListResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def get_instance_info(
        self,
        request: InstanceInfoRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceInfoResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetInstanceInfo",
                service_name="soulfire.v1.InstanceService",
                input=InstanceInfoRequest,
                output=InstanceInfoResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def update_instance_meta(
        self,
        request: InstanceUpdateMetaRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceUpdateMetaResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateInstanceMeta",
                service_name="soulfire.v1.InstanceService",
                input=InstanceUpdateMetaRequest,
                output=InstanceUpdateMetaResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def update_instance_config(
        self,
        request: InstanceUpdateConfigRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceUpdateConfigResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateInstanceConfig",
                service_name="soulfire.v1.InstanceService",
                input=InstanceUpdateConfigRequest,
                output=InstanceUpdateConfigResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def update_instance_config_entry(
        self,
        request: InstanceUpdateConfigEntryRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceUpdateConfigEntryResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateInstanceConfigEntry",
                service_name="soulfire.v1.InstanceService",
                input=InstanceUpdateConfigEntryRequest,
                output=InstanceUpdateConfigEntryResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def add_instance_account(
        self,
        request: InstanceAddAccountRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceAddAccountResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="AddInstanceAccount",
                service_name="soulfire.v1.InstanceService",
                input=InstanceAddAccountRequest,
                output=InstanceAddAccountResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def remove_instance_account(
        self,
        request: InstanceRemoveAccountRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceRemoveAccountResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="RemoveInstanceAccount",
                service_name="soulfire.v1.InstanceService",
                input=InstanceRemoveAccountRequest,
                output=InstanceRemoveAccountResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def update_instance_account(
        self,
        request: InstanceUpdateAccountRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceUpdateAccountResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateInstanceAccount",
                service_name="soulfire.v1.InstanceService",
                input=InstanceUpdateAccountRequest,
                output=InstanceUpdateAccountResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def add_instance_accounts_batch(
        self,
        request: InstanceAddAccountsBatchRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceAddAccountsBatchResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="AddInstanceAccountsBatch",
                service_name="soulfire.v1.InstanceService",
                input=InstanceAddAccountsBatchRequest,
                output=InstanceAddAccountsBatchResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def remove_instance_accounts_batch(
        self,
        request: InstanceRemoveAccountsBatchRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceRemoveAccountsBatchResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="RemoveInstanceAccountsBatch",
                service_name="soulfire.v1.InstanceService",
                input=InstanceRemoveAccountsBatchRequest,
                output=InstanceRemoveAccountsBatchResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def add_instance_proxy(
        self,
        request: InstanceAddProxyRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceAddProxyResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="AddInstanceProxy",
                service_name="soulfire.v1.InstanceService",
                input=InstanceAddProxyRequest,
                output=InstanceAddProxyResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def remove_instance_proxy(
        self,
        request: InstanceRemoveProxyRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceRemoveProxyResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="RemoveInstanceProxy",
                service_name="soulfire.v1.InstanceService",
                input=InstanceRemoveProxyRequest,
                output=InstanceRemoveProxyResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def update_instance_proxy(
        self,
        request: InstanceUpdateProxyRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceUpdateProxyResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="UpdateInstanceProxy",
                service_name="soulfire.v1.InstanceService",
                input=InstanceUpdateProxyRequest,
                output=InstanceUpdateProxyResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def add_instance_proxies_batch(
        self,
        request: InstanceAddProxiesBatchRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceAddProxiesBatchResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="AddInstanceProxiesBatch",
                service_name="soulfire.v1.InstanceService",
                input=InstanceAddProxiesBatchRequest,
                output=InstanceAddProxiesBatchResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def remove_instance_proxies_batch(
        self,
        request: InstanceRemoveProxiesBatchRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceRemoveProxiesBatchResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="RemoveInstanceProxiesBatch",
                service_name="soulfire.v1.InstanceService",
                input=InstanceRemoveProxiesBatchRequest,
                output=InstanceRemoveProxiesBatchResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def get_audit_log(
        self,
        request: InstanceAuditLogRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> InstanceAuditLogResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetAuditLog",
                service_name="soulfire.v1.InstanceService",
                input=InstanceAuditLogRequest,
                output=InstanceAuditLogResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def get_account_metadata(
        self,
        request: GetAccountMetadataRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> GetAccountMetadataResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetAccountMetadata",
                service_name="soulfire.v1.InstanceService",
                input=GetAccountMetadataRequest,
                output=GetAccountMetadataResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def set_account_metadata_entry(
        self,
        request: SetAccountMetadataEntryRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> SetAccountMetadataEntryResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="SetAccountMetadataEntry",
                service_name="soulfire.v1.InstanceService",
                input=SetAccountMetadataEntryRequest,
                output=SetAccountMetadataEntryResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def delete_account_metadata_entry(
        self,
        request: DeleteAccountMetadataEntryRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> DeleteAccountMetadataEntryResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="DeleteAccountMetadataEntry",
                service_name="soulfire.v1.InstanceService",
                input=DeleteAccountMetadataEntryRequest,
                output=DeleteAccountMetadataEntryResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def get_instance_metadata(
        self,
        request: GetInstanceMetadataRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> GetInstanceMetadataResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="GetInstanceMetadata",
                service_name="soulfire.v1.InstanceService",
                input=GetInstanceMetadataRequest,
                output=GetInstanceMetadataResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def set_instance_metadata_entry(
        self,
        request: SetInstanceMetadataEntryRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> SetInstanceMetadataEntryResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="SetInstanceMetadataEntry",
                service_name="soulfire.v1.InstanceService",
                input=SetInstanceMetadataEntryRequest,
                output=SetInstanceMetadataEntryResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
    def delete_instance_metadata_entry(
        self,
        request: DeleteInstanceMetadataEntryRequest,
        *,
        headers: Headers | Mapping[str, str] | None = None,
        timeout_ms: int | None = None,
    ) -> DeleteInstanceMetadataEntryResponse:
        return self.execute_unary(
            request=request,
            method=MethodInfo(
                name="DeleteInstanceMetadataEntry",
                service_name="soulfire.v1.InstanceService",
                input=DeleteInstanceMetadataEntryRequest,
                output=DeleteInstanceMetadataEntryResponse,
                idempotency_level=IdempotencyLevel.UNKNOWN,
            ),
            headers=headers,
            timeout_ms=timeout_ms,
        )
