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

#ifndef PROTOBUF_C_kv_2eproto__INCLUDED
#define PROTOBUF_C_kv_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 1005001 < 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 Mvccpb__KeyValue Mvccpb__KeyValue;
typedef struct Mvccpb__Event Mvccpb__Event;


/* --- enums --- */

typedef enum _Mvccpb__Event__EventType {
  MVCCPB__EVENT__EVENT_TYPE__PUT = 0,
  MVCCPB__EVENT__EVENT_TYPE__DELETE = 1
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(MVCCPB__EVENT__EVENT_TYPE)
} Mvccpb__Event__EventType;

/* --- messages --- */

struct  Mvccpb__KeyValue
{
  ProtobufCMessage base;
  ProtobufCBinaryData key;
  int64_t create_revision;
  int64_t mod_revision;
  int64_t version;
  ProtobufCBinaryData value;
  int64_t lease;
};
#define MVCCPB__KEY_VALUE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&mvccpb__key_value__descriptor) \
    , {0,NULL}, 0, 0, 0, {0,NULL}, 0 }


struct  Mvccpb__Event
{
  ProtobufCMessage base;
  Mvccpb__Event__EventType type;
  Mvccpb__KeyValue *kv;
  Mvccpb__KeyValue *prev_kv;
};
#define MVCCPB__EVENT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&mvccpb__event__descriptor) \
    , MVCCPB__EVENT__EVENT_TYPE__PUT, NULL, NULL }


/* Mvccpb__KeyValue methods */
void   mvccpb__key_value__init
                     (Mvccpb__KeyValue         *message);
size_t mvccpb__key_value__get_packed_size
                     (const Mvccpb__KeyValue   *message);
size_t mvccpb__key_value__pack
                     (const Mvccpb__KeyValue   *message,
                      uint8_t             *out);
size_t mvccpb__key_value__pack_to_buffer
                     (const Mvccpb__KeyValue   *message,
                      ProtobufCBuffer     *buffer);
Mvccpb__KeyValue *
       mvccpb__key_value__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   mvccpb__key_value__free_unpacked
                     (Mvccpb__KeyValue *message,
                      ProtobufCAllocator *allocator);
/* Mvccpb__Event methods */
void   mvccpb__event__init
                     (Mvccpb__Event         *message);
size_t mvccpb__event__get_packed_size
                     (const Mvccpb__Event   *message);
size_t mvccpb__event__pack
                     (const Mvccpb__Event   *message,
                      uint8_t             *out);
size_t mvccpb__event__pack_to_buffer
                     (const Mvccpb__Event   *message,
                      ProtobufCBuffer     *buffer);
Mvccpb__Event *
       mvccpb__event__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   mvccpb__event__free_unpacked
                     (Mvccpb__Event *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Mvccpb__KeyValue_Closure)
                 (const Mvccpb__KeyValue *message,
                  void *closure_data);
typedef void (*Mvccpb__Event_Closure)
                 (const Mvccpb__Event *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor mvccpb__key_value__descriptor;
extern const ProtobufCMessageDescriptor mvccpb__event__descriptor;
extern const ProtobufCEnumDescriptor    mvccpb__event__event_type__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_kv_2eproto__INCLUDED */
