;;; type.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.GOOGLE.PROTOBUF")
    (cl:defpackage "CL-PROTOBUFS.GOOGLE.PROTOBUF" (:use)
                   (:local-nicknames (#:pi #:cl-protobufs.implementation)))))

(cl:in-package "CL-PROTOBUFS.GOOGLE.PROTOBUF")

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

     :package "google.protobuf"))
     ;;:import '("any.proto"
     ;;         "source_context.proto")


;;; Top-Level enums

(pi:define-enum syntax
    ()
  (:syntax-proto2 :index 0)
  (:syntax-proto3 :index 1))

;;; Top-Level messages

(pi:define-message type
    ()
  ;; Fields
  (name
   :index 1 :type cl:string :kind :scalar :label (:optional) :json-name "name")
  (fields
   :index 2 :type field :kind :message :label (:repeated :list) :json-name "fields")
  (oneofs
   :index 3 :type cl:string :kind :scalar :label (:repeated :list) :json-name "oneofs")
  (options
   :index 4 :type option :kind :message :label (:repeated :list) :json-name "options")
  (source-context
   :index 5 :type cl-protobufs.google.protobuf::source-context :kind :message :label (:optional) :json-name "sourceContext")
  (syntax
   :index 6 :type syntax :kind :enum :label (:optional) :json-name "syntax" :default :syntax-proto2))

(pi:define-message field
    ()
  ;; Nested enums

  (pi:define-enum field.kind
      ()
    (:type-unknown :index 0)
    (:type-double :index 1)
    (:type-float :index 2)
    (:type-int64 :index 3)
    (:type-uint64 :index 4)
    (:type-int32 :index 5)
    (:type-fixed64 :index 6)
    (:type-fixed32 :index 7)
    (:type-bool :index 8)
    (:type-string :index 9)
    (:type-group :index 10)
    (:type-message :index 11)
    (:type-bytes :index 12)
    (:type-uint32 :index 13)
    (:type-enum :index 14)
    (:type-sfixed32 :index 15)
    (:type-sfixed64 :index 16)
    (:type-sint32 :index 17)
    (:type-sint64 :index 18))

  (pi:define-enum field.cardinality
      ()
    (:cardinality-unknown :index 0)
    (:cardinality-optional :index 1)
    (:cardinality-required :index 2)
    (:cardinality-repeated :index 3))
  ;; Fields
  (kind
   :index 1 :type field.kind :kind :enum :label (:optional) :json-name "kind" :default :type-unknown)
  (cardinality
   :index 2 :type field.cardinality :kind :enum :label (:optional) :json-name "cardinality" :default :cardinality-unknown)
  (number
   :index 3 :type cl-protobufs:int32 :kind :scalar :label (:optional) :json-name "number")
  (name
   :index 4 :type cl:string :kind :scalar :label (:optional) :json-name "name")
  (type-url
   :index 6 :type cl:string :kind :scalar :label (:optional) :json-name "typeUrl")
  (oneof-index
   :index 7 :type cl-protobufs:int32 :kind :scalar :label (:optional) :json-name "oneofIndex")
  (packed
   :index 8 :type cl:boolean :kind :scalar :label (:optional) :json-name "packed")
  (options
   :index 9 :type option :kind :message :label (:repeated :list) :json-name "options")
  (json-name
   :index 10 :type cl:string :kind :scalar :label (:optional) :json-name "jsonName")
  (default-value
   :index 11 :type cl:string :kind :scalar :label (:optional) :json-name "defaultValue"))

(pi:define-message enum
    ()
  ;; Fields
  (name
   :index 1 :type cl:string :kind :scalar :label (:optional) :json-name "name")
  (enumvalue
   :index 2 :type enum-value :kind :message :label (:repeated :list) :json-name "enumvalue")
  (options
   :index 3 :type option :kind :message :label (:repeated :list) :json-name "options")
  (source-context
   :index 4 :type cl-protobufs.google.protobuf::source-context :kind :message :label (:optional) :json-name "sourceContext")
  (syntax
   :index 5 :type syntax :kind :enum :label (:optional) :json-name "syntax" :default :syntax-proto2))

(pi:define-message enum-value
    ()
  ;; Fields
  (name
   :index 1 :type cl:string :kind :scalar :label (:optional) :json-name "name")
  (number
   :index 2 :type cl-protobufs:int32 :kind :scalar :label (:optional) :json-name "number")
  (options
   :index 3 :type option :kind :message :label (:repeated :list) :json-name "options"))

(pi:define-message option
    ()
  ;; Fields
  (name
   :index 1 :type cl:string :kind :scalar :label (:optional) :json-name "name")
  (value
   :index 2 :type cl-protobufs.google.protobuf::any :kind :message :label (:optional) :json-name "value"))


(cl:export '(cardinality
             default-value
             enum
             enum-value
             enumvalue
             field
             field.cardinality
             field.cardinality-int-to-keyword
             field.cardinality-keyword-to-int
             field.kind
             field.kind-int-to-keyword
             field.kind-keyword-to-int
             fields
             json-name
             kind
             name
             number
             oneof-index
             oneofs
             option
             options
             packed
             source-context
             syntax
             syntax-int-to-keyword
             syntax-keyword-to-int
             type
             type-url
             value))
