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

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

#include "ledger/queryresult/kv_query_result.pb-c.h"
void   queryresult__kv__init
                     (Queryresult__KV         *message)
{
  static Queryresult__KV init_value = QUERYRESULT__KV__INIT;
  *message = init_value;
}
size_t queryresult__kv__get_packed_size
                     (const Queryresult__KV *message)
{
  assert(message->base.descriptor == &queryresult__kv__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t queryresult__kv__pack
                     (const Queryresult__KV *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &queryresult__kv__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t queryresult__kv__pack_to_buffer
                     (const Queryresult__KV *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &queryresult__kv__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Queryresult__KV *
       queryresult__kv__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Queryresult__KV *)
     protobuf_c_message_unpack (&queryresult__kv__descriptor,
                                allocator, len, data);
}
void   queryresult__kv__free_unpacked
                     (Queryresult__KV *message,
                      ProtobufCAllocator *allocator)
{
  assert(message->base.descriptor == &queryresult__kv__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   queryresult__key_modification__init
                     (Queryresult__KeyModification         *message)
{
  static Queryresult__KeyModification init_value = QUERYRESULT__KEY_MODIFICATION__INIT;
  *message = init_value;
}
size_t queryresult__key_modification__get_packed_size
                     (const Queryresult__KeyModification *message)
{
  assert(message->base.descriptor == &queryresult__key_modification__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t queryresult__key_modification__pack
                     (const Queryresult__KeyModification *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &queryresult__key_modification__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t queryresult__key_modification__pack_to_buffer
                     (const Queryresult__KeyModification *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &queryresult__key_modification__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Queryresult__KeyModification *
       queryresult__key_modification__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Queryresult__KeyModification *)
     protobuf_c_message_unpack (&queryresult__key_modification__descriptor,
                                allocator, len, data);
}
void   queryresult__key_modification__free_unpacked
                     (Queryresult__KeyModification *message,
                      ProtobufCAllocator *allocator)
{
  assert(message->base.descriptor == &queryresult__key_modification__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor queryresult__kv__field_descriptors[3] =
{
  {
    "namespace",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Queryresult__KV, namespace_),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "key",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Queryresult__KV, key),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "value",
    3,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BYTES,
    offsetof(Queryresult__KV, has_value),
    offsetof(Queryresult__KV, value),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned queryresult__kv__field_indices_by_name[] = {
  1,   /* field[1] = key */
  0,   /* field[0] = namespace */
  2,   /* field[2] = value */
};
static const ProtobufCIntRange queryresult__kv__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 3 }
};
const ProtobufCMessageDescriptor queryresult__kv__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "queryresult.KV",
  "KV",
  "Queryresult__KV",
  "queryresult",
  sizeof(Queryresult__KV),
  3,
  queryresult__kv__field_descriptors,
  queryresult__kv__field_indices_by_name,
  1,  queryresult__kv__number_ranges,
  (ProtobufCMessageInit) queryresult__kv__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor queryresult__key_modification__field_descriptors[4] =
{
  {
    "tx_id",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Queryresult__KeyModification, tx_id),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "value",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BYTES,
    offsetof(Queryresult__KeyModification, has_value),
    offsetof(Queryresult__KeyModification, value),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "timestamp",
    3,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Queryresult__KeyModification, timestamp),
    &google__protobuf__timestamp__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "is_delete",
    4,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BOOL,
    offsetof(Queryresult__KeyModification, has_is_delete),
    offsetof(Queryresult__KeyModification, is_delete),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned queryresult__key_modification__field_indices_by_name[] = {
  3,   /* field[3] = is_delete */
  2,   /* field[2] = timestamp */
  0,   /* field[0] = tx_id */
  1,   /* field[1] = value */
};
static const ProtobufCIntRange queryresult__key_modification__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 4 }
};
const ProtobufCMessageDescriptor queryresult__key_modification__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "queryresult.KeyModification",
  "KeyModification",
  "Queryresult__KeyModification",
  "queryresult",
  sizeof(Queryresult__KeyModification),
  4,
  queryresult__key_modification__field_descriptors,
  queryresult__key_modification__field_indices_by_name,
  1,  queryresult__key_modification__number_ranges,
  (ProtobufCMessageInit) queryresult__key_modification__init,
  NULL,NULL,NULL    /* reserved[123] */
};
