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

/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif

#include "kv.pb-c.h"
void   mvccpb__key_value__init
                     (Mvccpb__KeyValue         *message)
{
  static const Mvccpb__KeyValue init_value = MVCCPB__KEY_VALUE__INIT;
  *message = init_value;
}
size_t mvccpb__key_value__get_packed_size
                     (const Mvccpb__KeyValue *message)
{
  assert(message->base.descriptor == &mvccpb__key_value__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t mvccpb__key_value__pack
                     (const Mvccpb__KeyValue *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &mvccpb__key_value__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t mvccpb__key_value__pack_to_buffer
                     (const Mvccpb__KeyValue *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &mvccpb__key_value__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Mvccpb__KeyValue *
       mvccpb__key_value__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Mvccpb__KeyValue *)
     protobuf_c_message_unpack (&mvccpb__key_value__descriptor,
                                allocator, len, data);
}
void   mvccpb__key_value__free_unpacked
                     (Mvccpb__KeyValue *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &mvccpb__key_value__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   mvccpb__event__init
                     (Mvccpb__Event         *message)
{
  static const Mvccpb__Event init_value = MVCCPB__EVENT__INIT;
  *message = init_value;
}
size_t mvccpb__event__get_packed_size
                     (const Mvccpb__Event *message)
{
  assert(message->base.descriptor == &mvccpb__event__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t mvccpb__event__pack
                     (const Mvccpb__Event *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &mvccpb__event__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t mvccpb__event__pack_to_buffer
                     (const Mvccpb__Event *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &mvccpb__event__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Mvccpb__Event *
       mvccpb__event__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Mvccpb__Event *)
     protobuf_c_message_unpack (&mvccpb__event__descriptor,
                                allocator, len, data);
}
void   mvccpb__event__free_unpacked
                     (Mvccpb__Event *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &mvccpb__event__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor mvccpb__key_value__field_descriptors[6] =
{
  {
    "key",
    1,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_BYTES,
    0,   /* quantifier_offset */
    offsetof(Mvccpb__KeyValue, key),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "create_revision",
    2,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT64,
    0,   /* quantifier_offset */
    offsetof(Mvccpb__KeyValue, create_revision),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "mod_revision",
    3,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT64,
    0,   /* quantifier_offset */
    offsetof(Mvccpb__KeyValue, mod_revision),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "version",
    4,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT64,
    0,   /* quantifier_offset */
    offsetof(Mvccpb__KeyValue, version),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "value",
    5,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_BYTES,
    0,   /* quantifier_offset */
    offsetof(Mvccpb__KeyValue, value),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "lease",
    6,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT64,
    0,   /* quantifier_offset */
    offsetof(Mvccpb__KeyValue, lease),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned mvccpb__key_value__field_indices_by_name[] = {
  1,   /* field[1] = create_revision */
  0,   /* field[0] = key */
  5,   /* field[5] = lease */
  2,   /* field[2] = mod_revision */
  4,   /* field[4] = value */
  3,   /* field[3] = version */
};
static const ProtobufCIntRange mvccpb__key_value__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 6 }
};
const ProtobufCMessageDescriptor mvccpb__key_value__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "mvccpb.KeyValue",
  "KeyValue",
  "Mvccpb__KeyValue",
  "mvccpb",
  sizeof(Mvccpb__KeyValue),
  6,
  mvccpb__key_value__field_descriptors,
  mvccpb__key_value__field_indices_by_name,
  1,  mvccpb__key_value__number_ranges,
  (ProtobufCMessageInit) mvccpb__key_value__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCEnumValue mvccpb__event__event_type__enum_values_by_number[2] =
{
  { "PUT", "MVCCPB__EVENT__EVENT_TYPE__PUT", 0 },
  { "DELETE", "MVCCPB__EVENT__EVENT_TYPE__DELETE", 1 },
};
static const ProtobufCIntRange mvccpb__event__event_type__value_ranges[] = {
{0, 0},{0, 2}
};
static const ProtobufCEnumValueIndex mvccpb__event__event_type__enum_values_by_name[2] =
{
  { "DELETE", 1 },
  { "PUT", 0 },
};
const ProtobufCEnumDescriptor mvccpb__event__event_type__descriptor =
{
  PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
  "mvccpb.Event.EventType",
  "EventType",
  "Mvccpb__Event__EventType",
  "mvccpb",
  2,
  mvccpb__event__event_type__enum_values_by_number,
  2,
  mvccpb__event__event_type__enum_values_by_name,
  1,
  mvccpb__event__event_type__value_ranges,
  NULL,NULL,NULL,NULL   /* reserved[1234] */
};
static const ProtobufCFieldDescriptor mvccpb__event__field_descriptors[3] =
{
  {
    "type",
    1,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_ENUM,
    0,   /* quantifier_offset */
    offsetof(Mvccpb__Event, type),
    &mvccpb__event__event_type__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "kv",
    2,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Mvccpb__Event, kv),
    &mvccpb__key_value__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "prev_kv",
    3,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Mvccpb__Event, prev_kv),
    &mvccpb__key_value__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned mvccpb__event__field_indices_by_name[] = {
  1,   /* field[1] = kv */
  2,   /* field[2] = prev_kv */
  0,   /* field[0] = type */
};
static const ProtobufCIntRange mvccpb__event__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 3 }
};
const ProtobufCMessageDescriptor mvccpb__event__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "mvccpb.Event",
  "Event",
  "Mvccpb__Event",
  "mvccpb",
  sizeof(Mvccpb__Event),
  3,
  mvccpb__event__field_descriptors,
  mvccpb__event__field_indices_by_name,
  1,  mvccpb__event__number_ranges,
  (ProtobufCMessageInit) mvccpb__event__init,
  NULL,NULL,NULL    /* reserved[123] */
};
