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

#ifndef PROTOBUF_C_ledger_2fqueryresult_2fkv_5fquery_5fresult_2eproto__INCLUDED
#define PROTOBUF_C_ledger_2fqueryresult_2fkv_5fquery_5fresult_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 "google/protobuf/timestamp.pb-c.h"

typedef struct _Queryresult__KV Queryresult__KV;
typedef struct _Queryresult__KeyModification Queryresult__KeyModification;


/* --- enums --- */


/* --- messages --- */

/*
 * KV -- QueryResult for range/execute query. Holds a key and corresponding value.
 */
struct  _Queryresult__KV
{
  ProtobufCMessage base;
  char *namespace_;
  char *key;
  protobuf_c_boolean has_value;
  ProtobufCBinaryData value;
};
#define QUERYRESULT__KV__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&queryresult__kv__descriptor) \
    , NULL, NULL, 0,{0,NULL} }


/*
 * KeyModification -- QueryResult for history query. Holds a transaction ID, value,
 * timestamp, and delete marker which resulted from a history query.
 */
struct  _Queryresult__KeyModification
{
  ProtobufCMessage base;
  char *tx_id;
  protobuf_c_boolean has_value;
  ProtobufCBinaryData value;
  Google__Protobuf__Timestamp *timestamp;
  protobuf_c_boolean has_is_delete;
  protobuf_c_boolean is_delete;
};
#define QUERYRESULT__KEY_MODIFICATION__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&queryresult__key_modification__descriptor) \
    , NULL, 0,{0,NULL}, NULL, 0,0 }


/* Queryresult__KV methods */
void   queryresult__kv__init
                     (Queryresult__KV         *message);
size_t queryresult__kv__get_packed_size
                     (const Queryresult__KV   *message);
size_t queryresult__kv__pack
                     (const Queryresult__KV   *message,
                      uint8_t             *out);
size_t queryresult__kv__pack_to_buffer
                     (const Queryresult__KV   *message,
                      ProtobufCBuffer     *buffer);
Queryresult__KV *
       queryresult__kv__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   queryresult__kv__free_unpacked
                     (Queryresult__KV *message,
                      ProtobufCAllocator *allocator);
/* Queryresult__KeyModification methods */
void   queryresult__key_modification__init
                     (Queryresult__KeyModification         *message);
size_t queryresult__key_modification__get_packed_size
                     (const Queryresult__KeyModification   *message);
size_t queryresult__key_modification__pack
                     (const Queryresult__KeyModification   *message,
                      uint8_t             *out);
size_t queryresult__key_modification__pack_to_buffer
                     (const Queryresult__KeyModification   *message,
                      ProtobufCBuffer     *buffer);
Queryresult__KeyModification *
       queryresult__key_modification__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   queryresult__key_modification__free_unpacked
                     (Queryresult__KeyModification *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Queryresult__KV_Closure)
                 (const Queryresult__KV *message,
                  void *closure_data);
typedef void (*Queryresult__KeyModification_Closure)
                 (const Queryresult__KeyModification *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor queryresult__kv__descriptor;
extern const ProtobufCMessageDescriptor queryresult__key_modification__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_ledger_2fqueryresult_2fkv_5fquery_5fresult_2eproto__INCLUDED */
