"""
This type stub file was generated by pyright.
"""

import google.protobuf.message
import temporalio.bridge.runtime
import temporalio.bridge.temporal_sdk_bridge
from dataclasses import dataclass
from datetime import timedelta
from typing import Mapping, Optional, Type, TypeVar

"""
This type stub file was generated by pyright.
"""
@dataclass
class ClientTlsConfig:
    """Python representation of the Rust struct for configuring TLS."""
    server_root_ca_cert: Optional[bytes]
    domain: Optional[str]
    client_cert: Optional[bytes]
    client_private_key: Optional[bytes]
    ...


@dataclass
class ClientRetryConfig:
    """Python representation of the Rust struct for configuring retry."""
    initial_interval_millis: int
    randomization_factor: float
    multiplier: float
    max_interval_millis: int
    max_elapsed_time_millis: Optional[int]
    max_retries: int
    ...


@dataclass
class ClientKeepAliveConfig:
    """Python representation of the Rust struct for configuring keep alive."""
    interval_millis: int
    timeout_millis: int
    ...


@dataclass
class ClientConfig:
    """Python representation of the Rust struct for configuring the client."""
    target_url: str
    metadata: Mapping[str, str]
    identity: str
    tls_config: Optional[ClientTlsConfig]
    retry_config: Optional[ClientRetryConfig]
    keep_alive_config: Optional[ClientKeepAliveConfig]
    client_name: str
    client_version: str
    ...


@dataclass
class RpcCall:
    """Python representation of the Rust struct for an RPC call."""
    rpc: str
    req: bytes
    retry: bool
    metadata: Mapping[str, str]
    timeout_millis: Optional[int]
    ...


ProtoMessage = TypeVar("ProtoMessage", bound=google.protobuf.message.Message)
class Client:
    """RPC client using SDK Core."""
    @staticmethod
    async def connect(runtime: temporalio.bridge.runtime.Runtime, config: ClientConfig) -> Client:
        """Establish connection with server."""
        ...
    
    def __init__(self, runtime: temporalio.bridge.runtime.Runtime, ref: temporalio.bridge.temporal_sdk_bridge.ClientRef) -> None:
        """Initialize client with underlying SDK Core reference."""
        ...
    
    def update_metadata(self, metadata: Mapping[str, str]) -> None:
        """Update underlying metadata on Core client."""
        ...
    
    async def call(self, *, service: str, rpc: str, req: google.protobuf.message.Message, resp_type: Type[ProtoMessage], retry: bool, metadata: Mapping[str, str], timeout: Optional[timedelta]) -> ProtoMessage:
        """Make RPC call using SDK Core."""
        ...
    


