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

#ifndef PROTOBUF_C_msp_2fmsp_5fconfig_2eproto__INCLUDED
#define PROTOBUF_C_msp_2fmsp_5fconfig_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


typedef struct _Msp__MSPConfig Msp__MSPConfig;
typedef struct _Msp__FabricMSPConfig Msp__FabricMSPConfig;
typedef struct _Msp__FabricCryptoConfig Msp__FabricCryptoConfig;
typedef struct _Msp__IdemixMSPConfig Msp__IdemixMSPConfig;
typedef struct _Msp__IdemixMSPSignerConfig Msp__IdemixMSPSignerConfig;
typedef struct _Msp__SigningIdentityInfo Msp__SigningIdentityInfo;
typedef struct _Msp__KeyInfo Msp__KeyInfo;
typedef struct _Msp__FabricOUIdentifier Msp__FabricOUIdentifier;
typedef struct _Msp__FabricNodeOUs Msp__FabricNodeOUs;


/* --- enums --- */


/* --- messages --- */

/*
 * MSPConfig collects all the configuration information for
 * an MSP. The Config field should be unmarshalled in a way
 * that depends on the Type
 */
struct  _Msp__MSPConfig
{
  ProtobufCMessage base;
  /*
   * Type holds the type of the MSP; the default one would
   * be of type FABRIC implementing an X.509 based provider
   */
  protobuf_c_boolean has_type;
  int32_t type;
  /*
   * Config is MSP dependent configuration info
   */
  protobuf_c_boolean has_config;
  ProtobufCBinaryData config;
};
#define MSP__MSPCONFIG__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&msp__mspconfig__descriptor) \
    , 0,0, 0,{0,NULL} }


/*
 * FabricMSPConfig collects all the configuration information for
 * a Fabric MSP.
 * Here we assume a default certificate validation policy, where
 * any certificate signed by any of the listed rootCA certs would
 * be considered as valid under this MSP.
 * This MSP may or may not come with a signing identity. If it does,
 * it can also issue signing identities. If it does not, it can only
 * be used to validate and verify certificates.
 */
struct  _Msp__FabricMSPConfig
{
  ProtobufCMessage base;
  /*
   * Name holds the identifier of the MSP; MSP identifier
   * is chosen by the application that governs this MSP.
   * For example, and assuming the default implementation of MSP,
   * that is X.509-based and considers a single Issuer,
   * this can refer to the Subject OU field or the Issuer OU field.
   */
  char *name;
  /*
   * List of root certificates trusted by this MSP
   * they are used upon certificate validation (see
   * comment for IntermediateCerts below)
   */
  size_t n_root_certs;
  ProtobufCBinaryData *root_certs;
  /*
   * List of intermediate certificates trusted by this MSP;
   * they are used upon certificate validation as follows:
   * validation attempts to build a path from the certificate
   * to be validated (which is at one end of the path) and
   * one of the certs in the RootCerts field (which is at
   * the other end of the path). If the path is longer than
   * 2, certificates in the middle are searched within the
   * IntermediateCerts pool
   */
  size_t n_intermediate_certs;
  ProtobufCBinaryData *intermediate_certs;
  /*
   * Identity denoting the administrator of this MSP
   */
  size_t n_admins;
  ProtobufCBinaryData *admins;
  /*
   * Identity revocation list
   */
  size_t n_revocation_list;
  ProtobufCBinaryData *revocation_list;
  /*
   * SigningIdentity holds information on the signing identity
   * this peer is to use, and which is to be imported by the
   * MSP defined before
   */
  Msp__SigningIdentityInfo *signing_identity;
  /*
   * OrganizationalUnitIdentifiers holds one or more
   * fabric organizational unit identifiers that belong to
   * this MSP configuration
   */
  size_t n_organizational_unit_identifiers;
  Msp__FabricOUIdentifier **organizational_unit_identifiers;
  /*
   * FabricCryptoConfig contains the configuration parameters
   * for the cryptographic algorithms used by this MSP
   */
  Msp__FabricCryptoConfig *crypto_config;
  /*
   * List of TLS root certificates trusted by this MSP.
   * They are returned by GetTLSRootCerts.
   */
  size_t n_tls_root_certs;
  ProtobufCBinaryData *tls_root_certs;
  /*
   * List of TLS intermediate certificates trusted by this MSP;
   * They are returned by GetTLSIntermediateCerts.
   */
  size_t n_tls_intermediate_certs;
  ProtobufCBinaryData *tls_intermediate_certs;
  /*
   * fabric_node_ous contains the configuration to distinguish clients from peers from orderers
   * based on the OUs.
   */
  Msp__FabricNodeOUs *fabric_node_ous;
};
#define MSP__FABRIC_MSPCONFIG__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&msp__fabric_mspconfig__descriptor) \
    , NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL, NULL, 0,NULL, NULL, 0,NULL, 0,NULL, NULL }


/*
 * FabricCryptoConfig contains configuration parameters
 * for the cryptographic algorithms used by the MSP
 * this configuration refers to
 */
struct  _Msp__FabricCryptoConfig
{
  ProtobufCMessage base;
  /*
   * SignatureHashFamily is a string representing the hash family to be used
   * during sign and verify operations.
   * Allowed values are "SHA2" and "SHA3".
   */
  char *signature_hash_family;
  /*
   * IdentityIdentifierHashFunction is a string representing the hash function
   * to be used during the computation of the identity identifier of an MSP identity.
   * Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384".
   */
  char *identity_identifier_hash_function;
};
#define MSP__FABRIC_CRYPTO_CONFIG__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&msp__fabric_crypto_config__descriptor) \
    , NULL, NULL }


/*
 * IdemixMSPConfig collects all the configuration information for
 * an Idemix MSP.
 */
struct  _Msp__IdemixMSPConfig
{
  ProtobufCMessage base;
  /*
   * Name holds the identifier of the MSP
   */
  char *name;
  /*
   * ipk represents the (serialized) issuer public key
   */
  protobuf_c_boolean has_ipk;
  ProtobufCBinaryData ipk;
  /*
   * signer may contain crypto material to configure a default signer
   */
  Msp__IdemixMSPSignerConfig *signer;
  /*
   * revocation_pk is the public key used for revocation of credentials
   */
  protobuf_c_boolean has_revocation_pk;
  ProtobufCBinaryData revocation_pk;
  /*
   * epoch represents the current epoch (time interval) used for revocation
   */
  protobuf_c_boolean has_epoch;
  int64_t epoch;
};
#define MSP__IDEMIX_MSPCONFIG__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&msp__idemix_mspconfig__descriptor) \
    , NULL, 0,{0,NULL}, NULL, 0,{0,NULL}, 0,0 }


/*
 * IdemixMSPSIgnerConfig contains the crypto material to set up an idemix signing identity
 */
struct  _Msp__IdemixMSPSignerConfig
{
  ProtobufCMessage base;
  /*
   * cred represents the serialized idemix credential of the default signer
   */
  protobuf_c_boolean has_cred;
  ProtobufCBinaryData cred;
  /*
   * sk is the secret key of the default signer, corresponding to credential Cred
   */
  protobuf_c_boolean has_sk;
  ProtobufCBinaryData sk;
  /*
   * organizational_unit_identifier defines the organizational unit the default signer is in
   */
  char *organizational_unit_identifier;
  /*
   * role defines whether the default signer is admin, peer, member or client
   */
  protobuf_c_boolean has_role;
  int32_t role;
  /*
   * enrollment_id contains the enrollment id of this signer
   */
  char *enrollment_id;
  /*
   * credential_revocation_information contains a serialized CredentialRevocationInformation
   */
  protobuf_c_boolean has_credential_revocation_information;
  ProtobufCBinaryData credential_revocation_information;
};
#define MSP__IDEMIX_MSPSIGNER_CONFIG__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&msp__idemix_mspsigner_config__descriptor) \
    , 0,{0,NULL}, 0,{0,NULL}, NULL, 0,0, NULL, 0,{0,NULL} }


/*
 * SigningIdentityInfo represents the configuration information
 * related to the signing identity the peer is to use for generating
 * endorsements
 */
struct  _Msp__SigningIdentityInfo
{
  ProtobufCMessage base;
  /*
   * PublicSigner carries the public information of the signing
   * identity. For an X.509 provider this would be represented by
   * an X.509 certificate
   */
  protobuf_c_boolean has_public_signer;
  ProtobufCBinaryData public_signer;
  /*
   * PrivateSigner denotes a reference to the private key of the
   * peer's signing identity
   */
  Msp__KeyInfo *private_signer;
};
#define MSP__SIGNING_IDENTITY_INFO__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&msp__signing_identity_info__descriptor) \
    , 0,{0,NULL}, NULL }


/*
 * KeyInfo represents a (secret) key that is either already stored
 * in the bccsp/keystore or key material to be imported to the
 * bccsp key-store. In later versions it may contain also a
 * keystore identifier
 */
struct  _Msp__KeyInfo
{
  ProtobufCMessage base;
  /*
   * Identifier of the key inside the default keystore; this for
   * the case of Software BCCSP as well as the HSM BCCSP would be
   * the SKI of the key
   */
  char *key_identifier;
  /*
   * KeyMaterial (optional) for the key to be imported; this is
   * properly encoded key bytes, prefixed by the type of the key
   */
  protobuf_c_boolean has_key_material;
  ProtobufCBinaryData key_material;
};
#define MSP__KEY_INFO__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&msp__key_info__descriptor) \
    , NULL, 0,{0,NULL} }


/*
 * FabricOUIdentifier represents an organizational unit and
 * its related chain of trust identifier.
 */
struct  _Msp__FabricOUIdentifier
{
  ProtobufCMessage base;
  /*
   * Certificate represents the second certificate in a certification chain.
   * (Notice that the first certificate in a certification chain is supposed
   * to be the certificate of an identity).
   * It must correspond to the certificate of root or intermediate CA
   * recognized by the MSP this message belongs to.
   * Starting from this certificate, a certification chain is computed
   * and bound to the OrganizationUnitIdentifier specified
   */
  protobuf_c_boolean has_certificate;
  ProtobufCBinaryData certificate;
  /*
   * OrganizationUnitIdentifier defines the organizational unit under the
   * MSP identified with MSPIdentifier
   */
  char *organizational_unit_identifier;
};
#define MSP__FABRIC_OUIDENTIFIER__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&msp__fabric_ouidentifier__descriptor) \
    , 0,{0,NULL}, NULL }


/*
 * FabricNodeOUs contains configuration to tell apart clients from peers from orderers
 * based on OUs. If NodeOUs recognition is enabled then an msp identity
 * that does not contain any of the specified OU will be considered invalid.
 */
struct  _Msp__FabricNodeOUs
{
  ProtobufCMessage base;
  /*
   * If true then an msp identity that does not contain any of the specified OU will be considered invalid.
   */
  protobuf_c_boolean has_enable;
  protobuf_c_boolean enable;
  /*
   * OU Identifier of the clients
   */
  Msp__FabricOUIdentifier *client_ou_identifier;
  /*
   * OU Identifier of the peers
   */
  Msp__FabricOUIdentifier *peer_ou_identifier;
};
#define MSP__FABRIC_NODE_OUS__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&msp__fabric_node_ous__descriptor) \
    , 0,0, NULL, NULL }


/* Msp__MSPConfig methods */
void   msp__mspconfig__init
                     (Msp__MSPConfig         *message);
size_t msp__mspconfig__get_packed_size
                     (const Msp__MSPConfig   *message);
size_t msp__mspconfig__pack
                     (const Msp__MSPConfig   *message,
                      uint8_t             *out);
size_t msp__mspconfig__pack_to_buffer
                     (const Msp__MSPConfig   *message,
                      ProtobufCBuffer     *buffer);
Msp__MSPConfig *
       msp__mspconfig__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   msp__mspconfig__free_unpacked
                     (Msp__MSPConfig *message,
                      ProtobufCAllocator *allocator);
/* Msp__FabricMSPConfig methods */
void   msp__fabric_mspconfig__init
                     (Msp__FabricMSPConfig         *message);
size_t msp__fabric_mspconfig__get_packed_size
                     (const Msp__FabricMSPConfig   *message);
size_t msp__fabric_mspconfig__pack
                     (const Msp__FabricMSPConfig   *message,
                      uint8_t             *out);
size_t msp__fabric_mspconfig__pack_to_buffer
                     (const Msp__FabricMSPConfig   *message,
                      ProtobufCBuffer     *buffer);
Msp__FabricMSPConfig *
       msp__fabric_mspconfig__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   msp__fabric_mspconfig__free_unpacked
                     (Msp__FabricMSPConfig *message,
                      ProtobufCAllocator *allocator);
/* Msp__FabricCryptoConfig methods */
void   msp__fabric_crypto_config__init
                     (Msp__FabricCryptoConfig         *message);
size_t msp__fabric_crypto_config__get_packed_size
                     (const Msp__FabricCryptoConfig   *message);
size_t msp__fabric_crypto_config__pack
                     (const Msp__FabricCryptoConfig   *message,
                      uint8_t             *out);
size_t msp__fabric_crypto_config__pack_to_buffer
                     (const Msp__FabricCryptoConfig   *message,
                      ProtobufCBuffer     *buffer);
Msp__FabricCryptoConfig *
       msp__fabric_crypto_config__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   msp__fabric_crypto_config__free_unpacked
                     (Msp__FabricCryptoConfig *message,
                      ProtobufCAllocator *allocator);
/* Msp__IdemixMSPConfig methods */
void   msp__idemix_mspconfig__init
                     (Msp__IdemixMSPConfig         *message);
size_t msp__idemix_mspconfig__get_packed_size
                     (const Msp__IdemixMSPConfig   *message);
size_t msp__idemix_mspconfig__pack
                     (const Msp__IdemixMSPConfig   *message,
                      uint8_t             *out);
size_t msp__idemix_mspconfig__pack_to_buffer
                     (const Msp__IdemixMSPConfig   *message,
                      ProtobufCBuffer     *buffer);
Msp__IdemixMSPConfig *
       msp__idemix_mspconfig__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   msp__idemix_mspconfig__free_unpacked
                     (Msp__IdemixMSPConfig *message,
                      ProtobufCAllocator *allocator);
/* Msp__IdemixMSPSignerConfig methods */
void   msp__idemix_mspsigner_config__init
                     (Msp__IdemixMSPSignerConfig         *message);
size_t msp__idemix_mspsigner_config__get_packed_size
                     (const Msp__IdemixMSPSignerConfig   *message);
size_t msp__idemix_mspsigner_config__pack
                     (const Msp__IdemixMSPSignerConfig   *message,
                      uint8_t             *out);
size_t msp__idemix_mspsigner_config__pack_to_buffer
                     (const Msp__IdemixMSPSignerConfig   *message,
                      ProtobufCBuffer     *buffer);
Msp__IdemixMSPSignerConfig *
       msp__idemix_mspsigner_config__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   msp__idemix_mspsigner_config__free_unpacked
                     (Msp__IdemixMSPSignerConfig *message,
                      ProtobufCAllocator *allocator);
/* Msp__SigningIdentityInfo methods */
void   msp__signing_identity_info__init
                     (Msp__SigningIdentityInfo         *message);
size_t msp__signing_identity_info__get_packed_size
                     (const Msp__SigningIdentityInfo   *message);
size_t msp__signing_identity_info__pack
                     (const Msp__SigningIdentityInfo   *message,
                      uint8_t             *out);
size_t msp__signing_identity_info__pack_to_buffer
                     (const Msp__SigningIdentityInfo   *message,
                      ProtobufCBuffer     *buffer);
Msp__SigningIdentityInfo *
       msp__signing_identity_info__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   msp__signing_identity_info__free_unpacked
                     (Msp__SigningIdentityInfo *message,
                      ProtobufCAllocator *allocator);
/* Msp__KeyInfo methods */
void   msp__key_info__init
                     (Msp__KeyInfo         *message);
size_t msp__key_info__get_packed_size
                     (const Msp__KeyInfo   *message);
size_t msp__key_info__pack
                     (const Msp__KeyInfo   *message,
                      uint8_t             *out);
size_t msp__key_info__pack_to_buffer
                     (const Msp__KeyInfo   *message,
                      ProtobufCBuffer     *buffer);
Msp__KeyInfo *
       msp__key_info__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   msp__key_info__free_unpacked
                     (Msp__KeyInfo *message,
                      ProtobufCAllocator *allocator);
/* Msp__FabricOUIdentifier methods */
void   msp__fabric_ouidentifier__init
                     (Msp__FabricOUIdentifier         *message);
size_t msp__fabric_ouidentifier__get_packed_size
                     (const Msp__FabricOUIdentifier   *message);
size_t msp__fabric_ouidentifier__pack
                     (const Msp__FabricOUIdentifier   *message,
                      uint8_t             *out);
size_t msp__fabric_ouidentifier__pack_to_buffer
                     (const Msp__FabricOUIdentifier   *message,
                      ProtobufCBuffer     *buffer);
Msp__FabricOUIdentifier *
       msp__fabric_ouidentifier__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   msp__fabric_ouidentifier__free_unpacked
                     (Msp__FabricOUIdentifier *message,
                      ProtobufCAllocator *allocator);
/* Msp__FabricNodeOUs methods */
void   msp__fabric_node_ous__init
                     (Msp__FabricNodeOUs         *message);
size_t msp__fabric_node_ous__get_packed_size
                     (const Msp__FabricNodeOUs   *message);
size_t msp__fabric_node_ous__pack
                     (const Msp__FabricNodeOUs   *message,
                      uint8_t             *out);
size_t msp__fabric_node_ous__pack_to_buffer
                     (const Msp__FabricNodeOUs   *message,
                      ProtobufCBuffer     *buffer);
Msp__FabricNodeOUs *
       msp__fabric_node_ous__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   msp__fabric_node_ous__free_unpacked
                     (Msp__FabricNodeOUs *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Msp__MSPConfig_Closure)
                 (const Msp__MSPConfig *message,
                  void *closure_data);
typedef void (*Msp__FabricMSPConfig_Closure)
                 (const Msp__FabricMSPConfig *message,
                  void *closure_data);
typedef void (*Msp__FabricCryptoConfig_Closure)
                 (const Msp__FabricCryptoConfig *message,
                  void *closure_data);
typedef void (*Msp__IdemixMSPConfig_Closure)
                 (const Msp__IdemixMSPConfig *message,
                  void *closure_data);
typedef void (*Msp__IdemixMSPSignerConfig_Closure)
                 (const Msp__IdemixMSPSignerConfig *message,
                  void *closure_data);
typedef void (*Msp__SigningIdentityInfo_Closure)
                 (const Msp__SigningIdentityInfo *message,
                  void *closure_data);
typedef void (*Msp__KeyInfo_Closure)
                 (const Msp__KeyInfo *message,
                  void *closure_data);
typedef void (*Msp__FabricOUIdentifier_Closure)
                 (const Msp__FabricOUIdentifier *message,
                  void *closure_data);
typedef void (*Msp__FabricNodeOUs_Closure)
                 (const Msp__FabricNodeOUs *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor msp__mspconfig__descriptor;
extern const ProtobufCMessageDescriptor msp__fabric_mspconfig__descriptor;
extern const ProtobufCMessageDescriptor msp__fabric_crypto_config__descriptor;
extern const ProtobufCMessageDescriptor msp__idemix_mspconfig__descriptor;
extern const ProtobufCMessageDescriptor msp__idemix_mspsigner_config__descriptor;
extern const ProtobufCMessageDescriptor msp__signing_identity_info__descriptor;
extern const ProtobufCMessageDescriptor msp__key_info__descriptor;
extern const ProtobufCMessageDescriptor msp__fabric_ouidentifier__descriptor;
extern const ProtobufCMessageDescriptor msp__fabric_node_ous__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_msp_2fmsp_5fconfig_2eproto__INCLUDED */
