nilenso/protoclj — pull request #1 by gja (2014-04-26 00:11:40+00:00)
Title: Added working version of protege

Features:
1) Gives you a reified object which can (proto-get obj :key)
2) It handles nested protobuf correctly with the other API

Missing functionality
* Lists (repeated)
* Turn this into a map (though it's a 15 minute hack :-p)

The macro turns this:
```clojure
(defproto-readers heart-of-gold
->key-value-pair nilenso.heart_of_gold.protos.HeartOfGold$KeyValuePair
->generic nilenso.heart_of_gold.protos.HeartOfGold$GenericRequestInfo
->device nilenso.heart_of_gold.protos.HeartOfGold$DeviceIdentifiers
->staples nilenso.heart_of_gold.protos.HeartOfGold$StaplesIdentifiers
->get-email-promos nilenso.heart_of_gold.protos.HeartOfGold$GetEmailPromosRequest)
```

into this

```clojure
(do
(clojure.core/defn ->get-email-promos [this14055]
(clojure.core/reify
trillian.io.heart-of-gold/ProtosMap
(trillian.io.heart-of-gold/proto-get
[trillian.io.heart-of-gold/_ k__14008__auto__]
(clojure.core/case
k__14008__auto__
:field
(.getField this14055)
:campaign-id
(.getCampaignId this14055)
:template-id
(.getTemplateId this14055)
:device
(->device (.getDevice this14055))
:staples
(->staples (.getStaples this14055))
:customer
(.getCustomer this14055)
:generic
(->generic (.getGeneric this14055))
:merchant-id
(.getMerchantId this14055)
nil))
(trillian.io.heart-of-gold/proto-keys
[trillian.io.heart-of-gold/_]
[:field
:campaign-id
:template-id
:device
:staples
:customer
:generic
:merchant-id])))
(clojure.core/defn ->staples [this14056]
(clojure.core/reify
trillian.io.heart-of-gold/ProtosMap
(trillian.io.heart-of-gold/proto-get
[trillian.io.heart-of-gold/_ k__14008__auto__]
(clojure.core/case
k__14008__auto__
:field
(.getField this14056)
:level3-id
(.getLevel3Id this14056)
:level4-id
(.getLevel4Id this14056)
:level5-id
(.getLevel5Id this14056)
:visitor-id
(.getVisitorId this14056)
:customer-id
(.getCustomerId this14056)
:session-id
(.getSessionId this14056)
nil))
(trillian.io.heart-of-gold/proto-keys
[trillian.io.heart-of-gold/_]
[:field
:level3-id
:level4-id
:level5-id
:visitor-id
:customer-id
:session-id])))
(clojure.core/defn ->device [this14057]
(clojure.core/reify
trillian.io.heart-of-gold/ProtosMap
(trillian.io.heart-of-gold/proto-get
[trillian.io.heart-of-gold/_ k__14008__auto__]
(clojure.core/case
k__14008__auto__
:field
(.getField this14057)
:browser-user-agent
(.getBrowserUserAgent this14057)
:runa-device-tracker-id
(.getRunaDeviceTrackerId this14057)
:ip-address
(.getIpAddress this14057)
nil))
(trillian.io.heart-of-gold/proto-keys
[trillian.io.heart-of-gold/_]
[:field
:browser-user-agent
:runa-device-tracker-id
:ip-address])))
(clojure.core/defn ->generic [this14058]
(clojure.core/reify
trillian.io.heart-of-gold/ProtosMap
(trillian.io.heart-of-gold/proto-get
[trillian.io.heart-of-gold/_ k__14008__auto__]
(clojure.core/case
k__14008__auto__
:field
(.getField this14058)
:client-request-id
(.getClientRequestId this14058)
:api-version
(.getApiVersion this14058)
nil))
(trillian.io.heart-of-gold/proto-keys
[trillian.io.heart-of-gold/_]
[:field :client-request-id :api-version])))
(clojure.core/defn ->key-value-pair [this14059]
(clojure.core/reify
trillian.io.heart-of-gold/ProtosMap
(trillian.io.heart-of-gold/proto-get
[trillian.io.heart-of-gold/_ k__14008__auto__]
(clojure.core/case
k__14008__auto__
:field
(.getField this14059)
:key
(.getKey this14059)
:value
(.getValue this14059)
nil))
(trillian.io.heart-of-gold/proto-keys
[trillian.io.heart-of-gold/_]
[:field :key :value]))))
```