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

#ifndef PROTOBUF_C_gossip_2fmessage_2eproto__INCLUDED
#define PROTOBUF_C_gossip_2fmessage_2eproto__INCLUDED

#include <protobuf-c/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1000000
# error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
#elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
# error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
#endif

#include "common/collection.pb-c.h"

typedef struct _Gossip__Envelope Gossip__Envelope;
typedef struct _Gossip__SecretEnvelope Gossip__SecretEnvelope;
typedef struct _Gossip__Secret Gossip__Secret;
typedef struct _Gossip__GossipMessage Gossip__GossipMessage;
typedef struct _Gossip__StateInfo Gossip__StateInfo;
typedef struct _Gossip__Properties Gossip__Properties;
typedef struct _Gossip__StateInfoSnapshot Gossip__StateInfoSnapshot;
typedef struct _Gossip__StateInfoPullRequest Gossip__StateInfoPullRequest;
typedef struct _Gossip__ConnEstablish Gossip__ConnEstablish;
typedef struct _Gossip__PeerIdentity Gossip__PeerIdentity;
typedef struct _Gossip__DataRequest Gossip__DataRequest;
typedef struct _Gossip__GossipHello Gossip__GossipHello;
typedef struct _Gossip__DataUpdate Gossip__DataUpdate;
typedef struct _Gossip__DataDigest Gossip__DataDigest;
typedef struct _Gossip__DataMessage Gossip__DataMessage;
typedef struct _Gossip__PrivateDataMessage Gossip__PrivateDataMessage;
typedef struct _Gossip__Payload Gossip__Payload;
typedef struct _Gossip__PrivatePayload Gossip__PrivatePayload;
typedef struct _Gossip__AliveMessage Gossip__AliveMessage;
typedef struct _Gossip__LeadershipMessage Gossip__LeadershipMessage;
typedef struct _Gossip__PeerTime Gossip__PeerTime;
typedef struct _Gossip__MembershipRequest Gossip__MembershipRequest;
typedef struct _Gossip__MembershipResponse Gossip__MembershipResponse;
typedef struct _Gossip__Member Gossip__Member;
typedef struct _Gossip__Empty Gossip__Empty;
typedef struct _Gossip__RemoteStateRequest Gossip__RemoteStateRequest;
typedef struct _Gossip__RemoteStateResponse Gossip__RemoteStateResponse;
typedef struct _Gossip__RemotePvtDataRequest Gossip__RemotePvtDataRequest;
typedef struct _Gossip__PvtDataDigest Gossip__PvtDataDigest;
typedef struct _Gossip__RemotePvtDataResponse Gossip__RemotePvtDataResponse;
typedef struct _Gossip__PvtDataElement Gossip__PvtDataElement;
typedef struct _Gossip__PvtDataPayload Gossip__PvtDataPayload;
typedef struct _Gossip__Acknowledgement Gossip__Acknowledgement;
typedef struct _Gossip__Chaincode Gossip__Chaincode;


/* --- enums --- */

typedef enum _Gossip__GossipMessage__Tag {
  GOSSIP__GOSSIP_MESSAGE__TAG__UNDEFINED = 0,
  GOSSIP__GOSSIP_MESSAGE__TAG__EMPTY = 1,
  GOSSIP__GOSSIP_MESSAGE__TAG__ORG_ONLY = 2,
  GOSSIP__GOSSIP_MESSAGE__TAG__CHAN_ONLY = 3,
  GOSSIP__GOSSIP_MESSAGE__TAG__CHAN_AND_ORG = 4,
  GOSSIP__GOSSIP_MESSAGE__TAG__CHAN_OR_ORG = 5
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(GOSSIP__GOSSIP_MESSAGE__TAG)
} Gossip__GossipMessage__Tag;
typedef enum _Gossip__PullMsgType {
  GOSSIP__PULL_MSG_TYPE__UNDEFINED = 0,
  GOSSIP__PULL_MSG_TYPE__BLOCK_MSG = 1,
  GOSSIP__PULL_MSG_TYPE__IDENTITY_MSG = 2
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(GOSSIP__PULL_MSG_TYPE)
} Gossip__PullMsgType;

/* --- messages --- */

/*
 * Envelope contains a marshalled
 * GossipMessage and a signature over it.
 * It may also contain a SecretEnvelope
 * which is a marshalled Secret
 */
struct  _Gossip__Envelope
{
  ProtobufCMessage base;
  protobuf_c_boolean has_payload;
  ProtobufCBinaryData payload;
  protobuf_c_boolean has_signature;
  ProtobufCBinaryData signature;
  Gossip__SecretEnvelope *secret_envelope;
};
#define GOSSIP__ENVELOPE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__envelope__descriptor) \
    , 0,{0,NULL}, 0,{0,NULL}, NULL }


/*
 * SecretEnvelope is a marshalled Secret
 * and a signature over it.
 * The signature should be validated by the peer
 * that signed the Envelope the SecretEnvelope
 * came with
 */
struct  _Gossip__SecretEnvelope
{
  ProtobufCMessage base;
  protobuf_c_boolean has_payload;
  ProtobufCBinaryData payload;
  protobuf_c_boolean has_signature;
  ProtobufCBinaryData signature;
};
#define GOSSIP__SECRET_ENVELOPE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__secret_envelope__descriptor) \
    , 0,{0,NULL}, 0,{0,NULL} }


typedef enum {
  GOSSIP__SECRET__CONTENT__NOT_SET = 0,
  GOSSIP__SECRET__CONTENT_INTERNAL_ENDPOINT = 1,
} Gossip__Secret__ContentCase;

/*
 * Secret is an entity that might be omitted
 * from an Envelope when the remote peer that is receiving
 * the Envelope shouldn't know the secret's content.
 */
struct  _Gossip__Secret
{
  ProtobufCMessage base;
  Gossip__Secret__ContentCase content_case;
  union {
    char *internalendpoint;
  };
};
#define GOSSIP__SECRET__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__secret__descriptor) \
    , GOSSIP__SECRET__CONTENT__NOT_SET, {0} }


typedef enum {
  GOSSIP__GOSSIP_MESSAGE__CONTENT__NOT_SET = 0,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_ALIVE_MSG = 5,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_MEM_REQ = 6,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_MEM_RES = 7,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_DATA_MSG = 8,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_HELLO = 9,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_DATA_DIG = 10,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_DATA_REQ = 11,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_DATA_UPDATE = 12,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_EMPTY = 13,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_CONN = 14,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_STATE_INFO = 15,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_STATE_SNAPSHOT = 16,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_STATE_INFO_PULL_REQ = 17,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_STATE_REQUEST = 18,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_STATE_RESPONSE = 19,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_LEADERSHIP_MSG = 20,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_PEER_IDENTITY = 21,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_ACK = 22,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_PRIVATE_REQ = 23,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_PRIVATE_RES = 24,
  GOSSIP__GOSSIP_MESSAGE__CONTENT_PRIVATE_DATA = 25,
} Gossip__GossipMessage__ContentCase;

/*
 * GossipMessage defines the message sent in a gossip network
 */
struct  _Gossip__GossipMessage
{
  ProtobufCMessage base;
  /*
   * used mainly for testing, but will might be used in the future
   * for ensuring message delivery by acking
   */
  protobuf_c_boolean has_nonce;
  uint64_t nonce;
  /*
   * The channel of the message.
   * Some GossipMessages may set this to nil, because
   * they are cross-channels but some may not
   */
  protobuf_c_boolean has_channel;
  ProtobufCBinaryData channel;
  /*
   * determines to which peers it is allowed
   * to forward the message
   */
  protobuf_c_boolean has_tag;
  Gossip__GossipMessage__Tag tag;
  Gossip__GossipMessage__ContentCase content_case;
  union {
    /*
     * Membership
     */
    Gossip__AliveMessage *alive_msg;
    Gossip__MembershipRequest *mem_req;
    Gossip__MembershipResponse *mem_res;
    /*
     * Contains a ledger block
     */
    Gossip__DataMessage *data_msg;
    /*
     * Used for push&pull
     */
    Gossip__GossipHello *hello;
    Gossip__DataDigest *data_dig;
    Gossip__DataRequest *data_req;
    Gossip__DataUpdate *data_update;
    /*
     * Empty message, used for pinging
     */
    Gossip__Empty *empty;
    /*
     * ConnEstablish, used for establishing a connection
     */
    Gossip__ConnEstablish *conn;
    /*
     * Used for relaying information
     * about state
     */
    Gossip__StateInfo *state_info;
    /*
     * Used for sending sets of StateInfo messages
     */
    Gossip__StateInfoSnapshot *state_snapshot;
    /*
     * Used for asking for StateInfoSnapshots
     */
    Gossip__StateInfoPullRequest *state_info_pull_req;
    /*
     *  Used to ask from a remote peer a set of blocks
     */
    Gossip__RemoteStateRequest *state_request;
    /*
     * Used to send a set of blocks to a remote peer
     */
    Gossip__RemoteStateResponse *state_response;
    /*
     * Used to indicate intent of peer to become leader
     */
    Gossip__LeadershipMessage *leadership_msg;
    /*
     * Used to learn of a peer's certificate
     */
    Gossip__PeerIdentity *peer_identity;
    Gossip__Acknowledgement *ack;
    /*
     * Used to request private data
     */
    Gossip__RemotePvtDataRequest *privatereq;
    /*
     * Used to respond to private data requests
     */
    Gossip__RemotePvtDataResponse *privateres;
    /*
     * Encapsulates private data used to distribute
     * private rwset after the endorsement
     */
    Gossip__PrivateDataMessage *private_data;
  };
};
#define GOSSIP__GOSSIP_MESSAGE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__gossip_message__descriptor) \
    , 0,0, 0,{0,NULL}, 0,0, GOSSIP__GOSSIP_MESSAGE__CONTENT__NOT_SET, {0} }


/*
 * StateInfo is used for a peer to relay its state information
 * to other peers
 */
struct  _Gossip__StateInfo
{
  ProtobufCMessage base;
  Gossip__PeerTime *timestamp;
  protobuf_c_boolean has_pki_id;
  ProtobufCBinaryData pki_id;
  /*
   * channel_MAC is an authentication code that proves
   * that the peer that sent this message knows
   * the name of the channel.
   */
  protobuf_c_boolean has_channel_mac;
  ProtobufCBinaryData channel_mac;
  Gossip__Properties *properties;
};
#define GOSSIP__STATE_INFO__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__state_info__descriptor) \
    , NULL, 0,{0,NULL}, 0,{0,NULL}, NULL }


struct  _Gossip__Properties
{
  ProtobufCMessage base;
  protobuf_c_boolean has_ledger_height;
  uint64_t ledger_height;
  protobuf_c_boolean has_left_channel;
  protobuf_c_boolean left_channel;
  size_t n_chaincodes;
  Gossip__Chaincode **chaincodes;
};
#define GOSSIP__PROPERTIES__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__properties__descriptor) \
    , 0,0, 0,0, 0,NULL }


/*
 * StateInfoSnapshot is an aggregation of StateInfo messages
 */
struct  _Gossip__StateInfoSnapshot
{
  ProtobufCMessage base;
  size_t n_elements;
  Gossip__Envelope **elements;
};
#define GOSSIP__STATE_INFO_SNAPSHOT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__state_info_snapshot__descriptor) \
    , 0,NULL }


/*
 * StateInfoPullRequest is used to fetch a StateInfoSnapshot
 * from a remote peer
 */
struct  _Gossip__StateInfoPullRequest
{
  ProtobufCMessage base;
  /*
   * channel_MAC is an authentication code that proves
   * that the peer that sent this message knows
   * the name of the channel.
   */
  protobuf_c_boolean has_channel_mac;
  ProtobufCBinaryData channel_mac;
};
#define GOSSIP__STATE_INFO_PULL_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__state_info_pull_request__descriptor) \
    , 0,{0,NULL} }


/*
 * ConnEstablish is the message used for the gossip handshake
 * Whenever a peer connects to another peer, it handshakes
 * with it by sending this message that proves its identity
 */
struct  _Gossip__ConnEstablish
{
  ProtobufCMessage base;
  protobuf_c_boolean has_pki_id;
  ProtobufCBinaryData pki_id;
  protobuf_c_boolean has_identity;
  ProtobufCBinaryData identity;
  protobuf_c_boolean has_tls_cert_hash;
  ProtobufCBinaryData tls_cert_hash;
};
#define GOSSIP__CONN_ESTABLISH__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__conn_establish__descriptor) \
    , 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL} }


/*
 * PeerIdentity defines the identity of the peer
 * Used to make other peers learn of the identity
 * of a certain peer
 */
struct  _Gossip__PeerIdentity
{
  ProtobufCMessage base;
  protobuf_c_boolean has_pki_id;
  ProtobufCBinaryData pki_id;
  protobuf_c_boolean has_cert;
  ProtobufCBinaryData cert;
  protobuf_c_boolean has_metadata;
  ProtobufCBinaryData metadata;
};
#define GOSSIP__PEER_IDENTITY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__peer_identity__descriptor) \
    , 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL} }


/*
 * DataRequest is a message used for a peer to request
 * certain data blocks from a remote peer
 */
struct  _Gossip__DataRequest
{
  ProtobufCMessage base;
  protobuf_c_boolean has_nonce;
  uint64_t nonce;
  size_t n_digests;
  ProtobufCBinaryData *digests;
  protobuf_c_boolean has_msg_type;
  Gossip__PullMsgType msg_type;
};
#define GOSSIP__DATA_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__data_request__descriptor) \
    , 0,0, 0,NULL, 0,0 }


/*
 * GossipHello is the message that is used for the peer to initiate
 * a pull round with another peer
 */
struct  _Gossip__GossipHello
{
  ProtobufCMessage base;
  protobuf_c_boolean has_nonce;
  uint64_t nonce;
  protobuf_c_boolean has_metadata;
  ProtobufCBinaryData metadata;
  protobuf_c_boolean has_msg_type;
  Gossip__PullMsgType msg_type;
};
#define GOSSIP__GOSSIP_HELLO__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__gossip_hello__descriptor) \
    , 0,0, 0,{0,NULL}, 0,0 }


/*
 * DataUpdate is the final message in the pull phase
 * sent from the receiver to the initiator
 */
struct  _Gossip__DataUpdate
{
  ProtobufCMessage base;
  protobuf_c_boolean has_nonce;
  uint64_t nonce;
  size_t n_data;
  Gossip__Envelope **data;
  protobuf_c_boolean has_msg_type;
  Gossip__PullMsgType msg_type;
};
#define GOSSIP__DATA_UPDATE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__data_update__descriptor) \
    , 0,0, 0,NULL, 0,0 }


/*
 * DataDigest is the message sent from the receiver peer
 * to the initator peer and contains the data items it has
 */
struct  _Gossip__DataDigest
{
  ProtobufCMessage base;
  protobuf_c_boolean has_nonce;
  uint64_t nonce;
  /*
   * Maybe change this to bitmap later on
   */
  size_t n_digests;
  ProtobufCBinaryData *digests;
  protobuf_c_boolean has_msg_type;
  Gossip__PullMsgType msg_type;
};
#define GOSSIP__DATA_DIGEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__data_digest__descriptor) \
    , 0,0, 0,NULL, 0,0 }


/*
 * DataMessage is the message that contains a block
 */
struct  _Gossip__DataMessage
{
  ProtobufCMessage base;
  Gossip__Payload *payload;
};
#define GOSSIP__DATA_MESSAGE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__data_message__descriptor) \
    , NULL }


/*
 * PrivateDataMessage message which includes private
 * data information to distributed once transaction
 * has been endorsed
 */
struct  _Gossip__PrivateDataMessage
{
  ProtobufCMessage base;
  Gossip__PrivatePayload *payload;
};
#define GOSSIP__PRIVATE_DATA_MESSAGE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__private_data_message__descriptor) \
    , NULL }


/*
 * Payload contains a block
 */
struct  _Gossip__Payload
{
  ProtobufCMessage base;
  protobuf_c_boolean has_seq_num;
  uint64_t seq_num;
  protobuf_c_boolean has_data;
  ProtobufCBinaryData data;
  size_t n_private_data;
  ProtobufCBinaryData *private_data;
};
#define GOSSIP__PAYLOAD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__payload__descriptor) \
    , 0,0, 0,{0,NULL}, 0,NULL }


/*
 * PrivatePayload payload to encapsulate private
 * data with collection name to enable routing
 * based on collection partitioning
 */
struct  _Gossip__PrivatePayload
{
  ProtobufCMessage base;
  char *collection_name;
  char *namespace_;
  char *tx_id;
  protobuf_c_boolean has_private_rwset;
  ProtobufCBinaryData private_rwset;
  protobuf_c_boolean has_private_sim_height;
  uint64_t private_sim_height;
  Common__CollectionConfigPackage *collection_configs;
};
#define GOSSIP__PRIVATE_PAYLOAD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__private_payload__descriptor) \
    , NULL, NULL, NULL, 0,{0,NULL}, 0,0, NULL }


/*
 * AliveMessage is sent to inform remote peers
 * of a peer's existence and activity
 */
struct  _Gossip__AliveMessage
{
  ProtobufCMessage base;
  Gossip__Member *membership;
  Gossip__PeerTime *timestamp;
  protobuf_c_boolean has_identity;
  ProtobufCBinaryData identity;
};
#define GOSSIP__ALIVE_MESSAGE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__alive_message__descriptor) \
    , NULL, NULL, 0,{0,NULL} }


/*
 * Leadership Message is sent during leader election to inform
 * remote peers about intent of peer to proclaim itself as leader
 */
struct  _Gossip__LeadershipMessage
{
  ProtobufCMessage base;
  protobuf_c_boolean has_pki_id;
  ProtobufCBinaryData pki_id;
  Gossip__PeerTime *timestamp;
  protobuf_c_boolean has_is_declaration;
  protobuf_c_boolean is_declaration;
};
#define GOSSIP__LEADERSHIP_MESSAGE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__leadership_message__descriptor) \
    , 0,{0,NULL}, NULL, 0,0 }


/*
 * PeerTime defines the logical time of a peer's life
 */
struct  _Gossip__PeerTime
{
  ProtobufCMessage base;
  protobuf_c_boolean has_inc_num;
  uint64_t inc_num;
  protobuf_c_boolean has_seq_num;
  uint64_t seq_num;
};
#define GOSSIP__PEER_TIME__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__peer_time__descriptor) \
    , 0,0, 0,0 }


/*
 * MembershipRequest is used to ask membership information
 * from a remote peer
 */
struct  _Gossip__MembershipRequest
{
  ProtobufCMessage base;
  Gossip__Envelope *self_information;
  size_t n_known;
  ProtobufCBinaryData *known;
};
#define GOSSIP__MEMBERSHIP_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__membership_request__descriptor) \
    , NULL, 0,NULL }


/*
 * MembershipResponse is used for replying to MembershipRequests
 */
struct  _Gossip__MembershipResponse
{
  ProtobufCMessage base;
  size_t n_alive;
  Gossip__Envelope **alive;
  size_t n_dead;
  Gossip__Envelope **dead;
};
#define GOSSIP__MEMBERSHIP_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__membership_response__descriptor) \
    , 0,NULL, 0,NULL }


/*
 * Member holds membership-related information
 * about a peer
 */
struct  _Gossip__Member
{
  ProtobufCMessage base;
  char *endpoint;
  protobuf_c_boolean has_metadata;
  ProtobufCBinaryData metadata;
  protobuf_c_boolean has_pki_id;
  ProtobufCBinaryData pki_id;
};
#define GOSSIP__MEMBER__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__member__descriptor) \
    , NULL, 0,{0,NULL}, 0,{0,NULL} }


/*
 * Empty is used for pinging and in tests
 */
struct  _Gossip__Empty
{
  ProtobufCMessage base;
};
#define GOSSIP__EMPTY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__empty__descriptor) \
     }


/*
 * RemoteStateRequest is used to ask a set of blocks
 * from a remote peer
 */
struct  _Gossip__RemoteStateRequest
{
  ProtobufCMessage base;
  protobuf_c_boolean has_start_seq_num;
  uint64_t start_seq_num;
  protobuf_c_boolean has_end_seq_num;
  uint64_t end_seq_num;
};
#define GOSSIP__REMOTE_STATE_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__remote_state_request__descriptor) \
    , 0,0, 0,0 }


/*
 * RemoteStateResponse is used to send a set of blocks
 * to a remote peer
 */
struct  _Gossip__RemoteStateResponse
{
  ProtobufCMessage base;
  size_t n_payloads;
  Gossip__Payload **payloads;
};
#define GOSSIP__REMOTE_STATE_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__remote_state_response__descriptor) \
    , 0,NULL }


/*
 * RemotePrivateDataRequest message used to request
 * missing private rwset
 */
struct  _Gossip__RemotePvtDataRequest
{
  ProtobufCMessage base;
  size_t n_digests;
  Gossip__PvtDataDigest **digests;
};
#define GOSSIP__REMOTE_PVT_DATA_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__remote_pvt_data_request__descriptor) \
    , 0,NULL }


/*
 * PvtDataDigest defines a digest of private data
 */
struct  _Gossip__PvtDataDigest
{
  ProtobufCMessage base;
  char *tx_id;
  char *namespace_;
  char *collection;
  protobuf_c_boolean has_block_seq;
  uint64_t block_seq;
  protobuf_c_boolean has_seq_in_block;
  uint64_t seq_in_block;
};
#define GOSSIP__PVT_DATA_DIGEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__pvt_data_digest__descriptor) \
    , NULL, NULL, NULL, 0,0, 0,0 }


/*
 * RemotePrivateData message to response on private
 * data replication request
 */
struct  _Gossip__RemotePvtDataResponse
{
  ProtobufCMessage base;
  size_t n_elements;
  Gossip__PvtDataElement **elements;
};
#define GOSSIP__REMOTE_PVT_DATA_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__remote_pvt_data_response__descriptor) \
    , 0,NULL }


struct  _Gossip__PvtDataElement
{
  ProtobufCMessage base;
  Gossip__PvtDataDigest *digest;
  /*
   * the payload is a marshaled kvrwset.KVRWSet
   */
  size_t n_payload;
  ProtobufCBinaryData *payload;
};
#define GOSSIP__PVT_DATA_ELEMENT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__pvt_data_element__descriptor) \
    , NULL, 0,NULL }


/*
 * PvtPayload augments private rwset data and tx index
 * inside the block
 */
struct  _Gossip__PvtDataPayload
{
  ProtobufCMessage base;
  protobuf_c_boolean has_tx_seq_in_block;
  uint64_t tx_seq_in_block;
  /*
   * Encodes marhslaed bytes of rwset.TxPvtReadWriteSet
   * defined in rwset.proto
   */
  protobuf_c_boolean has_payload;
  ProtobufCBinaryData payload;
};
#define GOSSIP__PVT_DATA_PAYLOAD__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__pvt_data_payload__descriptor) \
    , 0,0, 0,{0,NULL} }


struct  _Gossip__Acknowledgement
{
  ProtobufCMessage base;
  char *error;
};
#define GOSSIP__ACKNOWLEDGEMENT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__acknowledgement__descriptor) \
    , NULL }


/*
 * Chaincode represents a Chaincode that is installed
 * on a peer
 */
struct  _Gossip__Chaincode
{
  ProtobufCMessage base;
  char *name;
  char *version;
  protobuf_c_boolean has_metadata;
  ProtobufCBinaryData metadata;
};
#define GOSSIP__CHAINCODE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&gossip__chaincode__descriptor) \
    , NULL, NULL, 0,{0,NULL} }


/* Gossip__Envelope methods */
void   gossip__envelope__init
                     (Gossip__Envelope         *message);
size_t gossip__envelope__get_packed_size
                     (const Gossip__Envelope   *message);
size_t gossip__envelope__pack
                     (const Gossip__Envelope   *message,
                      uint8_t             *out);
size_t gossip__envelope__pack_to_buffer
                     (const Gossip__Envelope   *message,
                      ProtobufCBuffer     *buffer);
Gossip__Envelope *
       gossip__envelope__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__envelope__free_unpacked
                     (Gossip__Envelope *message,
                      ProtobufCAllocator *allocator);
/* Gossip__SecretEnvelope methods */
void   gossip__secret_envelope__init
                     (Gossip__SecretEnvelope         *message);
size_t gossip__secret_envelope__get_packed_size
                     (const Gossip__SecretEnvelope   *message);
size_t gossip__secret_envelope__pack
                     (const Gossip__SecretEnvelope   *message,
                      uint8_t             *out);
size_t gossip__secret_envelope__pack_to_buffer
                     (const Gossip__SecretEnvelope   *message,
                      ProtobufCBuffer     *buffer);
Gossip__SecretEnvelope *
       gossip__secret_envelope__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__secret_envelope__free_unpacked
                     (Gossip__SecretEnvelope *message,
                      ProtobufCAllocator *allocator);
/* Gossip__Secret methods */
void   gossip__secret__init
                     (Gossip__Secret         *message);
size_t gossip__secret__get_packed_size
                     (const Gossip__Secret   *message);
size_t gossip__secret__pack
                     (const Gossip__Secret   *message,
                      uint8_t             *out);
size_t gossip__secret__pack_to_buffer
                     (const Gossip__Secret   *message,
                      ProtobufCBuffer     *buffer);
Gossip__Secret *
       gossip__secret__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__secret__free_unpacked
                     (Gossip__Secret *message,
                      ProtobufCAllocator *allocator);
/* Gossip__GossipMessage methods */
void   gossip__gossip_message__init
                     (Gossip__GossipMessage         *message);
size_t gossip__gossip_message__get_packed_size
                     (const Gossip__GossipMessage   *message);
size_t gossip__gossip_message__pack
                     (const Gossip__GossipMessage   *message,
                      uint8_t             *out);
size_t gossip__gossip_message__pack_to_buffer
                     (const Gossip__GossipMessage   *message,
                      ProtobufCBuffer     *buffer);
Gossip__GossipMessage *
       gossip__gossip_message__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__gossip_message__free_unpacked
                     (Gossip__GossipMessage *message,
                      ProtobufCAllocator *allocator);
/* Gossip__StateInfo methods */
void   gossip__state_info__init
                     (Gossip__StateInfo         *message);
size_t gossip__state_info__get_packed_size
                     (const Gossip__StateInfo   *message);
size_t gossip__state_info__pack
                     (const Gossip__StateInfo   *message,
                      uint8_t             *out);
size_t gossip__state_info__pack_to_buffer
                     (const Gossip__StateInfo   *message,
                      ProtobufCBuffer     *buffer);
Gossip__StateInfo *
       gossip__state_info__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__state_info__free_unpacked
                     (Gossip__StateInfo *message,
                      ProtobufCAllocator *allocator);
/* Gossip__Properties methods */
void   gossip__properties__init
                     (Gossip__Properties         *message);
size_t gossip__properties__get_packed_size
                     (const Gossip__Properties   *message);
size_t gossip__properties__pack
                     (const Gossip__Properties   *message,
                      uint8_t             *out);
size_t gossip__properties__pack_to_buffer
                     (const Gossip__Properties   *message,
                      ProtobufCBuffer     *buffer);
Gossip__Properties *
       gossip__properties__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__properties__free_unpacked
                     (Gossip__Properties *message,
                      ProtobufCAllocator *allocator);
/* Gossip__StateInfoSnapshot methods */
void   gossip__state_info_snapshot__init
                     (Gossip__StateInfoSnapshot         *message);
size_t gossip__state_info_snapshot__get_packed_size
                     (const Gossip__StateInfoSnapshot   *message);
size_t gossip__state_info_snapshot__pack
                     (const Gossip__StateInfoSnapshot   *message,
                      uint8_t             *out);
size_t gossip__state_info_snapshot__pack_to_buffer
                     (const Gossip__StateInfoSnapshot   *message,
                      ProtobufCBuffer     *buffer);
Gossip__StateInfoSnapshot *
       gossip__state_info_snapshot__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__state_info_snapshot__free_unpacked
                     (Gossip__StateInfoSnapshot *message,
                      ProtobufCAllocator *allocator);
/* Gossip__StateInfoPullRequest methods */
void   gossip__state_info_pull_request__init
                     (Gossip__StateInfoPullRequest         *message);
size_t gossip__state_info_pull_request__get_packed_size
                     (const Gossip__StateInfoPullRequest   *message);
size_t gossip__state_info_pull_request__pack
                     (const Gossip__StateInfoPullRequest   *message,
                      uint8_t             *out);
size_t gossip__state_info_pull_request__pack_to_buffer
                     (const Gossip__StateInfoPullRequest   *message,
                      ProtobufCBuffer     *buffer);
Gossip__StateInfoPullRequest *
       gossip__state_info_pull_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__state_info_pull_request__free_unpacked
                     (Gossip__StateInfoPullRequest *message,
                      ProtobufCAllocator *allocator);
/* Gossip__ConnEstablish methods */
void   gossip__conn_establish__init
                     (Gossip__ConnEstablish         *message);
size_t gossip__conn_establish__get_packed_size
                     (const Gossip__ConnEstablish   *message);
size_t gossip__conn_establish__pack
                     (const Gossip__ConnEstablish   *message,
                      uint8_t             *out);
size_t gossip__conn_establish__pack_to_buffer
                     (const Gossip__ConnEstablish   *message,
                      ProtobufCBuffer     *buffer);
Gossip__ConnEstablish *
       gossip__conn_establish__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__conn_establish__free_unpacked
                     (Gossip__ConnEstablish *message,
                      ProtobufCAllocator *allocator);
/* Gossip__PeerIdentity methods */
void   gossip__peer_identity__init
                     (Gossip__PeerIdentity         *message);
size_t gossip__peer_identity__get_packed_size
                     (const Gossip__PeerIdentity   *message);
size_t gossip__peer_identity__pack
                     (const Gossip__PeerIdentity   *message,
                      uint8_t             *out);
size_t gossip__peer_identity__pack_to_buffer
                     (const Gossip__PeerIdentity   *message,
                      ProtobufCBuffer     *buffer);
Gossip__PeerIdentity *
       gossip__peer_identity__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__peer_identity__free_unpacked
                     (Gossip__PeerIdentity *message,
                      ProtobufCAllocator *allocator);
/* Gossip__DataRequest methods */
void   gossip__data_request__init
                     (Gossip__DataRequest         *message);
size_t gossip__data_request__get_packed_size
                     (const Gossip__DataRequest   *message);
size_t gossip__data_request__pack
                     (const Gossip__DataRequest   *message,
                      uint8_t             *out);
size_t gossip__data_request__pack_to_buffer
                     (const Gossip__DataRequest   *message,
                      ProtobufCBuffer     *buffer);
Gossip__DataRequest *
       gossip__data_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__data_request__free_unpacked
                     (Gossip__DataRequest *message,
                      ProtobufCAllocator *allocator);
/* Gossip__GossipHello methods */
void   gossip__gossip_hello__init
                     (Gossip__GossipHello         *message);
size_t gossip__gossip_hello__get_packed_size
                     (const Gossip__GossipHello   *message);
size_t gossip__gossip_hello__pack
                     (const Gossip__GossipHello   *message,
                      uint8_t             *out);
size_t gossip__gossip_hello__pack_to_buffer
                     (const Gossip__GossipHello   *message,
                      ProtobufCBuffer     *buffer);
Gossip__GossipHello *
       gossip__gossip_hello__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__gossip_hello__free_unpacked
                     (Gossip__GossipHello *message,
                      ProtobufCAllocator *allocator);
/* Gossip__DataUpdate methods */
void   gossip__data_update__init
                     (Gossip__DataUpdate         *message);
size_t gossip__data_update__get_packed_size
                     (const Gossip__DataUpdate   *message);
size_t gossip__data_update__pack
                     (const Gossip__DataUpdate   *message,
                      uint8_t             *out);
size_t gossip__data_update__pack_to_buffer
                     (const Gossip__DataUpdate   *message,
                      ProtobufCBuffer     *buffer);
Gossip__DataUpdate *
       gossip__data_update__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__data_update__free_unpacked
                     (Gossip__DataUpdate *message,
                      ProtobufCAllocator *allocator);
/* Gossip__DataDigest methods */
void   gossip__data_digest__init
                     (Gossip__DataDigest         *message);
size_t gossip__data_digest__get_packed_size
                     (const Gossip__DataDigest   *message);
size_t gossip__data_digest__pack
                     (const Gossip__DataDigest   *message,
                      uint8_t             *out);
size_t gossip__data_digest__pack_to_buffer
                     (const Gossip__DataDigest   *message,
                      ProtobufCBuffer     *buffer);
Gossip__DataDigest *
       gossip__data_digest__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__data_digest__free_unpacked
                     (Gossip__DataDigest *message,
                      ProtobufCAllocator *allocator);
/* Gossip__DataMessage methods */
void   gossip__data_message__init
                     (Gossip__DataMessage         *message);
size_t gossip__data_message__get_packed_size
                     (const Gossip__DataMessage   *message);
size_t gossip__data_message__pack
                     (const Gossip__DataMessage   *message,
                      uint8_t             *out);
size_t gossip__data_message__pack_to_buffer
                     (const Gossip__DataMessage   *message,
                      ProtobufCBuffer     *buffer);
Gossip__DataMessage *
       gossip__data_message__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__data_message__free_unpacked
                     (Gossip__DataMessage *message,
                      ProtobufCAllocator *allocator);
/* Gossip__PrivateDataMessage methods */
void   gossip__private_data_message__init
                     (Gossip__PrivateDataMessage         *message);
size_t gossip__private_data_message__get_packed_size
                     (const Gossip__PrivateDataMessage   *message);
size_t gossip__private_data_message__pack
                     (const Gossip__PrivateDataMessage   *message,
                      uint8_t             *out);
size_t gossip__private_data_message__pack_to_buffer
                     (const Gossip__PrivateDataMessage   *message,
                      ProtobufCBuffer     *buffer);
Gossip__PrivateDataMessage *
       gossip__private_data_message__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__private_data_message__free_unpacked
                     (Gossip__PrivateDataMessage *message,
                      ProtobufCAllocator *allocator);
/* Gossip__Payload methods */
void   gossip__payload__init
                     (Gossip__Payload         *message);
size_t gossip__payload__get_packed_size
                     (const Gossip__Payload   *message);
size_t gossip__payload__pack
                     (const Gossip__Payload   *message,
                      uint8_t             *out);
size_t gossip__payload__pack_to_buffer
                     (const Gossip__Payload   *message,
                      ProtobufCBuffer     *buffer);
Gossip__Payload *
       gossip__payload__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__payload__free_unpacked
                     (Gossip__Payload *message,
                      ProtobufCAllocator *allocator);
/* Gossip__PrivatePayload methods */
void   gossip__private_payload__init
                     (Gossip__PrivatePayload         *message);
size_t gossip__private_payload__get_packed_size
                     (const Gossip__PrivatePayload   *message);
size_t gossip__private_payload__pack
                     (const Gossip__PrivatePayload   *message,
                      uint8_t             *out);
size_t gossip__private_payload__pack_to_buffer
                     (const Gossip__PrivatePayload   *message,
                      ProtobufCBuffer     *buffer);
Gossip__PrivatePayload *
       gossip__private_payload__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__private_payload__free_unpacked
                     (Gossip__PrivatePayload *message,
                      ProtobufCAllocator *allocator);
/* Gossip__AliveMessage methods */
void   gossip__alive_message__init
                     (Gossip__AliveMessage         *message);
size_t gossip__alive_message__get_packed_size
                     (const Gossip__AliveMessage   *message);
size_t gossip__alive_message__pack
                     (const Gossip__AliveMessage   *message,
                      uint8_t             *out);
size_t gossip__alive_message__pack_to_buffer
                     (const Gossip__AliveMessage   *message,
                      ProtobufCBuffer     *buffer);
Gossip__AliveMessage *
       gossip__alive_message__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__alive_message__free_unpacked
                     (Gossip__AliveMessage *message,
                      ProtobufCAllocator *allocator);
/* Gossip__LeadershipMessage methods */
void   gossip__leadership_message__init
                     (Gossip__LeadershipMessage         *message);
size_t gossip__leadership_message__get_packed_size
                     (const Gossip__LeadershipMessage   *message);
size_t gossip__leadership_message__pack
                     (const Gossip__LeadershipMessage   *message,
                      uint8_t             *out);
size_t gossip__leadership_message__pack_to_buffer
                     (const Gossip__LeadershipMessage   *message,
                      ProtobufCBuffer     *buffer);
Gossip__LeadershipMessage *
       gossip__leadership_message__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__leadership_message__free_unpacked
                     (Gossip__LeadershipMessage *message,
                      ProtobufCAllocator *allocator);
/* Gossip__PeerTime methods */
void   gossip__peer_time__init
                     (Gossip__PeerTime         *message);
size_t gossip__peer_time__get_packed_size
                     (const Gossip__PeerTime   *message);
size_t gossip__peer_time__pack
                     (const Gossip__PeerTime   *message,
                      uint8_t             *out);
size_t gossip__peer_time__pack_to_buffer
                     (const Gossip__PeerTime   *message,
                      ProtobufCBuffer     *buffer);
Gossip__PeerTime *
       gossip__peer_time__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__peer_time__free_unpacked
                     (Gossip__PeerTime *message,
                      ProtobufCAllocator *allocator);
/* Gossip__MembershipRequest methods */
void   gossip__membership_request__init
                     (Gossip__MembershipRequest         *message);
size_t gossip__membership_request__get_packed_size
                     (const Gossip__MembershipRequest   *message);
size_t gossip__membership_request__pack
                     (const Gossip__MembershipRequest   *message,
                      uint8_t             *out);
size_t gossip__membership_request__pack_to_buffer
                     (const Gossip__MembershipRequest   *message,
                      ProtobufCBuffer     *buffer);
Gossip__MembershipRequest *
       gossip__membership_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__membership_request__free_unpacked
                     (Gossip__MembershipRequest *message,
                      ProtobufCAllocator *allocator);
/* Gossip__MembershipResponse methods */
void   gossip__membership_response__init
                     (Gossip__MembershipResponse         *message);
size_t gossip__membership_response__get_packed_size
                     (const Gossip__MembershipResponse   *message);
size_t gossip__membership_response__pack
                     (const Gossip__MembershipResponse   *message,
                      uint8_t             *out);
size_t gossip__membership_response__pack_to_buffer
                     (const Gossip__MembershipResponse   *message,
                      ProtobufCBuffer     *buffer);
Gossip__MembershipResponse *
       gossip__membership_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__membership_response__free_unpacked
                     (Gossip__MembershipResponse *message,
                      ProtobufCAllocator *allocator);
/* Gossip__Member methods */
void   gossip__member__init
                     (Gossip__Member         *message);
size_t gossip__member__get_packed_size
                     (const Gossip__Member   *message);
size_t gossip__member__pack
                     (const Gossip__Member   *message,
                      uint8_t             *out);
size_t gossip__member__pack_to_buffer
                     (const Gossip__Member   *message,
                      ProtobufCBuffer     *buffer);
Gossip__Member *
       gossip__member__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__member__free_unpacked
                     (Gossip__Member *message,
                      ProtobufCAllocator *allocator);
/* Gossip__Empty methods */
void   gossip__empty__init
                     (Gossip__Empty         *message);
size_t gossip__empty__get_packed_size
                     (const Gossip__Empty   *message);
size_t gossip__empty__pack
                     (const Gossip__Empty   *message,
                      uint8_t             *out);
size_t gossip__empty__pack_to_buffer
                     (const Gossip__Empty   *message,
                      ProtobufCBuffer     *buffer);
Gossip__Empty *
       gossip__empty__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__empty__free_unpacked
                     (Gossip__Empty *message,
                      ProtobufCAllocator *allocator);
/* Gossip__RemoteStateRequest methods */
void   gossip__remote_state_request__init
                     (Gossip__RemoteStateRequest         *message);
size_t gossip__remote_state_request__get_packed_size
                     (const Gossip__RemoteStateRequest   *message);
size_t gossip__remote_state_request__pack
                     (const Gossip__RemoteStateRequest   *message,
                      uint8_t             *out);
size_t gossip__remote_state_request__pack_to_buffer
                     (const Gossip__RemoteStateRequest   *message,
                      ProtobufCBuffer     *buffer);
Gossip__RemoteStateRequest *
       gossip__remote_state_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__remote_state_request__free_unpacked
                     (Gossip__RemoteStateRequest *message,
                      ProtobufCAllocator *allocator);
/* Gossip__RemoteStateResponse methods */
void   gossip__remote_state_response__init
                     (Gossip__RemoteStateResponse         *message);
size_t gossip__remote_state_response__get_packed_size
                     (const Gossip__RemoteStateResponse   *message);
size_t gossip__remote_state_response__pack
                     (const Gossip__RemoteStateResponse   *message,
                      uint8_t             *out);
size_t gossip__remote_state_response__pack_to_buffer
                     (const Gossip__RemoteStateResponse   *message,
                      ProtobufCBuffer     *buffer);
Gossip__RemoteStateResponse *
       gossip__remote_state_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__remote_state_response__free_unpacked
                     (Gossip__RemoteStateResponse *message,
                      ProtobufCAllocator *allocator);
/* Gossip__RemotePvtDataRequest methods */
void   gossip__remote_pvt_data_request__init
                     (Gossip__RemotePvtDataRequest         *message);
size_t gossip__remote_pvt_data_request__get_packed_size
                     (const Gossip__RemotePvtDataRequest   *message);
size_t gossip__remote_pvt_data_request__pack
                     (const Gossip__RemotePvtDataRequest   *message,
                      uint8_t             *out);
size_t gossip__remote_pvt_data_request__pack_to_buffer
                     (const Gossip__RemotePvtDataRequest   *message,
                      ProtobufCBuffer     *buffer);
Gossip__RemotePvtDataRequest *
       gossip__remote_pvt_data_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__remote_pvt_data_request__free_unpacked
                     (Gossip__RemotePvtDataRequest *message,
                      ProtobufCAllocator *allocator);
/* Gossip__PvtDataDigest methods */
void   gossip__pvt_data_digest__init
                     (Gossip__PvtDataDigest         *message);
size_t gossip__pvt_data_digest__get_packed_size
                     (const Gossip__PvtDataDigest   *message);
size_t gossip__pvt_data_digest__pack
                     (const Gossip__PvtDataDigest   *message,
                      uint8_t             *out);
size_t gossip__pvt_data_digest__pack_to_buffer
                     (const Gossip__PvtDataDigest   *message,
                      ProtobufCBuffer     *buffer);
Gossip__PvtDataDigest *
       gossip__pvt_data_digest__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__pvt_data_digest__free_unpacked
                     (Gossip__PvtDataDigest *message,
                      ProtobufCAllocator *allocator);
/* Gossip__RemotePvtDataResponse methods */
void   gossip__remote_pvt_data_response__init
                     (Gossip__RemotePvtDataResponse         *message);
size_t gossip__remote_pvt_data_response__get_packed_size
                     (const Gossip__RemotePvtDataResponse   *message);
size_t gossip__remote_pvt_data_response__pack
                     (const Gossip__RemotePvtDataResponse   *message,
                      uint8_t             *out);
size_t gossip__remote_pvt_data_response__pack_to_buffer
                     (const Gossip__RemotePvtDataResponse   *message,
                      ProtobufCBuffer     *buffer);
Gossip__RemotePvtDataResponse *
       gossip__remote_pvt_data_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__remote_pvt_data_response__free_unpacked
                     (Gossip__RemotePvtDataResponse *message,
                      ProtobufCAllocator *allocator);
/* Gossip__PvtDataElement methods */
void   gossip__pvt_data_element__init
                     (Gossip__PvtDataElement         *message);
size_t gossip__pvt_data_element__get_packed_size
                     (const Gossip__PvtDataElement   *message);
size_t gossip__pvt_data_element__pack
                     (const Gossip__PvtDataElement   *message,
                      uint8_t             *out);
size_t gossip__pvt_data_element__pack_to_buffer
                     (const Gossip__PvtDataElement   *message,
                      ProtobufCBuffer     *buffer);
Gossip__PvtDataElement *
       gossip__pvt_data_element__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__pvt_data_element__free_unpacked
                     (Gossip__PvtDataElement *message,
                      ProtobufCAllocator *allocator);
/* Gossip__PvtDataPayload methods */
void   gossip__pvt_data_payload__init
                     (Gossip__PvtDataPayload         *message);
size_t gossip__pvt_data_payload__get_packed_size
                     (const Gossip__PvtDataPayload   *message);
size_t gossip__pvt_data_payload__pack
                     (const Gossip__PvtDataPayload   *message,
                      uint8_t             *out);
size_t gossip__pvt_data_payload__pack_to_buffer
                     (const Gossip__PvtDataPayload   *message,
                      ProtobufCBuffer     *buffer);
Gossip__PvtDataPayload *
       gossip__pvt_data_payload__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__pvt_data_payload__free_unpacked
                     (Gossip__PvtDataPayload *message,
                      ProtobufCAllocator *allocator);
/* Gossip__Acknowledgement methods */
void   gossip__acknowledgement__init
                     (Gossip__Acknowledgement         *message);
size_t gossip__acknowledgement__get_packed_size
                     (const Gossip__Acknowledgement   *message);
size_t gossip__acknowledgement__pack
                     (const Gossip__Acknowledgement   *message,
                      uint8_t             *out);
size_t gossip__acknowledgement__pack_to_buffer
                     (const Gossip__Acknowledgement   *message,
                      ProtobufCBuffer     *buffer);
Gossip__Acknowledgement *
       gossip__acknowledgement__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__acknowledgement__free_unpacked
                     (Gossip__Acknowledgement *message,
                      ProtobufCAllocator *allocator);
/* Gossip__Chaincode methods */
void   gossip__chaincode__init
                     (Gossip__Chaincode         *message);
size_t gossip__chaincode__get_packed_size
                     (const Gossip__Chaincode   *message);
size_t gossip__chaincode__pack
                     (const Gossip__Chaincode   *message,
                      uint8_t             *out);
size_t gossip__chaincode__pack_to_buffer
                     (const Gossip__Chaincode   *message,
                      ProtobufCBuffer     *buffer);
Gossip__Chaincode *
       gossip__chaincode__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   gossip__chaincode__free_unpacked
                     (Gossip__Chaincode *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Gossip__Envelope_Closure)
                 (const Gossip__Envelope *message,
                  void *closure_data);
typedef void (*Gossip__SecretEnvelope_Closure)
                 (const Gossip__SecretEnvelope *message,
                  void *closure_data);
typedef void (*Gossip__Secret_Closure)
                 (const Gossip__Secret *message,
                  void *closure_data);
typedef void (*Gossip__GossipMessage_Closure)
                 (const Gossip__GossipMessage *message,
                  void *closure_data);
typedef void (*Gossip__StateInfo_Closure)
                 (const Gossip__StateInfo *message,
                  void *closure_data);
typedef void (*Gossip__Properties_Closure)
                 (const Gossip__Properties *message,
                  void *closure_data);
typedef void (*Gossip__StateInfoSnapshot_Closure)
                 (const Gossip__StateInfoSnapshot *message,
                  void *closure_data);
typedef void (*Gossip__StateInfoPullRequest_Closure)
                 (const Gossip__StateInfoPullRequest *message,
                  void *closure_data);
typedef void (*Gossip__ConnEstablish_Closure)
                 (const Gossip__ConnEstablish *message,
                  void *closure_data);
typedef void (*Gossip__PeerIdentity_Closure)
                 (const Gossip__PeerIdentity *message,
                  void *closure_data);
typedef void (*Gossip__DataRequest_Closure)
                 (const Gossip__DataRequest *message,
                  void *closure_data);
typedef void (*Gossip__GossipHello_Closure)
                 (const Gossip__GossipHello *message,
                  void *closure_data);
typedef void (*Gossip__DataUpdate_Closure)
                 (const Gossip__DataUpdate *message,
                  void *closure_data);
typedef void (*Gossip__DataDigest_Closure)
                 (const Gossip__DataDigest *message,
                  void *closure_data);
typedef void (*Gossip__DataMessage_Closure)
                 (const Gossip__DataMessage *message,
                  void *closure_data);
typedef void (*Gossip__PrivateDataMessage_Closure)
                 (const Gossip__PrivateDataMessage *message,
                  void *closure_data);
typedef void (*Gossip__Payload_Closure)
                 (const Gossip__Payload *message,
                  void *closure_data);
typedef void (*Gossip__PrivatePayload_Closure)
                 (const Gossip__PrivatePayload *message,
                  void *closure_data);
typedef void (*Gossip__AliveMessage_Closure)
                 (const Gossip__AliveMessage *message,
                  void *closure_data);
typedef void (*Gossip__LeadershipMessage_Closure)
                 (const Gossip__LeadershipMessage *message,
                  void *closure_data);
typedef void (*Gossip__PeerTime_Closure)
                 (const Gossip__PeerTime *message,
                  void *closure_data);
typedef void (*Gossip__MembershipRequest_Closure)
                 (const Gossip__MembershipRequest *message,
                  void *closure_data);
typedef void (*Gossip__MembershipResponse_Closure)
                 (const Gossip__MembershipResponse *message,
                  void *closure_data);
typedef void (*Gossip__Member_Closure)
                 (const Gossip__Member *message,
                  void *closure_data);
typedef void (*Gossip__Empty_Closure)
                 (const Gossip__Empty *message,
                  void *closure_data);
typedef void (*Gossip__RemoteStateRequest_Closure)
                 (const Gossip__RemoteStateRequest *message,
                  void *closure_data);
typedef void (*Gossip__RemoteStateResponse_Closure)
                 (const Gossip__RemoteStateResponse *message,
                  void *closure_data);
typedef void (*Gossip__RemotePvtDataRequest_Closure)
                 (const Gossip__RemotePvtDataRequest *message,
                  void *closure_data);
typedef void (*Gossip__PvtDataDigest_Closure)
                 (const Gossip__PvtDataDigest *message,
                  void *closure_data);
typedef void (*Gossip__RemotePvtDataResponse_Closure)
                 (const Gossip__RemotePvtDataResponse *message,
                  void *closure_data);
typedef void (*Gossip__PvtDataElement_Closure)
                 (const Gossip__PvtDataElement *message,
                  void *closure_data);
typedef void (*Gossip__PvtDataPayload_Closure)
                 (const Gossip__PvtDataPayload *message,
                  void *closure_data);
typedef void (*Gossip__Acknowledgement_Closure)
                 (const Gossip__Acknowledgement *message,
                  void *closure_data);
typedef void (*Gossip__Chaincode_Closure)
                 (const Gossip__Chaincode *message,
                  void *closure_data);

/* --- services --- */

typedef struct _Gossip__Gossip_Service Gossip__Gossip_Service;
struct _Gossip__Gossip_Service
{
  ProtobufCService base;
  void (*gossip_stream)(Gossip__Gossip_Service *service,
                        const Gossip__Envelope *input,
                        Gossip__Envelope_Closure closure,
                        void *closure_data);
  void (*ping)(Gossip__Gossip_Service *service,
               const Gossip__Empty *input,
               Gossip__Empty_Closure closure,
               void *closure_data);
};
typedef void (*Gossip__Gossip_ServiceDestroy)(Gossip__Gossip_Service *);
void gossip__gossip__init (Gossip__Gossip_Service *service,
                           Gossip__Gossip_ServiceDestroy destroy);
#define GOSSIP__GOSSIP__BASE_INIT \
    { &gossip__gossip__descriptor, protobuf_c_service_invoke_internal, NULL }
#define GOSSIP__GOSSIP__INIT(function_prefix__) \
    { GOSSIP__GOSSIP__BASE_INIT,\
      function_prefix__ ## gossip_stream,\
      function_prefix__ ## ping  }
void gossip__gossip__gossip_stream(ProtobufCService *service,
                                   const Gossip__Envelope *input,
                                   Gossip__Envelope_Closure closure,
                                   void *closure_data);
void gossip__gossip__ping(ProtobufCService *service,
                          const Gossip__Empty *input,
                          Gossip__Empty_Closure closure,
                          void *closure_data);

/* --- descriptors --- */

extern const ProtobufCEnumDescriptor    gossip__pull_msg_type__descriptor;
extern const ProtobufCMessageDescriptor gossip__envelope__descriptor;
extern const ProtobufCMessageDescriptor gossip__secret_envelope__descriptor;
extern const ProtobufCMessageDescriptor gossip__secret__descriptor;
extern const ProtobufCMessageDescriptor gossip__gossip_message__descriptor;
extern const ProtobufCEnumDescriptor    gossip__gossip_message__tag__descriptor;
extern const ProtobufCMessageDescriptor gossip__state_info__descriptor;
extern const ProtobufCMessageDescriptor gossip__properties__descriptor;
extern const ProtobufCMessageDescriptor gossip__state_info_snapshot__descriptor;
extern const ProtobufCMessageDescriptor gossip__state_info_pull_request__descriptor;
extern const ProtobufCMessageDescriptor gossip__conn_establish__descriptor;
extern const ProtobufCMessageDescriptor gossip__peer_identity__descriptor;
extern const ProtobufCMessageDescriptor gossip__data_request__descriptor;
extern const ProtobufCMessageDescriptor gossip__gossip_hello__descriptor;
extern const ProtobufCMessageDescriptor gossip__data_update__descriptor;
extern const ProtobufCMessageDescriptor gossip__data_digest__descriptor;
extern const ProtobufCMessageDescriptor gossip__data_message__descriptor;
extern const ProtobufCMessageDescriptor gossip__private_data_message__descriptor;
extern const ProtobufCMessageDescriptor gossip__payload__descriptor;
extern const ProtobufCMessageDescriptor gossip__private_payload__descriptor;
extern const ProtobufCMessageDescriptor gossip__alive_message__descriptor;
extern const ProtobufCMessageDescriptor gossip__leadership_message__descriptor;
extern const ProtobufCMessageDescriptor gossip__peer_time__descriptor;
extern const ProtobufCMessageDescriptor gossip__membership_request__descriptor;
extern const ProtobufCMessageDescriptor gossip__membership_response__descriptor;
extern const ProtobufCMessageDescriptor gossip__member__descriptor;
extern const ProtobufCMessageDescriptor gossip__empty__descriptor;
extern const ProtobufCMessageDescriptor gossip__remote_state_request__descriptor;
extern const ProtobufCMessageDescriptor gossip__remote_state_response__descriptor;
extern const ProtobufCMessageDescriptor gossip__remote_pvt_data_request__descriptor;
extern const ProtobufCMessageDescriptor gossip__pvt_data_digest__descriptor;
extern const ProtobufCMessageDescriptor gossip__remote_pvt_data_response__descriptor;
extern const ProtobufCMessageDescriptor gossip__pvt_data_element__descriptor;
extern const ProtobufCMessageDescriptor gossip__pvt_data_payload__descriptor;
extern const ProtobufCMessageDescriptor gossip__acknowledgement__descriptor;
extern const ProtobufCMessageDescriptor gossip__chaincode__descriptor;
extern const ProtobufCServiceDescriptor gossip__gossip__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_gossip_2fmessage_2eproto__INCLUDED */
