Source code for ubii.proto.v1.dataStructure.touchEvent_pb_plus
"""
@generated by codestare-proto-plus. Do not edit manually!
"""
from builtins import (
float,
str,
)
from proto import (
ENUM,
Enum,
FLOAT,
Field,
MESSAGE,
RepeatedField,
STRING,
module,
)
from proto.message import (
Message,
)
from typing import (
MutableSequence,
)
from ubii.proto.v1.dataStructure.vector2_pb_plus import (
Vector2,
)
__protobuf__ = module(
package="ubii.proto.v1.dataStructure",
marshal="ubii.proto.v1",
manifest={
"TouchEvent",
"TouchEventList",
}
)
[docs]class TouchEvent(Message):
"""
Attributes:
type (proto.fields.Field): :obj:`~proto.fields.Field` of type :obj:`~.TouchEventType`
position (proto.fields.Field): :obj:`~proto.fields.Field` of type
:obj:`~ubii.proto.v1.dataStructure.vector2_pb_plus.Vector2`
id (proto.fields.Field): :obj:`~proto.fields.Field` of type
:obj:`~proto.primitives.ProtoType.STRING`
force (proto.fields.Field): :obj:`~proto.fields.Field` of type
:obj:`~proto.primitives.ProtoType.FLOAT`
"""
[docs] class TouchEventType(Enum):
TOUCH_START = 0
""""""
TOUCH_MOVE = 1
""""""
TOUCH_END = 2
""""""
type: TouchEventType = Field(
ENUM,
number=1,
enum=TouchEventType,
)
position: Vector2 = Field(
MESSAGE,
number=2,
message=Vector2,
)
id: str = Field(
STRING,
number=3,
)
force: float = Field(
FLOAT,
number=4,
)
[docs]class TouchEventList(Message):
"""
Attributes:
elements (proto.fields.RepeatedField): :obj:`~proto.fields.RepeatedField` of type
:obj:`~.TouchEvent`
"""
elements: MutableSequence[TouchEvent] = RepeatedField(
MESSAGE,
number=1,
message=TouchEvent,
)