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

#ifndef PROTOBUF_C_remote_2eproto__INCLUDED
#define PROTOBUF_C_remote_2eproto__INCLUDED

#include <prometheus_remote_write/protobuf-c.h>

PROTOBUF_C__BEGIN_DECLS

#if PROTOBUF_C_VERSION_NUMBER < 1003000
# 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 1003003 < 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 "types.pb-c.h"
// #include "gogoproto/gogo.pb-c.h"

typedef struct _Prometheus__WriteRequest Prometheus__WriteRequest;
typedef struct _Prometheus__ReadRequest Prometheus__ReadRequest;
typedef struct _Prometheus__ReadResponse Prometheus__ReadResponse;
typedef struct _Prometheus__Query Prometheus__Query;
typedef struct _Prometheus__QueryResult Prometheus__QueryResult;
typedef struct _Prometheus__ChunkedReadResponse Prometheus__ChunkedReadResponse;


/* --- enums --- */

typedef enum _Prometheus__ReadRequest__ResponseType {
  /*
   * Server will return a single ReadResponse message with matched series that includes list of raw samples.
   * It's recommended to use streamed response types instead.
   * Response headers:
   * Content-Type: "application/x-protobuf"
   * Content-Encoding: "snappy"
   */
  PROMETHEUS__READ_REQUEST__RESPONSE_TYPE__SAMPLES = 0,
  /*
   * Server will stream a delimited ChunkedReadResponse message that contains XOR encoded chunks for a single series.
   * Each message is following varint size and fixed size bigendian uint32 for CRC32 Castagnoli checksum.
   * Response headers:
   * Content-Type: "application/x-streamed-protobuf; proto=prometheus.ChunkedReadResponse"
   * Content-Encoding: ""
   */
  PROMETHEUS__READ_REQUEST__RESPONSE_TYPE__STREAMED_XOR_CHUNKS = 1
    PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(PROMETHEUS__READ_REQUEST__RESPONSE_TYPE)
} Prometheus__ReadRequest__ResponseType;

/* --- messages --- */

struct  _Prometheus__WriteRequest
{
  ProtobufCMessage base;
  size_t n_timeseries;
  Prometheus__TimeSeries **timeseries;
  size_t n_metadata;
  Prometheus__MetricMetadata **metadata;
};
#define PROMETHEUS__WRITE_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__write_request__descriptor) \
    , 0,NULL, 0,NULL }


/*
 * ReadRequest represents a remote read request.
 */
struct  _Prometheus__ReadRequest
{
  ProtobufCMessage base;
  size_t n_queries;
  Prometheus__Query **queries;
  /*
   * accepted_response_types allows negotiating the content type of the response.
   * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
   * implemented by server, error is returned.
   * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
   */
  size_t n_accepted_response_types;
  Prometheus__ReadRequest__ResponseType *accepted_response_types;
};
#define PROMETHEUS__READ_REQUEST__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__read_request__descriptor) \
    , 0,NULL, 0,NULL }


/*
 * ReadResponse is a response when response_type equals SAMPLES.
 */
struct  _Prometheus__ReadResponse
{
  ProtobufCMessage base;
  /*
   * In same order as the request's queries.
   */
  size_t n_results;
  Prometheus__QueryResult **results;
};
#define PROMETHEUS__READ_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__read_response__descriptor) \
    , 0,NULL }


struct  _Prometheus__Query
{
  ProtobufCMessage base;
  int64_t start_timestamp_ms;
  int64_t end_timestamp_ms;
  size_t n_matchers;
  Prometheus__LabelMatcher **matchers;
  Prometheus__ReadHints *hints;
};
#define PROMETHEUS__QUERY__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__query__descriptor) \
    , 0, 0, 0,NULL, NULL }


struct  _Prometheus__QueryResult
{
  ProtobufCMessage base;
  /*
   * Samples within a time series must be ordered by time.
   */
  size_t n_timeseries;
  Prometheus__TimeSeries **timeseries;
};
#define PROMETHEUS__QUERY_RESULT__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__query_result__descriptor) \
    , 0,NULL }


/*
 * ChunkedReadResponse is a response when response_type equals STREAMED_XOR_CHUNKS.
 * We strictly stream full series after series, optionally split by time. This means that a single frame can contain
 * partition of the single series, but once a new series is started to be streamed it means that no more chunks will
 * be sent for previous one. Series are returned sorted in the same way TSDB block are internally.
 */
struct  _Prometheus__ChunkedReadResponse
{
  ProtobufCMessage base;
  size_t n_chunked_series;
  Prometheus__ChunkedSeries **chunked_series;
  /*
   * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
   */
  int64_t query_index;
};
#define PROMETHEUS__CHUNKED_READ_RESPONSE__INIT \
 { PROTOBUF_C_MESSAGE_INIT (&prometheus__chunked_read_response__descriptor) \
    , 0,NULL, 0 }


/* Prometheus__WriteRequest methods */
void   prometheus__write_request__init
                     (Prometheus__WriteRequest         *message);
size_t prometheus__write_request__get_packed_size
                     (const Prometheus__WriteRequest   *message);
size_t prometheus__write_request__pack
                     (const Prometheus__WriteRequest   *message,
                      uint8_t             *out);
size_t prometheus__write_request__pack_to_buffer
                     (const Prometheus__WriteRequest   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__WriteRequest *
       prometheus__write_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__write_request__free_unpacked
                     (Prometheus__WriteRequest *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__ReadRequest methods */
void   prometheus__read_request__init
                     (Prometheus__ReadRequest         *message);
size_t prometheus__read_request__get_packed_size
                     (const Prometheus__ReadRequest   *message);
size_t prometheus__read_request__pack
                     (const Prometheus__ReadRequest   *message,
                      uint8_t             *out);
size_t prometheus__read_request__pack_to_buffer
                     (const Prometheus__ReadRequest   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__ReadRequest *
       prometheus__read_request__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__read_request__free_unpacked
                     (Prometheus__ReadRequest *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__ReadResponse methods */
void   prometheus__read_response__init
                     (Prometheus__ReadResponse         *message);
size_t prometheus__read_response__get_packed_size
                     (const Prometheus__ReadResponse   *message);
size_t prometheus__read_response__pack
                     (const Prometheus__ReadResponse   *message,
                      uint8_t             *out);
size_t prometheus__read_response__pack_to_buffer
                     (const Prometheus__ReadResponse   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__ReadResponse *
       prometheus__read_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__read_response__free_unpacked
                     (Prometheus__ReadResponse *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__Query methods */
void   prometheus__query__init
                     (Prometheus__Query         *message);
size_t prometheus__query__get_packed_size
                     (const Prometheus__Query   *message);
size_t prometheus__query__pack
                     (const Prometheus__Query   *message,
                      uint8_t             *out);
size_t prometheus__query__pack_to_buffer
                     (const Prometheus__Query   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__Query *
       prometheus__query__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__query__free_unpacked
                     (Prometheus__Query *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__QueryResult methods */
void   prometheus__query_result__init
                     (Prometheus__QueryResult         *message);
size_t prometheus__query_result__get_packed_size
                     (const Prometheus__QueryResult   *message);
size_t prometheus__query_result__pack
                     (const Prometheus__QueryResult   *message,
                      uint8_t             *out);
size_t prometheus__query_result__pack_to_buffer
                     (const Prometheus__QueryResult   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__QueryResult *
       prometheus__query_result__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__query_result__free_unpacked
                     (Prometheus__QueryResult *message,
                      ProtobufCAllocator *allocator);
/* Prometheus__ChunkedReadResponse methods */
void   prometheus__chunked_read_response__init
                     (Prometheus__ChunkedReadResponse         *message);
size_t prometheus__chunked_read_response__get_packed_size
                     (const Prometheus__ChunkedReadResponse   *message);
size_t prometheus__chunked_read_response__pack
                     (const Prometheus__ChunkedReadResponse   *message,
                      uint8_t             *out);
size_t prometheus__chunked_read_response__pack_to_buffer
                     (const Prometheus__ChunkedReadResponse   *message,
                      ProtobufCBuffer     *buffer);
Prometheus__ChunkedReadResponse *
       prometheus__chunked_read_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data);
void   prometheus__chunked_read_response__free_unpacked
                     (Prometheus__ChunkedReadResponse *message,
                      ProtobufCAllocator *allocator);
/* --- per-message closures --- */

typedef void (*Prometheus__WriteRequest_Closure)
                 (const Prometheus__WriteRequest *message,
                  void *closure_data);
typedef void (*Prometheus__ReadRequest_Closure)
                 (const Prometheus__ReadRequest *message,
                  void *closure_data);
typedef void (*Prometheus__ReadResponse_Closure)
                 (const Prometheus__ReadResponse *message,
                  void *closure_data);
typedef void (*Prometheus__Query_Closure)
                 (const Prometheus__Query *message,
                  void *closure_data);
typedef void (*Prometheus__QueryResult_Closure)
                 (const Prometheus__QueryResult *message,
                  void *closure_data);
typedef void (*Prometheus__ChunkedReadResponse_Closure)
                 (const Prometheus__ChunkedReadResponse *message,
                  void *closure_data);

/* --- services --- */


/* --- descriptors --- */

extern const ProtobufCMessageDescriptor prometheus__write_request__descriptor;
extern const ProtobufCMessageDescriptor prometheus__read_request__descriptor;
extern const ProtobufCEnumDescriptor    prometheus__read_request__response_type__descriptor;
extern const ProtobufCMessageDescriptor prometheus__read_response__descriptor;
extern const ProtobufCMessageDescriptor prometheus__query__descriptor;
extern const ProtobufCMessageDescriptor prometheus__query_result__descriptor;
extern const ProtobufCMessageDescriptor prometheus__chunked_read_response__descriptor;

PROTOBUF_C__END_DECLS


#endif  /* PROTOBUF_C_remote_2eproto__INCLUDED */
