/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.9.1 */

#ifndef PB_SNS_CLIENT_BATCH_PB_H_INCLUDED
#define PB_SNS_CLIENT_BATCH_PB_H_INCLUDED
#include <pb.h>
#include "sns_std_type.pb.h"

#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif

/* Enum definitions */
/* @brief Message IDs for Client Batch Sensor. */
typedef enum _sns_client_batch_msgid {
    /* @brief Message ID for configuring and activating the sensor. */
    SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_CONFIG = 122,
    /* @brief Message ID of events generated by the sensor. */
    SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_EVENT = 259,
    /* @brief Message ID of the event generated at the end of every batch. */
    SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_COMPLETE_EVENT = 260
} sns_client_batch_msgid;

/* Struct definitions */
/* @brief Client Batch Sensor will start storing all events
 specified through batch_msg_ids coming from requested SUID. */
typedef struct _sns_client_batch_config {
    /* @brief UID of the Sensor to be logged. */
    bool has_suid;
    sns_std_suid suid;
    /* @brief Island batching mode (default is false).
 When false (default), Client Batch Sensor will use main memory batching.
 When true, Client Batch Sensor will use island (low-power) batching mode. */
    bool has_island_batching_mode;
    bool island_batching_mode;
    /* @brief Msg Ids of the underlying sensor to be batched.
 All other events will be dropped. */
    pb_size_t batch_msg_ids_count;
    uint32_t batch_msg_ids[10];
} sns_client_batch_config;

/* @brief Client Batch Event
 Used to publish stored Events for the requested SUID. */
typedef struct _sns_client_batch_event {
    /* @brief UTC Time in seconds (since 1/1/1970 00:00:00). */
    bool has_utc_time;
    uint64_t utc_time;
    /* @brief Time Zone in seconds. */
    bool has_time_zone;
    int32_t time_zone;
    /* @brief Message ID of the event. */
    bool has_msg_id;
    uint32_t msg_id;
    /* @brief The event as binary payload.
  See specific proto file for definition of the event. */
    pb_callback_t event_payload;
} sns_client_batch_event;

/* @brief client batch complete event
 Associated message ID : SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_COMPLETE_EVENT
 Client Batch sensor will append this batch complete event at the end of every batch. */
typedef struct _sns_client_batch_complete { /* empty message */
    char dummy_field;
} sns_client_batch_complete;


#ifdef __cplusplus
extern "C" {
#endif

/* Helper constants for enums */
#define _sns_client_batch_msgid_MIN SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_CONFIG
#define _sns_client_batch_msgid_MAX SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_COMPLETE_EVENT
#define _sns_client_batch_msgid_ARRAYSIZE ((sns_client_batch_msgid)(SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_COMPLETE_EVENT+1))
#define sns_client_batch_msgid_SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_CONFIG SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_CONFIG
#define sns_client_batch_msgid_SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_EVENT SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_EVENT
#define sns_client_batch_msgid_SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_COMPLETE_EVENT SNS_CLIENT_BATCH_MSGID_SNS_CLIENT_BATCH_COMPLETE_EVENT





/* Initializer values for message structs */
#define sns_client_batch_config_init_default     {false, sns_std_suid_init_default, false, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
#define sns_client_batch_event_init_default      {false, 0, false, 0, false, 0, {{NULL}, NULL}}
#define sns_client_batch_complete_init_default   {0}
#define sns_client_batch_config_init_zero        {false, sns_std_suid_init_zero, false, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}
#define sns_client_batch_event_init_zero         {false, 0, false, 0, false, 0, {{NULL}, NULL}}
#define sns_client_batch_complete_init_zero      {0}

/* Field tags (for use in manual encoding/decoding) */
#define sns_client_batch_config_suid_tag         1
#define sns_client_batch_config_island_batching_mode_tag 2
#define sns_client_batch_config_batch_msg_ids_tag 3
#define sns_client_batch_event_utc_time_tag      1
#define sns_client_batch_event_time_zone_tag     2
#define sns_client_batch_event_msg_id_tag        3
#define sns_client_batch_event_event_payload_tag 4

/* Struct field encoding specification for nanopb */
#define sns_client_batch_config_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, MESSAGE,  suid,              1) \
X(a, STATIC,   OPTIONAL, BOOL,     island_batching_mode,   2) \
X(a, STATIC,   REPEATED, UINT32,   batch_msg_ids,     3)
#define sns_client_batch_config_CALLBACK NULL
#define sns_client_batch_config_DEFAULT NULL
#define sns_client_batch_config_suid_MSGTYPE sns_std_suid

#define sns_client_batch_event_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, UINT64,   utc_time,          1) \
X(a, STATIC,   OPTIONAL, SINT32,   time_zone,         2) \
X(a, STATIC,   OPTIONAL, UINT32,   msg_id,            3) \
X(a, CALLBACK, REPEATED, BYTES,    event_payload,     4)
#define sns_client_batch_event_CALLBACK pb_default_field_callback
#define sns_client_batch_event_DEFAULT NULL

#define sns_client_batch_complete_FIELDLIST(X, a) \

#define sns_client_batch_complete_CALLBACK NULL
#define sns_client_batch_complete_DEFAULT NULL

extern const pb_msgdesc_t sns_client_batch_config_msg;
extern const pb_msgdesc_t sns_client_batch_event_msg;
extern const pb_msgdesc_t sns_client_batch_complete_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define sns_client_batch_config_fields &sns_client_batch_config_msg
#define sns_client_batch_event_fields &sns_client_batch_event_msg
#define sns_client_batch_complete_fields &sns_client_batch_complete_msg

/* Maximum encoded size of messages (where known) */
/* sns_client_batch_event_size depends on runtime parameters */
#define SNS_CLIENT_BATCH_PB_H_MAX_SIZE           sns_client_batch_config_size
#define sns_client_batch_complete_size           0
#define sns_client_batch_config_size             82

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif
