# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: common.proto
# plugin: python-betterproto2
# This file has been @generated

__all__ = (
    "EpCommand",
    "EpisodeControl",
    "Pose",
    "Vec3",
)

from dataclasses import dataclass

import betterproto2

from ...message_pool import default_message_pool

_COMPILER_VERSION = "0.9.0"
betterproto2.check_compiler_version(_COMPILER_VERSION)


class EpCommand(betterproto2.Enum):
    """
    Episode control commands
    """

    NOTHING = 0

    ABANDON = 1

    END_RECORDING = 2

    START_OR_COMPLETE = 3

    @classmethod
    def betterproto_value_to_renamed_proto_names(cls) -> dict[int, str]:
        return {
            0: "EPCOMMAND_NOTHING",
            1: "EPCOMMAND_ABANDON",
            2: "EPCOMMAND_END_RECORDING",
            3: "EPCOMMAND_START_OR_COMPLETE",
        }

    @classmethod
    def betterproto_renamed_proto_names_to_value(cls) -> dict[str, int]:
        return {
            "EPCOMMAND_NOTHING": 0,
            "EPCOMMAND_ABANDON": 1,
            "EPCOMMAND_END_RECORDING": 2,
            "EPCOMMAND_START_OR_COMPLETE": 3,
        }


@dataclass(eq=False, repr=False)
class EpisodeControl(betterproto2.Message):
    command: "EpCommand" = betterproto2.field(
        1, betterproto2.TYPE_ENUM, default_factory=lambda: EpCommand(0)
    )


default_message_pool.register_message("nf.common", "EpisodeControl", EpisodeControl)


@dataclass(eq=False, repr=False)
class Pose(betterproto2.Message):
    rotation: "Vec3 | None" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, optional=True
    )
    """
    Rodriguez rotation vector
    """

    position: "Vec3 | None" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, optional=True
    )


default_message_pool.register_message("nf.common", "Pose", Pose)


@dataclass(eq=False, repr=False)
class Vec3(betterproto2.Message):
    """
    When representing robot world space, Z is up
    """

    x: "float" = betterproto2.field(1, betterproto2.TYPE_FLOAT)

    y: "float" = betterproto2.field(2, betterproto2.TYPE_FLOAT)

    z: "float" = betterproto2.field(3, betterproto2.TYPE_FLOAT)


default_message_pool.register_message("nf.common", "Vec3", Vec3)
