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

__all__ = ("TypedMessage",)

from dataclasses import dataclass

import betterproto2

from ....message_pool import default_message_pool

betterproto2.check_compiler_version("0.5.1")


@dataclass(eq=False, repr=False)
class TypedMessage(betterproto2.Message):
    """
    TypedMessage is a serialized proto message along with its type name.
    """

    type: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)
    """
    The name of the message type, retrieved from protobuf API.
    """

    value: "bytes" = betterproto2.field(2, betterproto2.TYPE_BYTES)
    """
    Serialized proto message.
    """


default_message_pool.register_message(
    "xray.common.serial", "TypedMessage", TypedMessage
)
