# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: blickfeld/base/options/access_control.proto, blickfeld/base/options/misc.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 ascending, 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 access tokens of the AUTHORIZED access level.
    It may also be used to manage configuration which might void the warranty
    or specification of the device.
    """

    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 ProtocolMaturityLevel(betterproto.Enum):
    """
    This enumeration describes the maturity of a protocol. Please refer to the
    individual values. [IMPORTANT] APIs marked with the EXPERIMENTAL &
    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 & production use case.
    """

    LEVEL_UNSPECIFIED = 0
    """
    Level is not set. Default level for services is EXPERIMENTAL. Default level
    for methods & 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 ensure 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 behaviour 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"""


@dataclass(eq=False, repr=False)
class AccessControl(betterproto.Message):
    """
    Access Control message which 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"""


@dataclass(eq=False, repr=False)
class LinkData(betterproto.Message):
    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- &
    production-facing APIs.
    """

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