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

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

#include "peer/events.pb-c.h"
void   protos__filtered_block__init
                     (Protos__FilteredBlock         *message)
{
  static Protos__FilteredBlock init_value = PROTOS__FILTERED_BLOCK__INIT;
  *message = init_value;
}
size_t protos__filtered_block__get_packed_size
                     (const Protos__FilteredBlock *message)
{
  assert(message->base.descriptor == &protos__filtered_block__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t protos__filtered_block__pack
                     (const Protos__FilteredBlock *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &protos__filtered_block__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t protos__filtered_block__pack_to_buffer
                     (const Protos__FilteredBlock *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &protos__filtered_block__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Protos__FilteredBlock *
       protos__filtered_block__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Protos__FilteredBlock *)
     protobuf_c_message_unpack (&protos__filtered_block__descriptor,
                                allocator, len, data);
}
void   protos__filtered_block__free_unpacked
                     (Protos__FilteredBlock *message,
                      ProtobufCAllocator *allocator)
{
  assert(message->base.descriptor == &protos__filtered_block__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   protos__filtered_transaction__init
                     (Protos__FilteredTransaction         *message)
{
  static Protos__FilteredTransaction init_value = PROTOS__FILTERED_TRANSACTION__INIT;
  *message = init_value;
}
size_t protos__filtered_transaction__get_packed_size
                     (const Protos__FilteredTransaction *message)
{
  assert(message->base.descriptor == &protos__filtered_transaction__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t protos__filtered_transaction__pack
                     (const Protos__FilteredTransaction *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &protos__filtered_transaction__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t protos__filtered_transaction__pack_to_buffer
                     (const Protos__FilteredTransaction *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &protos__filtered_transaction__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Protos__FilteredTransaction *
       protos__filtered_transaction__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Protos__FilteredTransaction *)
     protobuf_c_message_unpack (&protos__filtered_transaction__descriptor,
                                allocator, len, data);
}
void   protos__filtered_transaction__free_unpacked
                     (Protos__FilteredTransaction *message,
                      ProtobufCAllocator *allocator)
{
  assert(message->base.descriptor == &protos__filtered_transaction__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   protos__filtered_transaction_actions__init
                     (Protos__FilteredTransactionActions         *message)
{
  static Protos__FilteredTransactionActions init_value = PROTOS__FILTERED_TRANSACTION_ACTIONS__INIT;
  *message = init_value;
}
size_t protos__filtered_transaction_actions__get_packed_size
                     (const Protos__FilteredTransactionActions *message)
{
  assert(message->base.descriptor == &protos__filtered_transaction_actions__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t protos__filtered_transaction_actions__pack
                     (const Protos__FilteredTransactionActions *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &protos__filtered_transaction_actions__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t protos__filtered_transaction_actions__pack_to_buffer
                     (const Protos__FilteredTransactionActions *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &protos__filtered_transaction_actions__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Protos__FilteredTransactionActions *
       protos__filtered_transaction_actions__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Protos__FilteredTransactionActions *)
     protobuf_c_message_unpack (&protos__filtered_transaction_actions__descriptor,
                                allocator, len, data);
}
void   protos__filtered_transaction_actions__free_unpacked
                     (Protos__FilteredTransactionActions *message,
                      ProtobufCAllocator *allocator)
{
  assert(message->base.descriptor == &protos__filtered_transaction_actions__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   protos__filtered_chaincode_action__init
                     (Protos__FilteredChaincodeAction         *message)
{
  static Protos__FilteredChaincodeAction init_value = PROTOS__FILTERED_CHAINCODE_ACTION__INIT;
  *message = init_value;
}
size_t protos__filtered_chaincode_action__get_packed_size
                     (const Protos__FilteredChaincodeAction *message)
{
  assert(message->base.descriptor == &protos__filtered_chaincode_action__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t protos__filtered_chaincode_action__pack
                     (const Protos__FilteredChaincodeAction *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &protos__filtered_chaincode_action__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t protos__filtered_chaincode_action__pack_to_buffer
                     (const Protos__FilteredChaincodeAction *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &protos__filtered_chaincode_action__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Protos__FilteredChaincodeAction *
       protos__filtered_chaincode_action__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Protos__FilteredChaincodeAction *)
     protobuf_c_message_unpack (&protos__filtered_chaincode_action__descriptor,
                                allocator, len, data);
}
void   protos__filtered_chaincode_action__free_unpacked
                     (Protos__FilteredChaincodeAction *message,
                      ProtobufCAllocator *allocator)
{
  assert(message->base.descriptor == &protos__filtered_chaincode_action__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   protos__deliver_response__init
                     (Protos__DeliverResponse         *message)
{
  static Protos__DeliverResponse init_value = PROTOS__DELIVER_RESPONSE__INIT;
  *message = init_value;
}
size_t protos__deliver_response__get_packed_size
                     (const Protos__DeliverResponse *message)
{
  assert(message->base.descriptor == &protos__deliver_response__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t protos__deliver_response__pack
                     (const Protos__DeliverResponse *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &protos__deliver_response__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t protos__deliver_response__pack_to_buffer
                     (const Protos__DeliverResponse *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &protos__deliver_response__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Protos__DeliverResponse *
       protos__deliver_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Protos__DeliverResponse *)
     protobuf_c_message_unpack (&protos__deliver_response__descriptor,
                                allocator, len, data);
}
void   protos__deliver_response__free_unpacked
                     (Protos__DeliverResponse *message,
                      ProtobufCAllocator *allocator)
{
  assert(message->base.descriptor == &protos__deliver_response__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor protos__filtered_block__field_descriptors[3] =
{
  {
    "channel_id",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Protos__FilteredBlock, channel_id),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "number",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_UINT64,
    offsetof(Protos__FilteredBlock, has_number),
    offsetof(Protos__FilteredBlock, number),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "filtered_transactions",
    4,
    PROTOBUF_C_LABEL_REPEATED,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(Protos__FilteredBlock, n_filtered_transactions),
    offsetof(Protos__FilteredBlock, filtered_transactions),
    &protos__filtered_transaction__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned protos__filtered_block__field_indices_by_name[] = {
  0,   /* field[0] = channel_id */
  2,   /* field[2] = filtered_transactions */
  1,   /* field[1] = number */
};
static const ProtobufCIntRange protos__filtered_block__number_ranges[2 + 1] =
{
  { 1, 0 },
  { 4, 2 },
  { 0, 3 }
};
const ProtobufCMessageDescriptor protos__filtered_block__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "protos.FilteredBlock",
  "FilteredBlock",
  "Protos__FilteredBlock",
  "protos",
  sizeof(Protos__FilteredBlock),
  3,
  protos__filtered_block__field_descriptors,
  protos__filtered_block__field_indices_by_name,
  2,  protos__filtered_block__number_ranges,
  (ProtobufCMessageInit) protos__filtered_block__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor protos__filtered_transaction__field_descriptors[4] =
{
  {
    "txid",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_STRING,
    0,   /* quantifier_offset */
    offsetof(Protos__FilteredTransaction, txid),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "type",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_ENUM,
    offsetof(Protos__FilteredTransaction, has_type),
    offsetof(Protos__FilteredTransaction, type),
    &common__header_type__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "tx_validation_code",
    3,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_ENUM,
    offsetof(Protos__FilteredTransaction, has_tx_validation_code),
    offsetof(Protos__FilteredTransaction, tx_validation_code),
    &protos__tx_validation_code__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "transaction_actions",
    4,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(Protos__FilteredTransaction, data_case),
    offsetof(Protos__FilteredTransaction, transaction_actions),
    &protos__filtered_transaction_actions__descriptor,
    NULL,
    0 | PROTOBUF_C_FIELD_FLAG_ONEOF,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned protos__filtered_transaction__field_indices_by_name[] = {
  3,   /* field[3] = transaction_actions */
  2,   /* field[2] = tx_validation_code */
  0,   /* field[0] = txid */
  1,   /* field[1] = type */
};
static const ProtobufCIntRange protos__filtered_transaction__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 4 }
};
const ProtobufCMessageDescriptor protos__filtered_transaction__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "protos.FilteredTransaction",
  "FilteredTransaction",
  "Protos__FilteredTransaction",
  "protos",
  sizeof(Protos__FilteredTransaction),
  4,
  protos__filtered_transaction__field_descriptors,
  protos__filtered_transaction__field_indices_by_name,
  1,  protos__filtered_transaction__number_ranges,
  (ProtobufCMessageInit) protos__filtered_transaction__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor protos__filtered_transaction_actions__field_descriptors[1] =
{
  {
    "chaincode_actions",
    1,
    PROTOBUF_C_LABEL_REPEATED,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(Protos__FilteredTransactionActions, n_chaincode_actions),
    offsetof(Protos__FilteredTransactionActions, chaincode_actions),
    &protos__filtered_chaincode_action__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned protos__filtered_transaction_actions__field_indices_by_name[] = {
  0,   /* field[0] = chaincode_actions */
};
static const ProtobufCIntRange protos__filtered_transaction_actions__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 1 }
};
const ProtobufCMessageDescriptor protos__filtered_transaction_actions__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "protos.FilteredTransactionActions",
  "FilteredTransactionActions",
  "Protos__FilteredTransactionActions",
  "protos",
  sizeof(Protos__FilteredTransactionActions),
  1,
  protos__filtered_transaction_actions__field_descriptors,
  protos__filtered_transaction_actions__field_indices_by_name,
  1,  protos__filtered_transaction_actions__number_ranges,
  (ProtobufCMessageInit) protos__filtered_transaction_actions__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor protos__filtered_chaincode_action__field_descriptors[1] =
{
  {
    "chaincode_event",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Protos__FilteredChaincodeAction, chaincode_event),
    &protos__chaincode_event__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned protos__filtered_chaincode_action__field_indices_by_name[] = {
  0,   /* field[0] = chaincode_event */
};
static const ProtobufCIntRange protos__filtered_chaincode_action__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 1 }
};
const ProtobufCMessageDescriptor protos__filtered_chaincode_action__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "protos.FilteredChaincodeAction",
  "FilteredChaincodeAction",
  "Protos__FilteredChaincodeAction",
  "protos",
  sizeof(Protos__FilteredChaincodeAction),
  1,
  protos__filtered_chaincode_action__field_descriptors,
  protos__filtered_chaincode_action__field_indices_by_name,
  1,  protos__filtered_chaincode_action__number_ranges,
  (ProtobufCMessageInit) protos__filtered_chaincode_action__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor protos__deliver_response__field_descriptors[3] =
{
  {
    "status",
    1,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_ENUM,
    offsetof(Protos__DeliverResponse, type_case),
    offsetof(Protos__DeliverResponse, status),
    &common__status__descriptor,
    NULL,
    0 | PROTOBUF_C_FIELD_FLAG_ONEOF,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "block",
    2,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(Protos__DeliverResponse, type_case),
    offsetof(Protos__DeliverResponse, block),
    &common__block__descriptor,
    NULL,
    0 | PROTOBUF_C_FIELD_FLAG_ONEOF,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "filtered_block",
    3,
    PROTOBUF_C_LABEL_OPTIONAL,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(Protos__DeliverResponse, type_case),
    offsetof(Protos__DeliverResponse, filtered_block),
    &protos__filtered_block__descriptor,
    NULL,
    0 | PROTOBUF_C_FIELD_FLAG_ONEOF,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned protos__deliver_response__field_indices_by_name[] = {
  1,   /* field[1] = block */
  2,   /* field[2] = filtered_block */
  0,   /* field[0] = status */
};
static const ProtobufCIntRange protos__deliver_response__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 3 }
};
const ProtobufCMessageDescriptor protos__deliver_response__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "protos.DeliverResponse",
  "DeliverResponse",
  "Protos__DeliverResponse",
  "protos",
  sizeof(Protos__DeliverResponse),
  3,
  protos__deliver_response__field_descriptors,
  protos__deliver_response__field_indices_by_name,
  1,  protos__deliver_response__number_ranges,
  (ProtobufCMessageInit) protos__deliver_response__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCMethodDescriptor protos__deliver__method_descriptors[2] =
{
  { "Deliver", &common__envelope__descriptor, &protos__deliver_response__descriptor },
  { "DeliverFiltered", &common__envelope__descriptor, &protos__deliver_response__descriptor },
};
const unsigned protos__deliver__method_indices_by_name[] = {
  0,        /* Deliver */
  1         /* DeliverFiltered */
};
const ProtobufCServiceDescriptor protos__deliver__descriptor =
{
  PROTOBUF_C__SERVICE_DESCRIPTOR_MAGIC,
  "protos.Deliver",
  "Deliver",
  "Protos__Deliver",
  "protos",
  2,
  protos__deliver__method_descriptors,
  protos__deliver__method_indices_by_name
};
void protos__deliver__deliver(ProtobufCService *service,
                              const Common__Envelope *input,
                              Protos__DeliverResponse_Closure closure,
                              void *closure_data)
{
  assert(service->descriptor == &protos__deliver__descriptor);
  service->invoke(service, 0, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data);
}
void protos__deliver__deliver_filtered(ProtobufCService *service,
                                       const Common__Envelope *input,
                                       Protos__DeliverResponse_Closure closure,
                                       void *closure_data)
{
  assert(service->descriptor == &protos__deliver__descriptor);
  service->invoke(service, 1, (const ProtobufCMessage *) input, (ProtobufCClosure) closure, closure_data);
}
void protos__deliver__init (Protos__Deliver_Service *service,
                            Protos__Deliver_ServiceDestroy destroy)
{
  protobuf_c_service_generated_init (&service->base,
                                     &protos__deliver__descriptor,
                                     (ProtobufCServiceDestroy) destroy);
}
