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

#ifndef PROTOBUF_C_discovery_2fprotocol_2eproto__INCLUDED
#define PROTOBUF_C_discovery_2fprotocol_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 "gossip/message.pb-c.h"
#include "msp/msp_config.pb-c.h"
#include "msp/identities.pb-c.h"

typedef struct _Discovery__SignedRequest Discovery__SignedRequest;
typedef struct _Discovery__Request Discovery__Request;
typedef struct _Discovery__Response Discovery__Response;
typedef struct _Discovery__AuthInfo Discovery__AuthInfo;
typedef struct _Discovery__Query Discovery__Query;
typedef struct _Discovery__QueryResult Discovery__QueryResult;
typedef struct _Discovery__ConfigQuery Discovery__ConfigQuery;
typedef struct _Discovery__ConfigResult Discovery__ConfigResult;
typedef struct _Discovery__ConfigResult__MspsEntry Discovery__ConfigResult__MspsEntry;
typedef struct _Discovery__ConfigResult__OrderersEntry Discovery__ConfigResult__OrderersEntry;
typedef struct _Discovery__PeerMembershipQuery Discovery__PeerMembershipQuery;
typedef struct _Discovery__PeerMembershipResult Discovery__PeerMembershipResult;
typedef struct _Discovery__PeerMembershipResult__PeersByOrgEntry Discovery__PeerMembershipResult__PeersByOrgEntry;
typedef struct _Discovery__ChaincodeQuery Discovery__ChaincodeQuery;
typedef struct _Discovery__ChaincodeInterest Discovery__ChaincodeInterest;
typedef struct _Discovery__ChaincodeCall Discovery__ChaincodeCall;
typedef struct _Discovery__ChaincodeQueryResult Discovery__ChaincodeQueryResult;
typedef struct _Discovery__LocalPeerQuery Discovery__LocalPeerQuery;
typedef struct _Discovery__EndorsementDescriptor Discovery__EndorsementDescriptor;
typedef struct _Discovery__EndorsementDescriptor__EndorsersByGroupsEntry Discovery__EndorsementDescriptor__EndorsersByGroupsEntry;
typedef struct _Discovery__Layout Discovery__Layout;
typedef struct _Discovery__Layout__QuantitiesByGroupEntry Discovery__Layout__QuantitiesByGroupEntry;
typedef struct _Discovery__Peers Discovery__Peers;
typedef struct _Discovery__Peer Discovery__Peer;
typedef struct _Discovery__Error Discovery__Error;
typedef struct _Discovery__Endpoints Discovery__Endpoints;
typedef struct _Discovery__Endpoint Discovery__Endpoint;


/* --- enums --- */


/* --- messages --- */

/*
 * SignedRequest contains a serialized Request in the payload field
 * and a signature.
 * The identity that is used to verify the signature
 * can be extracted from the authentication field of type AuthInfo
 * in the Request itself after deserializing it.
 */
struct  _Discovery__SignedRequest
{
  ProtobufCMessage base;
  protobuf_c_boolean has_payload;
  ProtobufCBinaryData payload;
  protobuf_c_boolean has_signature;
  ProtobufCBinaryData signature;
};
#define DISCOVERY__SIGNED_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__signed_request__descriptor) \
    , 0,{0,NULL}, 0,{0,NULL} }


/*
 * Request contains authentication info about the client that sent the request
 * and the queries it wishes to query the service
 */
struct  _Discovery__Request
{
  ProtobufCMessage base;
  /*
   * authentication contains information that the service uses to check
   * the client's eligibility for the queries.
   */
  Discovery__AuthInfo *authentication;
  /*
   * queries
   */
  size_t n_queries;
  Discovery__Query **queries;
};
#define DISCOVERY__REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__request__descriptor) \
    , NULL, 0,NULL }


struct  _Discovery__Response
{
  ProtobufCMessage base;
  /*
   * The results are returned in the same order of the queries
   */
  size_t n_results;
  Discovery__QueryResult **results;
};
#define DISCOVERY__RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__response__descriptor) \
    , 0,NULL }


/*
 * AuthInfo aggregates authentication information that the server uses
 * to authenticate the client
 */
struct  _Discovery__AuthInfo
{
  ProtobufCMessage base;
  /*
   * This is the identity of the client that is used to verify the signature
   * on the SignedRequest's payload.
   * It is a msp.SerializedIdentity in bytes form
   */
  protobuf_c_boolean has_client_identity;
  ProtobufCBinaryData client_identity;
  /*
   * This is the hash of the client's TLS cert.
   * When the network is running with TLS, clients that don't include a certificate
   * will be denied access to the service.
   * Since the Request is encapsulated with a SignedRequest (which is signed),
   * this binds the TLS session to the enrollement identity of the client and
   * therefore both authenticates the client to the server,
   * and also prevents the server from relaying the request message to another server.
   */
  protobuf_c_boolean has_client_tls_cert_hash;
  ProtobufCBinaryData client_tls_cert_hash;
};
#define DISCOVERY__AUTH_INFO__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__auth_info__descriptor) \
    , 0,{0,NULL}, 0,{0,NULL} }


typedef enum {
  DISCOVERY__QUERY__QUERY__NOT_SET = 0,
  DISCOVERY__QUERY__QUERY_CONFIG_QUERY = 2,
  DISCOVERY__QUERY__QUERY_PEER_QUERY = 3,
  DISCOVERY__QUERY__QUERY_CC_QUERY = 4,
  DISCOVERY__QUERY__QUERY_LOCAL_PEERS = 5,
} Discovery__Query__QueryCase;

/*
 * Query asks for information in the context of a specific channel
 */
struct  _Discovery__Query
{
  ProtobufCMessage base;
  char *channel;
  Discovery__Query__QueryCase query_case;
  union {
    /*
     * ConfigQuery is used to query for the configuration of the channel,
     * such as FabricMSPConfig, and rorderer endpoints.
     * The client has to query a peer it trusts as it doesn't have means to self-verify
     * the authenticity of the returned result.
     * The result is returned in the form of ConfigResult.
     */
    Discovery__ConfigQuery *config_query;
    /*
     * PeerMembershipQuery queries for peers in a channel context,
     * and returns PeerMembershipResult
     */
    Discovery__PeerMembershipQuery *peer_query;
    /*
     * ChaincodeQuery queries for chaincodes by their name and version.
     * An empty version means any version can by returned.
     */
    Discovery__ChaincodeQuery *cc_query;
    /*
     * LocalPeerQuery queries for peers in a non channel context,
     * and returns PeerMembershipResult
     */
    Discovery__LocalPeerQuery *local_peers;
  };
};
#define DISCOVERY__QUERY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__query__descriptor) \
    , NULL, DISCOVERY__QUERY__QUERY__NOT_SET, {0} }


typedef enum {
  DISCOVERY__QUERY_RESULT__RESULT__NOT_SET = 0,
  DISCOVERY__QUERY_RESULT__RESULT_ERROR = 1,
  DISCOVERY__QUERY_RESULT__RESULT_CONFIG_RESULT = 2,
  DISCOVERY__QUERY_RESULT__RESULT_CC_QUERY_RES = 3,
  DISCOVERY__QUERY_RESULT__RESULT_MEMBERS = 4,
} Discovery__QueryResult__ResultCase;

/*
 * QueryResult contains a result for a given Query.
 * The corresponding Query can be inferred by the index of the QueryResult from
 * its enclosing Response message.
 * QueryResults are ordered in the same order as the Queries are ordered in their enclosing Request.
 */
struct  _Discovery__QueryResult
{
  ProtobufCMessage base;
  Discovery__QueryResult__ResultCase result_case;
  union {
    /*
     * Error indicates failure or refusal to process the query
     */
    Discovery__Error *error;
    /*
     * ConfigResult contains the configuration of the channel,
     * such as FabricMSPConfig and orderer endpoints
     */
    Discovery__ConfigResult *config_result;
    /*
     * ChaincodeQueryResult contains information about chaincodes,
     * and their corresponding endorsers
     */
    Discovery__ChaincodeQueryResult *cc_query_res;
    /*
     * PeerMembershipResult contains information about peers,
     * such as their identity, endpoints, and channel related state.
     */
    Discovery__PeerMembershipResult *members;
  };
};
#define DISCOVERY__QUERY_RESULT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__query_result__descriptor) \
    , DISCOVERY__QUERY_RESULT__RESULT__NOT_SET, {0} }


/*
 * ConfigQuery requests a ConfigResult
 */
struct  _Discovery__ConfigQuery
{
  ProtobufCMessage base;
};
#define DISCOVERY__CONFIG_QUERY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__config_query__descriptor) \
     }


struct  _Discovery__ConfigResult__MspsEntry
{
  ProtobufCMessage base;
  char *key;
  Msp__FabricMSPConfig *value;
};
#define DISCOVERY__CONFIG_RESULT__MSPS_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__config_result__msps_entry__descriptor) \
    , NULL, NULL }


struct  _Discovery__ConfigResult__OrderersEntry
{
  ProtobufCMessage base;
  char *key;
  Discovery__Endpoints *value;
};
#define DISCOVERY__CONFIG_RESULT__ORDERERS_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__config_result__orderers_entry__descriptor) \
    , NULL, NULL }


struct  _Discovery__ConfigResult
{
  ProtobufCMessage base;
  /*
   * msps is a map from MSP_ID to FabricMSPConfig
   */
  size_t n_msps;
  Discovery__ConfigResult__MspsEntry **msps;
  /*
   * orderers is a map from MSP_ID to endpoint lists of orderers
   */
  size_t n_orderers;
  Discovery__ConfigResult__OrderersEntry **orderers;
};
#define DISCOVERY__CONFIG_RESULT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__config_result__descriptor) \
    , 0,NULL, 0,NULL }


/*
 * PeerMembershipQuery requests PeerMembershipResult.
 * The filter field may be optionally populated in order
 * for the peer membership to be filtered according to
 * chaincodes that are installed on peers and collection
 * access control policies.
 */
struct  _Discovery__PeerMembershipQuery
{
  ProtobufCMessage base;
  Discovery__ChaincodeInterest *filter;
};
#define DISCOVERY__PEER_MEMBERSHIP_QUERY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__peer_membership_query__descriptor) \
    , NULL }


struct  _Discovery__PeerMembershipResult__PeersByOrgEntry
{
  ProtobufCMessage base;
  char *key;
  Discovery__Peers *value;
};
#define DISCOVERY__PEER_MEMBERSHIP_RESULT__PEERS_BY_ORG_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__peer_membership_result__peers_by_org_entry__descriptor) \
    , NULL, NULL }


/*
 * PeerMembershipResult contains peers mapped by their organizations (MSP_ID)
 */
struct  _Discovery__PeerMembershipResult
{
  ProtobufCMessage base;
  size_t n_peers_by_org;
  Discovery__PeerMembershipResult__PeersByOrgEntry **peers_by_org;
};
#define DISCOVERY__PEER_MEMBERSHIP_RESULT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__peer_membership_result__descriptor) \
    , 0,NULL }


/*
 * ChaincodeQuery requests ChaincodeQueryResults for a given
 * list of chaincode invocations.
 * Each invocation is a separate one, and the endorsement policy
 * is evaluated independantly for each given interest.
 */
struct  _Discovery__ChaincodeQuery
{
  ProtobufCMessage base;
  size_t n_interests;
  Discovery__ChaincodeInterest **interests;
};
#define DISCOVERY__CHAINCODE_QUERY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__chaincode_query__descriptor) \
    , 0,NULL }


/*
 * ChaincodeInterest defines an interest about an endorsement
 * for a specific single chaincode invocation.
 * Multiple chaincodes indicate chaincode to chaincode invocations.
 */
struct  _Discovery__ChaincodeInterest
{
  ProtobufCMessage base;
  size_t n_chaincodes;
  Discovery__ChaincodeCall **chaincodes;
};
#define DISCOVERY__CHAINCODE_INTEREST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__chaincode_interest__descriptor) \
    , 0,NULL }


/*
 * ChaincodeCall defines a call to a chaincode.
 * It may have collections that are related to the chaincode
 */
struct  _Discovery__ChaincodeCall
{
  ProtobufCMessage base;
  char *name;
  size_t n_collection_names;
  char **collection_names;
};
#define DISCOVERY__CHAINCODE_CALL__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__chaincode_call__descriptor) \
    , NULL, 0,NULL }


/*
 * ChaincodeQueryResult contains EndorsementDescriptors for
 * chaincodes
 */
struct  _Discovery__ChaincodeQueryResult
{
  ProtobufCMessage base;
  size_t n_content;
  Discovery__EndorsementDescriptor **content;
};
#define DISCOVERY__CHAINCODE_QUERY_RESULT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__chaincode_query_result__descriptor) \
    , 0,NULL }


/*
 * LocalPeerQuery queries for peers in a non channel context
 */
struct  _Discovery__LocalPeerQuery
{
  ProtobufCMessage base;
};
#define DISCOVERY__LOCAL_PEER_QUERY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__local_peer_query__descriptor) \
     }


struct  _Discovery__EndorsementDescriptor__EndorsersByGroupsEntry
{
  ProtobufCMessage base;
  char *key;
  Discovery__Peers *value;
};
#define DISCOVERY__ENDORSEMENT_DESCRIPTOR__ENDORSERS_BY_GROUPS_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__endorsement_descriptor__endorsers_by_groups_entry__descriptor) \
    , NULL, NULL }


/*
 * EndorsementDescriptor contains information about which peers can be used
 * to request endorsement from, such that the endorsement policy would be fulfilled.
 * Here is how to compute a set of peers to ask an endorsement from, given an EndorsementDescriptor:
 * Let e: G --> P be the endorsers_by_groups field that maps a group to a set of peers.
 * Note that applying e on a group g yields a set of peers.
 * 1) Select a layout l: G --> N out of the layouts given.
 *    l is the quantities_by_group field of a Layout, and it maps a group to an integer.
 * 2) R = {}  (an empty set of peers)
 * 3) For each group g in the layout l, compute n = l(g)
 *    3.1) Denote P_g as a set of n random peers {p0, p1, ... p_n} selected from e(g)
 *    3.2) R = R U P_g  (add P_g to R)
 * 4) The set of peers R is the peers the client needs to request endorsements from
 */
struct  _Discovery__EndorsementDescriptor
{
  ProtobufCMessage base;
  char *chaincode;
  /*
   * Specifies the endorsers, separated to groups.
   */
  size_t n_endorsers_by_groups;
  Discovery__EndorsementDescriptor__EndorsersByGroupsEntry **endorsers_by_groups;
  /*
   * Specifies options of fulfulling the endorsement policy.
   * Each option lists the group names, and the amount of signatures needed
   * from each group.
   */
  size_t n_layouts;
  Discovery__Layout **layouts;
};
#define DISCOVERY__ENDORSEMENT_DESCRIPTOR__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__endorsement_descriptor__descriptor) \
    , NULL, 0,NULL, 0,NULL }


struct  _Discovery__Layout__QuantitiesByGroupEntry
{
  ProtobufCMessage base;
  char *key;
  protobuf_c_boolean has_value;
  uint32_t value;
};
#define DISCOVERY__LAYOUT__QUANTITIES_BY_GROUP_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__layout__quantities_by_group_entry__descriptor) \
    , NULL, 0,0 }


/*
 * Layout contains a mapping from a group name to number of peers
 * that are needed for fulfilling an endorsement policy
 */
struct  _Discovery__Layout
{
  ProtobufCMessage base;
  /*
   * Specifies how many non repeated signatures of each group
   * are needed for endorsement
   */
  size_t n_quantities_by_group;
  Discovery__Layout__QuantitiesByGroupEntry **quantities_by_group;
};
#define DISCOVERY__LAYOUT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__layout__descriptor) \
    , 0,NULL }


/*
 * Peers contains a list of Peer(s)
 */
struct  _Discovery__Peers
{
  ProtobufCMessage base;
  size_t n_peers;
  Discovery__Peer **peers;
};
#define DISCOVERY__PEERS__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__peers__descriptor) \
    , 0,NULL }


/*
 * Peer contains information about the peer such as its channel specific
 * state, and membership information.
 */
struct  _Discovery__Peer
{
  ProtobufCMessage base;
  /*
   * This is an Envelope of a GossipMessage with a gossip.StateInfo message
   */
  Gossip__Envelope *state_info;
  /*
   * This is an Envelope of a GossipMessage with a gossip.AliveMessage message
   */
  Gossip__Envelope *membership_info;
  /*
   * This is the msp.SerializedIdentity of the peer, represented in bytes.
   */
  protobuf_c_boolean has_identity;
  ProtobufCBinaryData identity;
};
#define DISCOVERY__PEER__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__peer__descriptor) \
    , NULL, NULL, 0,{0,NULL} }


/*
 * Error denotes that something went wrong and contains the error message
 */
struct  _Discovery__Error
{
  ProtobufCMessage base;
  char *content;
};
#define DISCOVERY__ERROR__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__error__descriptor) \
    , NULL }


/*
 * Endpoints is a list of Endpoint(s)
 */
struct  _Discovery__Endpoints
{
  ProtobufCMessage base;
  size_t n_endpoint;
  Discovery__Endpoint **endpoint;
};
#define DISCOVERY__ENDPOINTS__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__endpoints__descriptor) \
    , 0,NULL }


/*
 * Endpoint is a combination of a host and a port
 */
struct  _Discovery__Endpoint
{
  ProtobufCMessage base;
  char *host;
  protobuf_c_boolean has_port;
  uint32_t port;
};
#define DISCOVERY__ENDPOINT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&discovery__endpoint__descriptor) \
    , NULL, 0,0 }


/* Discovery__SignedRequest methods */
void   discovery__signed_request__init
                     (Discovery__SignedRequest         *message);
size_t discovery__signed_request__get_packed_size
                     (const Discovery__SignedRequest   *message);
size_t discovery__signed_request__pack
                     (const Discovery__SignedRequest   *message,
                      uint8_t             *out);
size_t discovery__signed_request__pack_to_buffer
                     (const Discovery__SignedRequest   *message,
                      ProtobufCBuffer     *buffer);
Discovery__SignedRequest *
       discovery__signed_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__signed_request__free_unpacked
                     (Discovery__SignedRequest *message,
                      ProtobufCAllocator *allocator);
/* Discovery__Request methods */
void   discovery__request__init
                     (Discovery__Request         *message);
size_t discovery__request__get_packed_size
                     (const Discovery__Request   *message);
size_t discovery__request__pack
                     (const Discovery__Request   *message,
                      uint8_t             *out);
size_t discovery__request__pack_to_buffer
                     (const Discovery__Request   *message,
                      ProtobufCBuffer     *buffer);
Discovery__Request *
       discovery__request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__request__free_unpacked
                     (Discovery__Request *message,
                      ProtobufCAllocator *allocator);
/* Discovery__Response methods */
void   discovery__response__init
                     (Discovery__Response         *message);
size_t discovery__response__get_packed_size
                     (const Discovery__Response   *message);
size_t discovery__response__pack
                     (const Discovery__Response   *message,
                      uint8_t             *out);
size_t discovery__response__pack_to_buffer
                     (const Discovery__Response   *message,
                      ProtobufCBuffer     *buffer);
Discovery__Response *
       discovery__response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__response__free_unpacked
                     (Discovery__Response *message,
                      ProtobufCAllocator *allocator);
/* Discovery__AuthInfo methods */
void   discovery__auth_info__init
                     (Discovery__AuthInfo         *message);
size_t discovery__auth_info__get_packed_size
                     (const Discovery__AuthInfo   *message);
size_t discovery__auth_info__pack
                     (const Discovery__AuthInfo   *message,
                      uint8_t             *out);
size_t discovery__auth_info__pack_to_buffer
                     (const Discovery__AuthInfo   *message,
                      ProtobufCBuffer     *buffer);
Discovery__AuthInfo *
       discovery__auth_info__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__auth_info__free_unpacked
                     (Discovery__AuthInfo *message,
                      ProtobufCAllocator *allocator);
/* Discovery__Query methods */
void   discovery__query__init
                     (Discovery__Query         *message);
size_t discovery__query__get_packed_size
                     (const Discovery__Query   *message);
size_t discovery__query__pack
                     (const Discovery__Query   *message,
                      uint8_t             *out);
size_t discovery__query__pack_to_buffer
                     (const Discovery__Query   *message,
                      ProtobufCBuffer     *buffer);
Discovery__Query *
       discovery__query__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__query__free_unpacked
                     (Discovery__Query *message,
                      ProtobufCAllocator *allocator);
/* Discovery__QueryResult methods */
void   discovery__query_result__init
                     (Discovery__QueryResult         *message);
size_t discovery__query_result__get_packed_size
                     (const Discovery__QueryResult   *message);
size_t discovery__query_result__pack
                     (const Discovery__QueryResult   *message,
                      uint8_t             *out);
size_t discovery__query_result__pack_to_buffer
                     (const Discovery__QueryResult   *message,
                      ProtobufCBuffer     *buffer);
Discovery__QueryResult *
       discovery__query_result__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__query_result__free_unpacked
                     (Discovery__QueryResult *message,
                      ProtobufCAllocator *allocator);
/* Discovery__ConfigQuery methods */
void   discovery__config_query__init
                     (Discovery__ConfigQuery         *message);
size_t discovery__config_query__get_packed_size
                     (const Discovery__ConfigQuery   *message);
size_t discovery__config_query__pack
                     (const Discovery__ConfigQuery   *message,
                      uint8_t             *out);
size_t discovery__config_query__pack_to_buffer
                     (const Discovery__ConfigQuery   *message,
                      ProtobufCBuffer     *buffer);
Discovery__ConfigQuery *
       discovery__config_query__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__config_query__free_unpacked
                     (Discovery__ConfigQuery *message,
                      ProtobufCAllocator *allocator);
/* Discovery__ConfigResult__MspsEntry methods */
void   discovery__config_result__msps_entry__init
                     (Discovery__ConfigResult__MspsEntry         *message);
/* Discovery__ConfigResult__OrderersEntry methods */
void   discovery__config_result__orderers_entry__init
                     (Discovery__ConfigResult__OrderersEntry         *message);
/* Discovery__ConfigResult methods */
void   discovery__config_result__init
                     (Discovery__ConfigResult         *message);
size_t discovery__config_result__get_packed_size
                     (const Discovery__ConfigResult   *message);
size_t discovery__config_result__pack
                     (const Discovery__ConfigResult   *message,
                      uint8_t             *out);
size_t discovery__config_result__pack_to_buffer
                     (const Discovery__ConfigResult   *message,
                      ProtobufCBuffer     *buffer);
Discovery__ConfigResult *
       discovery__config_result__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__config_result__free_unpacked
                     (Discovery__ConfigResult *message,
                      ProtobufCAllocator *allocator);
/* Discovery__PeerMembershipQuery methods */
void   discovery__peer_membership_query__init
                     (Discovery__PeerMembershipQuery         *message);
size_t discovery__peer_membership_query__get_packed_size
                     (const Discovery__PeerMembershipQuery   *message);
size_t discovery__peer_membership_query__pack
                     (const Discovery__PeerMembershipQuery   *message,
                      uint8_t             *out);
size_t discovery__peer_membership_query__pack_to_buffer
                     (const Discovery__PeerMembershipQuery   *message,
                      ProtobufCBuffer     *buffer);
Discovery__PeerMembershipQuery *
       discovery__peer_membership_query__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__peer_membership_query__free_unpacked
                     (Discovery__PeerMembershipQuery *message,
                      ProtobufCAllocator *allocator);
/* Discovery__PeerMembershipResult__PeersByOrgEntry methods */
void   discovery__peer_membership_result__peers_by_org_entry__init
                     (Discovery__PeerMembershipResult__PeersByOrgEntry         *message);
/* Discovery__PeerMembershipResult methods */
void   discovery__peer_membership_result__init
                     (Discovery__PeerMembershipResult         *message);
size_t discovery__peer_membership_result__get_packed_size
                     (const Discovery__PeerMembershipResult   *message);
size_t discovery__peer_membership_result__pack
                     (const Discovery__PeerMembershipResult   *message,
                      uint8_t             *out);
size_t discovery__peer_membership_result__pack_to_buffer
                     (const Discovery__PeerMembershipResult   *message,
                      ProtobufCBuffer     *buffer);
Discovery__PeerMembershipResult *
       discovery__peer_membership_result__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__peer_membership_result__free_unpacked
                     (Discovery__PeerMembershipResult *message,
                      ProtobufCAllocator *allocator);
/* Discovery__ChaincodeQuery methods */
void   discovery__chaincode_query__init
                     (Discovery__ChaincodeQuery         *message);
size_t discovery__chaincode_query__get_packed_size
                     (const Discovery__ChaincodeQuery   *message);
size_t discovery__chaincode_query__pack
                     (const Discovery__ChaincodeQuery   *message,
                      uint8_t             *out);
size_t discovery__chaincode_query__pack_to_buffer
                     (const Discovery__ChaincodeQuery   *message,
                      ProtobufCBuffer     *buffer);
Discovery__ChaincodeQuery *
       discovery__chaincode_query__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__chaincode_query__free_unpacked
                     (Discovery__ChaincodeQuery *message,
                      ProtobufCAllocator *allocator);
/* Discovery__ChaincodeInterest methods */
void   discovery__chaincode_interest__init
                     (Discovery__ChaincodeInterest         *message);
size_t discovery__chaincode_interest__get_packed_size
                     (const Discovery__ChaincodeInterest   *message);
size_t discovery__chaincode_interest__pack
                     (const Discovery__ChaincodeInterest   *message,
                      uint8_t             *out);
size_t discovery__chaincode_interest__pack_to_buffer
                     (const Discovery__ChaincodeInterest   *message,
                      ProtobufCBuffer     *buffer);
Discovery__ChaincodeInterest *
       discovery__chaincode_interest__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__chaincode_interest__free_unpacked
                     (Discovery__ChaincodeInterest *message,
                      ProtobufCAllocator *allocator);
/* Discovery__ChaincodeCall methods */
void   discovery__chaincode_call__init
                     (Discovery__ChaincodeCall         *message);
size_t discovery__chaincode_call__get_packed_size
                     (const Discovery__ChaincodeCall   *message);
size_t discovery__chaincode_call__pack
                     (const Discovery__ChaincodeCall   *message,
                      uint8_t             *out);
size_t discovery__chaincode_call__pack_to_buffer
                     (const Discovery__ChaincodeCall   *message,
                      ProtobufCBuffer     *buffer);
Discovery__ChaincodeCall *
       discovery__chaincode_call__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__chaincode_call__free_unpacked
                     (Discovery__ChaincodeCall *message,
                      ProtobufCAllocator *allocator);
/* Discovery__ChaincodeQueryResult methods */
void   discovery__chaincode_query_result__init
                     (Discovery__ChaincodeQueryResult         *message);
size_t discovery__chaincode_query_result__get_packed_size
                     (const Discovery__ChaincodeQueryResult   *message);
size_t discovery__chaincode_query_result__pack
                     (const Discovery__ChaincodeQueryResult   *message,
                      uint8_t             *out);
size_t discovery__chaincode_query_result__pack_to_buffer
                     (const Discovery__ChaincodeQueryResult   *message,
                      ProtobufCBuffer     *buffer);
Discovery__ChaincodeQueryResult *
       discovery__chaincode_query_result__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__chaincode_query_result__free_unpacked
                     (Discovery__ChaincodeQueryResult *message,
                      ProtobufCAllocator *allocator);
/* Discovery__LocalPeerQuery methods */
void   discovery__local_peer_query__init
                     (Discovery__LocalPeerQuery         *message);
size_t discovery__local_peer_query__get_packed_size
                     (const Discovery__LocalPeerQuery   *message);
size_t discovery__local_peer_query__pack
                     (const Discovery__LocalPeerQuery   *message,
                      uint8_t             *out);
size_t discovery__local_peer_query__pack_to_buffer
                     (const Discovery__LocalPeerQuery   *message,
                      ProtobufCBuffer     *buffer);
Discovery__LocalPeerQuery *
       discovery__local_peer_query__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__local_peer_query__free_unpacked
                     (Discovery__LocalPeerQuery *message,
                      ProtobufCAllocator *allocator);
/* Discovery__EndorsementDescriptor__EndorsersByGroupsEntry methods */
void   discovery__endorsement_descriptor__endorsers_by_groups_entry__init
                     (Discovery__EndorsementDescriptor__EndorsersByGroupsEntry         *message);
/* Discovery__EndorsementDescriptor methods */
void   discovery__endorsement_descriptor__init
                     (Discovery__EndorsementDescriptor         *message);
size_t discovery__endorsement_descriptor__get_packed_size
                     (const Discovery__EndorsementDescriptor   *message);
size_t discovery__endorsement_descriptor__pack
                     (const Discovery__EndorsementDescriptor   *message,
                      uint8_t             *out);
size_t discovery__endorsement_descriptor__pack_to_buffer
                     (const Discovery__EndorsementDescriptor   *message,
                      ProtobufCBuffer     *buffer);
Discovery__EndorsementDescriptor *
       discovery__endorsement_descriptor__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__endorsement_descriptor__free_unpacked
                     (Discovery__EndorsementDescriptor *message,
                      ProtobufCAllocator *allocator);
/* Discovery__Layout__QuantitiesByGroupEntry methods */
void   discovery__layout__quantities_by_group_entry__init
                     (Discovery__Layout__QuantitiesByGroupEntry         *message);
/* Discovery__Layout methods */
void   discovery__layout__init
                     (Discovery__Layout         *message);
size_t discovery__layout__get_packed_size
                     (const Discovery__Layout   *message);
size_t discovery__layout__pack
                     (const Discovery__Layout   *message,
                      uint8_t             *out);
size_t discovery__layout__pack_to_buffer
                     (const Discovery__Layout   *message,
                      ProtobufCBuffer     *buffer);
Discovery__Layout *
       discovery__layout__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__layout__free_unpacked
                     (Discovery__Layout *message,
                      ProtobufCAllocator *allocator);
/* Discovery__Peers methods */
void   discovery__peers__init
                     (Discovery__Peers         *message);
size_t discovery__peers__get_packed_size
                     (const Discovery__Peers   *message);
size_t discovery__peers__pack
                     (const Discovery__Peers   *message,
                      uint8_t             *out);
size_t discovery__peers__pack_to_buffer
                     (const Discovery__Peers   *message,
                      ProtobufCBuffer     *buffer);
Discovery__Peers *
       discovery__peers__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__peers__free_unpacked
                     (Discovery__Peers *message,
                      ProtobufCAllocator *allocator);
/* Discovery__Peer methods */
void   discovery__peer__init
                     (Discovery__Peer         *message);
size_t discovery__peer__get_packed_size
                     (const Discovery__Peer   *message);
size_t discovery__peer__pack
                     (const Discovery__Peer   *message,
                      uint8_t             *out);
size_t discovery__peer__pack_to_buffer
                     (const Discovery__Peer   *message,
                      ProtobufCBuffer     *buffer);
Discovery__Peer *
       discovery__peer__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__peer__free_unpacked
                     (Discovery__Peer *message,
                      ProtobufCAllocator *allocator);
/* Discovery__Error methods */
void   discovery__error__init
                     (Discovery__Error         *message);
size_t discovery__error__get_packed_size
                     (const Discovery__Error   *message);
size_t discovery__error__pack
                     (const Discovery__Error   *message,
                      uint8_t             *out);
size_t discovery__error__pack_to_buffer
                     (const Discovery__Error   *message,
                      ProtobufCBuffer     *buffer);
Discovery__Error *
       discovery__error__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__error__free_unpacked
                     (Discovery__Error *message,
                      ProtobufCAllocator *allocator);
/* Discovery__Endpoints methods */
void   discovery__endpoints__init
                     (Discovery__Endpoints         *message);
size_t discovery__endpoints__get_packed_size
                     (const Discovery__Endpoints   *message);
size_t discovery__endpoints__pack
                     (const Discovery__Endpoints   *message,
                      uint8_t             *out);
size_t discovery__endpoints__pack_to_buffer
                     (const Discovery__Endpoints   *message,
                      ProtobufCBuffer     *buffer);
Discovery__Endpoints *
       discovery__endpoints__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__endpoints__free_unpacked
                     (Discovery__Endpoints *message,
                      ProtobufCAllocator *allocator);
/* Discovery__Endpoint methods */
void   discovery__endpoint__init
                     (Discovery__Endpoint         *message);
size_t discovery__endpoint__get_packed_size
                     (const Discovery__Endpoint   *message);
size_t discovery__endpoint__pack
                     (const Discovery__Endpoint   *message,
                      uint8_t             *out);
size_t discovery__endpoint__pack_to_buffer
                     (const Discovery__Endpoint   *message,
                      ProtobufCBuffer     *buffer);
Discovery__Endpoint *
       discovery__endpoint__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   discovery__endpoint__free_unpacked
                     (Discovery__Endpoint *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Discovery__SignedRequest_Closure)
                 (const Discovery__SignedRequest *message,
                  void *closure_data);
typedef void (*Discovery__Request_Closure)
                 (const Discovery__Request *message,
                  void *closure_data);
typedef void (*Discovery__Response_Closure)
                 (const Discovery__Response *message,
                  void *closure_data);
typedef void (*Discovery__AuthInfo_Closure)
                 (const Discovery__AuthInfo *message,
                  void *closure_data);
typedef void (*Discovery__Query_Closure)
                 (const Discovery__Query *message,
                  void *closure_data);
typedef void (*Discovery__QueryResult_Closure)
                 (const Discovery__QueryResult *message,
                  void *closure_data);
typedef void (*Discovery__ConfigQuery_Closure)
                 (const Discovery__ConfigQuery *message,
                  void *closure_data);
typedef void (*Discovery__ConfigResult__MspsEntry_Closure)
                 (const Discovery__ConfigResult__MspsEntry *message,
                  void *closure_data);
typedef void (*Discovery__ConfigResult__OrderersEntry_Closure)
                 (const Discovery__ConfigResult__OrderersEntry *message,
                  void *closure_data);
typedef void (*Discovery__ConfigResult_Closure)
                 (const Discovery__ConfigResult *message,
                  void *closure_data);
typedef void (*Discovery__PeerMembershipQuery_Closure)
                 (const Discovery__PeerMembershipQuery *message,
                  void *closure_data);
typedef void (*Discovery__PeerMembershipResult__PeersByOrgEntry_Closure)
                 (const Discovery__PeerMembershipResult__PeersByOrgEntry *message,
                  void *closure_data);
typedef void (*Discovery__PeerMembershipResult_Closure)
                 (const Discovery__PeerMembershipResult *message,
                  void *closure_data);
typedef void (*Discovery__ChaincodeQuery_Closure)
                 (const Discovery__ChaincodeQuery *message,
                  void *closure_data);
typedef void (*Discovery__ChaincodeInterest_Closure)
                 (const Discovery__ChaincodeInterest *message,
                  void *closure_data);
typedef void (*Discovery__ChaincodeCall_Closure)
                 (const Discovery__ChaincodeCall *message,
                  void *closure_data);
typedef void (*Discovery__ChaincodeQueryResult_Closure)
                 (const Discovery__ChaincodeQueryResult *message,
                  void *closure_data);
typedef void (*Discovery__LocalPeerQuery_Closure)
                 (const Discovery__LocalPeerQuery *message,
                  void *closure_data);
typedef void (*Discovery__EndorsementDescriptor__EndorsersByGroupsEntry_Closure)
                 (const Discovery__EndorsementDescriptor__EndorsersByGroupsEntry *message,
                  void *closure_data);
typedef void (*Discovery__EndorsementDescriptor_Closure)
                 (const Discovery__EndorsementDescriptor *message,
                  void *closure_data);
typedef void (*Discovery__Layout__QuantitiesByGroupEntry_Closure)
                 (const Discovery__Layout__QuantitiesByGroupEntry *message,
                  void *closure_data);
typedef void (*Discovery__Layout_Closure)
                 (const Discovery__Layout *message,
                  void *closure_data);
typedef void (*Discovery__Peers_Closure)
                 (const Discovery__Peers *message,
                  void *closure_data);
typedef void (*Discovery__Peer_Closure)
                 (const Discovery__Peer *message,
                  void *closure_data);
typedef void (*Discovery__Error_Closure)
                 (const Discovery__Error *message,
                  void *closure_data);
typedef void (*Discovery__Endpoints_Closure)
                 (const Discovery__Endpoints *message,
                  void *closure_data);
typedef void (*Discovery__Endpoint_Closure)
                 (const Discovery__Endpoint *message,
                  void *closure_data);

/* --- services --- */

typedef struct _Discovery__Discovery_Service Discovery__Discovery_Service;
struct _Discovery__Discovery_Service
{
  ProtobufCService base;
  void (*discover)(Discovery__Discovery_Service *service,
                   const Discovery__SignedRequest *input,
                   Discovery__Response_Closure closure,
                   void *closure_data);
};
typedef void (*Discovery__Discovery_ServiceDestroy)(Discovery__Discovery_Service *);
void discovery__discovery__init (Discovery__Discovery_Service *service,
                                 Discovery__Discovery_ServiceDestroy destroy);
#define DISCOVERY__DISCOVERY__BASE_INIT \
    { &discovery__discovery__descriptor, protobuf_c_service_invoke_internal, NULL }
#define DISCOVERY__DISCOVERY__INIT(function_prefix__) \
    { DISCOVERY__DISCOVERY__BASE_INIT,\
      function_prefix__ ## discover  }
void discovery__discovery__discover(ProtobufCService *service,
                                    const Discovery__SignedRequest *input,
                                    Discovery__Response_Closure closure,
                                    void *closure_data);

/* --- descriptors --- */

extern const ProtobufCMessageDescriptor discovery__signed_request__descriptor;
extern const ProtobufCMessageDescriptor discovery__request__descriptor;
extern const ProtobufCMessageDescriptor discovery__response__descriptor;
extern const ProtobufCMessageDescriptor discovery__auth_info__descriptor;
extern const ProtobufCMessageDescriptor discovery__query__descriptor;
extern const ProtobufCMessageDescriptor discovery__query_result__descriptor;
extern const ProtobufCMessageDescriptor discovery__config_query__descriptor;
extern const ProtobufCMessageDescriptor discovery__config_result__descriptor;
extern const ProtobufCMessageDescriptor discovery__config_result__msps_entry__descriptor;
extern const ProtobufCMessageDescriptor discovery__config_result__orderers_entry__descriptor;
extern const ProtobufCMessageDescriptor discovery__peer_membership_query__descriptor;
extern const ProtobufCMessageDescriptor discovery__peer_membership_result__descriptor;
extern const ProtobufCMessageDescriptor discovery__peer_membership_result__peers_by_org_entry__descriptor;
extern const ProtobufCMessageDescriptor discovery__chaincode_query__descriptor;
extern const ProtobufCMessageDescriptor discovery__chaincode_interest__descriptor;
extern const ProtobufCMessageDescriptor discovery__chaincode_call__descriptor;
extern const ProtobufCMessageDescriptor discovery__chaincode_query_result__descriptor;
extern const ProtobufCMessageDescriptor discovery__local_peer_query__descriptor;
extern const ProtobufCMessageDescriptor discovery__endorsement_descriptor__descriptor;
extern const ProtobufCMessageDescriptor discovery__endorsement_descriptor__endorsers_by_groups_entry__descriptor;
extern const ProtobufCMessageDescriptor discovery__layout__descriptor;
extern const ProtobufCMessageDescriptor discovery__layout__quantities_by_group_entry__descriptor;
extern const ProtobufCMessageDescriptor discovery__peers__descriptor;
extern const ProtobufCMessageDescriptor discovery__peer__descriptor;
extern const ProtobufCMessageDescriptor discovery__error__descriptor;
extern const ProtobufCMessageDescriptor discovery__endpoints__descriptor;
extern const ProtobufCMessageDescriptor discovery__endpoint__descriptor;
extern const ProtobufCServiceDescriptor discovery__discovery__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_discovery_2fprotocol_2eproto__INCLUDED */
