"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
"""
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import google.protobuf.timestamp_pb2
import prodvana.proto.prodvana.common_config.task_pb2
import prodvana.proto.prodvana.desired_state.model.desired_state_pb2
import sys
import typing

if sys.version_info >= (3, 10):
    import typing as typing_extensions
else:
    import typing_extensions

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class _DependencyType:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _DependencyTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_DependencyType.ValueType], builtins.type):  # noqa: F821
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    DEPENDENCY_UNKNOWN: _DependencyType.ValueType  # 0
    DEPENDENCY_CHILD: _DependencyType.ValueType  # 1
    DEPENDENCY_PROTECTION_ATTACHMENT: _DependencyType.ValueType  # 2
    DEPENDENCY_RELEASE_CHANNEL: _DependencyType.ValueType  # 3
    DEPENDENCY_PRECONDITION: _DependencyType.ValueType  # 4
    DEPENDENCY_DELIVERY_EXTENSION: _DependencyType.ValueType  # 5

class DependencyType(_DependencyType, metaclass=_DependencyTypeEnumTypeWrapper): ...

DEPENDENCY_UNKNOWN: DependencyType.ValueType  # 0
DEPENDENCY_CHILD: DependencyType.ValueType  # 1
DEPENDENCY_PROTECTION_ATTACHMENT: DependencyType.ValueType  # 2
DEPENDENCY_RELEASE_CHANNEL: DependencyType.ValueType  # 3
DEPENDENCY_PRECONDITION: DependencyType.ValueType  # 4
DEPENDENCY_DELIVERY_EXTENSION: DependencyType.ValueType  # 5
global___DependencyType = DependencyType

class Notifications(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    class ProgramFailures(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        FAILURE_COUNT_FIELD_NUMBER: builtins.int
        MOST_RECENT_FAILURE_FIELD_NUMBER: builtins.int
        failure_count: builtins.int
        """Either k8s errors or runtime extension apply errors"""
        @property
        def most_recent_failure(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
        def __init__(
            self,
            *,
            failure_count: builtins.int = ...,
            most_recent_failure: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        ) -> None: ...
        def HasField(self, field_name: typing_extensions.Literal["most_recent_failure", b"most_recent_failure"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing_extensions.Literal["failure_count", b"failure_count", "most_recent_failure", b"most_recent_failure"]) -> None: ...

    class RuntimeFailure(google.protobuf.message.Message):
        """Info to convey:
        - Extension Fetch couldn't be started - kubernetes errors?
        - Extension Fetch ran but failed
        - K8s apply error
        - Extension Apply couldn't be applied
        """

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        class _FailureType:
            ValueType = typing.NewType("ValueType", builtins.int)
            V: typing_extensions.TypeAlias = ValueType

        class _FailureTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Notifications.RuntimeFailure._FailureType.ValueType], builtins.type):  # noqa: F821
            DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
            UNKNOWN: Notifications.RuntimeFailure._FailureType.ValueType  # 0
            EXTENSION_FETCH_INVOKE_ERROR: Notifications.RuntimeFailure._FailureType.ValueType  # 1
            EXTENSION_FETCH_RESULT_ERROR: Notifications.RuntimeFailure._FailureType.ValueType  # 2
            RUNTIME_APPLY_ERROR: Notifications.RuntimeFailure._FailureType.ValueType  # 3
            EXTENSION_APPLY_INVOKE_ERROR: Notifications.RuntimeFailure._FailureType.ValueType  # 4

        class FailureType(_FailureType, metaclass=_FailureTypeEnumTypeWrapper): ...
        UNKNOWN: Notifications.RuntimeFailure.FailureType.ValueType  # 0
        EXTENSION_FETCH_INVOKE_ERROR: Notifications.RuntimeFailure.FailureType.ValueType  # 1
        EXTENSION_FETCH_RESULT_ERROR: Notifications.RuntimeFailure.FailureType.ValueType  # 2
        RUNTIME_APPLY_ERROR: Notifications.RuntimeFailure.FailureType.ValueType  # 3
        EXTENSION_APPLY_INVOKE_ERROR: Notifications.RuntimeFailure.FailureType.ValueType  # 4

        FAILURE_TYPE_FIELD_NUMBER: builtins.int
        MESSAGE_FIELD_NUMBER: builtins.int
        failure_type: global___Notifications.RuntimeFailure.FailureType.ValueType
        message: builtins.str
        """TODO: Indicate event id if possible"""
        def __init__(
            self,
            *,
            failure_type: global___Notifications.RuntimeFailure.FailureType.ValueType = ...,
            message: builtins.str = ...,
        ) -> None: ...
        def ClearField(self, field_name: typing_extensions.Literal["failure_type", b"failure_type", "message", b"message"]) -> None: ...

    class ProtectionFailure(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        PROTECTION_ID_FIELD_NUMBER: builtins.int
        @property
        def protection_id(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier: ...
        def __init__(
            self,
            *,
            protection_id: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier | None = ...,
        ) -> None: ...
        def HasField(self, field_name: typing_extensions.Literal["protection_id", b"protection_id"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing_extensions.Literal["protection_id", b"protection_id"]) -> None: ...

    class ConvergenceExtensionFailure(google.protobuf.message.Message):
        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        EXTENSION_ID_FIELD_NUMBER: builtins.int
        @property
        def extension_id(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier: ...
        def __init__(
            self,
            *,
            extension_id: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier | None = ...,
        ) -> None: ...
        def HasField(self, field_name: typing_extensions.Literal["extension_id", b"extension_id"]) -> builtins.bool: ...
        def ClearField(self, field_name: typing_extensions.Literal["extension_id", b"extension_id"]) -> None: ...

    class DelayedConvergence(google.protobuf.message.Message):
        """- Runtime extension fetch has not completed a long time after it was started"""

        DESCRIPTOR: google.protobuf.descriptor.Descriptor

        def __init__(
            self,
        ) -> None: ...

    PROGRAM_FAILURES_FIELD_NUMBER: builtins.int
    RUNTIME_FAILURES_FIELD_NUMBER: builtins.int
    PROTECTION_FAILURE_FIELD_NUMBER: builtins.int
    CONVERGENCE_EXTENSION_FAILURE_FIELD_NUMBER: builtins.int
    DELAYED_CONVERGENCE_FIELD_NUMBER: builtins.int
    CONCURRENCY_LIMIT_EXCEEDED_ERRORS_FIELD_NUMBER: builtins.int
    @property
    def program_failures(self) -> global___Notifications.ProgramFailures: ...
    @property
    def runtime_failures(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Notifications.RuntimeFailure]: ...
    @property
    def protection_failure(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Notifications.ProtectionFailure]: ...
    @property
    def convergence_extension_failure(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Notifications.ConvergenceExtensionFailure]: ...
    @property
    def delayed_convergence(self) -> global___Notifications.DelayedConvergence: ...
    @property
    def concurrency_limit_exceeded_errors(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.ConcurrencyLimitExceeded]:
        """TODO: Link to next action?"""
    def __init__(
        self,
        *,
        program_failures: global___Notifications.ProgramFailures | None = ...,
        runtime_failures: collections.abc.Iterable[global___Notifications.RuntimeFailure] | None = ...,
        protection_failure: collections.abc.Iterable[global___Notifications.ProtectionFailure] | None = ...,
        convergence_extension_failure: collections.abc.Iterable[global___Notifications.ConvergenceExtensionFailure] | None = ...,
        delayed_convergence: global___Notifications.DelayedConvergence | None = ...,
        concurrency_limit_exceeded_errors: collections.abc.Iterable[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.ConcurrencyLimitExceeded] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["delayed_convergence", b"delayed_convergence", "program_failures", b"program_failures"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["concurrency_limit_exceeded_errors", b"concurrency_limit_exceeded_errors", "convergence_extension_failure", b"convergence_extension_failure", "delayed_convergence", b"delayed_convergence", "program_failures", b"program_failures", "protection_failure", b"protection_failure", "runtime_failures", b"runtime_failures"]) -> None: ...

global___Notifications = Notifications

class Dependency(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    TYPE_FIELD_NUMBER: builtins.int
    ID_FIELD_NUMBER: builtins.int
    type: global___DependencyType.ValueType
    @property
    def id(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier: ...
    def __init__(
        self,
        *,
        type: global___DependencyType.ValueType = ...,
        id: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["id", b"id"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["id", b"id", "type", b"type"]) -> None: ...

global___Dependency = Dependency

class Entity(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ID_FIELD_NUMBER: builtins.int
    DESIRED_STATE_ID_FIELD_NUMBER: builtins.int
    ROOT_DESIRED_STATE_ID_FIELD_NUMBER: builtins.int
    PARENT_DESIRED_STATE_ID_FIELD_NUMBER: builtins.int
    RELEASE_ID_FIELD_NUMBER: builtins.int
    ANNOTATIONS_FIELD_NUMBER: builtins.int
    STATUS_FIELD_NUMBER: builtins.int
    SIMPLE_STATUS_FIELD_NUMBER: builtins.int
    STARTING_STATE_FIELD_NUMBER: builtins.int
    LAST_SEEN_STATE_FIELD_NUMBER: builtins.int
    DESIRED_STATE_FIELD_NUMBER: builtins.int
    TARGET_STATE_FIELD_NUMBER: builtins.int
    PRECONDITION_STATUSES_FIELD_NUMBER: builtins.int
    STATUS_EXPLANATIONS_FIELD_NUMBER: builtins.int
    LOGS_FIELD_NUMBER: builtins.int
    ACTION_EXPLANATION_FIELD_NUMBER: builtins.int
    LAST_UPDATE_TIMESTAMP_FIELD_NUMBER: builtins.int
    LAST_FETCHED_TIMESTAMP_FIELD_NUMBER: builtins.int
    LAST_APPLIED_TIMESTAMP_FIELD_NUMBER: builtins.int
    EXPECTED_NEXT_APPLY_TIMESTAMP_FIELD_NUMBER: builtins.int
    DEPENDENCIES_FIELD_NUMBER: builtins.int
    DIRECT_DEPENDENCIES_FIELD_NUMBER: builtins.int
    DEPENDENCIES_WITH_TYPE_FIELD_NUMBER: builtins.int
    LIFECYCLE_FIELD_NUMBER: builtins.int
    MISSING_APPROVAL_FIELD_NUMBER: builtins.int
    APPLY_ERROR_FIELD_NUMBER: builtins.int
    NOTIFICATIONS_FIELD_NUMBER: builtins.int
    @property
    def id(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier: ...
    desired_state_id: builtins.str
    root_desired_state_id: builtins.str
    parent_desired_state_id: builtins.str
    release_id: builtins.str
    @property
    def annotations(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Annotations: ...
    status: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Status.ValueType
    simple_status: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.SimpleStatus.ValueType
    @property
    def starting_state(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.State: ...
    @property
    def last_seen_state(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.State: ...
    @property
    def desired_state(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.State:
        """the state we want to get to before calling convergence complete"""
    @property
    def target_state(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.State:
        """the state we are actually going to apply. when preconditions are met, target state = desired state, otherwise, target state = previous desired state"""
    @property
    def precondition_statuses(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.ConditionState]: ...
    @property
    def status_explanations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.StatusExplanation]: ...
    @property
    def logs(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.DebugLog]: ...
    @property
    def action_explanation(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.ActionExplanation: ...
    @property
    def last_update_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """when the entity state last changed"""
    @property
    def last_fetched_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """when prodvana last fetched entity state, best effort"""
    @property
    def last_applied_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """when prodvana last applied state for this entity, best effort"""
    @property
    def expected_next_apply_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """when prodvana expects to run apply again for this entity, if there is any work to be done. If nil, apply is expected to happen immediately, again if there is any work to be done."""
    @property
    def dependencies(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier]: ...
    @property
    def direct_dependencies(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier]: ...
    @property
    def dependencies_with_type(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Dependency]: ...
    lifecycle: prodvana.proto.prodvana.common_config.task_pb2.TaskLifecycle.ValueType
    @property
    def missing_approval(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.MissingApproval: ...
    @property
    def apply_error(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.ApplyError: ...
    @property
    def notifications(self) -> global___Notifications: ...
    def __init__(
        self,
        *,
        id: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier | None = ...,
        desired_state_id: builtins.str = ...,
        root_desired_state_id: builtins.str = ...,
        parent_desired_state_id: builtins.str = ...,
        release_id: builtins.str = ...,
        annotations: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Annotations | None = ...,
        status: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Status.ValueType = ...,
        simple_status: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.SimpleStatus.ValueType = ...,
        starting_state: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.State | None = ...,
        last_seen_state: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.State | None = ...,
        desired_state: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.State | None = ...,
        target_state: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.State | None = ...,
        precondition_statuses: collections.abc.Iterable[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.ConditionState] | None = ...,
        status_explanations: collections.abc.Iterable[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.StatusExplanation] | None = ...,
        logs: collections.abc.Iterable[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.DebugLog] | None = ...,
        action_explanation: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.ActionExplanation | None = ...,
        last_update_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        last_fetched_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        last_applied_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        expected_next_apply_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        dependencies: collections.abc.Iterable[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier] | None = ...,
        direct_dependencies: collections.abc.Iterable[prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier] | None = ...,
        dependencies_with_type: collections.abc.Iterable[global___Dependency] | None = ...,
        lifecycle: prodvana.proto.prodvana.common_config.task_pb2.TaskLifecycle.ValueType = ...,
        missing_approval: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.MissingApproval | None = ...,
        apply_error: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.ApplyError | None = ...,
        notifications: global___Notifications | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["action_explanation", b"action_explanation", "annotations", b"annotations", "apply_error", b"apply_error", "desired_state", b"desired_state", "expected_next_apply_timestamp", b"expected_next_apply_timestamp", "id", b"id", "last_applied_timestamp", b"last_applied_timestamp", "last_fetched_timestamp", b"last_fetched_timestamp", "last_seen_state", b"last_seen_state", "last_update_timestamp", b"last_update_timestamp", "missing_approval", b"missing_approval", "notifications", b"notifications", "starting_state", b"starting_state", "target_state", b"target_state"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["action_explanation", b"action_explanation", "annotations", b"annotations", "apply_error", b"apply_error", "dependencies", b"dependencies", "dependencies_with_type", b"dependencies_with_type", "desired_state", b"desired_state", "desired_state_id", b"desired_state_id", "direct_dependencies", b"direct_dependencies", "expected_next_apply_timestamp", b"expected_next_apply_timestamp", "id", b"id", "last_applied_timestamp", b"last_applied_timestamp", "last_fetched_timestamp", b"last_fetched_timestamp", "last_seen_state", b"last_seen_state", "last_update_timestamp", b"last_update_timestamp", "lifecycle", b"lifecycle", "logs", b"logs", "missing_approval", b"missing_approval", "notifications", b"notifications", "parent_desired_state_id", b"parent_desired_state_id", "precondition_statuses", b"precondition_statuses", "release_id", b"release_id", "root_desired_state_id", b"root_desired_state_id", "simple_status", b"simple_status", "starting_state", b"starting_state", "status", b"status", "status_explanations", b"status_explanations", "target_state", b"target_state"]) -> None: ...

global___Entity = Entity

class EntityGraph(google.protobuf.message.Message):
    DESCRIPTOR: google.protobuf.descriptor.Descriptor

    ROOT_FIELD_NUMBER: builtins.int
    ENTITIES_FIELD_NUMBER: builtins.int
    @property
    def root(self) -> prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier: ...
    @property
    def entities(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Entity]: ...
    def __init__(
        self,
        *,
        root: prodvana.proto.prodvana.desired_state.model.desired_state_pb2.Identifier | None = ...,
        entities: collections.abc.Iterable[global___Entity] | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["root", b"root"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["entities", b"entities", "root", b"root"]) -> None: ...

global___EntityGraph = EntityGraph
