"""
@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 google.protobuf.wrappers_pb2
import prodvana.proto.prodvana.object.meta_pb2
import prodvana.proto.prodvana.repo.repo_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 _ReleaseStatus:
    ValueType = typing.NewType("ValueType", builtins.int)
    V: typing_extensions.TypeAlias = ValueType

class _ReleaseStatusEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_ReleaseStatus.ValueType], builtins.type):  # noqa: F821
    DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
    UNKNOWN_STATUS: _ReleaseStatus.ValueType  # 0
    PENDING: _ReleaseStatus.ValueType  # 1
    SUCCEEDED: _ReleaseStatus.ValueType  # 2
    FAILED: _ReleaseStatus.ValueType  # 3

class ReleaseStatus(_ReleaseStatus, metaclass=_ReleaseStatusEnumTypeWrapper): ...

UNKNOWN_STATUS: ReleaseStatus.ValueType  # 0
PENDING: ReleaseStatus.ValueType  # 1
SUCCEEDED: ReleaseStatus.ValueType  # 2
FAILED: ReleaseStatus.ValueType  # 3
global___ReleaseStatus = ReleaseStatus

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

    CREATION_TIMESTAMP_FIELD_NUMBER: builtins.int
    DEPLOYMENT_SYSTEM_FIELD_NUMBER: builtins.int
    SERVICE_FIELD_NUMBER: builtins.int
    RELEASE_CHANNEL_FIELD_NUMBER: builtins.int
    APPLICATION_FIELD_NUMBER: builtins.int
    REPOSITORY_FIELD_NUMBER: builtins.int
    COMMIT_ID_FIELD_NUMBER: builtins.int
    USER_FIELD_NUMBER: builtins.int
    @property
    def creation_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
        """must be unset on input"""
    deployment_system: builtins.str
    service: builtins.str
    release_channel: builtins.str
    application: builtins.str
    repository: builtins.str
    """e.g. github.com/foo/bar"""
    commit_id: builtins.str
    """commit hash"""
    user: builtins.str
    """if known"""
    def __init__(
        self,
        *,
        creation_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
        deployment_system: builtins.str = ...,
        service: builtins.str = ...,
        release_channel: builtins.str = ...,
        application: builtins.str = ...,
        repository: builtins.str = ...,
        commit_id: builtins.str = ...,
        user: builtins.str = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["creation_timestamp", b"creation_timestamp"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["application", b"application", "commit_id", b"commit_id", "creation_timestamp", b"creation_timestamp", "deployment_system", b"deployment_system", "release_channel", b"release_channel", "repository", b"repository", "service", b"service", "user", b"user"]) -> None: ...

global___ReleaseConfig = ReleaseConfig

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

    STATUS_FIELD_NUMBER: builtins.int
    LAST_UPDATE_TIMESTAMP_FIELD_NUMBER: builtins.int
    status: global___ReleaseStatus.ValueType
    @property
    def last_update_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
    def __init__(
        self,
        *,
        status: global___ReleaseStatus.ValueType = ...,
        last_update_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["last_update_timestamp", b"last_update_timestamp"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["last_update_timestamp", b"last_update_timestamp", "status", b"status"]) -> None: ...

global___ReleaseState = ReleaseState

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

    RELEVANT_COMMITS_FIELD_NUMBER: builtins.int
    UNANALYZED_COMMITS_FIELD_NUMBER: builtins.int
    @property
    def relevant_commits(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[prodvana.proto.prodvana.repo.repo_pb2.Commit]:
        """commits likely to be impactful, prev_commit_id and new_commit_id have a merge base"""
    unanalyzed_commits: builtins.int
    def __init__(
        self,
        *,
        relevant_commits: collections.abc.Iterable[prodvana.proto.prodvana.repo.repo_pb2.Commit] | None = ...,
        unanalyzed_commits: builtins.int = ...,
    ) -> None: ...
    def ClearField(self, field_name: typing_extensions.Literal["relevant_commits", b"relevant_commits", "unanalyzed_commits", b"unanalyzed_commits"]) -> None: ...

global___ImpactAnalysisComparison = ImpactAnalysisComparison

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

    PREV_FIELD_NUMBER: builtins.int
    PREV_REPOSITORY_FIELD_NUMBER: builtins.int
    NEW_REPOSITORY_FIELD_NUMBER: builtins.int
    PREV_COMMIT_ID_FIELD_NUMBER: builtins.int
    NEW_COMMIT_ID_FIELD_NUMBER: builtins.int
    IMPACT_ANALYSIS_FIELD_NUMBER: builtins.int
    TOTAL_COMMITS_FIELD_NUMBER: builtins.int
    @property
    def prev(self) -> prodvana.proto.prodvana.object.meta_pb2.ObjectMeta: ...
    prev_repository: builtins.str
    new_repository: builtins.str
    prev_commit_id: builtins.str
    new_commit_id: builtins.str
    @property
    def impact_analysis(self) -> global___ImpactAnalysisComparison: ...
    @property
    def total_commits(self) -> google.protobuf.wrappers_pb2.Int64Value:
        """only set if the previous commit is set and is from the same repo, and the repo is linked to prodvana"""
    def __init__(
        self,
        *,
        prev: prodvana.proto.prodvana.object.meta_pb2.ObjectMeta | None = ...,
        prev_repository: builtins.str = ...,
        new_repository: builtins.str = ...,
        prev_commit_id: builtins.str = ...,
        new_commit_id: builtins.str = ...,
        impact_analysis: global___ImpactAnalysisComparison | None = ...,
        total_commits: google.protobuf.wrappers_pb2.Int64Value | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["impact_analysis", b"impact_analysis", "prev", b"prev", "total_commits", b"total_commits"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["impact_analysis", b"impact_analysis", "new_commit_id", b"new_commit_id", "new_repository", b"new_repository", "prev", b"prev", "prev_commit_id", b"prev_commit_id", "prev_repository", b"prev_repository", "total_commits", b"total_commits"]) -> None: ...

global___ReleaseComparison = ReleaseComparison

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

    META_FIELD_NUMBER: builtins.int
    CONFIG_FIELD_NUMBER: builtins.int
    COMPARISON_FIELD_NUMBER: builtins.int
    STATE_FIELD_NUMBER: builtins.int
    @property
    def meta(self) -> prodvana.proto.prodvana.object.meta_pb2.ObjectMeta: ...
    @property
    def config(self) -> global___ReleaseConfig: ...
    @property
    def comparison(self) -> global___ReleaseComparison:
        """TODO(naphat) should this really be part of the proto here, or should it be a separate endpoint so we can request arbitrary comparison?"""
    @property
    def state(self) -> global___ReleaseState: ...
    def __init__(
        self,
        *,
        meta: prodvana.proto.prodvana.object.meta_pb2.ObjectMeta | None = ...,
        config: global___ReleaseConfig | None = ...,
        comparison: global___ReleaseComparison | None = ...,
        state: global___ReleaseState | None = ...,
    ) -> None: ...
    def HasField(self, field_name: typing_extensions.Literal["comparison", b"comparison", "config", b"config", "meta", b"meta", "state", b"state"]) -> builtins.bool: ...
    def ClearField(self, field_name: typing_extensions.Literal["comparison", b"comparison", "config", b"config", "meta", b"meta", "state", b"state"]) -> None: ...

global___Release = Release
