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

#ifndef PROTOBUF_C_peer_2fchaincode_2eproto__INCLUDED
#define PROTOBUF_C_peer_2fchaincode_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 _Protos__ChaincodeID Protos__ChaincodeID;
typedef struct _Protos__ChaincodeInput Protos__ChaincodeInput;
typedef struct _Protos__ChaincodeInput__DecorationsEntry Protos__ChaincodeInput__DecorationsEntry;
typedef struct _Protos__ChaincodeSpec Protos__ChaincodeSpec;
typedef struct _Protos__ChaincodeDeploymentSpec Protos__ChaincodeDeploymentSpec;
typedef struct _Protos__ChaincodeInvocationSpec Protos__ChaincodeInvocationSpec;
typedef struct _Protos__LifecycleEvent Protos__LifecycleEvent;


/* --- enums --- */

typedef enum _Protos__ChaincodeSpec__Type {
  PROTOS__CHAINCODE_SPEC__TYPE__UNDEFINED = 0,
  PROTOS__CHAINCODE_SPEC__TYPE__GOLANG = 1,
  PROTOS__CHAINCODE_SPEC__TYPE__NODE = 2,
  PROTOS__CHAINCODE_SPEC__TYPE__CAR = 3,
  PROTOS__CHAINCODE_SPEC__TYPE__JAVA = 4
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PROTOS__CHAINCODE_SPEC__TYPE)
} Protos__ChaincodeSpec__Type;
typedef enum _Protos__ChaincodeDeploymentSpec__ExecutionEnvironment {
  PROTOS__CHAINCODE_DEPLOYMENT_SPEC__EXECUTION_ENVIRONMENT__DOCKER = 0,
  PROTOS__CHAINCODE_DEPLOYMENT_SPEC__EXECUTION_ENVIRONMENT__SYSTEM = 1
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PROTOS__CHAINCODE_DEPLOYMENT_SPEC__EXECUTION_ENVIRONMENT)
} Protos__ChaincodeDeploymentSpec__ExecutionEnvironment;
/*
 * Confidentiality Levels
 */
typedef enum _Protos__ConfidentialityLevel {
  PROTOS__CONFIDENTIALITY_LEVEL__PUBLIC = 0,
  PROTOS__CONFIDENTIALITY_LEVEL__CONFIDENTIAL = 1
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PROTOS__CONFIDENTIALITY_LEVEL)
} Protos__ConfidentialityLevel;

/* --- messages --- */

/*
 *ChaincodeID contains the path as specified by the deploy transaction
 *that created it as well as the hashCode that is generated by the
 *system for the path. From the user level (ie, CLI, REST API and so on)
 *deploy transaction is expected to provide the path and other requests
 *are expected to provide the hashCode. The other value will be ignored.
 *Internally, the structure could contain both values. For instance, the
 *hashCode will be set when first generated using the path
 */
struct  _Protos__ChaincodeID
{
  ProtobufCMessage base;
  /*
   *deploy transaction will use the path
   */
  char *path;
  /*
   *all other requests will use the name (really a hashcode) generated by
   *the deploy transaction
   */
  char *name;
  /*
   *user friendly version name for the chaincode
   */
  char *version;
};
#define PROTOS__CHAINCODE_ID__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&protos__chaincode_id__descriptor) \
    , NULL, NULL, NULL }


struct  _Protos__ChaincodeInput__DecorationsEntry
{
  ProtobufCMessage base;
  char *key;
  protobuf_c_boolean has_value;
  ProtobufCBinaryData value;
};
#define PROTOS__CHAINCODE_INPUT__DECORATIONS_ENTRY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&protos__chaincode_input__decorations_entry__descriptor) \
    , NULL, 0,{0,NULL} }


/*
 * Carries the chaincode function and its arguments.
 * UnmarshalJSON in transaction.go converts the string-based REST/JSON input to
 * the []byte-based current ChaincodeInput structure.
 */
struct  _Protos__ChaincodeInput
{
  ProtobufCMessage base;
  size_t n_args;
  ProtobufCBinaryData *args;
  size_t n_decorations;
  Protos__ChaincodeInput__DecorationsEntry **decorations;
};
#define PROTOS__CHAINCODE_INPUT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&protos__chaincode_input__descriptor) \
    , 0,NULL, 0,NULL }


/*
 * Carries the chaincode specification. This is the actual metadata required for
 * defining a chaincode.
 */
struct  _Protos__ChaincodeSpec
{
  ProtobufCMessage base;
  protobuf_c_boolean has_type;
  Protos__ChaincodeSpec__Type type;
  Protos__ChaincodeID *chaincode_id;
  Protos__ChaincodeInput *input;
  protobuf_c_boolean has_timeout;
  int32_t timeout;
};
#define PROTOS__CHAINCODE_SPEC__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&protos__chaincode_spec__descriptor) \
    , 0,0, NULL, NULL, 0,0 }


/*
 * Specify the deployment of a chaincode.
 * TODO: Define `codePackage`.
 */
struct  _Protos__ChaincodeDeploymentSpec
{
  ProtobufCMessage base;
  Protos__ChaincodeSpec *chaincode_spec;
  protobuf_c_boolean has_code_package;
  ProtobufCBinaryData code_package;
  protobuf_c_boolean has_exec_env;
  Protos__ChaincodeDeploymentSpec__ExecutionEnvironment exec_env;
};
#define PROTOS__CHAINCODE_DEPLOYMENT_SPEC__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&protos__chaincode_deployment_spec__descriptor) \
    , NULL, 0,{0,NULL}, 0,0 }


/*
 * Carries the chaincode function and its arguments.
 */
struct  _Protos__ChaincodeInvocationSpec
{
  ProtobufCMessage base;
  Protos__ChaincodeSpec *chaincode_spec;
};
#define PROTOS__CHAINCODE_INVOCATION_SPEC__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&protos__chaincode_invocation_spec__descriptor) \
    , NULL }


/*
 * LifecycleEvent is used as the payload of the chaincode event emitted by LSCC
 */
struct  _Protos__LifecycleEvent
{
  ProtobufCMessage base;
  char *chaincode_name;
};
#define PROTOS__LIFECYCLE_EVENT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&protos__lifecycle_event__descriptor) \
    , NULL }


/* Protos__ChaincodeID methods */
void   protos__chaincode_id__init
                     (Protos__ChaincodeID         *message);
size_t protos__chaincode_id__get_packed_size
                     (const Protos__ChaincodeID   *message);
size_t protos__chaincode_id__pack
                     (const Protos__ChaincodeID   *message,
                      uint8_t             *out);
size_t protos__chaincode_id__pack_to_buffer
                     (const Protos__ChaincodeID   *message,
                      ProtobufCBuffer     *buffer);
Protos__ChaincodeID *
       protos__chaincode_id__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   protos__chaincode_id__free_unpacked
                     (Protos__ChaincodeID *message,
                      ProtobufCAllocator *allocator);
/* Protos__ChaincodeInput__DecorationsEntry methods */
void   protos__chaincode_input__decorations_entry__init
                     (Protos__ChaincodeInput__DecorationsEntry         *message);
/* Protos__ChaincodeInput methods */
void   protos__chaincode_input__init
                     (Protos__ChaincodeInput         *message);
size_t protos__chaincode_input__get_packed_size
                     (const Protos__ChaincodeInput   *message);
size_t protos__chaincode_input__pack
                     (const Protos__ChaincodeInput   *message,
                      uint8_t             *out);
size_t protos__chaincode_input__pack_to_buffer
                     (const Protos__ChaincodeInput   *message,
                      ProtobufCBuffer     *buffer);
Protos__ChaincodeInput *
       protos__chaincode_input__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   protos__chaincode_input__free_unpacked
                     (Protos__ChaincodeInput *message,
                      ProtobufCAllocator *allocator);
/* Protos__ChaincodeSpec methods */
void   protos__chaincode_spec__init
                     (Protos__ChaincodeSpec         *message);
size_t protos__chaincode_spec__get_packed_size
                     (const Protos__ChaincodeSpec   *message);
size_t protos__chaincode_spec__pack
                     (const Protos__ChaincodeSpec   *message,
                      uint8_t             *out);
size_t protos__chaincode_spec__pack_to_buffer
                     (const Protos__ChaincodeSpec   *message,
                      ProtobufCBuffer     *buffer);
Protos__ChaincodeSpec *
       protos__chaincode_spec__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   protos__chaincode_spec__free_unpacked
                     (Protos__ChaincodeSpec *message,
                      ProtobufCAllocator *allocator);
/* Protos__ChaincodeDeploymentSpec methods */
void   protos__chaincode_deployment_spec__init
                     (Protos__ChaincodeDeploymentSpec         *message);
size_t protos__chaincode_deployment_spec__get_packed_size
                     (const Protos__ChaincodeDeploymentSpec   *message);
size_t protos__chaincode_deployment_spec__pack
                     (const Protos__ChaincodeDeploymentSpec   *message,
                      uint8_t             *out);
size_t protos__chaincode_deployment_spec__pack_to_buffer
                     (const Protos__ChaincodeDeploymentSpec   *message,
                      ProtobufCBuffer     *buffer);
Protos__ChaincodeDeploymentSpec *
       protos__chaincode_deployment_spec__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   protos__chaincode_deployment_spec__free_unpacked
                     (Protos__ChaincodeDeploymentSpec *message,
                      ProtobufCAllocator *allocator);
/* Protos__ChaincodeInvocationSpec methods */
void   protos__chaincode_invocation_spec__init
                     (Protos__ChaincodeInvocationSpec         *message);
size_t protos__chaincode_invocation_spec__get_packed_size
                     (const Protos__ChaincodeInvocationSpec   *message);
size_t protos__chaincode_invocation_spec__pack
                     (const Protos__ChaincodeInvocationSpec   *message,
                      uint8_t             *out);
size_t protos__chaincode_invocation_spec__pack_to_buffer
                     (const Protos__ChaincodeInvocationSpec   *message,
                      ProtobufCBuffer     *buffer);
Protos__ChaincodeInvocationSpec *
       protos__chaincode_invocation_spec__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   protos__chaincode_invocation_spec__free_unpacked
                     (Protos__ChaincodeInvocationSpec *message,
                      ProtobufCAllocator *allocator);
/* Protos__LifecycleEvent methods */
void   protos__lifecycle_event__init
                     (Protos__LifecycleEvent         *message);
size_t protos__lifecycle_event__get_packed_size
                     (const Protos__LifecycleEvent   *message);
size_t protos__lifecycle_event__pack
                     (const Protos__LifecycleEvent   *message,
                      uint8_t             *out);
size_t protos__lifecycle_event__pack_to_buffer
                     (const Protos__LifecycleEvent   *message,
                      ProtobufCBuffer     *buffer);
Protos__LifecycleEvent *
       protos__lifecycle_event__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   protos__lifecycle_event__free_unpacked
                     (Protos__LifecycleEvent *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Protos__ChaincodeID_Closure)
                 (const Protos__ChaincodeID *message,
                  void *closure_data);
typedef void (*Protos__ChaincodeInput__DecorationsEntry_Closure)
                 (const Protos__ChaincodeInput__DecorationsEntry *message,
                  void *closure_data);
typedef void (*Protos__ChaincodeInput_Closure)
                 (const Protos__ChaincodeInput *message,
                  void *closure_data);
typedef void (*Protos__ChaincodeSpec_Closure)
                 (const Protos__ChaincodeSpec *message,
                  void *closure_data);
typedef void (*Protos__ChaincodeDeploymentSpec_Closure)
                 (const Protos__ChaincodeDeploymentSpec *message,
                  void *closure_data);
typedef void (*Protos__ChaincodeInvocationSpec_Closure)
                 (const Protos__ChaincodeInvocationSpec *message,
                  void *closure_data);
typedef void (*Protos__LifecycleEvent_Closure)
                 (const Protos__LifecycleEvent *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCEnumDescriptor    protos__confidentiality_level__descriptor;
extern const ProtobufCMessageDescriptor protos__chaincode_id__descriptor;
extern const ProtobufCMessageDescriptor protos__chaincode_input__descriptor;
extern const ProtobufCMessageDescriptor protos__chaincode_input__decorations_entry__descriptor;
extern const ProtobufCMessageDescriptor protos__chaincode_spec__descriptor;
extern const ProtobufCEnumDescriptor    protos__chaincode_spec__type__descriptor;
extern const ProtobufCMessageDescriptor protos__chaincode_deployment_spec__descriptor;
extern const ProtobufCEnumDescriptor    protos__chaincode_deployment_spec__execution_environment__descriptor;
extern const ProtobufCMessageDescriptor protos__chaincode_invocation_spec__descriptor;
extern const ProtobufCMessageDescriptor protos__lifecycle_event__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_peer_2fchaincode_2eproto__INCLUDED */
