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

import builtins
import collections.abc
import sys
import google.protobuf.descriptor
import google.protobuf.duration_pb2
import google.protobuf.internal.containers
import google.protobuf.message
import google.protobuf.timestamp_pb2
import temporalio.api.deployment.v1.message_pb2
import temporalio.api.enums.v1.common_pb2
import typing as typing_extensions

"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
if sys.version_info >= (3, 8):
    ...
else:
    ...
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
class WorkerPollerInfo(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    CURRENT_POLLERS_FIELD_NUMBER: builtins.int
    LAST_SUCCESSFUL_POLL_TIME_FIELD_NUMBER: builtins.int
    IS_AUTOSCALING_FIELD_NUMBER: builtins.int
    current_pollers: builtins.int
    @property
    def last_successful_poll_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        ...
    
    is_autoscaling: builtins.bool
    def __init__(self, *, current_pollers: builtins.int = ..., last_successful_poll_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., is_autoscaling: builtins.bool = ...) -> None:
        ...
    
    def HasField(self, field_name: typing_extensions.Literal["last_successful_poll_time", b"last_successful_poll_time"]) -> builtins.bool:
        ...
    
    def ClearField(self, field_name: typing_extensions.Literal["current_pollers", b"current_pollers", "is_autoscaling", b"is_autoscaling", "last_successful_poll_time", b"last_successful_poll_time",]) -> None:
        ...
    


global___WorkerPollerInfo = WorkerPollerInfo
class WorkerSlotsInfo(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    CURRENT_AVAILABLE_SLOTS_FIELD_NUMBER: builtins.int
    CURRENT_USED_SLOTS_FIELD_NUMBER: builtins.int
    SLOT_SUPPLIER_KIND_FIELD_NUMBER: builtins.int
    TOTAL_PROCESSED_TASKS_FIELD_NUMBER: builtins.int
    TOTAL_FAILED_TASKS_FIELD_NUMBER: builtins.int
    LAST_INTERVAL_PROCESSED_TASKS_FIELD_NUMBER: builtins.int
    LAST_INTERVAL_FAILURE_TASKS_FIELD_NUMBER: builtins.int
    current_available_slots: builtins.int
    current_used_slots: builtins.int
    slot_supplier_kind: builtins.str
    total_processed_tasks: builtins.int
    total_failed_tasks: builtins.int
    last_interval_processed_tasks: builtins.int
    last_interval_failure_tasks: builtins.int
    def __init__(self, *, current_available_slots: builtins.int = ..., current_used_slots: builtins.int = ..., slot_supplier_kind: builtins.str = ..., total_processed_tasks: builtins.int = ..., total_failed_tasks: builtins.int = ..., last_interval_processed_tasks: builtins.int = ..., last_interval_failure_tasks: builtins.int = ...) -> None:
        ...
    
    def ClearField(self, field_name: typing_extensions.Literal["current_available_slots", b"current_available_slots", "current_used_slots", b"current_used_slots", "last_interval_failure_tasks", b"last_interval_failure_tasks", "last_interval_processed_tasks", b"last_interval_processed_tasks", "slot_supplier_kind", b"slot_supplier_kind", "total_failed_tasks", b"total_failed_tasks", "total_processed_tasks", b"total_processed_tasks",]) -> None:
        ...
    


global___WorkerSlotsInfo = WorkerSlotsInfo
class WorkerHostInfo(google.protobuf.message.Message):
    """Holds everything needed to identify the worker host/process context"""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    HOST_NAME_FIELD_NUMBER: builtins.int
    PROCESS_KEY_FIELD_NUMBER: builtins.int
    PROCESS_ID_FIELD_NUMBER: builtins.int
    CURRENT_HOST_CPU_USAGE_FIELD_NUMBER: builtins.int
    CURRENT_HOST_MEM_USAGE_FIELD_NUMBER: builtins.int
    host_name: builtins.str
    process_key: builtins.str
    process_id: builtins.str
    current_host_cpu_usage: builtins.float
    current_host_mem_usage: builtins.float
    def __init__(self, *, host_name: builtins.str = ..., process_key: builtins.str = ..., process_id: builtins.str = ..., current_host_cpu_usage: builtins.float = ..., current_host_mem_usage: builtins.float = ...) -> None:
        ...
    
    def ClearField(self, field_name: typing_extensions.Literal["current_host_cpu_usage", b"current_host_cpu_usage", "current_host_mem_usage", b"current_host_mem_usage", "host_name", b"host_name", "process_id", b"process_id", "process_key", b"process_key",]) -> None:
        ...
    


global___WorkerHostInfo = WorkerHostInfo
class WorkerHeartbeat(google.protobuf.message.Message):
    """Worker info message, contains information about the worker and its current state.
    All information is provided by the worker itself.
    (-- api-linter: core::0140::prepositions=disabled
        aip.dev/not-precedent: Removing those words make names less clear. --)
    """
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    WORKER_INSTANCE_KEY_FIELD_NUMBER: builtins.int
    WORKER_IDENTITY_FIELD_NUMBER: builtins.int
    HOST_INFO_FIELD_NUMBER: builtins.int
    TASK_QUEUE_FIELD_NUMBER: builtins.int
    DEPLOYMENT_VERSION_FIELD_NUMBER: builtins.int
    SDK_NAME_FIELD_NUMBER: builtins.int
    SDK_VERSION_FIELD_NUMBER: builtins.int
    STATUS_FIELD_NUMBER: builtins.int
    START_TIME_FIELD_NUMBER: builtins.int
    HEARTBEAT_TIME_FIELD_NUMBER: builtins.int
    ELAPSED_SINCE_LAST_HEARTBEAT_FIELD_NUMBER: builtins.int
    WORKFLOW_TASK_SLOTS_INFO_FIELD_NUMBER: builtins.int
    ACTIVITY_TASK_SLOTS_INFO_FIELD_NUMBER: builtins.int
    NEXUS_TASK_SLOTS_INFO_FIELD_NUMBER: builtins.int
    LOCAL_ACTIVITY_SLOTS_INFO_FIELD_NUMBER: builtins.int
    WORKFLOW_POLLER_INFO_FIELD_NUMBER: builtins.int
    WORKFLOW_STICKY_POLLER_INFO_FIELD_NUMBER: builtins.int
    ACTIVITY_POLLER_INFO_FIELD_NUMBER: builtins.int
    NEXUS_POLLER_INFO_FIELD_NUMBER: builtins.int
    TOTAL_STICKY_CACHE_HIT_FIELD_NUMBER: builtins.int
    TOTAL_STICKY_CACHE_MISS_FIELD_NUMBER: builtins.int
    CURRENT_STICKY_CACHE_SIZE_FIELD_NUMBER: builtins.int
    PLUGINS_FIELD_NUMBER: builtins.int
    worker_instance_key: builtins.str
    worker_identity: builtins.str
    @property
    def host_info(self) -> global___WorkerHostInfo:
        """Worker host information."""
        ...
    
    task_queue: builtins.str
    @property
    def deployment_version(self) -> temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion:
        ...
    
    sdk_name: builtins.str
    sdk_version: builtins.str
    status: temporalio.api.enums.v1.common_pb2.WorkerStatus.ValueType
    @property
    def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Worker start time.
        It can be used to determine worker uptime. (current time - start time)
        """
        ...
    
    @property
    def heartbeat_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Timestamp of this heartbeat, coming from the worker. Worker should set it to "now".
        Note that this timestamp comes directly from the worker and is subject to workers' clock skew.
        """
        ...
    
    @property
    def elapsed_since_last_heartbeat(self) -> google.protobuf.duration_pb2.Duration:
        """Elapsed time since the last heartbeat from the worker."""
        ...
    
    @property
    def workflow_task_slots_info(self) -> global___WorkerSlotsInfo:
        ...
    
    @property
    def activity_task_slots_info(self) -> global___WorkerSlotsInfo:
        ...
    
    @property
    def nexus_task_slots_info(self) -> global___WorkerSlotsInfo:
        ...
    
    @property
    def local_activity_slots_info(self) -> global___WorkerSlotsInfo:
        ...
    
    @property
    def workflow_poller_info(self) -> global___WorkerPollerInfo:
        ...
    
    @property
    def workflow_sticky_poller_info(self) -> global___WorkerPollerInfo:
        ...
    
    @property
    def activity_poller_info(self) -> global___WorkerPollerInfo:
        ...
    
    @property
    def nexus_poller_info(self) -> global___WorkerPollerInfo:
        ...
    
    total_sticky_cache_hit: builtins.int
    total_sticky_cache_miss: builtins.int
    current_sticky_cache_size: builtins.int
    @property
    def plugins(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PluginInfo]:
        """Plugins currently in use by this SDK."""
        ...
    
    def __init__(self, *, worker_instance_key: builtins.str = ..., worker_identity: builtins.str = ..., host_info: global___WorkerHostInfo | None = ..., task_queue: builtins.str = ..., deployment_version: temporalio.api.deployment.v1.message_pb2.WorkerDeploymentVersion | None = ..., sdk_name: builtins.str = ..., sdk_version: builtins.str = ..., status: temporalio.api.enums.v1.common_pb2.WorkerStatus.ValueType = ..., start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., heartbeat_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., elapsed_since_last_heartbeat: google.protobuf.duration_pb2.Duration | None = ..., workflow_task_slots_info: global___WorkerSlotsInfo | None = ..., activity_task_slots_info: global___WorkerSlotsInfo | None = ..., nexus_task_slots_info: global___WorkerSlotsInfo | None = ..., local_activity_slots_info: global___WorkerSlotsInfo | None = ..., workflow_poller_info: global___WorkerPollerInfo | None = ..., workflow_sticky_poller_info: global___WorkerPollerInfo | None = ..., activity_poller_info: global___WorkerPollerInfo | None = ..., nexus_poller_info: global___WorkerPollerInfo | None = ..., total_sticky_cache_hit: builtins.int = ..., total_sticky_cache_miss: builtins.int = ..., current_sticky_cache_size: builtins.int = ..., plugins: collections.abc.Iterable[global___PluginInfo] | None = ...) -> None:
        ...
    
    def HasField(self, field_name: typing_extensions.Literal["activity_poller_info", b"activity_poller_info", "activity_task_slots_info", b"activity_task_slots_info", "deployment_version", b"deployment_version", "elapsed_since_last_heartbeat", b"elapsed_since_last_heartbeat", "heartbeat_time", b"heartbeat_time", "host_info", b"host_info", "local_activity_slots_info", b"local_activity_slots_info", "nexus_poller_info", b"nexus_poller_info", "nexus_task_slots_info", b"nexus_task_slots_info", "start_time", b"start_time", "workflow_poller_info", b"workflow_poller_info", "workflow_sticky_poller_info", b"workflow_sticky_poller_info", "workflow_task_slots_info", b"workflow_task_slots_info",]) -> builtins.bool:
        ...
    
    def ClearField(self, field_name: typing_extensions.Literal["activity_poller_info", b"activity_poller_info", "activity_task_slots_info", b"activity_task_slots_info", "current_sticky_cache_size", b"current_sticky_cache_size", "deployment_version", b"deployment_version", "elapsed_since_last_heartbeat", b"elapsed_since_last_heartbeat", "heartbeat_time", b"heartbeat_time", "host_info", b"host_info", "local_activity_slots_info", b"local_activity_slots_info", "nexus_poller_info", b"nexus_poller_info", "nexus_task_slots_info", b"nexus_task_slots_info", "plugins", b"plugins", "sdk_name", b"sdk_name", "sdk_version", b"sdk_version", "start_time", b"start_time", "status", b"status", "task_queue", b"task_queue", "total_sticky_cache_hit", b"total_sticky_cache_hit", "total_sticky_cache_miss", b"total_sticky_cache_miss", "worker_identity", b"worker_identity", "worker_instance_key", b"worker_instance_key", "workflow_poller_info", b"workflow_poller_info", "workflow_sticky_poller_info", b"workflow_sticky_poller_info", "workflow_task_slots_info", b"workflow_task_slots_info",]) -> None:
        ...
    


global___WorkerHeartbeat = WorkerHeartbeat
class WorkerInfo(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    WORKER_HEARTBEAT_FIELD_NUMBER: builtins.int
    @property
    def worker_heartbeat(self) -> global___WorkerHeartbeat:
        ...
    
    def __init__(self, *, worker_heartbeat: global___WorkerHeartbeat | None = ...) -> None:
        ...
    
    def HasField(self, field_name: typing_extensions.Literal["worker_heartbeat", b"worker_heartbeat"]) -> builtins.bool:
        ...
    
    def ClearField(self, field_name: typing_extensions.Literal["worker_heartbeat", b"worker_heartbeat"]) -> None:
        ...
    


global___WorkerInfo = WorkerInfo
class PluginInfo(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    NAME_FIELD_NUMBER: builtins.int
    VERSION_FIELD_NUMBER: builtins.int
    name: builtins.str
    version: builtins.str
    def __init__(self, *, name: builtins.str = ..., version: builtins.str = ...) -> None:
        ...
    
    def ClearField(self, field_name: typing_extensions.Literal["name", b"name", "version", b"version"]) -> None:
        ...
    


global___PluginInfo = PluginInfo
