;;; meshtastic/storeforward.proto.lisp
;;;
;;; Generated by the protocol buffer compiler. DO NOT EDIT!

(cl:in-package #:common-lisp-user)

#+sbcl
(cl:progn
 (cl:eval-when (:compile-toplevel) (sb-ext:restrict-compiler-policy 'cl:debug 0 1))
 (cl:declaim (cl:optimize (sb-c:store-coverage-data 0))))

(cl:eval-when (:compile-toplevel :load-toplevel :execute)
  (cl:unless (cl:find-package "CL-PROTOBUFS.MESHTASTIC")
    (cl:defpackage "CL-PROTOBUFS.MESHTASTIC" (:use)
                   (:local-nicknames (#:pi #:cl-protobufs.implementation)))))

(cl:in-package "CL-PROTOBUFS.MESHTASTIC")

(cl:eval-when (:compile-toplevel :load-toplevel :execute)
(pi:define-schema 'storeforward
    :syntax :proto3

     :package "meshtastic")
)


;;; Top-Level messages

(pi:define-message store-and-forward
    ()
  ;; Nested enums

  (pi:define-enum store-and-forward.request-response
      ()
    (:unset :index 0)
    (:router-error :index 1)
    (:router-heartbeat :index 2)
    (:router-ping :index 3)
    (:router-pong :index 4)
    (:router-busy :index 5)
    (:router-history :index 6)
    (:router-stats :index 7)
    (:client-error :index 64)
    (:client-history :index 65)
    (:client-stats :index 66)
    (:client-ping :index 67)
    (:client-pong :index 68)
    (:client-abort :index 106))
  ;; Nested messages

  (pi:define-message store-and-forward.statistics
      ()
    ;; Fields
    (messages-total
     :index 1 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "messagesTotal")
    (messages-saved
     :index 2 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "messagesSaved")
    (messages-max
     :index 3 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "messagesMax")
    (up-time
     :index 4 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "upTime")
    (requests
     :index 5 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "requests")
    (requests-history
     :index 6 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "requestsHistory")
    (heartbeat
     :index 7 :type cl:boolean :kind :scalar :label (:optional) :json-name "heartbeat")
    (return-max
     :index 8 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "returnMax")
    (return-window
     :index 9 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "returnWindow"))

  (pi:define-message store-and-forward.history
      ()
    ;; Fields
    (history-messages
     :index 1 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "historyMessages")
    (window
     :index 2 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "window")
    (last-request
     :index 3 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "lastRequest"))

  (pi:define-message store-and-forward.heartbeat
      ()
    ;; Fields
    (period
     :index 1 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "period")
    (secondary
     :index 2 :type cl-protobufs:uint32 :kind :scalar :label (:optional) :json-name "secondary"))
  ;; Fields
  (pi:define-oneof variant ()
    (stats
     :index 2 :type store-and-forward.statistics :kind :message :label (:optional) :json-name "stats")
    (history
     :index 3 :type store-and-forward.history :kind :message :label (:optional) :json-name "history")
    (heartbeat
     :index 4 :type store-and-forward.heartbeat :kind :message :label (:optional) :json-name "heartbeat")
    (empty
     :index 5 :type cl:boolean :kind :scalar :label (:optional) :json-name "empty"))
  (rr
   :index 1 :type store-and-forward.request-response :kind :enum :label (:optional) :json-name "rr" :default :unset))

(cl:export '(empty
             heartbeat
             history
             history-messages
             last-request
             messages-max
             messages-saved
             messages-total
             period
             requests
             requests-history
             return-max
             return-window
             rr
             secondary
             stats
             store-and-forward
             store-and-forward.heartbeat
             store-and-forward.history
             store-and-forward.request-response
             store-and-forward.request-response-int-to-keyword
             store-and-forward.request-response-keyword-to-int
             store-and-forward.statistics
             storeforward
             up-time
             window))
