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

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

#include "peer/chaincode_event.pb-c.h"
void   protos__chaincode_event__init
                     (Protos__ChaincodeEvent         *message)
{
  static Protos__ChaincodeEvent init_value = PROTOS__CHAINCODE_EVENT__INIT;
  *message = init_value;
}
size_t protos__chaincode_event__get_packed_size
                     (const Protos__ChaincodeEvent *message)
{
  assert(message->base.descriptor == &protos__chaincode_event__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t protos__chaincode_event__pack
                     (const Protos__ChaincodeEvent *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &protos__chaincode_event__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t protos__chaincode_event__pack_to_buffer
                     (const Protos__ChaincodeEvent *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &protos__chaincode_event__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Protos__ChaincodeEvent *
       protos__chaincode_event__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Protos__ChaincodeEvent *)
     protobuf_c_message_unpack (&protos__chaincode_event__descriptor,
                                allocator, len, data);
}
void   protos__chaincode_event__free_unpacked
                     (Protos__ChaincodeEvent *message,
                      ProtobufCAllocator *allocator)
{
  assert(message->base.descriptor == &protos__chaincode_event__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor protos__chaincode_event__field_descriptors[4] =
{
  {
    "chaincode_id",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Protos__ChaincodeEvent, chaincode_id),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "tx_id",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Protos__ChaincodeEvent, tx_id),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "event_name",
    3,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Protos__ChaincodeEvent, event_name),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "payload",
    4,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_BYTES,
    offsetof(Protos__ChaincodeEvent, has_payload),
    offsetof(Protos__ChaincodeEvent, payload),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned protos__chaincode_event__field_indices_by_name[] = {
  0,   /* field[0] = chaincode_id */
  2,   /* field[2] = event_name */
  3,   /* field[3] = payload */
  1,   /* field[1] = tx_id */
};
static const ProtobufCIntRange protos__chaincode_event__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 4 }
};
const ProtobufCMessageDescriptor protos__chaincode_event__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "protos.ChaincodeEvent",
  "ChaincodeEvent",
  "Protos__ChaincodeEvent",
  "protos",
  sizeof(Protos__ChaincodeEvent),
  4,
  protos__chaincode_event__field_descriptors,
  protos__chaincode_event__field_indices_by_name,
  1,  protos__chaincode_event__number_ranges,
  (ProtobufCMessageInit) protos__chaincode_event__init,
  NULL,NULL,NULL    /* reserved[123] */
};
