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

import builtins
import collections.abc
import sys
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import google.protobuf.timestamp_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 WorkflowRuleAction(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    class ActionActivityPause(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        def __init__(self) -> None:
            ...
        
    
    
    ACTIVITY_PAUSE_FIELD_NUMBER: builtins.int
    @property
    def activity_pause(self) -> global___WorkflowRuleAction.ActionActivityPause:
        ...
    
    def __init__(self, *, activity_pause: global___WorkflowRuleAction.ActionActivityPause | None = ...) -> None:
        ...
    
    def HasField(self, field_name: typing_extensions.Literal["activity_pause", b"activity_pause", "variant", b"variant"]) -> builtins.bool:
        ...
    
    def ClearField(self, field_name: typing_extensions.Literal["activity_pause", b"activity_pause", "variant", b"variant"]) -> None:
        ...
    
    def WhichOneof(self, oneof_group: typing_extensions.Literal["variant", b"variant"]) -> typing_extensions.Literal["activity_pause"] | None:
        ...
    


global___WorkflowRuleAction = WorkflowRuleAction
class WorkflowRuleSpec(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    class ActivityStartingTrigger(google.protobuf.message.Message):
        """Activity trigger will be triggered when an activity is about to start."""
        DESCRIPTOR: google.protobuf.descriptor.Descriptor
        PREDICATE_FIELD_NUMBER: builtins.int
        predicate: builtins.str
        def __init__(self, *, predicate: builtins.str = ...) -> None:
            ...
        
        def ClearField(self, field_name: typing_extensions.Literal["predicate", b"predicate"]) -> None:
            ...
        
    
    
    ID_FIELD_NUMBER: builtins.int
    ACTIVITY_START_FIELD_NUMBER: builtins.int
    VISIBILITY_QUERY_FIELD_NUMBER: builtins.int
    ACTIONS_FIELD_NUMBER: builtins.int
    EXPIRATION_TIME_FIELD_NUMBER: builtins.int
    id: builtins.str
    @property
    def activity_start(self) -> global___WorkflowRuleSpec.ActivityStartingTrigger:
        ...
    
    visibility_query: builtins.str
    @property
    def actions(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___WorkflowRuleAction]:
        """WorkflowRuleAction to be taken when the rule is triggered and predicate is matched."""
        ...
    
    @property
    def expiration_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Expiration time of the rule. After this time, the rule will be deleted.
        Can be empty if the rule should never expire.
        """
        ...
    
    def __init__(self, *, id: builtins.str = ..., activity_start: global___WorkflowRuleSpec.ActivityStartingTrigger | None = ..., visibility_query: builtins.str = ..., actions: collections.abc.Iterable[global___WorkflowRuleAction] | None = ..., expiration_time: google.protobuf.timestamp_pb2.Timestamp | None = ...) -> None:
        ...
    
    def HasField(self, field_name: typing_extensions.Literal["activity_start", b"activity_start", "expiration_time", b"expiration_time", "trigger", b"trigger",]) -> builtins.bool:
        ...
    
    def ClearField(self, field_name: typing_extensions.Literal["actions", b"actions", "activity_start", b"activity_start", "expiration_time", b"expiration_time", "id", b"id", "trigger", b"trigger", "visibility_query", b"visibility_query",]) -> None:
        ...
    
    def WhichOneof(self, oneof_group: typing_extensions.Literal["trigger", b"trigger"]) -> typing_extensions.Literal["activity_start"] | None:
        ...
    


global___WorkflowRuleSpec = WorkflowRuleSpec
class WorkflowRule(google.protobuf.message.Message):
    """WorkflowRule describes a rule that can be applied to any workflow in this namespace."""
    DESCRIPTOR: google.protobuf.descriptor.Descriptor
    CREATE_TIME_FIELD_NUMBER: builtins.int
    SPEC_FIELD_NUMBER: builtins.int
    CREATED_BY_IDENTITY_FIELD_NUMBER: builtins.int
    DESCRIPTION_FIELD_NUMBER: builtins.int
    @property
    def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """Rule creation time."""
        ...
    
    @property
    def spec(self) -> global___WorkflowRuleSpec:
        """Rule specification"""
        ...
    
    created_by_identity: builtins.str
    description: builtins.str
    def __init__(self, *, create_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., spec: global___WorkflowRuleSpec | None = ..., created_by_identity: builtins.str = ..., description: builtins.str = ...) -> None:
        ...
    
    def HasField(self, field_name: typing_extensions.Literal["create_time", b"create_time", "spec", b"spec"]) -> builtins.bool:
        ...
    
    def ClearField(self, field_name: typing_extensions.Literal["create_time", b"create_time", "created_by_identity", b"created_by_identity", "description", b"description", "spec", b"spec",]) -> None:
        ...
    


global___WorkflowRule = WorkflowRule
