# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: blickfeld/base/data/health.proto, blickfeld/base/data/version.proto
# plugin: python-betterproto
from dataclasses import dataclass

import blickfeld_qb2.betterproto as betterproto
import blickfeld_qb2.betterproto.lib.google.protobuf as betterproto_lib_google_protobuf


class HealthState(betterproto.Enum):
    """
    High-level state which indicates the current health state of the module. If
    the State is not OK, please refer to the details fields in the Health
    message to trace the root cause.
    """

    STATE_UNSPECIFIED = 0
    """The current state is unknown."""

    STATE_OK = 1
    """Everything is perfect."""

    STATE_WARNING = 2
    """
    There are non-critical errors. This might result in unexpected error and
    should be investigated for production set-ups.
    """

    STATE_FAILED = 3
    """The module is in a failed state and can no longer operate."""

    STATE_BUSY = 4
    """The module is currently busy. Requests might get aborted or delayed."""


@dataclass(eq=False, repr=False)
class Health(betterproto.Message):
    """
    The Health message and corresponding services are used to indicate their
    health & status. They are available on different layers. Upstream / higher
    layers usually aggregate the Health of their child modules. In the end, the
    goal is, to get an aggregated product Health which reliably indicates if
    everything is functional.
    """

    pass


@dataclass(eq=False, repr=False)
class Version(betterproto.Message):
    """
    General message which is used for version information.
    https://semver.org[Semantic versioning] is used to identify a software
    state. It additional adds the short hash of the corresponding commit.
    """

    major: int = betterproto.uint32_field(1)
    """Increments when we make incompatible API changes."""

    minor: int = betterproto.uint32_field(2)
    """
    Increments when we add functionality in a backwards compatible manner.
    """

    patch: int = betterproto.uint32_field(3)
    """Increments when we make backwards compatible bug fixes."""

    revision: str = betterproto.string_field(4)
    """Short hash of the commit in the corresponding project repo."""

    is_release: bool = betterproto.bool_field(5)
    """
    This flag indicates a release. An official release is fully tested &
    reviewed.
    """
