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

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

#include "common/transaction.pb-c.h"
void   common__transaction__init
                     (Common__Transaction         *message)
{
  static const Common__Transaction init_value = COMMON__TRANSACTION__INIT;
  *message = init_value;
}
size_t common__transaction__get_packed_size
                     (const Common__Transaction *message)
{
  assert(message->base.descriptor == &common__transaction__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t common__transaction__pack
                     (const Common__Transaction *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &common__transaction__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t common__transaction__pack_to_buffer
                     (const Common__Transaction *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &common__transaction__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Common__Transaction *
       common__transaction__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Common__Transaction *)
     protobuf_c_message_unpack (&common__transaction__descriptor,
                                allocator, len, data);
}
void   common__transaction__free_unpacked
                     (Common__Transaction *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &common__transaction__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   common__transaction_info__init
                     (Common__TransactionInfo         *message)
{
  static const Common__TransactionInfo init_value = COMMON__TRANSACTION_INFO__INIT;
  *message = init_value;
}
size_t common__transaction_info__get_packed_size
                     (const Common__TransactionInfo *message)
{
  assert(message->base.descriptor == &common__transaction_info__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t common__transaction_info__pack
                     (const Common__TransactionInfo *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &common__transaction_info__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t common__transaction_info__pack_to_buffer
                     (const Common__TransactionInfo *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &common__transaction_info__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Common__TransactionInfo *
       common__transaction_info__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Common__TransactionInfo *)
     protobuf_c_message_unpack (&common__transaction_info__descriptor,
                                allocator, len, data);
}
void   common__transaction_info__free_unpacked
                     (Common__TransactionInfo *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &common__transaction_info__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   common__transaction_with_rwset__init
                     (Common__TransactionWithRWSet         *message)
{
  static const Common__TransactionWithRWSet init_value = COMMON__TRANSACTION_WITH_RWSET__INIT;
  *message = init_value;
}
size_t common__transaction_with_rwset__get_packed_size
                     (const Common__TransactionWithRWSet *message)
{
  assert(message->base.descriptor == &common__transaction_with_rwset__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t common__transaction_with_rwset__pack
                     (const Common__TransactionWithRWSet *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &common__transaction_with_rwset__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t common__transaction_with_rwset__pack_to_buffer
                     (const Common__TransactionWithRWSet *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &common__transaction_with_rwset__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Common__TransactionWithRWSet *
       common__transaction_with_rwset__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Common__TransactionWithRWSet *)
     protobuf_c_message_unpack (&common__transaction_with_rwset__descriptor,
                                allocator, len, data);
}
void   common__transaction_with_rwset__free_unpacked
                     (Common__TransactionWithRWSet *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &common__transaction_with_rwset__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
void   common__transaction_info_with_rwset__init
                     (Common__TransactionInfoWithRWSet         *message)
{
  static const Common__TransactionInfoWithRWSet init_value = COMMON__TRANSACTION_INFO_WITH_RWSET__INIT;
  *message = init_value;
}
size_t common__transaction_info_with_rwset__get_packed_size
                     (const Common__TransactionInfoWithRWSet *message)
{
  assert(message->base.descriptor == &common__transaction_info_with_rwset__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t common__transaction_info_with_rwset__pack
                     (const Common__TransactionInfoWithRWSet *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &common__transaction_info_with_rwset__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t common__transaction_info_with_rwset__pack_to_buffer
                     (const Common__TransactionInfoWithRWSet *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &common__transaction_info_with_rwset__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
Common__TransactionInfoWithRWSet *
       common__transaction_info_with_rwset__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (Common__TransactionInfoWithRWSet *)
     protobuf_c_message_unpack (&common__transaction_info_with_rwset__descriptor,
                                allocator, len, data);
}
void   common__transaction_info_with_rwset__free_unpacked
                     (Common__TransactionInfoWithRWSet *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &common__transaction_info_with_rwset__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
static const ProtobufCFieldDescriptor common__transaction__field_descriptors[4] =
{
  {
    "payload",
    1,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Common__Transaction, payload),
    &common__chainmaker_payload__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "sender",
    2,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Common__Transaction, sender),
    &common__endorsement_entry__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "endorsers",
    3,
    PROTOBUF_C_LABEL_REPEATED,
    PROTOBUF_C_TYPE_MESSAGE,
    offsetof(Common__Transaction, n_endorsers),
    offsetof(Common__Transaction, endorsers),
    &common__endorsement_entry__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "result",
    4,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Common__Transaction, result),
    &common__result__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned common__transaction__field_indices_by_name[] = {
  2,   /* field[2] = endorsers */
  0,   /* field[0] = payload */
  3,   /* field[3] = result */
  1,   /* field[1] = sender */
};
static const ProtobufCIntRange common__transaction__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 4 }
};
const ProtobufCMessageDescriptor common__transaction__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "common.Transaction",
  "Transaction",
  "Common__Transaction",
  "common",
  sizeof(Common__Transaction),
  4,
  common__transaction__field_descriptors,
  common__transaction__field_indices_by_name,
  1,  common__transaction__number_ranges,
  (ProtobufCMessageInit) common__transaction__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor common__transaction_info__field_descriptors[5] =
{
  {
    "transaction",
    1,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfo, transaction),
    &common__transaction__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "block_height",
    2,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_UINT64,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfo, block_height),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "block_hash",
    3,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_BYTES,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfo, block_hash),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "tx_index",
    4,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfo, tx_index),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "block_timestamp",
    5,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT64,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfo, block_timestamp),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned common__transaction_info__field_indices_by_name[] = {
  2,   /* field[2] = block_hash */
  1,   /* field[1] = block_height */
  4,   /* field[4] = block_timestamp */
  0,   /* field[0] = transaction */
  3,   /* field[3] = tx_index */
};
static const ProtobufCIntRange common__transaction_info__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 5 }
};
const ProtobufCMessageDescriptor common__transaction_info__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "common.TransactionInfo",
  "TransactionInfo",
  "Common__TransactionInfo",
  "common",
  sizeof(Common__TransactionInfo),
  5,
  common__transaction_info__field_descriptors,
  common__transaction_info__field_indices_by_name,
  1,  common__transaction_info__number_ranges,
  (ProtobufCMessageInit) common__transaction_info__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor common__transaction_with_rwset__field_descriptors[2] =
{
  {
    "transaction",
    1,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionWithRWSet, transaction),
    &common__transaction__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "rw_set",
    2,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionWithRWSet, rw_set),
    &common__tx_rwset__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned common__transaction_with_rwset__field_indices_by_name[] = {
  1,   /* field[1] = rw_set */
  0,   /* field[0] = transaction */
};
static const ProtobufCIntRange common__transaction_with_rwset__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 2 }
};
const ProtobufCMessageDescriptor common__transaction_with_rwset__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "common.TransactionWithRWSet",
  "TransactionWithRWSet",
  "Common__TransactionWithRWSet",
  "common",
  sizeof(Common__TransactionWithRWSet),
  2,
  common__transaction_with_rwset__field_descriptors,
  common__transaction_with_rwset__field_indices_by_name,
  1,  common__transaction_with_rwset__number_ranges,
  (ProtobufCMessageInit) common__transaction_with_rwset__init,
  NULL,NULL,NULL    /* reserved[123] */
};
static const ProtobufCFieldDescriptor common__transaction_info_with_rwset__field_descriptors[6] =
{
  {
    "transaction",
    1,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfoWithRWSet, transaction),
    &common__transaction__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "block_height",
    2,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_UINT64,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfoWithRWSet, block_height),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "block_hash",
    3,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_BYTES,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfoWithRWSet, block_hash),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "tx_index",
    4,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_UINT32,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfoWithRWSet, tx_index),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "block_timestamp",
    5,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_INT64,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfoWithRWSet, block_timestamp),
    NULL,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
  {
    "rw_set",
    6,
    PROTOBUF_C_LABEL_NONE,
    PROTOBUF_C_TYPE_MESSAGE,
    0,   /* quantifier_offset */
    offsetof(Common__TransactionInfoWithRWSet, rw_set),
    &common__tx_rwset__descriptor,
    NULL,
    0,             /* flags */
    0,NULL,NULL    /* reserved1,reserved2, etc */
  },
};
static const unsigned common__transaction_info_with_rwset__field_indices_by_name[] = {
  2,   /* field[2] = block_hash */
  1,   /* field[1] = block_height */
  4,   /* field[4] = block_timestamp */
  5,   /* field[5] = rw_set */
  0,   /* field[0] = transaction */
  3,   /* field[3] = tx_index */
};
static const ProtobufCIntRange common__transaction_info_with_rwset__number_ranges[1 + 1] =
{
  { 1, 0 },
  { 0, 6 }
};
const ProtobufCMessageDescriptor common__transaction_info_with_rwset__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "common.TransactionInfoWithRWSet",
  "TransactionInfoWithRWSet",
  "Common__TransactionInfoWithRWSet",
  "common",
  sizeof(Common__TransactionInfoWithRWSet),
  6,
  common__transaction_info_with_rwset__field_descriptors,
  common__transaction_info_with_rwset__field_indices_by_name,
  1,  common__transaction_info_with_rwset__number_ranges,
  (ProtobufCMessageInit) common__transaction_info_with_rwset__init,
  NULL,NULL,NULL    /* reserved[123] */
};
