/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: usp-record.proto */

#ifndef PROTOBUF_C_usp_2drecord_2eproto__INCLUDED
#define PROTOBUF_C_usp_2drecord_2eproto__INCLUDED

#include <protobuf-c/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# error This file was generated by a newer version of protobuf-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1005002 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protobuf-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protobuf-c.
#endif


typedef struct UspRecord__Record UspRecord__Record;
typedef struct UspRecord__NoSessionContextRecord UspRecord__NoSessionContextRecord;
typedef struct UspRecord__SessionContextRecord UspRecord__SessionContextRecord;
typedef struct UspRecord__WebSocketConnectRecord UspRecord__WebSocketConnectRecord;
typedef struct UspRecord__MQTTConnectRecord UspRecord__MQTTConnectRecord;
typedef struct UspRecord__STOMPConnectRecord UspRecord__STOMPConnectRecord;
typedef struct UspRecord__UDSConnectRecord UspRecord__UDSConnectRecord;
typedef struct UspRecord__DisconnectRecord UspRecord__DisconnectRecord;


/* --- enums --- */

typedef enum _UspRecord__Record__PayloadSecurity {
  USP_RECORD__RECORD__PAYLOAD_SECURITY__PLAINTEXT = 0,
  USP_RECORD__RECORD__PAYLOAD_SECURITY__TLS12 = 1
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(USP_RECORD__RECORD__PAYLOAD_SECURITY)
} UspRecord__Record__PayloadSecurity;
typedef enum _UspRecord__SessionContextRecord__PayloadSARState {
  /*
   *No segmentation
   */
  USP_RECORD__SESSION_CONTEXT_RECORD__PAYLOAD_SARSTATE__NONE = 0,
  /*
   *Begin segmentation
   */
  USP_RECORD__SESSION_CONTEXT_RECORD__PAYLOAD_SARSTATE__BEGIN = 1,
  /*
   *Segmentation in process
   */
  USP_RECORD__SESSION_CONTEXT_RECORD__PAYLOAD_SARSTATE__INPROCESS = 2,
  /*
   *Segmentation is complete
   */
  USP_RECORD__SESSION_CONTEXT_RECORD__PAYLOAD_SARSTATE__COMPLETE = 3
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(USP_RECORD__SESSION_CONTEXT_RECORD__PAYLOAD_SARSTATE)
} UspRecord__SessionContextRecord__PayloadSARState;
typedef enum _UspRecord__MQTTConnectRecord__MQTTVersion {
  /*
   * Represents MQTT v3.1.1, a.k.a. v4 in the MQTT Spec
   */
  USP_RECORD__MQTTCONNECT_RECORD__MQTTVERSION__V3_1_1 = 0,
  USP_RECORD__MQTTCONNECT_RECORD__MQTTVERSION__V5 = 1
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(USP_RECORD__MQTTCONNECT_RECORD__MQTTVERSION)
} UspRecord__MQTTConnectRecord__MQTTVersion;
typedef enum _UspRecord__STOMPConnectRecord__STOMPVersion {
  USP_RECORD__STOMPCONNECT_RECORD__STOMPVERSION__V1_2 = 0
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(USP_RECORD__STOMPCONNECT_RECORD__STOMPVERSION)
} UspRecord__STOMPConnectRecord__STOMPVersion;

/* --- messages --- */

typedef enum {
  USP_RECORD__RECORD__RECORD_TYPE__NOT_SET = 0,
  USP_RECORD__RECORD__RECORD_TYPE_NO_SESSION_CONTEXT = 7,
  USP_RECORD__RECORD__RECORD_TYPE_SESSION_CONTEXT = 8,
  USP_RECORD__RECORD__RECORD_TYPE_WEBSOCKET_CONNECT = 9,
  USP_RECORD__RECORD__RECORD_TYPE_MQTT_CONNECT = 10,
  USP_RECORD__RECORD__RECORD_TYPE_STOMP_CONNECT = 11,
  USP_RECORD__RECORD__RECORD_TYPE_DISCONNECT = 12,
  USP_RECORD__RECORD__RECORD_TYPE_UDS_CONNECT = 13
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(USP_RECORD__RECORD__RECORD_TYPE__CASE)
} UspRecord__Record__RecordTypeCase;

struct  UspRecord__Record
{
  ProtobufCMessage base;
  char *version;
  char *to_id;
  char *from_id;
  UspRecord__Record__PayloadSecurity payload_security;
  /*
   *MAC or Signature
   */
  ProtobufCBinaryData mac_signature;
  ProtobufCBinaryData sender_cert;
  UspRecord__Record__RecordTypeCase record_type_case;
  union {
    UspRecord__DisconnectRecord *disconnect;
    UspRecord__MQTTConnectRecord *mqtt_connect;
    UspRecord__NoSessionContextRecord *no_session_context;
    UspRecord__SessionContextRecord *session_context;
    UspRecord__STOMPConnectRecord *stomp_connect;
    UspRecord__UDSConnectRecord *uds_connect;
    UspRecord__WebSocketConnectRecord *websocket_connect;
  };
};
#define USP_RECORD__RECORD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&usp_record__record__descriptor) \
    , (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, (char *)protobuf_c_empty_string, USP_RECORD__RECORD__PAYLOAD_SECURITY__PLAINTEXT, {0,NULL}, {0,NULL}, USP_RECORD__RECORD__RECORD_TYPE__NOT_SET, {0} }


struct  UspRecord__NoSessionContextRecord
{
  ProtobufCMessage base;
  ProtobufCBinaryData payload;
};
#define USP_RECORD__NO_SESSION_CONTEXT_RECORD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&usp_record__no_session_context_record__descriptor) \
    , {0,NULL} }


struct  UspRecord__SessionContextRecord
{
  ProtobufCMessage base;
  uint64_t session_id;
  uint64_t sequence_id;
  uint64_t expected_id;
  uint64_t retransmit_id;
  UspRecord__SessionContextRecord__PayloadSARState payload_sar_state;
  UspRecord__SessionContextRecord__PayloadSARState payloadrec_sar_state;
  size_t n_payload;
  ProtobufCBinaryData *payload;
};
#define USP_RECORD__SESSION_CONTEXT_RECORD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&usp_record__session_context_record__descriptor) \
    , 0, 0, 0, 0, USP_RECORD__SESSION_CONTEXT_RECORD__PAYLOAD_SARSTATE__NONE, USP_RECORD__SESSION_CONTEXT_RECORD__PAYLOAD_SARSTATE__NONE, 0,NULL }


struct  UspRecord__WebSocketConnectRecord
{
  ProtobufCMessage base;
};
#define USP_RECORD__WEB_SOCKET_CONNECT_RECORD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&usp_record__web_socket_connect_record__descriptor) \
     }


struct  UspRecord__MQTTConnectRecord
{
  ProtobufCMessage base;
  UspRecord__MQTTConnectRecord__MQTTVersion version;
  char *subscribed_topic;
};
#define USP_RECORD__MQTTCONNECT_RECORD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&usp_record__mqttconnect_record__descriptor) \
    , USP_RECORD__MQTTCONNECT_RECORD__MQTTVERSION__V3_1_1, (char *)protobuf_c_empty_string }


struct  UspRecord__STOMPConnectRecord
{
  ProtobufCMessage base;
  UspRecord__STOMPConnectRecord__STOMPVersion version;
  char *subscribed_destination;
};
#define USP_RECORD__STOMPCONNECT_RECORD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&usp_record__stompconnect_record__descriptor) \
    , USP_RECORD__STOMPCONNECT_RECORD__STOMPVERSION__V1_2, (char *)protobuf_c_empty_string }


struct  UspRecord__UDSConnectRecord
{
  ProtobufCMessage base;
};
#define USP_RECORD__UDSCONNECT_RECORD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&usp_record__udsconnect_record__descriptor) \
     }


struct  UspRecord__DisconnectRecord
{
  ProtobufCMessage base;
  char *reason;
  uint32_t reason_code;
};
#define USP_RECORD__DISCONNECT_RECORD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&usp_record__disconnect_record__descriptor) \
    , (char *)protobuf_c_empty_string, 0 }


/* UspRecord__Record methods */
void   usp_record__record__init
                     (UspRecord__Record         *message);
size_t usp_record__record__get_packed_size
                     (const UspRecord__Record   *message);
size_t usp_record__record__pack
                     (const UspRecord__Record   *message,
                      uint8_t             *out);
size_t usp_record__record__pack_to_buffer
                     (const UspRecord__Record   *message,
                      ProtobufCBuffer     *buffer);
UspRecord__Record *
       usp_record__record__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   usp_record__record__free_unpacked
                     (UspRecord__Record *message,
                      ProtobufCAllocator *allocator);
/* UspRecord__NoSessionContextRecord methods */
void   usp_record__no_session_context_record__init
                     (UspRecord__NoSessionContextRecord         *message);
size_t usp_record__no_session_context_record__get_packed_size
                     (const UspRecord__NoSessionContextRecord   *message);
size_t usp_record__no_session_context_record__pack
                     (const UspRecord__NoSessionContextRecord   *message,
                      uint8_t             *out);
size_t usp_record__no_session_context_record__pack_to_buffer
                     (const UspRecord__NoSessionContextRecord   *message,
                      ProtobufCBuffer     *buffer);
UspRecord__NoSessionContextRecord *
       usp_record__no_session_context_record__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   usp_record__no_session_context_record__free_unpacked
                     (UspRecord__NoSessionContextRecord *message,
                      ProtobufCAllocator *allocator);
/* UspRecord__SessionContextRecord methods */
void   usp_record__session_context_record__init
                     (UspRecord__SessionContextRecord         *message);
size_t usp_record__session_context_record__get_packed_size
                     (const UspRecord__SessionContextRecord   *message);
size_t usp_record__session_context_record__pack
                     (const UspRecord__SessionContextRecord   *message,
                      uint8_t             *out);
size_t usp_record__session_context_record__pack_to_buffer
                     (const UspRecord__SessionContextRecord   *message,
                      ProtobufCBuffer     *buffer);
UspRecord__SessionContextRecord *
       usp_record__session_context_record__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   usp_record__session_context_record__free_unpacked
                     (UspRecord__SessionContextRecord *message,
                      ProtobufCAllocator *allocator);
/* UspRecord__WebSocketConnectRecord methods */
void   usp_record__web_socket_connect_record__init
                     (UspRecord__WebSocketConnectRecord         *message);
size_t usp_record__web_socket_connect_record__get_packed_size
                     (const UspRecord__WebSocketConnectRecord   *message);
size_t usp_record__web_socket_connect_record__pack
                     (const UspRecord__WebSocketConnectRecord   *message,
                      uint8_t             *out);
size_t usp_record__web_socket_connect_record__pack_to_buffer
                     (const UspRecord__WebSocketConnectRecord   *message,
                      ProtobufCBuffer     *buffer);
UspRecord__WebSocketConnectRecord *
       usp_record__web_socket_connect_record__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   usp_record__web_socket_connect_record__free_unpacked
                     (UspRecord__WebSocketConnectRecord *message,
                      ProtobufCAllocator *allocator);
/* UspRecord__MQTTConnectRecord methods */
void   usp_record__mqttconnect_record__init
                     (UspRecord__MQTTConnectRecord         *message);
size_t usp_record__mqttconnect_record__get_packed_size
                     (const UspRecord__MQTTConnectRecord   *message);
size_t usp_record__mqttconnect_record__pack
                     (const UspRecord__MQTTConnectRecord   *message,
                      uint8_t             *out);
size_t usp_record__mqttconnect_record__pack_to_buffer
                     (const UspRecord__MQTTConnectRecord   *message,
                      ProtobufCBuffer     *buffer);
UspRecord__MQTTConnectRecord *
       usp_record__mqttconnect_record__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   usp_record__mqttconnect_record__free_unpacked
                     (UspRecord__MQTTConnectRecord *message,
                      ProtobufCAllocator *allocator);
/* UspRecord__STOMPConnectRecord methods */
void   usp_record__stompconnect_record__init
                     (UspRecord__STOMPConnectRecord         *message);
size_t usp_record__stompconnect_record__get_packed_size
                     (const UspRecord__STOMPConnectRecord   *message);
size_t usp_record__stompconnect_record__pack
                     (const UspRecord__STOMPConnectRecord   *message,
                      uint8_t             *out);
size_t usp_record__stompconnect_record__pack_to_buffer
                     (const UspRecord__STOMPConnectRecord   *message,
                      ProtobufCBuffer     *buffer);
UspRecord__STOMPConnectRecord *
       usp_record__stompconnect_record__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   usp_record__stompconnect_record__free_unpacked
                     (UspRecord__STOMPConnectRecord *message,
                      ProtobufCAllocator *allocator);
/* UspRecord__UDSConnectRecord methods */
void   usp_record__udsconnect_record__init
                     (UspRecord__UDSConnectRecord         *message);
size_t usp_record__udsconnect_record__get_packed_size
                     (const UspRecord__UDSConnectRecord   *message);
size_t usp_record__udsconnect_record__pack
                     (const UspRecord__UDSConnectRecord   *message,
                      uint8_t             *out);
size_t usp_record__udsconnect_record__pack_to_buffer
                     (const UspRecord__UDSConnectRecord   *message,
                      ProtobufCBuffer     *buffer);
UspRecord__UDSConnectRecord *
       usp_record__udsconnect_record__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   usp_record__udsconnect_record__free_unpacked
                     (UspRecord__UDSConnectRecord *message,
                      ProtobufCAllocator *allocator);
/* UspRecord__DisconnectRecord methods */
void   usp_record__disconnect_record__init
                     (UspRecord__DisconnectRecord         *message);
size_t usp_record__disconnect_record__get_packed_size
                     (const UspRecord__DisconnectRecord   *message);
size_t usp_record__disconnect_record__pack
                     (const UspRecord__DisconnectRecord   *message,
                      uint8_t             *out);
size_t usp_record__disconnect_record__pack_to_buffer
                     (const UspRecord__DisconnectRecord   *message,
                      ProtobufCBuffer     *buffer);
UspRecord__DisconnectRecord *
       usp_record__disconnect_record__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   usp_record__disconnect_record__free_unpacked
                     (UspRecord__DisconnectRecord *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*UspRecord__Record_Closure)
                 (const UspRecord__Record *message,
                  void *closure_data);
typedef void (*UspRecord__NoSessionContextRecord_Closure)
                 (const UspRecord__NoSessionContextRecord *message,
                  void *closure_data);
typedef void (*UspRecord__SessionContextRecord_Closure)
                 (const UspRecord__SessionContextRecord *message,
                  void *closure_data);
typedef void (*UspRecord__WebSocketConnectRecord_Closure)
                 (const UspRecord__WebSocketConnectRecord *message,
                  void *closure_data);
typedef void (*UspRecord__MQTTConnectRecord_Closure)
                 (const UspRecord__MQTTConnectRecord *message,
                  void *closure_data);
typedef void (*UspRecord__STOMPConnectRecord_Closure)
                 (const UspRecord__STOMPConnectRecord *message,
                  void *closure_data);
typedef void (*UspRecord__UDSConnectRecord_Closure)
                 (const UspRecord__UDSConnectRecord *message,
                  void *closure_data);
typedef void (*UspRecord__DisconnectRecord_Closure)
                 (const UspRecord__DisconnectRecord *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor usp_record__record__descriptor;
extern const ProtobufCEnumDescriptor    usp_record__record__payload_security__descriptor;
extern const ProtobufCMessageDescriptor usp_record__no_session_context_record__descriptor;
extern const ProtobufCMessageDescriptor usp_record__session_context_record__descriptor;
extern const ProtobufCEnumDescriptor    usp_record__session_context_record__payload_sarstate__descriptor;
extern const ProtobufCMessageDescriptor usp_record__web_socket_connect_record__descriptor;
extern const ProtobufCMessageDescriptor usp_record__mqttconnect_record__descriptor;
extern const ProtobufCEnumDescriptor    usp_record__mqttconnect_record__mqttversion__descriptor;
extern const ProtobufCMessageDescriptor usp_record__stompconnect_record__descriptor;
extern const ProtobufCEnumDescriptor    usp_record__stompconnect_record__stompversion__descriptor;
extern const ProtobufCMessageDescriptor usp_record__udsconnect_record__descriptor;
extern const ProtobufCMessageDescriptor usp_record__disconnect_record__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_usp_2drecord_2eproto__INCLUDED */
