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

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

#include "mercury.pb-c.h"
void   mercury_multi_get_request__init
                     (MercuryMultiGetRequest         *message)
{
  static const MercuryMultiGetRequest init_value = MERCURY_MULTI_GET_REQUEST__INIT;
  *message = init_value;
}
size_t mercury_multi_get_request__get_packed_size
                     (const MercuryMultiGetRequest *message)
{
  assert(message->base.descriptor == &mercury_multi_get_request__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t mercury_multi_get_request__pack
                     (const MercuryMultiGetRequest *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &mercury_multi_get_request__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t mercury_multi_get_request__pack_to_buffer
                     (const MercuryMultiGetRequest *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &mercury_multi_get_request__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
MercuryMultiGetRequest *
       mercury_multi_get_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (MercuryMultiGetRequest *)
     protobuf_c_message_unpack (&mercury_multi_get_request__descriptor,
                                allocator, len, data);
}
void   mercury_multi_get_request__free_unpacked
                     (MercuryMultiGetRequest *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &mercury_multi_get_request__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   mercury_multi_get_reply__init
                     (MercuryMultiGetReply         *message)
{
  static const MercuryMultiGetReply init_value = MERCURY_MULTI_GET_REPLY__INIT;
  *message = init_value;
}
size_t mercury_multi_get_reply__get_packed_size
                     (const MercuryMultiGetReply *message)
{
  assert(message->base.descriptor == &mercury_multi_get_reply__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t mercury_multi_get_reply__pack
                     (const MercuryMultiGetReply *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &mercury_multi_get_reply__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t mercury_multi_get_reply__pack_to_buffer
                     (const MercuryMultiGetReply *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &mercury_multi_get_reply__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
MercuryMultiGetReply *
       mercury_multi_get_reply__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (MercuryMultiGetReply *)
     protobuf_c_message_unpack (&mercury_multi_get_reply__descriptor,
                                allocator, len, data);
}
void   mercury_multi_get_reply__free_unpacked
                     (MercuryMultiGetReply *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &mercury_multi_get_reply__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   mercury_request__init
                     (MercuryRequest         *message)
{
  static const MercuryRequest init_value = MERCURY_REQUEST__INIT;
  *message = init_value;
}
size_t mercury_request__get_packed_size
                     (const MercuryRequest *message)
{
  assert(message->base.descriptor == &mercury_request__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t mercury_request__pack
                     (const MercuryRequest *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &mercury_request__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t mercury_request__pack_to_buffer
                     (const MercuryRequest *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &mercury_request__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
MercuryRequest *
       mercury_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (MercuryRequest *)
     protobuf_c_message_unpack (&mercury_request__descriptor,
                                allocator, len, data);
}
void   mercury_request__free_unpacked
                     (MercuryRequest *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &mercury_request__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   mercury_reply__init
                     (MercuryReply         *message)
{
  static const MercuryReply init_value = MERCURY_REPLY__INIT;
  *message = init_value;
}
size_t mercury_reply__get_packed_size
                     (const MercuryReply *message)
{
  assert(message->base.descriptor == &mercury_reply__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t mercury_reply__pack
                     (const MercuryReply *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &mercury_reply__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t mercury_reply__pack_to_buffer
                     (const MercuryReply *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &mercury_reply__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
MercuryReply *
       mercury_reply__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (MercuryReply *)
     protobuf_c_message_unpack (&mercury_reply__descriptor,
                                allocator, len, data);
}
void   mercury_reply__free_unpacked
                     (MercuryReply *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &mercury_reply__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   header__init
                     (Header         *message)
{
  static const Header init_value = HEADER__INIT;
  *message = init_value;
}
size_t header__get_packed_size
                     (const Header *message)
{
  assert(message->base.descriptor == &header__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t header__pack
                     (const Header *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &header__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t header__pack_to_buffer
                     (const Header *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &header__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Header *
       header__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Header *)
     protobuf_c_message_unpack (&header__descriptor,
                                allocator, len, data);
}
void   header__free_unpacked
                     (Header *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &header__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   user_field__init
                     (UserField         *message)
{
  static const UserField init_value = USER_FIELD__INIT;
  *message = init_value;
}
size_t user_field__get_packed_size
                     (const UserField *message)
{
  assert(message->base.descriptor == &user_field__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t user_field__pack
                     (const UserField *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &user_field__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t user_field__pack_to_buffer
                     (const UserField *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &user_field__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
UserField *
       user_field__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (UserField *)
     protobuf_c_message_unpack (&user_field__descriptor,
                                allocator, len, data);
}
void   user_field__free_unpacked
                     (UserField *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &user_field__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor mercury_multi_get_request__field_descriptors[1] =
{
  {
    "request",
    1,
    PROTOBUF_C_LABEL_REPEATED,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(MercuryMultiGetRequest, n_request),
    offsetof(MercuryMultiGetRequest, request),
    &mercury_request__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned mercury_multi_get_request__field_indices_by_name[] = {
  0,   /* field[0] = request */
};
static const ProtobufCIntRange mercury_multi_get_request__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 1 }
};
const ProtobufCMessageDescriptor mercury_multi_get_request__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "MercuryMultiGetRequest",
  "MercuryMultiGetRequest",
  "MercuryMultiGetRequest",
  "",
  sizeof(MercuryMultiGetRequest),
  1,
  mercury_multi_get_request__field_descriptors,
  mercury_multi_get_request__field_indices_by_name,
  1,  mercury_multi_get_request__number_ranges,
  (ProtobufCMessageInit) mercury_multi_get_request__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor mercury_multi_get_reply__field_descriptors[1] =
{
  {
    "reply",
    1,
    PROTOBUF_C_LABEL_REPEATED,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(MercuryMultiGetReply, n_reply),
    offsetof(MercuryMultiGetReply, reply),
    &mercury_reply__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned mercury_multi_get_reply__field_indices_by_name[] = {
  0,   /* field[0] = reply */
};
static const ProtobufCIntRange mercury_multi_get_reply__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 1 }
};
const ProtobufCMessageDescriptor mercury_multi_get_reply__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "MercuryMultiGetReply",
  "MercuryMultiGetReply",
  "MercuryMultiGetReply",
  "",
  sizeof(MercuryMultiGetReply),
  1,
  mercury_multi_get_reply__field_descriptors,
  mercury_multi_get_reply__field_indices_by_name,
  1,  mercury_multi_get_reply__number_ranges,
  (ProtobufCMessageInit) mercury_multi_get_reply__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor mercury_request__field_descriptors[4] =
{
  {
    "uri",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(MercuryRequest, uri),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "content_type",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(MercuryRequest, content_type),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "body",
    3,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BYTES,
    offsetof(MercuryRequest, has_body),
    offsetof(MercuryRequest, body),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "etag",
    4,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BYTES,
    offsetof(MercuryRequest, has_etag),
    offsetof(MercuryRequest, etag),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned mercury_request__field_indices_by_name[] = {
  2,   /* field[2] = body */
  1,   /* field[1] = content_type */
  3,   /* field[3] = etag */
  0,   /* field[0] = uri */
};
static const ProtobufCIntRange mercury_request__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 4 }
};
const ProtobufCMessageDescriptor mercury_request__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "MercuryRequest",
  "MercuryRequest",
  "MercuryRequest",
  "",
  sizeof(MercuryRequest),
  4,
  mercury_request__field_descriptors,
  mercury_request__field_indices_by_name,
  1,  mercury_request__number_ranges,
  (ProtobufCMessageInit) mercury_request__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCEnumValue mercury_reply__cache_policy__enum_values_by_number[3] =
{
  { "CACHE_NO", "MERCURY_REPLY__CACHE_POLICY__CACHE_NO", 1 },
  { "CACHE_PRIVATE", "MERCURY_REPLY__CACHE_POLICY__CACHE_PRIVATE", 2 },
  { "CACHE_PUBLIC", "MERCURY_REPLY__CACHE_POLICY__CACHE_PUBLIC", 3 },
};
static const ProtobufCIntRange mercury_reply__cache_policy__value_ranges[] = {
{1, 0},{0, 3}
};
static const ProtobufCEnumValueIndex mercury_reply__cache_policy__enum_values_by_name[3] =
{
  { "CACHE_NO", 0 },
  { "CACHE_PRIVATE", 1 },
  { "CACHE_PUBLIC", 2 },
};
const ProtobufCEnumDescriptor mercury_reply__cache_policy__descriptor =
{
  PROTOBUF_C__ENUM_DESCRIPTOR_MAGIC,
  "MercuryReply.CachePolicy",
  "CachePolicy",
  "MercuryReply__CachePolicy",
  "",
  3,
  mercury_reply__cache_policy__enum_values_by_number,
  3,
  mercury_reply__cache_policy__enum_values_by_name,
  1,
  mercury_reply__cache_policy__value_ranges,
  NULL,NULL,NULL,NULL   /* reserved[1234] */
};
static const ProtobufCFieldDescriptor mercury_reply__field_descriptors[7] =
{
  {
    "status_code",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_SINT32,
    offsetof(MercuryReply, has_status_code),
    offsetof(MercuryReply, status_code),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "status_message",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(MercuryReply, status_message),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "cache_policy",
    3,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_ENUM,
    offsetof(MercuryReply, has_cache_policy),
    offsetof(MercuryReply, cache_policy),
    &mercury_reply__cache_policy__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "ttl",
    4,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_SINT32,
    offsetof(MercuryReply, has_ttl),
    offsetof(MercuryReply, ttl),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "etag",
    5,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BYTES,
    offsetof(MercuryReply, has_etag),
    offsetof(MercuryReply, etag),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "content_type",
    6,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(MercuryReply, content_type),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "body",
    7,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BYTES,
    offsetof(MercuryReply, has_body),
    offsetof(MercuryReply, body),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned mercury_reply__field_indices_by_name[] = {
  6,   /* field[6] = body */
  2,   /* field[2] = cache_policy */
  5,   /* field[5] = content_type */
  4,   /* field[4] = etag */
  0,   /* field[0] = status_code */
  1,   /* field[1] = status_message */
  3,   /* field[3] = ttl */
};
static const ProtobufCIntRange mercury_reply__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 7 }
};
const ProtobufCMessageDescriptor mercury_reply__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "MercuryReply",
  "MercuryReply",
  "MercuryReply",
  "",
  sizeof(MercuryReply),
  7,
  mercury_reply__field_descriptors,
  mercury_reply__field_indices_by_name,
  1,  mercury_reply__number_ranges,
  (ProtobufCMessageInit) mercury_reply__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor header__field_descriptors[5] =
{
  {
    "uri",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Header, uri),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "content_type",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Header, content_type),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "method",
    3,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Header, method),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "status_code",
    4,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_SINT32,
    offsetof(Header, has_status_code),
    offsetof(Header, status_code),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "user_fields",
    6,
    PROTOBUF_C_LABEL_REPEATED,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(Header, n_user_fields),
    offsetof(Header, user_fields),
    &user_field__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned header__field_indices_by_name[] = {
  1,   /* field[1] = content_type */
  2,   /* field[2] = method */
  3,   /* field[3] = status_code */
  0,   /* field[0] = uri */
  4,   /* field[4] = user_fields */
};
static const ProtobufCIntRange header__number_ranges[2 + 1] =
{
  { 1, 0 },
  { 6, 4 },
  { 0, 5 }
};
const ProtobufCMessageDescriptor header__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "Header",
  "Header",
  "Header",
  "",
  sizeof(Header),
  5,
  header__field_descriptors,
  header__field_indices_by_name,
  2,  header__number_ranges,
  (ProtobufCMessageInit) header__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor user_field__field_descriptors[2] =
{
  {
    "key",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(UserField, key),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "value",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BYTES,
    offsetof(UserField, has_value),
    offsetof(UserField, value),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned user_field__field_indices_by_name[] = {
  0,   /* field[0] = key */
  1,   /* field[1] = value */
};
static const ProtobufCIntRange user_field__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 2 }
};
const ProtobufCMessageDescriptor user_field__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "UserField",
  "UserField",
  "UserField",
  "",
  sizeof(UserField),
  2,
  user_field__field_descriptors,
  user_field__field_indices_by_name,
  1,  user_field__number_ranges,
  (ProtobufCMessageInit) user_field__init,
  NULL,NULL,NULL    /* reserved[123] */
};
