Bryan O'Sullivan avatar Bryan O'Sullivan committed c967623

Initial commit

Comments (0)

Files changed (33)

+^dist$
+^tests/benchmarks/.*\.txt$
+^tests/(?:\.hpc|bm|qc|qc-hpc|stdio-hpc|text/test)$
+\.(?:aux|eventlog|h[ip]|log|[oa]|orig|prof|ps|rej|swp)$
+~$
+syntax: glob
+.\#*
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+import Distribution.Simple
+main = defaultMain
+name:                riak
+version:             0.0.0.0
+synopsis:            Haskell Client for Riak
+description:
+  A Haskell client library for the Riak decentralized data
+  store.
+homepage:            http://github.com/mailrank/riak-haskell-client
+license:             OtherLicense
+license-file:        LICENSE
+author:              Bryan O'Sullivan <bos@mailrank.com>
+maintainer:          Bryan O'Sullivan <bos@mailrank.com>
+copyright:           Copyright 2011 MailRank, Inc.
+                     Portions copyright 2007-2010 Basho Technologies, Inc.
+category:            Network
+build-type:          Simple
+extra-source-files:
+  README.md src/riakclient.proto
+cabal-version:       >=1.8
+
+library
+  hs-source-dirs: src
+
+  exposed-modules:     
+    Network.Riak
+
+  other-modules:       
+    Network.Riak.Message.Code
+    Network.Riak.Message
+    Network.Riak.Socket
+    Network.Riak.Types
+    Network.Riakclient
+    Network.Riakclient.RpbBucketProps
+    Network.Riakclient.RpbContent
+    Network.Riakclient.RpbDelReq
+    Network.Riakclient.RpbErrorResp
+    Network.Riakclient.RpbGetBucketReq
+    Network.Riakclient.RpbGetBucketResp
+    Network.Riakclient.RpbGetClientIdResp
+    Network.Riakclient.RpbGetReq
+    Network.Riakclient.RpbGetResp
+    Network.Riakclient.RpbGetServerInfoResp
+    Network.Riakclient.RpbLink
+    Network.Riakclient.RpbListBucketsResp
+    Network.Riakclient.RpbListKeysReq
+    Network.Riakclient.RpbListKeysResp
+    Network.Riakclient.RpbMapRedReq
+    Network.Riakclient.RpbMapRedResp
+    Network.Riakclient.RpbPair
+    Network.Riakclient.RpbPutReq
+    Network.Riakclient.RpbPutResp
+    Network.Riakclient.RpbSetBucketReq
+    Network.Riakclient.RpbSetClientIdReq
+  
+  build-depends:       
+    base >= 4,
+    binary,
+    bytestring,
+    containers,
+    network >= 2.3,
+    protocol-buffers >= 1.8.0,
+    protocol-buffers-descriptor >= 1.8.1,
+    random
+  
+  -- needed for the code generated by hprotoc
+  extensions:
+    DeriveDataTypeable FlexibleInstances MultiParamTypeClasses
+
+  -- gather extensive profiling data for now
+  ghc-prof-options: -auto-all
+
+source-repository head
+  type:     git
+  location: http://github.com/mailrank/riak-haskell-client

src/Network/Riak.hs

+{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
+
+module Network.Riak
+    (
+      ClientID
+    , Client(..)
+    , Connection(connClient)
+    , Network.Riak.connect
+    , defaultClient
+    , makeClientID
+    , ping
+    , get
+    ) where
+
+import qualified Data.ByteString.Char8 as B
+import Data.Binary hiding (get)
+import Data.Binary.Put
+import Network.Socket.ByteString.Lazy as L
+import Network.Socket as Socket
+import qualified Data.ByteString.Lazy.Char8 as L
+import Numeric (showHex)
+import System.Random
+import qualified Network.Riak.Message.Code as Code
+import Network.Riakclient.RpbGetReq as GetReq
+import Network.Riakclient.RpbGetResp
+import Network.Riakclient.RpbSetClientIdReq
+import Network.Riak.Message
+import Network.Riak.Types as T
+import Text.ProtocolBuffers
+import Data.IORef
+
+defaultClient :: Client
+defaultClient = Client {
+                  riakHost = "127.0.0.1"
+                , riakPort = "8087"
+                , riakPrefix = "riak"
+                , riakMapReducePrefix = "mapred"
+                , riakClientID = L.empty
+                }
+
+makeClientID :: IO ClientID
+makeClientID = do
+  r <- randomIO :: IO Int
+  return . L.append "hs_" . L.pack . showHex (abs r) $ ""
+
+addClientID :: Client -> IO Client
+addClientID client
+  | L.null (riakClientID client) = do
+    i <- makeClientID
+    return client { riakClientID = i }
+  | otherwise = return client
+
+connect :: Client -> IO Connection
+connect cli0 = do
+  client@Client{..} <- addClientID cli0
+  let hints = defaultHints
+  (ai:_) <- getAddrInfo (Just hints) (Just riakHost) (Just riakPort)
+  sock <- socket (addrFamily ai) (addrSocketType ai) (addrProtocol ai)
+  Socket.connect sock (addrAddress ai)
+  buf <- newIORef L.empty
+  let conn = Connection sock client buf
+  setClientID conn riakClientID
+  return conn
+
+ping :: Connection -> IO ()
+ping conn@Connection{..} = do
+  L.sendAll connSock $ runPut putPingReq
+  _ <- recvResponse conn
+  return ()
+
+get :: Connection -> T.Bucket -> T.Key -> Maybe Int -> IO (Maybe RpbGetResp)
+get conn@Connection{..} bucket key r = do
+  let req = RpbGetReq { bucket = bucket, key = key, r = fromIntegral `fmap` r }
+  sendRequest conn req
+  resp <- recvResponse conn
+  case resp of
+    Left msg | msg == Code.getResp -> return Nothing
+    Right (GetResponse r) -> return (Just r)
+    _             -> fail $  "get: invalid response" ++ show r
+
+setClientID :: Connection -> ClientID -> IO ()
+setClientID conn id = do
+  let req = RpbSetClientIdReq { client_id = id }
+  sendRequest conn req
+  _ <- recvResponse conn
+  return ()

src/Network/Riak/Client.hs

+module Network.Riak.Client
+    (
+     )

src/Network/Riak/Message.hs

+{-# LANGUAGE RecordWildCards #-}
+
+module Network.Riak.Message
+    (
+      Response(..)
+    , getResponse
+    , putPingReq
+    , recvResponse_
+    , recvResponse
+    , sendRequest
+    ) where
+
+import Data.Binary hiding (Get)
+import Data.Binary.Put
+import Data.ByteString.Lazy as L
+import Data.IntMap as Map
+import Network.Socket
+import Network.Riak.Socket
+import Network.Riak.Types
+import Network.Riak.Message.Code
+import Text.ProtocolBuffers as PB
+import Text.ProtocolBuffers.Get
+import Network.Riakclient.RpbGetResp
+import Network.Socket.ByteString.Lazy as L
+
+
+data Response = ErrorResponse
+              | PingResponse
+              | SetClientIDResponse
+              | GetResponse RpbGetResp
+                deriving (Eq, Show)
+
+putPingReq :: Put
+putPingReq = putWord32be 1 >> putCode pingReq
+
+putRequest :: (ReflectDescriptor req, Coded req) => req -> Put
+putRequest req = do
+  putWord32be (fromIntegral (1 + messageSize req))
+  putCode (messageCode req)
+  messagePutM req
+
+sendRequest :: (ReflectDescriptor req, Coded req) => Connection -> req -> IO ()
+sendRequest Connection{..} req = L.sendAll connSock . runPut . putRequest $ req
+
+getterMap :: Map.IntMap (Get Response)
+getterMap = Map.fromList [
+              errorResp -:> return ErrorResponse
+            , pingResp -:> return PingResponse
+            , getResp -:> (GetResponse `fmap` messageGetM)
+            , setClientIdResp -:> return SetClientIDResponse
+            ]
+  where a -:> b = (messageNumber a, b)
+
+getResponse :: Get Response
+getResponse = do
+  code <- getCode
+  Map.findWithDefault (fail $ "invalid response: " ++ show code)
+         (messageNumber code) getterMap
+
+recvResponse_ :: Connection -> IO Response
+recvResponse_ conn = do
+  len <- fromIntegral `fmap` recvGet conn getWord32be
+  recvGetN conn len getResponse
+
+recvResponse :: Connection -> IO (Either MessageCode Response)
+recvResponse conn = do
+  len <- fromIntegral `fmap` recvGet conn getWord32be
+  print len
+  if len == 1
+    then Left `fmap` recvGet conn getCode
+    else Right `fmap` recvGetN conn len getResponse

src/Network/Riak/Message/Code.hs

+module Network.Riak.Message.Code
+    (
+      Coded(..)
+    , MessageCode
+    , messageNumber
+    , getCode
+    , putCode
+    , errorResp
+    , pingReq
+    , pingResp
+    , getClientIdReq
+    , getClientIdResp
+    , setClientIdReq
+    , setClientIdResp
+    , getServerInfoReq
+    , getServerInfoResp
+    , getReq 
+    , getResp
+    , putReq 
+    , putResp
+    , delReq 
+    , delResp
+    , listBucketsReq
+    , listBucketsResp
+    , listKeysReq
+    , listKeysResp
+    , getBucketReq
+    , getBucketResp
+    , setBucketReq
+    , setBucketResp
+    , mapRedReq
+    , mapRedResp
+    ) where
+
+import Control.Monad (liftM)
+import Data.Word (Word8)
+import Data.Binary.Put
+import Network.Riakclient.RpbSetClientIdReq
+import Network.Riakclient.RpbGetReq
+import Text.ProtocolBuffers
+import Text.ProtocolBuffers.Get
+
+newtype MessageCode = M Word8
+    deriving (Eq)
+
+messageNumber :: MessageCode -> Int
+messageNumber (M m) = fromIntegral m
+{-# INLINE messageNumber #-}
+
+class (Wire msg) => Coded msg where
+    messageCode :: msg -> MessageCode
+
+instance Coded RpbSetClientIdReq where
+    messageCode _ = setClientIdReq
+    {-# INLINE messageCode #-}
+
+instance Coded RpbGetReq where
+    messageCode _ = getReq
+    {-# INLINE messageCode #-}
+
+putCode :: MessageCode -> Put
+putCode (M m) = putWord8 m
+{-# INLINE putCode #-}
+
+getCode :: Get MessageCode
+getCode = do
+  n <- getWord8
+  if n > 24
+    then fail $ "invalid riak message code: " ++ show n
+    else return (M n)
+{-# INLINE getCode #-}
+
+instance Show MessageCode where
+    show (M 0) = "errorResp"
+    show (M 1) = "pingReq"
+    show (M 2) = "pingResp"
+    show (M 3) = "getClientIdReq"
+    show (M 4) = "getClientIdResp"
+    show (M 5) = "setClientIdReq"
+    show (M 6) = "setClientIdResp"
+    show (M 7) = "getServerInfoReq"
+    show (M 8) = "getServerInfoResp"
+    show (M 9) = "getReq"
+    show (M 10) = "getResp"
+    show (M 11) = "putReq"
+    show (M 12) = "putResp"
+    show (M 13) = "delReq"
+    show (M 14) = "delResp"
+    show (M 15) = "listBucketsReq"
+    show (M 16) = "listBucketsResp"
+    show (M 17) = "listKeysReq"
+    show (M 18) = "listKeysResp"
+    show (M 19) = "getBucketReq"
+    show (M 20) = "getBucketResp"
+    show (M 21) = "setBucketReq"
+    show (M 22) = "setBucketResp"
+    show (M 23) = "mapRedReq"
+    show (M 24) = "mapRedResp"
+
+errorResp :: MessageCode
+errorResp = M 0
+{-# INLINE errorResp #-}
+
+pingReq :: MessageCode
+pingReq = M 1
+{-# INLINE pingReq #-}
+
+pingResp :: MessageCode
+pingResp = M 2
+{-# INLINE pingResp #-}
+
+getClientIdReq :: MessageCode
+getClientIdReq = M 3
+{-# INLINE getClientIdReq #-}
+
+getClientIdResp :: MessageCode
+getClientIdResp = M 4
+{-# INLINE getClientIdResp #-}
+
+setClientIdReq :: MessageCode
+setClientIdReq = M 5
+{-# INLINE setClientIdReq #-}
+
+setClientIdResp :: MessageCode
+setClientIdResp = M 6
+{-# INLINE setClientIdResp #-}
+
+getServerInfoReq :: MessageCode
+getServerInfoReq = M 7
+{-# INLINE getServerInfoReq #-}
+
+getServerInfoResp :: MessageCode
+getServerInfoResp = M 8
+{-# INLINE getServerInfoResp #-}
+
+getReq  :: MessageCode
+getReq  = M 9
+{-# INLINE getReq  #-}
+
+getResp :: MessageCode
+getResp = M 10
+{-# INLINE getResp #-}
+
+putReq  :: MessageCode
+putReq  = M 11
+{-# INLINE putReq  #-}
+
+putResp :: MessageCode
+putResp = M 12
+{-# INLINE putResp #-}
+
+delReq  :: MessageCode
+delReq  = M 13
+{-# INLINE delReq  #-}
+
+delResp :: MessageCode
+delResp = M 14
+{-# INLINE delResp #-}
+
+listBucketsReq :: MessageCode
+listBucketsReq = M 15
+{-# INLINE listBucketsReq #-}
+
+listBucketsResp :: MessageCode
+listBucketsResp = M 16
+{-# INLINE listBucketsResp #-}
+
+listKeysReq :: MessageCode
+listKeysReq = M 17
+{-# INLINE listKeysReq #-}
+
+listKeysResp :: MessageCode
+listKeysResp = M 18
+{-# INLINE listKeysResp #-}
+
+getBucketReq :: MessageCode
+getBucketReq = M 19
+{-# INLINE getBucketReq #-}
+
+getBucketResp :: MessageCode
+getBucketResp = M 20
+{-# INLINE getBucketResp #-}
+
+setBucketReq :: MessageCode
+setBucketReq = M 21
+{-# INLINE setBucketReq #-}
+
+setBucketResp :: MessageCode
+setBucketResp = M 22
+{-# INLINE setBucketResp #-}
+
+mapRedReq :: MessageCode
+mapRedReq = M 23
+{-# INLINE mapRedReq #-}
+
+mapRedResp :: MessageCode
+mapRedResp = M 24
+{-# INLINE mapRedResp #-}

src/Network/Riak/Socket.hs

+{-# LANGUAGE RecordWildCards #-}
+
+module Network.Riak.Socket
+    (
+      recvExactly_
+    , recvExactly
+    , recvGet
+    , recvGetN
+    ) where
+
+import Control.Monad
+import qualified Data.ByteString.Lazy as L
+import qualified Data.ByteString as B
+import Network.Socket
+import Network.Socket.ByteString as B
+import Network.Socket.ByteString.Lazy as L
+import Data.Int
+import Text.ProtocolBuffers.Get
+import Network.Riak.Types
+import Data.IORef
+
+recvWith :: (L.ByteString -> IO L.ByteString) -> Connection -> Int64
+         -> IO L.ByteString
+recvWith onError Connection{..} n0 = do
+  bs <- readIORef connBuffer
+  let (h,t) = L.splitAt n0 bs
+      len = L.length h
+  if len == n0
+    then writeIORef connBuffer t >> return h
+    else if len == 0
+         then go [] n0
+         else go (reverse (L.toChunks t)) (n0-len)
+  where
+    maxInt = fromIntegral (maxBound :: Int)
+    go acc n
+        | n <= 0 = return (L.fromChunks (reverse acc))
+        | otherwise = do
+      let n' = min n maxInt
+      bs <- B.recv connSock (fromIntegral n')
+      let len = B.length bs
+      if len == 0
+        then onError (L.fromChunks (reverse acc))
+        else go (bs:acc) (n' - fromIntegral len)
+
+recvExactly_ :: Connection -> Int64 -> IO L.ByteString
+recvExactly_ = recvWith return
+
+recvExactly :: Connection -> Int64 -> IO L.ByteString
+recvExactly = recvWith (const (fail "short read from network"))
+
+recvGet :: Connection -> Get a -> IO a
+recvGet Connection{..} get = do
+  let refill = do
+        bs <- L.recv connSock 16384
+        if L.null bs
+          then shutdown connSock ShutdownReceive >> return Nothing
+          else return (Just bs)
+      step (Failed _ err)    = fail err
+      step (Finished bs _ r) = writeIORef connBuffer bs >> return r
+      step (Partial k)       = (step . k) =<< refill
+  mbs <- do
+    buf <- readIORef connBuffer
+    if L.null buf
+      then refill
+      else return (Just buf)
+  case mbs of
+    Just bs -> step $ runGet get bs
+    Nothing -> fail "socket closed"
+  
+recvGetN :: Connection -> Int64 -> Get a -> IO a
+recvGetN conn n get = do
+  bs <- recvExactly conn n
+  let finish bs' r = do
+        unless (L.null bs') $ modifyIORef (connBuffer conn) (`L.append` bs')
+        return r
+  case runGet get bs of
+    Finished bs' _ r -> finish bs' r
+    Partial k    -> case k Nothing of
+                      Finished bs' _ r -> finish bs' r
+                      Failed _ err -> fail err
+                      Partial _    -> fail "parser wants more input!?"
+    Failed _ err -> fail err

src/Network/Riak/Types.hs

+module Network.Riak.Types
+    (
+      ClientID
+    , Client(..)
+    , Connection(..)
+    , Bucket
+    , Key
+    ) where
+
+import qualified Data.ByteString as B
+import qualified Data.ByteString.Lazy as L
+import Data.IORef (IORef)
+import Network.Socket
+    
+type ClientID = L.ByteString
+
+data Client = Client {
+      riakHost :: HostName
+    , riakPort :: ServiceName
+    , riakPrefix :: B.ByteString
+    , riakMapReducePrefix :: B.ByteString
+    , riakClientID :: ClientID
+    } deriving (Eq, Show)
+
+data Connection = Connection {
+      connSock :: Socket
+    , connClient :: Client
+    , connBuffer :: IORef L.ByteString
+    } deriving (Eq)
+
+instance Show Connection where
+    show conn = show "Connection " ++ riakHost c ++ ":" ++ riakPort c
+        where c = connClient conn
+
+type Bucket = L.ByteString
+
+type Key = L.ByteString

src/Network/Riakclient.hs

+module Network.Riakclient (protoInfo, fileDescriptorProto) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+import Text.DescriptorProtos.FileDescriptorProto (FileDescriptorProto)
+import Text.ProtocolBuffers.Reflections (ProtoInfo)
+import qualified Text.ProtocolBuffers.WireMessage as P' (wireGet,getFromBS)
+ 
+protoInfo :: ProtoInfo
+protoInfo
+ = P'.read
+    "ProtoInfo {protoMod = ProtoName {protobufName = FIName \".Riakclient\", haskellPrefix = [MName \"Network\"], parentModule = [], baseName = MName \"Riakclient\"}, protoFilePath = [\"Network\",\"Riakclient.hs\"], protoSource = \"riakclient.proto\", extensionKeys = fromList [], messages = [DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbErrorResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbErrorResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbErrorResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbErrorResp.errmsg\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbErrorResp\"], baseName' = FName \"errmsg\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbErrorResp.errcode\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbErrorResp\"], baseName' = FName \"errcode\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetClientIdResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetClientIdResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetClientIdResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetClientIdResp.client_id\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetClientIdResp\"], baseName' = FName \"client_id\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbSetClientIdReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbSetClientIdReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbSetClientIdReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbSetClientIdReq.client_id\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbSetClientIdReq\"], baseName' = FName \"client_id\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetServerInfoResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetServerInfoResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetServerInfoResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetServerInfoResp.node\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetServerInfoResp\"], baseName' = FName \"node\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetServerInfoResp.server_version\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetServerInfoResp\"], baseName' = FName \"server_version\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetReq.key\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetReq\"], baseName' = FName \"key\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetReq.r\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetReq\"], baseName' = FName \"r\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetResp.content\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetResp\"], baseName' = FName \"content\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbContent\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbContent\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetResp.vclock\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetResp\"], baseName' = FName \"vclock\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbPutReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbPutReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbPutReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutReq.key\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutReq\"], baseName' = FName \"key\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutReq.vclock\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutReq\"], baseName' = FName \"vclock\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutReq.content\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutReq\"], baseName' = FName \"content\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbContent\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbContent\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutReq.w\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutReq\"], baseName' = FName \"w\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 40}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutReq.dw\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutReq\"], baseName' = FName \"dw\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 48}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutReq.return_body\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutReq\"], baseName' = FName \"return_body\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 56}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbPutResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbPutResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbPutResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutResp.content\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutResp\"], baseName' = FName \"content\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbContent\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbContent\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutResp.vclock\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutResp\"], baseName' = FName \"vclock\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbDelReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbDelReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbDelReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbDelReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbDelReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbDelReq.key\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbDelReq\"], baseName' = FName \"key\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbDelReq.rw\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbDelReq\"], baseName' = FName \"rw\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbListBucketsResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbListBucketsResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbListBucketsResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbListBucketsResp.buckets\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbListBucketsResp\"], baseName' = FName \"buckets\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbListKeysReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbListKeysReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbListKeysReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbListKeysReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbListKeysReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbListKeysResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbListKeysResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbListKeysResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbListKeysResp.keys\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbListKeysResp\"], baseName' = FName \"keys\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbListKeysResp.done\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbListKeysResp\"], baseName' = FName \"done\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetBucketReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetBucketReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetBucketReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetBucketReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetBucketReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetBucketResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetBucketResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetBucketResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetBucketResp.props\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetBucketResp\"], baseName' = FName \"props\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbBucketProps\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbBucketProps\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbSetBucketReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbSetBucketReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbSetBucketReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbSetBucketReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbSetBucketReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbSetBucketReq.props\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbSetBucketReq\"], baseName' = FName \"props\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbBucketProps\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbBucketProps\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbMapRedReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbMapRedReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbMapRedReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbMapRedReq.request\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbMapRedReq\"], baseName' = FName \"request\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbMapRedReq.content_type\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbMapRedReq\"], baseName' = FName \"content_type\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbMapRedResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbMapRedResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbMapRedResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbMapRedResp.phase\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbMapRedResp\"], baseName' = FName \"phase\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbMapRedResp.response\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbMapRedResp\"], baseName' = FName \"response\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbMapRedResp.done\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbMapRedResp\"], baseName' = FName \"done\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbContent\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbContent\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbContent.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.value\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"value\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.content_type\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"content_type\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.charset\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"charset\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.content_encoding\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"content_encoding\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.vtag\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"vtag\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.links\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"links\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbLink\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbLink\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.last_mod\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"last_mod\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 56}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.last_mod_usecs\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"last_mod_usecs\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 64}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.usermeta\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"usermeta\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 74}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbPair\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbPair\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbPair\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbPair\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbPair.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPair.key\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPair\"], baseName' = FName \"key\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPair.value\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPair\"], baseName' = FName \"value\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbLink\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbLink\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbLink.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbLink.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbLink\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbLink.key\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbLink\"], baseName' = FName \"key\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbLink.tag\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbLink\"], baseName' = FName \"tag\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False},DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbBucketProps\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbBucketProps\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbBucketProps.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbBucketProps.n_val\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbBucketProps\"], baseName' = FName \"n_val\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbBucketProps.allow_mult\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbBucketProps\"], baseName' = FName \"allow_mult\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}], enums = [], knownKeyMap = fromList []}"
+ 
+fileDescriptorProto :: FileDescriptorProto
+fileDescriptorProto
+ = P'.getFromBS (P'.wireGet 11)
+    (P'.pack
+      "\237\n\n\DLEriakclient.proto\"/\n\fRpbErrorResp\DC2\SO\n\ACKerrmsg\CAN\SOH \STX(\f\DC2\SI\n\aerrcode\CAN\STX \STX(\r\"'\n\DC2RpbGetClientIdResp\DC2\DC1\n\tclient_id\CAN\SOH \STX(\f\"&\n\DC1RpbSetClientIdReq\DC2\DC1\n\tclient_id\CAN\SOH \STX(\f\"<\n\DC4RpbGetServerInfoResp\DC2\f\n\EOTnode\CAN\SOH \SOH(\f\DC2\SYN\n\SOserver_version\CAN\STX \SOH(\f\"3\n\tRpbGetReq\DC2\SO\n\ACKbucket\CAN\SOH \STX(\f\DC2\v\n\ETXkey\CAN\STX \STX(\f\DC2\t\n\SOHr\CAN\ETX \SOH(\r\"E\n\nRpbGetResp\DC2'\n\acontent\CAN\SOH \ETX(\v2\SYN.Riakclient.RpbContent\DC2\SO\n\ACKvclock\CAN\STX \SOH(\f\"\141\SOH\n\tRpbPutReq\DC2\SO\n\ACKbucket\CAN\SOH \STX(\f\DC2\v\n\ETXkey\CAN\STX \STX(\f\DC2\SO\n\ACKvclock\CAN\ETX \SOH(\f\DC2'\n\acontent\CAN\EOT \STX(\v2\SYN.Riakclient.RpbContent\DC2\t\n\SOHw\CAN\ENQ \SOH(\r\DC2\n\n\STXdw\CAN\ACK \SOH(\r\DC2\DC3\n\vreturn_body\CAN\a \SOH(\b\"E\n\nRpbPutResp\DC2'\n\acontent\CAN\SOH \ETX(\v2\SYN.Riakclient.RpbContent\DC2\SO\n\ACKvclock\CAN\STX \SOH(\f\"4\n\tRpbDelReq\DC2\SO\n\ACKbucket\CAN\SOH \STX(\f\DC2\v\n\ETXkey\CAN\STX \STX(\f\DC2\n\n\STXrw\CAN\ETX \SOH(\r\"%\n\DC2RpbListBucketsResp\DC2\SI\n\abuckets\CAN\SOH \ETX(\f\" \n\SORpbListKeysReq\DC2\SO\n\ACKbucket\CAN\SOH \STX(\f\"-\n\SIRpbListKeysResp\DC2\f\n\EOTkeys\CAN\SOH \ETX(\f\DC2\f\n\EOTdone\CAN\STX \SOH(\b\"!\n\SIRpbGetBucketReq\DC2\SO\n\ACKbucket\CAN\SOH \STX(\f\"=\n\DLERpbGetBucketResp\DC2)\n\ENQprops\CAN\SOH \STX(\v2\SUB.Riakclient.RpbBucketProps\"L\n\SIRpbSetBucketReq\DC2\SO\n\ACKbucket\CAN\SOH \STX(\f\DC2)\n\ENQprops\CAN\STX \STX(\v2\SUB.Riakclient.RpbBucketProps\"5\n\fRpbMapRedReq\DC2\SI\n\arequest\CAN\SOH \STX(\f\DC2\DC4\n\fcontent_type\CAN\STX \STX(\f\">\n\rRpbMapRedResp\DC2\r\n\ENQphase\CAN\SOH \SOH(\r\DC2\DLE\n\bresponse\CAN\STX \SOH(\f\DC2\f\n\EOTdone\CAN\ETX \SOH(\b\"\223\SOH\n\nRpbContent\DC2\r\n\ENQvalue\CAN\SOH \STX(\f\DC2\DC4\n\fcontent_type\CAN\STX \SOH(\f\DC2\SI\n\acharset\CAN\ETX \SOH(\f\DC2\CAN\n\DLEcontent_encoding\CAN\EOT \SOH(\f\DC2\f\n\EOTvtag\CAN\ENQ \SOH(\f\DC2\"\n\ENQlinks\CAN\ACK \ETX(\v2\DC3.Riakclient.RpbLink\DC2\DLE\n\blast_mod\CAN\a \SOH(\r\DC2\SYN\n\SOlast_mod_usecs\CAN\b \SOH(\r\DC2%\n\busermeta\CAN\t \ETX(\v2\DC3.Riakclient.RpbPair\"%\n\aRpbPair\DC2\v\n\ETXkey\CAN\SOH \STX(\f\DC2\r\n\ENQvalue\CAN\STX \SOH(\f\"3\n\aRpbLink\DC2\SO\n\ACKbucket\CAN\SOH \SOH(\f\DC2\v\n\ETXkey\CAN\STX \SOH(\f\DC2\v\n\ETXtag\CAN\ETX \SOH(\f\"3\n\SORpbBucketProps\DC2\r\n\ENQn_val\CAN\SOH \SOH(\r\DC2\DC2\n\nallow_mult\CAN\STX \SOH(\b")

src/Network/Riakclient/RpbBucketProps.hs

+module Network.Riakclient.RpbBucketProps (RpbBucketProps(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbBucketProps = RpbBucketProps{n_val :: P'.Maybe P'.Word32, allow_mult :: P'.Maybe P'.Bool}
+                    deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbBucketProps where
+  mergeEmpty = RpbBucketProps P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbBucketProps x'1 x'2) (RpbBucketProps y'1 y'2) = RpbBucketProps (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)
+ 
+instance P'.Default RpbBucketProps where
+  defaultValue = RpbBucketProps P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbBucketProps where
+  wireSize ft' self'@(RpbBucketProps x'1 x'2)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeOpt 1 13 x'1 + P'.wireSizeOpt 1 8 x'2)
+  wirePut ft' self'@(RpbBucketProps x'1 x'2)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutOpt 8 13 x'1
+             P'.wirePutOpt 16 8 x'2
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             8 -> P'.fmap (\ new'Field -> old'Self{n_val = P'.Just new'Field}) (P'.wireGet 13)
+             16 -> P'.fmap (\ new'Field -> old'Self{allow_mult = P'.Just new'Field}) (P'.wireGet 8)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbBucketProps) RpbBucketProps where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbBucketProps
+ 
+instance P'.ReflectDescriptor RpbBucketProps where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [8, 16])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbBucketProps\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbBucketProps\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbBucketProps.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbBucketProps.n_val\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbBucketProps\"], baseName' = FName \"n_val\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbBucketProps.allow_mult\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbBucketProps\"], baseName' = FName \"allow_mult\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbContent.hs

+module Network.Riakclient.RpbContent (RpbContent(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+import qualified Network.Riakclient.RpbLink as Riakclient (RpbLink)
+import qualified Network.Riakclient.RpbPair as Riakclient (RpbPair)
+ 
+data RpbContent = RpbContent{value :: P'.ByteString, content_type :: P'.Maybe P'.ByteString, charset :: P'.Maybe P'.ByteString,
+                             content_encoding :: P'.Maybe P'.ByteString, vtag :: P'.Maybe P'.ByteString,
+                             links :: P'.Seq Riakclient.RpbLink, last_mod :: P'.Maybe P'.Word32,
+                             last_mod_usecs :: P'.Maybe P'.Word32, usermeta :: P'.Seq Riakclient.RpbPair}
+                deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbContent where
+  mergeEmpty
+   = RpbContent P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty
+      P'.mergeEmpty
+  mergeAppend (RpbContent x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9) (RpbContent y'1 y'2 y'3 y'4 y'5 y'6 y'7 y'8 y'9)
+   = RpbContent (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+      (P'.mergeAppend x'5 y'5)
+      (P'.mergeAppend x'6 y'6)
+      (P'.mergeAppend x'7 y'7)
+      (P'.mergeAppend x'8 y'8)
+      (P'.mergeAppend x'9 y'9)
+ 
+instance P'.Default RpbContent where
+  defaultValue
+   = RpbContent P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
+      P'.defaultValue
+      P'.defaultValue
+ 
+instance P'.Wire RpbContent where
+  wireSize ft' self'@(RpbContent x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size
+         = (P'.wireSizeReq 1 12 x'1 + P'.wireSizeOpt 1 12 x'2 + P'.wireSizeOpt 1 12 x'3 + P'.wireSizeOpt 1 12 x'4 +
+             P'.wireSizeOpt 1 12 x'5
+             + P'.wireSizeRep 1 11 x'6
+             + P'.wireSizeOpt 1 13 x'7
+             + P'.wireSizeOpt 1 13 x'8
+             + P'.wireSizeRep 1 11 x'9)
+  wirePut ft' self'@(RpbContent x'1 x'2 x'3 x'4 x'5 x'6 x'7 x'8 x'9)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 12 x'1
+             P'.wirePutOpt 18 12 x'2
+             P'.wirePutOpt 26 12 x'3
+             P'.wirePutOpt 34 12 x'4
+             P'.wirePutOpt 42 12 x'5
+             P'.wirePutRep 50 11 x'6
+             P'.wirePutOpt 56 13 x'7
+             P'.wirePutOpt 64 13 x'8
+             P'.wirePutRep 74 11 x'9
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{value = new'Field}) (P'.wireGet 12)
+             18 -> P'.fmap (\ new'Field -> old'Self{content_type = P'.Just new'Field}) (P'.wireGet 12)
+             26 -> P'.fmap (\ new'Field -> old'Self{charset = P'.Just new'Field}) (P'.wireGet 12)
+             34 -> P'.fmap (\ new'Field -> old'Self{content_encoding = P'.Just new'Field}) (P'.wireGet 12)
+             42 -> P'.fmap (\ new'Field -> old'Self{vtag = P'.Just new'Field}) (P'.wireGet 12)
+             50 -> P'.fmap (\ new'Field -> old'Self{links = P'.append (links old'Self) new'Field}) (P'.wireGet 11)
+             56 -> P'.fmap (\ new'Field -> old'Self{last_mod = P'.Just new'Field}) (P'.wireGet 13)
+             64 -> P'.fmap (\ new'Field -> old'Self{last_mod_usecs = P'.Just new'Field}) (P'.wireGet 13)
+             74 -> P'.fmap (\ new'Field -> old'Self{usermeta = P'.append (usermeta old'Self) new'Field}) (P'.wireGet 11)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbContent) RpbContent where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbContent
+ 
+instance P'.ReflectDescriptor RpbContent where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10, 18, 26, 34, 42, 50, 56, 64, 74])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbContent\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbContent\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbContent.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.value\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"value\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.content_type\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"content_type\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.charset\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"charset\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.content_encoding\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"content_encoding\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 34}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.vtag\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"vtag\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.links\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"links\"}, fieldNumber = FieldId {getFieldId = 6}, wireTag = WireTag {getWireTag = 50}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbLink\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbLink\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.last_mod\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"last_mod\"}, fieldNumber = FieldId {getFieldId = 7}, wireTag = WireTag {getWireTag = 56}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.last_mod_usecs\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"last_mod_usecs\"}, fieldNumber = FieldId {getFieldId = 8}, wireTag = WireTag {getWireTag = 64}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbContent.usermeta\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbContent\"], baseName' = FName \"usermeta\"}, fieldNumber = FieldId {getFieldId = 9}, wireTag = WireTag {getWireTag = 74}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbPair\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbPair\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbDelReq.hs

+module Network.Riakclient.RpbDelReq (RpbDelReq(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbDelReq = RpbDelReq{bucket :: P'.ByteString, key :: P'.ByteString, rw :: P'.Maybe P'.Word32}
+               deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbDelReq where
+  mergeEmpty = RpbDelReq P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbDelReq x'1 x'2 x'3) (RpbDelReq y'1 y'2 y'3)
+   = RpbDelReq (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)
+ 
+instance P'.Default RpbDelReq where
+  defaultValue = RpbDelReq P'.defaultValue P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbDelReq where
+  wireSize ft' self'@(RpbDelReq x'1 x'2 x'3)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeReq 1 12 x'1 + P'.wireSizeReq 1 12 x'2 + P'.wireSizeOpt 1 13 x'3)
+  wirePut ft' self'@(RpbDelReq x'1 x'2 x'3)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 12 x'1
+             P'.wirePutReq 18 12 x'2
+             P'.wirePutOpt 24 13 x'3
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{bucket = new'Field}) (P'.wireGet 12)
+             18 -> P'.fmap (\ new'Field -> old'Self{key = new'Field}) (P'.wireGet 12)
+             24 -> P'.fmap (\ new'Field -> old'Self{rw = P'.Just new'Field}) (P'.wireGet 13)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbDelReq) RpbDelReq where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbDelReq
+ 
+instance P'.ReflectDescriptor RpbDelReq where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10, 18]) (P'.fromDistinctAscList [10, 18, 24])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbDelReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbDelReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbDelReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbDelReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbDelReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbDelReq.key\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbDelReq\"], baseName' = FName \"key\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbDelReq.rw\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbDelReq\"], baseName' = FName \"rw\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbErrorResp.hs

+module Network.Riakclient.RpbErrorResp (RpbErrorResp(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbErrorResp = RpbErrorResp{errmsg :: P'.ByteString, errcode :: P'.Word32}
+                  deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbErrorResp where
+  mergeEmpty = RpbErrorResp P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbErrorResp x'1 x'2) (RpbErrorResp y'1 y'2) = RpbErrorResp (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)
+ 
+instance P'.Default RpbErrorResp where
+  defaultValue = RpbErrorResp P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbErrorResp where
+  wireSize ft' self'@(RpbErrorResp x'1 x'2)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeReq 1 12 x'1 + P'.wireSizeReq 1 13 x'2)
+  wirePut ft' self'@(RpbErrorResp x'1 x'2)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 12 x'1
+             P'.wirePutReq 16 13 x'2
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{errmsg = new'Field}) (P'.wireGet 12)
+             16 -> P'.fmap (\ new'Field -> old'Self{errcode = new'Field}) (P'.wireGet 13)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbErrorResp) RpbErrorResp where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbErrorResp
+ 
+instance P'.ReflectDescriptor RpbErrorResp where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10, 16]) (P'.fromDistinctAscList [10, 16])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbErrorResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbErrorResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbErrorResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbErrorResp.errmsg\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbErrorResp\"], baseName' = FName \"errmsg\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbErrorResp.errcode\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbErrorResp\"], baseName' = FName \"errcode\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbGetBucketReq.hs

+module Network.Riakclient.RpbGetBucketReq (RpbGetBucketReq(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbGetBucketReq = RpbGetBucketReq{bucket :: P'.ByteString}
+                     deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbGetBucketReq where
+  mergeEmpty = RpbGetBucketReq P'.mergeEmpty
+  mergeAppend (RpbGetBucketReq x'1) (RpbGetBucketReq y'1) = RpbGetBucketReq (P'.mergeAppend x'1 y'1)
+ 
+instance P'.Default RpbGetBucketReq where
+  defaultValue = RpbGetBucketReq P'.defaultValue
+ 
+instance P'.Wire RpbGetBucketReq where
+  wireSize ft' self'@(RpbGetBucketReq x'1)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeReq 1 12 x'1)
+  wirePut ft' self'@(RpbGetBucketReq x'1)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 12 x'1
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{bucket = new'Field}) (P'.wireGet 12)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbGetBucketReq) RpbGetBucketReq where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbGetBucketReq
+ 
+instance P'.ReflectDescriptor RpbGetBucketReq where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetBucketReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetBucketReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetBucketReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetBucketReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetBucketReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbGetBucketResp.hs

+module Network.Riakclient.RpbGetBucketResp (RpbGetBucketResp(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+import qualified Network.Riakclient.RpbBucketProps as Riakclient (RpbBucketProps)
+ 
+data RpbGetBucketResp = RpbGetBucketResp{props :: Riakclient.RpbBucketProps}
+                      deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbGetBucketResp where
+  mergeEmpty = RpbGetBucketResp P'.mergeEmpty
+  mergeAppend (RpbGetBucketResp x'1) (RpbGetBucketResp y'1) = RpbGetBucketResp (P'.mergeAppend x'1 y'1)
+ 
+instance P'.Default RpbGetBucketResp where
+  defaultValue = RpbGetBucketResp P'.defaultValue
+ 
+instance P'.Wire RpbGetBucketResp where
+  wireSize ft' self'@(RpbGetBucketResp x'1)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeReq 1 11 x'1)
+  wirePut ft' self'@(RpbGetBucketResp x'1)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 11 x'1
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{props = P'.mergeAppend (props old'Self) (new'Field)}) (P'.wireGet 11)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbGetBucketResp) RpbGetBucketResp where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbGetBucketResp
+ 
+instance P'.ReflectDescriptor RpbGetBucketResp where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetBucketResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetBucketResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetBucketResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetBucketResp.props\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetBucketResp\"], baseName' = FName \"props\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbBucketProps\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbBucketProps\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbGetClientIdResp.hs

+module Network.Riakclient.RpbGetClientIdResp (RpbGetClientIdResp(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbGetClientIdResp = RpbGetClientIdResp{client_id :: P'.ByteString}
+                        deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbGetClientIdResp where
+  mergeEmpty = RpbGetClientIdResp P'.mergeEmpty
+  mergeAppend (RpbGetClientIdResp x'1) (RpbGetClientIdResp y'1) = RpbGetClientIdResp (P'.mergeAppend x'1 y'1)
+ 
+instance P'.Default RpbGetClientIdResp where
+  defaultValue = RpbGetClientIdResp P'.defaultValue
+ 
+instance P'.Wire RpbGetClientIdResp where
+  wireSize ft' self'@(RpbGetClientIdResp x'1)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeReq 1 12 x'1)
+  wirePut ft' self'@(RpbGetClientIdResp x'1)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 12 x'1
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{client_id = new'Field}) (P'.wireGet 12)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbGetClientIdResp) RpbGetClientIdResp where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbGetClientIdResp
+ 
+instance P'.ReflectDescriptor RpbGetClientIdResp where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetClientIdResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetClientIdResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetClientIdResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetClientIdResp.client_id\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetClientIdResp\"], baseName' = FName \"client_id\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbGetReq.hs

+module Network.Riakclient.RpbGetReq (RpbGetReq(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbGetReq = RpbGetReq{bucket :: P'.ByteString, key :: P'.ByteString, r :: P'.Maybe P'.Word32}
+               deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbGetReq where
+  mergeEmpty = RpbGetReq P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbGetReq x'1 x'2 x'3) (RpbGetReq y'1 y'2 y'3)
+   = RpbGetReq (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)
+ 
+instance P'.Default RpbGetReq where
+  defaultValue = RpbGetReq P'.defaultValue P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbGetReq where
+  wireSize ft' self'@(RpbGetReq x'1 x'2 x'3)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeReq 1 12 x'1 + P'.wireSizeReq 1 12 x'2 + P'.wireSizeOpt 1 13 x'3)
+  wirePut ft' self'@(RpbGetReq x'1 x'2 x'3)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 12 x'1
+             P'.wirePutReq 18 12 x'2
+             P'.wirePutOpt 24 13 x'3
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{bucket = new'Field}) (P'.wireGet 12)
+             18 -> P'.fmap (\ new'Field -> old'Self{key = new'Field}) (P'.wireGet 12)
+             24 -> P'.fmap (\ new'Field -> old'Self{r = P'.Just new'Field}) (P'.wireGet 13)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbGetReq) RpbGetReq where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbGetReq
+ 
+instance P'.ReflectDescriptor RpbGetReq where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10, 18]) (P'.fromDistinctAscList [10, 18, 24])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetReq.key\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetReq\"], baseName' = FName \"key\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetReq.r\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetReq\"], baseName' = FName \"r\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbGetResp.hs

+module Network.Riakclient.RpbGetResp (RpbGetResp(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+import qualified Network.Riakclient.RpbContent as Riakclient (RpbContent)
+ 
+data RpbGetResp = RpbGetResp{content :: P'.Seq Riakclient.RpbContent, vclock :: P'.Maybe P'.ByteString}
+                deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbGetResp where
+  mergeEmpty = RpbGetResp P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbGetResp x'1 x'2) (RpbGetResp y'1 y'2) = RpbGetResp (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)
+ 
+instance P'.Default RpbGetResp where
+  defaultValue = RpbGetResp P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbGetResp where
+  wireSize ft' self'@(RpbGetResp x'1 x'2)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeRep 1 11 x'1 + P'.wireSizeOpt 1 12 x'2)
+  wirePut ft' self'@(RpbGetResp x'1 x'2)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutRep 10 11 x'1
+             P'.wirePutOpt 18 12 x'2
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{content = P'.append (content old'Self) new'Field}) (P'.wireGet 11)
+             18 -> P'.fmap (\ new'Field -> old'Self{vclock = P'.Just new'Field}) (P'.wireGet 12)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbGetResp) RpbGetResp where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbGetResp
+ 
+instance P'.ReflectDescriptor RpbGetResp where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10, 18])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetResp.content\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetResp\"], baseName' = FName \"content\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".Riakclient.RpbContent\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbContent\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetResp.vclock\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetResp\"], baseName' = FName \"vclock\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbGetServerInfoResp.hs

+module Network.Riakclient.RpbGetServerInfoResp (RpbGetServerInfoResp(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbGetServerInfoResp = RpbGetServerInfoResp{node :: P'.Maybe P'.ByteString, server_version :: P'.Maybe P'.ByteString}
+                          deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbGetServerInfoResp where
+  mergeEmpty = RpbGetServerInfoResp P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbGetServerInfoResp x'1 x'2) (RpbGetServerInfoResp y'1 y'2)
+   = RpbGetServerInfoResp (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)
+ 
+instance P'.Default RpbGetServerInfoResp where
+  defaultValue = RpbGetServerInfoResp P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbGetServerInfoResp where
+  wireSize ft' self'@(RpbGetServerInfoResp x'1 x'2)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeOpt 1 12 x'1 + P'.wireSizeOpt 1 12 x'2)
+  wirePut ft' self'@(RpbGetServerInfoResp x'1 x'2)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutOpt 10 12 x'1
+             P'.wirePutOpt 18 12 x'2
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{node = P'.Just new'Field}) (P'.wireGet 12)
+             18 -> P'.fmap (\ new'Field -> old'Self{server_version = P'.Just new'Field}) (P'.wireGet 12)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbGetServerInfoResp) RpbGetServerInfoResp where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbGetServerInfoResp
+ 
+instance P'.ReflectDescriptor RpbGetServerInfoResp where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10, 18])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbGetServerInfoResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbGetServerInfoResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbGetServerInfoResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetServerInfoResp.node\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetServerInfoResp\"], baseName' = FName \"node\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbGetServerInfoResp.server_version\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbGetServerInfoResp\"], baseName' = FName \"server_version\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbLink.hs

+module Network.Riakclient.RpbLink (RpbLink(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbLink = RpbLink{bucket :: P'.Maybe P'.ByteString, key :: P'.Maybe P'.ByteString, tag :: P'.Maybe P'.ByteString}
+             deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbLink where
+  mergeEmpty = RpbLink P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbLink x'1 x'2 x'3) (RpbLink y'1 y'2 y'3)
+   = RpbLink (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)
+ 
+instance P'.Default RpbLink where
+  defaultValue = RpbLink P'.defaultValue P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbLink where
+  wireSize ft' self'@(RpbLink x'1 x'2 x'3)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeOpt 1 12 x'1 + P'.wireSizeOpt 1 12 x'2 + P'.wireSizeOpt 1 12 x'3)
+  wirePut ft' self'@(RpbLink x'1 x'2 x'3)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutOpt 10 12 x'1
+             P'.wirePutOpt 18 12 x'2
+             P'.wirePutOpt 26 12 x'3
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{bucket = P'.Just new'Field}) (P'.wireGet 12)
+             18 -> P'.fmap (\ new'Field -> old'Self{key = P'.Just new'Field}) (P'.wireGet 12)
+             26 -> P'.fmap (\ new'Field -> old'Self{tag = P'.Just new'Field}) (P'.wireGet 12)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbLink) RpbLink where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbLink
+ 
+instance P'.ReflectDescriptor RpbLink where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10, 18, 26])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbLink\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbLink\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbLink.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbLink.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbLink\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbLink.key\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbLink\"], baseName' = FName \"key\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbLink.tag\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbLink\"], baseName' = FName \"tag\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbListBucketsResp.hs

+module Network.Riakclient.RpbListBucketsResp (RpbListBucketsResp(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbListBucketsResp = RpbListBucketsResp{buckets :: P'.Seq P'.ByteString}
+                        deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbListBucketsResp where
+  mergeEmpty = RpbListBucketsResp P'.mergeEmpty
+  mergeAppend (RpbListBucketsResp x'1) (RpbListBucketsResp y'1) = RpbListBucketsResp (P'.mergeAppend x'1 y'1)
+ 
+instance P'.Default RpbListBucketsResp where
+  defaultValue = RpbListBucketsResp P'.defaultValue
+ 
+instance P'.Wire RpbListBucketsResp where
+  wireSize ft' self'@(RpbListBucketsResp x'1)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeRep 1 12 x'1)
+  wirePut ft' self'@(RpbListBucketsResp x'1)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutRep 10 12 x'1
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{buckets = P'.append (buckets old'Self) new'Field}) (P'.wireGet 12)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbListBucketsResp) RpbListBucketsResp where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbListBucketsResp
+ 
+instance P'.ReflectDescriptor RpbListBucketsResp where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbListBucketsResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbListBucketsResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbListBucketsResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbListBucketsResp.buckets\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbListBucketsResp\"], baseName' = FName \"buckets\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbListKeysReq.hs

+module Network.Riakclient.RpbListKeysReq (RpbListKeysReq(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbListKeysReq = RpbListKeysReq{bucket :: P'.ByteString}
+                    deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbListKeysReq where
+  mergeEmpty = RpbListKeysReq P'.mergeEmpty
+  mergeAppend (RpbListKeysReq x'1) (RpbListKeysReq y'1) = RpbListKeysReq (P'.mergeAppend x'1 y'1)
+ 
+instance P'.Default RpbListKeysReq where
+  defaultValue = RpbListKeysReq P'.defaultValue
+ 
+instance P'.Wire RpbListKeysReq where
+  wireSize ft' self'@(RpbListKeysReq x'1)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeReq 1 12 x'1)
+  wirePut ft' self'@(RpbListKeysReq x'1)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 12 x'1
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{bucket = new'Field}) (P'.wireGet 12)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbListKeysReq) RpbListKeysReq where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbListKeysReq
+ 
+instance P'.ReflectDescriptor RpbListKeysReq where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbListKeysReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbListKeysReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbListKeysReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbListKeysReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbListKeysReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbListKeysResp.hs

+module Network.Riakclient.RpbListKeysResp (RpbListKeysResp(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbListKeysResp = RpbListKeysResp{keys :: P'.Seq P'.ByteString, done :: P'.Maybe P'.Bool}
+                     deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbListKeysResp where
+  mergeEmpty = RpbListKeysResp P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbListKeysResp x'1 x'2) (RpbListKeysResp y'1 y'2)
+   = RpbListKeysResp (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)
+ 
+instance P'.Default RpbListKeysResp where
+  defaultValue = RpbListKeysResp P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbListKeysResp where
+  wireSize ft' self'@(RpbListKeysResp x'1 x'2)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeRep 1 12 x'1 + P'.wireSizeOpt 1 8 x'2)
+  wirePut ft' self'@(RpbListKeysResp x'1 x'2)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutRep 10 12 x'1
+             P'.wirePutOpt 16 8 x'2
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{keys = P'.append (keys old'Self) new'Field}) (P'.wireGet 12)
+             16 -> P'.fmap (\ new'Field -> old'Self{done = P'.Just new'Field}) (P'.wireGet 8)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbListKeysResp) RpbListKeysResp where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbListKeysResp
+ 
+instance P'.ReflectDescriptor RpbListKeysResp where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10, 16])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbListKeysResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbListKeysResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbListKeysResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbListKeysResp.keys\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbListKeysResp\"], baseName' = FName \"keys\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = True, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbListKeysResp.done\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbListKeysResp\"], baseName' = FName \"done\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbMapRedReq.hs

+module Network.Riakclient.RpbMapRedReq (RpbMapRedReq(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbMapRedReq = RpbMapRedReq{request :: P'.ByteString, content_type :: P'.ByteString}
+                  deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbMapRedReq where
+  mergeEmpty = RpbMapRedReq P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbMapRedReq x'1 x'2) (RpbMapRedReq y'1 y'2) = RpbMapRedReq (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)
+ 
+instance P'.Default RpbMapRedReq where
+  defaultValue = RpbMapRedReq P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbMapRedReq where
+  wireSize ft' self'@(RpbMapRedReq x'1 x'2)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeReq 1 12 x'1 + P'.wireSizeReq 1 12 x'2)
+  wirePut ft' self'@(RpbMapRedReq x'1 x'2)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 12 x'1
+             P'.wirePutReq 18 12 x'2
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{request = new'Field}) (P'.wireGet 12)
+             18 -> P'.fmap (\ new'Field -> old'Self{content_type = new'Field}) (P'.wireGet 12)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbMapRedReq) RpbMapRedReq where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbMapRedReq
+ 
+instance P'.ReflectDescriptor RpbMapRedReq where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10, 18]) (P'.fromDistinctAscList [10, 18])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbMapRedReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbMapRedReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbMapRedReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbMapRedReq.request\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbMapRedReq\"], baseName' = FName \"request\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbMapRedReq.content_type\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbMapRedReq\"], baseName' = FName \"content_type\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbMapRedResp.hs

+module Network.Riakclient.RpbMapRedResp (RpbMapRedResp(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbMapRedResp = RpbMapRedResp{phase :: P'.Maybe P'.Word32, response :: P'.Maybe P'.ByteString, done :: P'.Maybe P'.Bool}
+                   deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbMapRedResp where
+  mergeEmpty = RpbMapRedResp P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbMapRedResp x'1 x'2 x'3) (RpbMapRedResp y'1 y'2 y'3)
+   = RpbMapRedResp (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)
+ 
+instance P'.Default RpbMapRedResp where
+  defaultValue = RpbMapRedResp P'.defaultValue P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbMapRedResp where
+  wireSize ft' self'@(RpbMapRedResp x'1 x'2 x'3)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeOpt 1 13 x'1 + P'.wireSizeOpt 1 12 x'2 + P'.wireSizeOpt 1 8 x'3)
+  wirePut ft' self'@(RpbMapRedResp x'1 x'2 x'3)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutOpt 8 13 x'1
+             P'.wirePutOpt 18 12 x'2
+             P'.wirePutOpt 24 8 x'3
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             8 -> P'.fmap (\ new'Field -> old'Self{phase = P'.Just new'Field}) (P'.wireGet 13)
+             18 -> P'.fmap (\ new'Field -> old'Self{response = P'.Just new'Field}) (P'.wireGet 12)
+             24 -> P'.fmap (\ new'Field -> old'Self{done = P'.Just new'Field}) (P'.wireGet 8)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbMapRedResp) RpbMapRedResp where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbMapRedResp
+ 
+instance P'.ReflectDescriptor RpbMapRedResp where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [8, 18, 24])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbMapRedResp\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbMapRedResp\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbMapRedResp.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbMapRedResp.phase\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbMapRedResp\"], baseName' = FName \"phase\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbMapRedResp.response\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbMapRedResp\"], baseName' = FName \"response\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbMapRedResp.done\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbMapRedResp\"], baseName' = FName \"done\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbPair.hs

+module Network.Riakclient.RpbPair (RpbPair(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+ 
+data RpbPair = RpbPair{key :: P'.ByteString, value :: P'.Maybe P'.ByteString}
+             deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbPair where
+  mergeEmpty = RpbPair P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbPair x'1 x'2) (RpbPair y'1 y'2) = RpbPair (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)
+ 
+instance P'.Default RpbPair where
+  defaultValue = RpbPair P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbPair where
+  wireSize ft' self'@(RpbPair x'1 x'2)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size = (P'.wireSizeReq 1 12 x'1 + P'.wireSizeOpt 1 12 x'2)
+  wirePut ft' self'@(RpbPair x'1 x'2)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 12 x'1
+             P'.wirePutOpt 18 12 x'2
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{key = new'Field}) (P'.wireGet 12)
+             18 -> P'.fmap (\ new'Field -> old'Self{value = P'.Just new'Field}) (P'.wireGet 12)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbPair) RpbPair where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbPair
+ 
+instance P'.ReflectDescriptor RpbPair where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10]) (P'.fromDistinctAscList [10, 18])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbPair\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbPair\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbPair.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPair.key\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPair\"], baseName' = FName \"key\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPair.value\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPair\"], baseName' = FName \"value\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"

src/Network/Riakclient/RpbPutReq.hs

+module Network.Riakclient.RpbPutReq (RpbPutReq(..)) where
+import Prelude ((+))
+import qualified Prelude as P'
+import qualified Text.ProtocolBuffers.Header as P'
+import qualified Network.Riakclient.RpbContent as Riakclient (RpbContent)
+ 
+data RpbPutReq = RpbPutReq{bucket :: P'.ByteString, key :: P'.ByteString, vclock :: P'.Maybe P'.ByteString,
+                           content :: Riakclient.RpbContent, w :: P'.Maybe P'.Word32, dw :: P'.Maybe P'.Word32,
+                           return_body :: P'.Maybe P'.Bool}
+               deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+ 
+instance P'.Mergeable RpbPutReq where
+  mergeEmpty = RpbPutReq P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty P'.mergeEmpty
+  mergeAppend (RpbPutReq x'1 x'2 x'3 x'4 x'5 x'6 x'7) (RpbPutReq y'1 y'2 y'3 y'4 y'5 y'6 y'7)
+   = RpbPutReq (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
+      (P'.mergeAppend x'5 y'5)
+      (P'.mergeAppend x'6 y'6)
+      (P'.mergeAppend x'7 y'7)
+ 
+instance P'.Default RpbPutReq where
+  defaultValue
+   = RpbPutReq P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
+ 
+instance P'.Wire RpbPutReq where
+  wireSize ft' self'@(RpbPutReq x'1 x'2 x'3 x'4 x'5 x'6 x'7)
+   = case ft' of
+       10 -> calc'Size
+       11 -> P'.prependMessageSize calc'Size
+       _ -> P'.wireSizeErr ft' self'
+    where
+        calc'Size
+         = (P'.wireSizeReq 1 12 x'1 + P'.wireSizeReq 1 12 x'2 + P'.wireSizeOpt 1 12 x'3 + P'.wireSizeReq 1 11 x'4 +
+             P'.wireSizeOpt 1 13 x'5
+             + P'.wireSizeOpt 1 13 x'6
+             + P'.wireSizeOpt 1 8 x'7)
+  wirePut ft' self'@(RpbPutReq x'1 x'2 x'3 x'4 x'5 x'6 x'7)
+   = case ft' of
+       10 -> put'Fields
+       11 -> do
+               P'.putSize (P'.wireSize 10 self')
+               put'Fields
+       _ -> P'.wirePutErr ft' self'
+    where
+        put'Fields
+         = do
+             P'.wirePutReq 10 12 x'1
+             P'.wirePutReq 18 12 x'2
+             P'.wirePutOpt 26 12 x'3
+             P'.wirePutReq 34 11 x'4
+             P'.wirePutOpt 40 13 x'5
+             P'.wirePutOpt 48 13 x'6
+             P'.wirePutOpt 56 8 x'7
+  wireGet ft'
+   = case ft' of
+       10 -> P'.getBareMessageWith update'Self
+       11 -> P'.getMessageWith update'Self
+       _ -> P'.wireGetErr ft'
+    where
+        update'Self wire'Tag old'Self
+         = case wire'Tag of
+             10 -> P'.fmap (\ new'Field -> old'Self{bucket = new'Field}) (P'.wireGet 12)
+             18 -> P'.fmap (\ new'Field -> old'Self{key = new'Field}) (P'.wireGet 12)
+             26 -> P'.fmap (\ new'Field -> old'Self{vclock = P'.Just new'Field}) (P'.wireGet 12)
+             34 -> P'.fmap (\ new'Field -> old'Self{content = P'.mergeAppend (content old'Self) (new'Field)}) (P'.wireGet 11)
+             40 -> P'.fmap (\ new'Field -> old'Self{w = P'.Just new'Field}) (P'.wireGet 13)
+             48 -> P'.fmap (\ new'Field -> old'Self{dw = P'.Just new'Field}) (P'.wireGet 13)
+             56 -> P'.fmap (\ new'Field -> old'Self{return_body = P'.Just new'Field}) (P'.wireGet 8)
+             _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
+ 
+instance P'.MessageAPI msg' (msg' -> RpbPutReq) RpbPutReq where
+  getVal m' f' = f' m'
+ 
+instance P'.GPB RpbPutReq
+ 
+instance P'.ReflectDescriptor RpbPutReq where
+  getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList [10, 18, 34]) (P'.fromDistinctAscList [10, 18, 26, 34, 40, 48, 56])
+  reflectDescriptorInfo _
+   = P'.read
+      "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Riakclient.RpbPutReq\", haskellPrefix = [MName \"Network\"], parentModule = [MName \"Riakclient\"], baseName = MName \"RpbPutReq\"}, descFilePath = [\"Network\",\"Riakclient\",\"RpbPutReq.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutReq.bucket\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutReq\"], baseName' = FName \"bucket\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Riakclient.RpbPutReq.key\", haskellPrefix' = [MName \"Network\"], parentModule' = [MName \"Riakclient\",MName \"RpbPutReq\"], baseName' = FName \"key\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = True, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 12}, type