"""
@generated by codestare-proto-plus.  Do not edit manually!
"""
from builtins import (
    str,
)

from proto import (
    ENUM,
    Enum,
    Field,
    MESSAGE,
    RepeatedField,
    STRING,
    module,
)

from proto.message import (
    Message,
)

from typing import (
    Iterable,
)

from ubii.proto.v1.devices.component_pb_plus import (
    Component,
)


__protobuf__ = module(
    package="ubii.proto.v1.devices",
    marshal="ubii.proto.v1",
    manifest={
        "Device",
        "DeviceList",
    }
)


class Device(Message):
    """
    Attributes:
        id (proto.fields.Field): :obj:`~proto.fields.Field` of type
            :obj:`~proto.primitives.ProtoType.STRING`
        name (proto.fields.Field): :obj:`~proto.fields.Field` of type
            :obj:`~proto.primitives.ProtoType.STRING`
        device_type (proto.fields.Field): :obj:`~proto.fields.Field` of type :obj:`~.DeviceType`
        components (proto.fields.RepeatedField): :obj:`~proto.fields.RepeatedField` of type
            :obj:`~ubii.proto.v1.devices.component_pb_plus.Component`
        client_id (proto.fields.Field): :obj:`~proto.fields.Field` of type
            :obj:`~proto.primitives.ProtoType.STRING`
        tags (proto.fields.RepeatedField): :obj:`~proto.fields.RepeatedField` of type
            :obj:`~proto.primitives.ProtoType.STRING`
        description (proto.fields.Field): :obj:`~proto.fields.Field` of type
            :obj:`~proto.primitives.ProtoType.STRING`
    """

    class DeviceType(Enum):
        PARTICIPANT = 0
        WATCHER = 1

    id: str = Field(
        STRING,
        number=1,
    )
    name: str = Field(
        STRING,
        number=2,
    )
    device_type: DeviceType = Field(
        ENUM,
        number=3,
        enum=DeviceType,
    )
    components: Iterable[Component] = RepeatedField(
        MESSAGE,
        number=4,
        message=Component,
    )
    client_id: str = Field(
        STRING,
        number=5,
    )
    tags: Iterable[str] = RepeatedField(
        STRING,
        number=6,
    )
    description: str = Field(
        STRING,
        number=7,
    )


class DeviceList(Message):
    """
    Attributes:
        elements (proto.fields.RepeatedField): :obj:`~proto.fields.RepeatedField` of type
            :obj:`~.Device`
    """

    elements: Iterable[Device] = RepeatedField(
        MESSAGE,
        number=1,
        message=Device,
    )

