from . import config
from . import data
from . import geometry

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: blickfeld/base/options/access_control.proto, blickfeld/base/options/misc.proto, blickfeld/base/options/product_variant.proto, blickfeld/base/options/protocol_maturity.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 AccessControlLevel(betterproto.Enum):
    """
    Available access levels   The levels are ordered in ascending order, which
    means that each level also inherits the permissions of the levels above it.
    """

    LEVEL_UNSPECIFIED = 0
    """Access level is not specified"""

    LEVEL_PUBLIC = 1
    """
    Everyone can access   The corresponding entities can be accessed by anyone
    who has access to the interface of the device. The access can not be
    disabled by the user.
    """

    LEVEL_AUTHORIZED = 2
    """
    Only authorized clients can access   The corresponding entities can only be
    used by authorized clients. The access can be managed by clients with the
    ADMIN access level. If desired, the AUTHORIZED access level can be
    configured to act equally to the PUBLIC access level.
    """

    LEVEL_ADMIN = 3
    """
    Only administrative clients can access   The corresponding entities are
    mainly used to configure the accounts with AUTHORIZED & ADMIN access
    levels.
    """

    LEVEL_SUPPORT = 4
    """
    Only clients of the Blickfeld support can access   The corresponding
    entities can only be accessed by Blickfeld Support Tools & clients. The
    access tokens are bound to devices.
    """

    LEVEL_PRODUCTION = 5
    """
    Only clients in production can access   The corresponding entities are used
    for end-of-line & re-work processes.
    """

    LEVEL_DEVELOPER = 6
    """Only Blickfeld developers can access"""


class LifeTimeDiagnosticsType(betterproto.Enum):
    """
    Type of diagnostics.   Is used to aggregate multiple long term statistics.
    """

    TYPE_UNSPECIFIED = 0
    """Unspecified type."""

    TYPE_TEMPERATURE = 1
    """Temperature sensor or estimate."""

    TYPE_UTILIZATION = 2
    """Indicates how much of the available resource is used."""

    TYPE_RATE = 3
    """Frequency measurement or estimate."""

    TYPE_VOLTAGE = 4
    """Electrical voltage sensor or estimate."""


class ProtocolMaturityLevel(betterproto.Enum):
    """
    This enumeration describes the maturity of a protocol. Please refer to the
    individual values.   [IMPORTANT] APIs marked with the EXPERIMENTAL and
    DEPRECATED flags have to be handled with care. Please read through the
    definition.   Please report if the protocol maturity of a service, method,
    and field does not fit e.g. if an EXPERIMENTAL field is required in an
    application and production use case.
    """

    LEVEL_UNSPECIFIED = 0
    """
    Level is not set. Default level for services is EXPERIMENTAL. Default level
    for methods and fields is INHERITED.
    """

    LEVEL_EXPERIMENTAL = 1
    """
    APIs marked with this flag should be handled with care. They might not
    function as expected. Additionally it is not ensured that the APIs will
    ever be moved to the MAINTAINED level. They might be altered or removed in
    any upcoming release without further notice.
    """

    LEVEL_MAINTAINED = 2
    """
    APIs marked with this flag are actively maintained and released. They will
    not change their behavior without notices in the changelog. Breaking
    changes in a maintained APIs have to result in a major update of the
    module.
    """

    LEVEL_DEPRECATED = 3
    """
    APIs marked with this flag are no longer actively maintained. They will be
    removed in upcoming releases.
    """

    LEVEL_INHERITED = 4
    """The protocol maturity is inherited from the parent"""


class ProductVariant(betterproto.Enum):
    """The product variant specifies a Blickfeld Qb2 product variant."""

    PRODUCT_VARIANT_UNSPECIFIED = 0
    """
    Unspecified (default value) - placeholder for all other product variants.
    """

    PRODUCT_VARIANT_QBBASIC = 1
    """QbBasic - Basic & Core product variant."""

    PRODUCT_VARIANT_QBPROTECT = 2
    """
    QbProtect - Tailored product variant for security & protection
    applications.
    """

    PRODUCT_VARIANT_QBVOLUME = 3
    """
    QbVolume - Tailored product variant for stockpile management applications.
    """

    PRODUCT_VARIANT_QB2 = 4
    """
    Qb2 - Generic product variant allowing the exploration & discovery of new
    applicaton areas for smart lidar.
    """


@dataclass(eq=False, repr=False)
class AccessControl(betterproto.Message):
    """
    The Access Control message specifies the required access level and licenses
    for protocol entities. Protocol entities are usually gRPC services but can
    also be more fine grained on gRPC method and Protobuf field level.
    """

    level: "AccessControlLevel" = betterproto.enum_field(1)
    """Minimum access level required for entity"""

    read_only: bool = betterproto.bool_field(2)
    """True if the entity can be accessed with read-only permissions"""


@dataclass(eq=False, repr=False)
class LifeTimeDiagnostics(betterproto.Message):
    """
    This annotation is used by diagnostic modules to collect long term
    statistics for the annotated field.
    """

    type: "LifeTimeDiagnosticsType" = betterproto.enum_field(1)
    """Type"""


@dataclass(eq=False, repr=False)
class LinkData(betterproto.Message):
    """Message defining LinkData"""

    type: str = betterproto.string_field(1)
    directory: str = betterproto.string_field(2)


@dataclass(eq=False, repr=False)
class ProtocolMaturity(betterproto.Message):
    """
    This message specifies the maturity of a protocol for customer- and
    production-facing APIs.
    """

    level: "ProtocolMaturityLevel" = betterproto.enum_field(1)
    """Simple level which describes maturity"""
