module Network.AMQP.Generated where

import Data.Binary
import Data.Binary.Get
import Data.Binary.Put
import Data.Bits
import Data.Maybe
import Network.AMQP.Types

getContentHeaderProperties :: ShortInt -> Get ContentHeaderProperties
getContentHeaderProperties :: Word16 -> Get ContentHeaderProperties
getContentHeaderProperties Word16
10 = Int -> Get [Bit]
getPropBits Int
0 Get [Bit]
-> ([Bit] -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[] ->  ContentHeaderProperties -> Get ContentHeaderProperties
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ContentHeaderProperties
CHConnection
getContentHeaderProperties Word16
20 = Int -> Get [Bit]
getPropBits Int
0 Get [Bit]
-> ([Bit] -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[] ->  ContentHeaderProperties -> Get ContentHeaderProperties
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ContentHeaderProperties
CHChannel
getContentHeaderProperties Word16
40 = Int -> Get [Bit]
getPropBits Int
0 Get [Bit]
-> ([Bit] -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[] ->  ContentHeaderProperties -> Get ContentHeaderProperties
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ContentHeaderProperties
CHExchange
getContentHeaderProperties Word16
50 = Int -> Get [Bit]
getPropBits Int
0 Get [Bit]
-> ([Bit] -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[] ->  ContentHeaderProperties -> Get ContentHeaderProperties
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ContentHeaderProperties
CHQueue
getContentHeaderProperties Word16
60 = Int -> Get [Bit]
getPropBits Int
14 Get [Bit]
-> ([Bit] -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[Bit
a,Bit
b,Bit
c,Bit
d,Bit
e,Bit
f,Bit
g,Bit
h,Bit
i,Bit
j,Bit
k,Bit
l,Bit
m,Bit
n] -> Bit -> Get (Maybe ShortString)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
a Get (Maybe ShortString)
-> (Maybe ShortString -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe ShortString
a' -> Bit -> Get (Maybe ShortString)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
b Get (Maybe ShortString)
-> (Maybe ShortString -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe ShortString
b' -> Bit -> Get (Maybe FieldTable)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
c Get (Maybe FieldTable)
-> (Maybe FieldTable -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe FieldTable
c' -> Bit -> Get (Maybe Word8)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
d Get (Maybe Word8)
-> (Maybe Word8 -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe Word8
d' -> Bit -> Get (Maybe Word8)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
e Get (Maybe Word8)
-> (Maybe Word8 -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe Word8
e' -> Bit -> Get (Maybe ShortString)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
f Get (Maybe ShortString)
-> (Maybe ShortString -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe ShortString
f' -> Bit -> Get (Maybe ShortString)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
g Get (Maybe ShortString)
-> (Maybe ShortString -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe ShortString
g' -> Bit -> Get (Maybe ShortString)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
h Get (Maybe ShortString)
-> (Maybe ShortString -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe ShortString
h' -> Bit -> Get (Maybe ShortString)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
i Get (Maybe ShortString)
-> (Maybe ShortString -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe ShortString
i' -> Bit -> Get (Maybe Timestamp)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
j Get (Maybe Timestamp)
-> (Maybe Timestamp -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe Timestamp
j' -> Bit -> Get (Maybe ShortString)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
k Get (Maybe ShortString)
-> (Maybe ShortString -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe ShortString
k' -> Bit -> Get (Maybe ShortString)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
l Get (Maybe ShortString)
-> (Maybe ShortString -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe ShortString
l' -> Bit -> Get (Maybe ShortString)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
m Get (Maybe ShortString)
-> (Maybe ShortString -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe ShortString
m' -> Bit -> Get (Maybe ShortString)
forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
n Get (Maybe ShortString)
-> (Maybe ShortString -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Maybe ShortString
n' ->  ContentHeaderProperties -> Get ContentHeaderProperties
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe ShortString
-> Maybe ShortString
-> Maybe FieldTable
-> Maybe Word8
-> Maybe Word8
-> Maybe ShortString
-> Maybe ShortString
-> Maybe ShortString
-> Maybe ShortString
-> Maybe Timestamp
-> Maybe ShortString
-> Maybe ShortString
-> Maybe ShortString
-> Maybe ShortString
-> ContentHeaderProperties
CHBasic Maybe ShortString
a' Maybe ShortString
b' Maybe FieldTable
c' Maybe Word8
d' Maybe Word8
e' Maybe ShortString
f' Maybe ShortString
g' Maybe ShortString
h' Maybe ShortString
i' Maybe Timestamp
j' Maybe ShortString
k' Maybe ShortString
l' Maybe ShortString
m' Maybe ShortString
n' )
getContentHeaderProperties Word16
90 = Int -> Get [Bit]
getPropBits Int
0 Get [Bit]
-> ([Bit] -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[] ->  ContentHeaderProperties -> Get ContentHeaderProperties
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ContentHeaderProperties
CHTx
getContentHeaderProperties Word16
85 = Int -> Get [Bit]
getPropBits Int
0 Get [Bit]
-> ([Bit] -> Get ContentHeaderProperties)
-> Get ContentHeaderProperties
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[] ->  ContentHeaderProperties -> Get ContentHeaderProperties
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ContentHeaderProperties
CHConfirm

getContentHeaderProperties Word16
n = [Char] -> Get ContentHeaderProperties
forall a. HasCallStack => [Char] -> a
error ([Char]
"Unexpected content header properties: " [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ Word16 -> [Char]
forall a. Show a => a -> [Char]
show Word16
n)
putContentHeaderProperties :: ContentHeaderProperties -> Put
putContentHeaderProperties :: ContentHeaderProperties -> Put
putContentHeaderProperties ContentHeaderProperties
CHConnection = [Bit] -> Put
putPropBits []
putContentHeaderProperties ContentHeaderProperties
CHChannel = [Bit] -> Put
putPropBits []
putContentHeaderProperties ContentHeaderProperties
CHExchange = [Bit] -> Put
putPropBits []
putContentHeaderProperties ContentHeaderProperties
CHQueue = [Bit] -> Put
putPropBits []
putContentHeaderProperties (CHBasic Maybe ShortString
a Maybe ShortString
b Maybe FieldTable
c Maybe Word8
d Maybe Word8
e Maybe ShortString
f Maybe ShortString
g Maybe ShortString
h Maybe ShortString
i Maybe Timestamp
j Maybe ShortString
k Maybe ShortString
l Maybe ShortString
m Maybe ShortString
n) = [Bit] -> Put
putPropBits [Maybe ShortString -> Bit
forall a. Maybe a -> Bit
isJust Maybe ShortString
a,Maybe ShortString -> Bit
forall a. Maybe a -> Bit
isJust Maybe ShortString
b,Maybe FieldTable -> Bit
forall a. Maybe a -> Bit
isJust Maybe FieldTable
c,Maybe Word8 -> Bit
forall a. Maybe a -> Bit
isJust Maybe Word8
d,Maybe Word8 -> Bit
forall a. Maybe a -> Bit
isJust Maybe Word8
e,Maybe ShortString -> Bit
forall a. Maybe a -> Bit
isJust Maybe ShortString
f,Maybe ShortString -> Bit
forall a. Maybe a -> Bit
isJust Maybe ShortString
g,Maybe ShortString -> Bit
forall a. Maybe a -> Bit
isJust Maybe ShortString
h,Maybe ShortString -> Bit
forall a. Maybe a -> Bit
isJust Maybe ShortString
i,Maybe Timestamp -> Bit
forall a. Maybe a -> Bit
isJust Maybe Timestamp
j,Maybe ShortString -> Bit
forall a. Maybe a -> Bit
isJust Maybe ShortString
k,Maybe ShortString -> Bit
forall a. Maybe a -> Bit
isJust Maybe ShortString
l,Maybe ShortString -> Bit
forall a. Maybe a -> Bit
isJust Maybe ShortString
m,Maybe ShortString -> Bit
forall a. Maybe a -> Bit
isJust Maybe ShortString
n]  Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe ShortString -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe ShortString
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe ShortString -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe FieldTable -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe FieldTable
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe Word8 -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe Word8
d Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe Word8 -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe Word8
e Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe ShortString -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe ShortString
f Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe ShortString -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe ShortString
g Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe ShortString -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe ShortString
h Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe ShortString -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe ShortString
i Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe Timestamp -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe Timestamp
j Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe ShortString -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe ShortString
k Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe ShortString -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe ShortString
l Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe ShortString -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe ShortString
m Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Maybe ShortString -> Put
forall a. Binary a => Maybe a -> Put
condPut Maybe ShortString
n
putContentHeaderProperties ContentHeaderProperties
CHTx = [Bit] -> Put
putPropBits []
putContentHeaderProperties ContentHeaderProperties
CHConfirm = [Bit] -> Put
putPropBits []

getClassIDOf :: ContentHeaderProperties -> ShortInt
getClassIDOf :: ContentHeaderProperties -> Word16
getClassIDOf (ContentHeaderProperties
CHConnection) = Word16
10
getClassIDOf (ContentHeaderProperties
CHChannel) = Word16
20
getClassIDOf (ContentHeaderProperties
CHExchange) = Word16
40
getClassIDOf (ContentHeaderProperties
CHQueue) = Word16
50
getClassIDOf (CHBasic Maybe ShortString
_ Maybe ShortString
_ Maybe FieldTable
_ Maybe Word8
_ Maybe Word8
_ Maybe ShortString
_ Maybe ShortString
_ Maybe ShortString
_ Maybe ShortString
_ Maybe Timestamp
_ Maybe ShortString
_ Maybe ShortString
_ Maybe ShortString
_ Maybe ShortString
_) = Word16
60
getClassIDOf (ContentHeaderProperties
CHTx) = Word16
90
getClassIDOf (ContentHeaderProperties
CHConfirm) = Word16
85

data ContentHeaderProperties =
    CHConnection

    |CHChannel

    |CHExchange

    |CHQueue

    |CHBasic
        (Maybe ShortString) -- content-type

        (Maybe ShortString) -- content-encoding

        (Maybe FieldTable) -- headers

        (Maybe Octet) -- delivery-mode

        (Maybe Octet) -- priority

        (Maybe ShortString) -- correlation-id

        (Maybe ShortString) -- reply-to

        (Maybe ShortString) -- expiration

        (Maybe ShortString) -- message-id

        (Maybe Timestamp) -- timestamp

        (Maybe ShortString) -- typ

        (Maybe ShortString) -- user-id

        (Maybe ShortString) -- app-id

        (Maybe ShortString) -- reserved

    |CHTx

    |CHConfirm


    deriving Int -> ContentHeaderProperties -> [Char] -> [Char]
[ContentHeaderProperties] -> [Char] -> [Char]
ContentHeaderProperties -> [Char]
(Int -> ContentHeaderProperties -> [Char] -> [Char])
-> (ContentHeaderProperties -> [Char])
-> ([ContentHeaderProperties] -> [Char] -> [Char])
-> Show ContentHeaderProperties
forall a.
(Int -> a -> [Char] -> [Char])
-> (a -> [Char]) -> ([a] -> [Char] -> [Char]) -> Show a
$cshowsPrec :: Int -> ContentHeaderProperties -> [Char] -> [Char]
showsPrec :: Int -> ContentHeaderProperties -> [Char] -> [Char]
$cshow :: ContentHeaderProperties -> [Char]
show :: ContentHeaderProperties -> [Char]
$cshowList :: [ContentHeaderProperties] -> [Char] -> [Char]
showList :: [ContentHeaderProperties] -> [Char] -> [Char]
Show

--Bits need special handling because AMQP requires contiguous bits to be packed into a Word8

-- | Packs up to 8 bits into a Word8

putBits :: [Bit] -> Put
putBits :: [Bit] -> Put
putBits = Word8 -> Put
putWord8 (Word8 -> Put) -> ([Bit] -> Word8) -> [Bit] -> Put
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> [Bit] -> Word8
putBits' Int
0
putBits' :: Int -> [Bit] -> Word8
putBits' :: Int -> [Bit] -> Word8
putBits' Int
_ [] = Word8
0
putBits' Int
offset (Bit
x:[Bit]
xs) = (Word8 -> Int -> Word8
forall a. Bits a => a -> Int -> a
shiftL (Bit -> Word8
forall {a}. Num a => Bit -> a
toInt Bit
x) Int
offset) Word8 -> Word8 -> Word8
forall a. Bits a => a -> a -> a
.|. (Int -> [Bit] -> Word8
putBits' (Int
offsetInt -> Int -> Int
forall a. Num a => a -> a -> a
+Int
1) [Bit]
xs)
    where toInt :: Bit -> a
toInt Bit
True = a
1
          toInt Bit
False = a
0
getBits :: Int -> Get [Bit]
getBits :: Int -> Get [Bit]
getBits Int
num = Get Word8
getWord8 Get Word8 -> (Word8 -> Get [Bit]) -> Get [Bit]
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= [Bit] -> Get [Bit]
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ([Bit] -> Get [Bit]) -> (Word8 -> [Bit]) -> Word8 -> Get [Bit]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int -> Word8 -> [Bit]
getBits' Int
num Int
0
getBits' :: Int -> Int -> Word8 -> [Bit]
getBits' :: Int -> Int -> Word8 -> [Bit]
getBits' Int
0 Int
_ Word8
_ = []
getBits' Int
num Int
offset Word8
x = ((Word8
x Word8 -> Word8 -> Word8
forall a. Bits a => a -> a -> a
.&. (Word8
2Word8 -> Int -> Word8
forall a b. (Num a, Integral b) => a -> b -> a
^Int
offset)) Word8 -> Word8 -> Bit
forall a. Eq a => a -> a -> Bit
/= Word8
0) Bit -> [Bit] -> [Bit]
forall a. a -> [a] -> [a]
: (Int -> Int -> Word8 -> [Bit]
getBits' (Int
numInt -> Int -> Int
forall a. Num a => a -> a -> a
-Int
1) (Int
offsetInt -> Int -> Int
forall a. Num a => a -> a -> a
+Int
1) Word8
x)
-- | Packs up to 15 Bits into a Word16 (=Property Flags)

putPropBits :: [Bit] -> Put
putPropBits :: [Bit] -> Put
putPropBits = Word16 -> Put
putWord16be (Word16 -> Put) -> ([Bit] -> Word16) -> [Bit] -> Put
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> [Bit] -> Word16
putPropBits' Int
0
putPropBits' :: Int -> [Bit] -> Word16
putPropBits' :: Int -> [Bit] -> Word16
putPropBits' Int
_ [] = Word16
0
putPropBits' Int
offset (Bit
x:[Bit]
xs) = (Word16 -> Int -> Word16
forall a. Bits a => a -> Int -> a
shiftL (Bit -> Word16
forall {a}. Num a => Bit -> a
toInt Bit
x) (Int
15Int -> Int -> Int
forall a. Num a => a -> a -> a
-Int
offset)) Word16 -> Word16 -> Word16
forall a. Bits a => a -> a -> a
.|. (Int -> [Bit] -> Word16
putPropBits' (Int
offsetInt -> Int -> Int
forall a. Num a => a -> a -> a
+Int
1) [Bit]
xs)
    where toInt :: Bit -> a
toInt Bit
True = a
1
          toInt Bit
False = a
0
getPropBits :: Int -> Get [Bit]
getPropBits :: Int -> Get [Bit]
getPropBits Int
num = Get Word16
getWord16be Get Word16 -> (Word16 -> Get [Bit]) -> Get [Bit]
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= [Bit] -> Get [Bit]
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return ([Bit] -> Get [Bit]) -> (Word16 -> [Bit]) -> Word16 -> Get [Bit]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int -> Word16 -> [Bit]
getPropBits' Int
num Int
0
getPropBits' :: Int -> Int -> Word16 -> [Bit]
getPropBits' :: Int -> Int -> Word16 -> [Bit]
getPropBits' Int
0 Int
_ Word16
_ = []
getPropBits' Int
num Int
offset Word16
x = ((Word16
x Word16 -> Word16 -> Word16
forall a. Bits a => a -> a -> a
.&. (Word16
2Word16 -> Int -> Word16
forall a b. (Num a, Integral b) => a -> b -> a
^(Int
15Int -> Int -> Int
forall a. Num a => a -> a -> a
-Int
offset))) Word16 -> Word16 -> Bit
forall a. Eq a => a -> a -> Bit
/= Word16
0) Bit -> [Bit] -> [Bit]
forall a. a -> [a] -> [a]
: (Int -> Int -> Word16 -> [Bit]
getPropBits' (Int
numInt -> Int -> Int
forall a. Num a => a -> a -> a
-Int
1) (Int
offsetInt -> Int -> Int
forall a. Num a => a -> a -> a
+Int
1) Word16
x)
condGet :: Binary a => Bool -> Get (Maybe a)
condGet :: forall a. Binary a => Bit -> Get (Maybe a)
condGet Bit
False = Maybe a -> Get (Maybe a)
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe a
forall a. Maybe a
Nothing
condGet Bit
True = Get a
forall t. Binary t => Get t
get Get a -> (a -> Get (Maybe a)) -> Get (Maybe a)
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Maybe a -> Get (Maybe a)
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe a -> Get (Maybe a)) -> (a -> Maybe a) -> a -> Get (Maybe a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> Maybe a
forall a. a -> Maybe a
Just

condPut :: Binary a => Maybe a -> Put
condPut :: forall a. Binary a => Maybe a -> Put
condPut = Put -> (a -> Put) -> Maybe a -> Put
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (() -> Put
forall a. a -> PutM a
forall (m :: * -> *) a. Monad m => a -> m a
return ()) a -> Put
forall t. Binary t => t -> Put
put
instance Binary MethodPayload where
    put :: MethodPayload -> Put
put (Connection_start Word8
a Word8
b FieldTable
c LongString
d LongString
e) = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word8 -> Put
forall t. Binary t => t -> Put
put Word8
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word8 -> Put
forall t. Binary t => t -> Put
put Word8
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> FieldTable -> Put
forall t. Binary t => t -> Put
put FieldTable
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongString -> Put
forall t. Binary t => t -> Put
put LongString
d Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongString -> Put
forall t. Binary t => t -> Put
put LongString
e
    put (Connection_start_ok FieldTable
a ShortString
b LongString
c ShortString
d) = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
11 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> FieldTable -> Put
forall t. Binary t => t -> Put
put FieldTable
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongString -> Put
forall t. Binary t => t -> Put
put LongString
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
d
    put (Connection_secure LongString
a) = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongString -> Put
forall t. Binary t => t -> Put
put LongString
a
    put (Connection_secure_ok LongString
a) = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
21 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongString -> Put
forall t. Binary t => t -> Put
put LongString
a
    put (Connection_tune Word16
a LongInt
b Word16
c) = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
30 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongInt -> Put
forall t. Binary t => t -> Put
put LongInt
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
c
    put (Connection_tune_ok Word16
a LongInt
b Word16
c) = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
31 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongInt -> Put
forall t. Binary t => t -> Put
put LongInt
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
c
    put (Connection_open ShortString
a ShortString
b Bit
c) = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
c
    put (Connection_open_ok ShortString
a) = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
41 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
a
    put (Connection_close Word16
a ShortString
b Word16
c Word16
d) = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
d
    put MethodPayload
Connection_close_ok = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
51
    put (Connection_blocked ShortString
a) = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
a
    put MethodPayload
Connection_unblocked = Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
61
    put (Channel_open ShortString
a) = Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
a
    put (Channel_open_ok LongString
a) = Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
11 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongString -> Put
forall t. Binary t => t -> Put
put LongString
a
    put (Channel_flow Bit
a) = Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
a
    put (Channel_flow_ok Bit
a) = Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
21 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
a
    put (Channel_close Word16
a ShortString
b Word16
c Word16
d) = Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
d
    put MethodPayload
Channel_close_ok = Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
41
    put (Exchange_declare Word16
a ShortString
b ShortString
c Bit
d Bit
e Bit
f Bit
g Bit
h FieldTable
i) = Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> [Bit] -> Put
putBits [Bit
d,Bit
e,Bit
f,Bit
g,Bit
h] Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> FieldTable -> Put
forall t. Binary t => t -> Put
put FieldTable
i
    put MethodPayload
Exchange_declare_ok = Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
11
    put (Exchange_delete Word16
a ShortString
b Bit
c Bit
d) = Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> [Bit] -> Put
putBits [Bit
c,Bit
d]
    put MethodPayload
Exchange_delete_ok = Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
21
    put (Exchange_bind Word16
a ShortString
b ShortString
c ShortString
d Bit
e FieldTable
f) = Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
30 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
d Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
e Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> FieldTable -> Put
forall t. Binary t => t -> Put
put FieldTable
f
    put MethodPayload
Exchange_bind_ok = Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
31
    put (Exchange_unbind Word16
a ShortString
b ShortString
c ShortString
d Bit
e FieldTable
f) = Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
d Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
e Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> FieldTable -> Put
forall t. Binary t => t -> Put
put FieldTable
f
    put MethodPayload
Exchange_unbind_ok = Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
51
    put (Queue_declare Word16
a ShortString
b Bit
c Bit
d Bit
e Bit
f Bit
g FieldTable
h) = Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> [Bit] -> Put
putBits [Bit
c,Bit
d,Bit
e,Bit
f,Bit
g] Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> FieldTable -> Put
forall t. Binary t => t -> Put
put FieldTable
h
    put (Queue_declare_ok ShortString
a LongInt
b LongInt
c) = Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
11 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongInt -> Put
forall t. Binary t => t -> Put
put LongInt
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongInt -> Put
forall t. Binary t => t -> Put
put LongInt
c
    put (Queue_bind Word16
a ShortString
b ShortString
c ShortString
d Bit
e FieldTable
f) = Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
d Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
e Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> FieldTable -> Put
forall t. Binary t => t -> Put
put FieldTable
f
    put MethodPayload
Queue_bind_ok = Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
21
    put (Queue_unbind Word16
a ShortString
b ShortString
c ShortString
d FieldTable
e) = Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
d Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> FieldTable -> Put
forall t. Binary t => t -> Put
put FieldTable
e
    put MethodPayload
Queue_unbind_ok = Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
51
    put (Queue_purge Word16
a ShortString
b Bit
c) = Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
30 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
c
    put (Queue_purge_ok LongInt
a) = Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
31 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongInt -> Put
forall t. Binary t => t -> Put
put LongInt
a
    put (Queue_delete Word16
a ShortString
b Bit
c Bit
d Bit
e) = Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> [Bit] -> Put
putBits [Bit
c,Bit
d,Bit
e]
    put (Queue_delete_ok LongInt
a) = Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
41 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongInt -> Put
forall t. Binary t => t -> Put
put LongInt
a
    put (Basic_qos LongInt
a Word16
b Bit
c) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongInt -> Put
forall t. Binary t => t -> Put
put LongInt
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
c
    put MethodPayload
Basic_qos_ok = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
11
    put (Basic_consume Word16
a ShortString
b ShortString
c Bit
d Bit
e Bit
f Bit
g FieldTable
h) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
20 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> [Bit] -> Put
putBits [Bit
d,Bit
e,Bit
f,Bit
g] Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> FieldTable -> Put
forall t. Binary t => t -> Put
put FieldTable
h
    put (Basic_consume_ok ShortString
a) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
21 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
a
    put (Basic_cancel ShortString
a Bit
b) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
30 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
b
    put (Basic_cancel_ok ShortString
a) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
31 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
a
    put (Basic_publish Word16
a ShortString
b ShortString
c Bit
d Bit
e) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
40 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> [Bit] -> Put
putBits [Bit
d,Bit
e]
    put (Basic_return Word16
a ShortString
b ShortString
c ShortString
d) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
50 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
d
    put (Basic_deliver ShortString
a Timestamp
b Bit
c ShortString
d ShortString
e) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Timestamp -> Put
forall t. Binary t => t -> Put
put Timestamp
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
d Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
e
    put (Basic_get Word16
a ShortString
b Bit
c) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
70 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
forall t. Binary t => t -> Put
put Word16
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
c
    put (Basic_get_ok Timestamp
a Bit
b ShortString
c ShortString
d LongInt
e) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
71 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Timestamp -> Put
forall t. Binary t => t -> Put
put Timestamp
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
b Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
c Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
d Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> LongInt -> Put
forall t. Binary t => t -> Put
put LongInt
e
    put (Basic_get_empty ShortString
a) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
72 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> ShortString -> Put
forall t. Binary t => t -> Put
put ShortString
a
    put (Basic_ack Timestamp
a Bit
b) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
80 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Timestamp -> Put
forall t. Binary t => t -> Put
put Timestamp
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
b
    put (Basic_reject Timestamp
a Bit
b) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
90 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Timestamp -> Put
forall t. Binary t => t -> Put
put Timestamp
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
b
    put (Basic_recover_async Bit
a) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
100 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
a
    put (Basic_recover Bit
a) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
110 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
a
    put MethodPayload
Basic_recover_ok = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
111
    put (Basic_nack Timestamp
a Bit
b Bit
c) = Word16 -> Put
putWord16be Word16
60 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
120 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Timestamp -> Put
forall t. Binary t => t -> Put
put Timestamp
a Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> [Bit] -> Put
putBits [Bit
b,Bit
c]
    put MethodPayload
Tx_select = Word16 -> Put
putWord16be Word16
90 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
10
    put MethodPayload
Tx_select_ok = Word16 -> Put
putWord16be Word16
90 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
11
    put MethodPayload
Tx_commit = Word16 -> Put
putWord16be Word16
90 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
20
    put MethodPayload
Tx_commit_ok = Word16 -> Put
putWord16be Word16
90 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
21
    put MethodPayload
Tx_rollback = Word16 -> Put
putWord16be Word16
90 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
30
    put MethodPayload
Tx_rollback_ok = Word16 -> Put
putWord16be Word16
90 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
31
    put (Confirm_select Bit
a) = Word16 -> Put
putWord16be Word16
85 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
10 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Bit -> Put
forall t. Binary t => t -> Put
put Bit
a
    put MethodPayload
Confirm_select_ok = Word16 -> Put
putWord16be Word16
85 Put -> Put -> Put
forall a b. PutM a -> PutM b -> PutM b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> Word16 -> Put
putWord16be Word16
11
    get :: Get MethodPayload
get = do
        Word16
classID <- Get Word16
getWord16be
        Word16
methodID <- Get Word16
getWord16be
        case (Word16
classID, Word16
methodID) of
            (Word16
10,Word16
10) -> Get Word8
forall t. Binary t => Get t
get Get Word8 -> (Word8 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word8
a -> Get Word8
forall t. Binary t => Get t
get Get Word8 -> (Word8 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word8
b -> Get FieldTable
forall t. Binary t => Get t
get Get FieldTable
-> (FieldTable -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \FieldTable
c -> Get LongString
forall t. Binary t => Get t
get Get LongString
-> (LongString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongString
d -> Get LongString
forall t. Binary t => Get t
get Get LongString
-> (LongString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongString
e ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word8
-> Word8 -> FieldTable -> LongString -> LongString -> MethodPayload
Connection_start Word8
a Word8
b FieldTable
c LongString
d LongString
e)
            (Word16
10,Word16
11) -> Get FieldTable
forall t. Binary t => Get t
get Get FieldTable
-> (FieldTable -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \FieldTable
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get LongString
forall t. Binary t => Get t
get Get LongString
-> (LongString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongString
c -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
d ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (FieldTable
-> ShortString -> LongString -> ShortString -> MethodPayload
Connection_start_ok FieldTable
a ShortString
b LongString
c ShortString
d)
            (Word16
10,Word16
20) -> Get LongString
forall t. Binary t => Get t
get Get LongString
-> (LongString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongString
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (LongString -> MethodPayload
Connection_secure LongString
a)
            (Word16
10,Word16
21) -> Get LongString
forall t. Binary t => Get t
get Get LongString
-> (LongString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongString
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (LongString -> MethodPayload
Connection_secure_ok LongString
a)
            (Word16
10,Word16
30) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get LongInt
forall t. Binary t => Get t
get Get LongInt -> (LongInt -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongInt
b -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
c ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16 -> LongInt -> Word16 -> MethodPayload
Connection_tune Word16
a LongInt
b Word16
c)
            (Word16
10,Word16
31) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get LongInt
forall t. Binary t => Get t
get Get LongInt -> (LongInt -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongInt
b -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
c ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16 -> LongInt -> Word16 -> MethodPayload
Connection_tune_ok Word16
a LongInt
b Word16
c)
            (Word16
10,Word16
40) -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
c ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ShortString -> ShortString -> Bit -> MethodPayload
Connection_open ShortString
a ShortString
b Bit
c)
            (Word16
10,Word16
41) -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ShortString -> MethodPayload
Connection_open_ok ShortString
a)
            (Word16
10,Word16
50) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
c -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
d ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16 -> ShortString -> Word16 -> Word16 -> MethodPayload
Connection_close Word16
a ShortString
b Word16
c Word16
d)
            (Word16
10,Word16
51) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Connection_close_ok
            (Word16
10,Word16
60) -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ShortString -> MethodPayload
Connection_blocked ShortString
a)
            (Word16
10,Word16
61) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Connection_unblocked
            (Word16
20,Word16
10) -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ShortString -> MethodPayload
Channel_open ShortString
a)
            (Word16
20,Word16
11) -> Get LongString
forall t. Binary t => Get t
get Get LongString
-> (LongString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongString
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (LongString -> MethodPayload
Channel_open_ok LongString
a)
            (Word16
20,Word16
20) -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bit -> MethodPayload
Channel_flow Bit
a)
            (Word16
20,Word16
21) -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bit -> MethodPayload
Channel_flow_ok Bit
a)
            (Word16
20,Word16
40) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
c -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
d ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16 -> ShortString -> Word16 -> Word16 -> MethodPayload
Channel_close Word16
a ShortString
b Word16
c Word16
d)
            (Word16
20,Word16
41) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Channel_close_ok
            (Word16
40,Word16
10) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
c -> Int -> Get [Bit]
getBits Int
5 Get [Bit] -> ([Bit] -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[Bit
d,Bit
e,Bit
f,Bit
g,Bit
h] -> Get FieldTable
forall t. Binary t => Get t
get Get FieldTable
-> (FieldTable -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \FieldTable
i ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16
-> ShortString
-> ShortString
-> Bit
-> Bit
-> Bit
-> Bit
-> Bit
-> FieldTable
-> MethodPayload
Exchange_declare Word16
a ShortString
b ShortString
c Bit
d Bit
e Bit
f Bit
g Bit
h FieldTable
i)
            (Word16
40,Word16
11) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Exchange_declare_ok
            (Word16
40,Word16
20) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Int -> Get [Bit]
getBits Int
2 Get [Bit] -> ([Bit] -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[Bit
c,Bit
d] ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16 -> ShortString -> Bit -> Bit -> MethodPayload
Exchange_delete Word16
a ShortString
b Bit
c Bit
d)
            (Word16
40,Word16
21) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Exchange_delete_ok
            (Word16
40,Word16
30) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
c -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
d -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
e -> Get FieldTable
forall t. Binary t => Get t
get Get FieldTable
-> (FieldTable -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \FieldTable
f ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16
-> ShortString
-> ShortString
-> ShortString
-> Bit
-> FieldTable
-> MethodPayload
Exchange_bind Word16
a ShortString
b ShortString
c ShortString
d Bit
e FieldTable
f)
            (Word16
40,Word16
31) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Exchange_bind_ok
            (Word16
40,Word16
40) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
c -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
d -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
e -> Get FieldTable
forall t. Binary t => Get t
get Get FieldTable
-> (FieldTable -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \FieldTable
f ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16
-> ShortString
-> ShortString
-> ShortString
-> Bit
-> FieldTable
-> MethodPayload
Exchange_unbind Word16
a ShortString
b ShortString
c ShortString
d Bit
e FieldTable
f)
            (Word16
40,Word16
51) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Exchange_unbind_ok
            (Word16
50,Word16
10) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Int -> Get [Bit]
getBits Int
5 Get [Bit] -> ([Bit] -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[Bit
c,Bit
d,Bit
e,Bit
f,Bit
g] -> Get FieldTable
forall t. Binary t => Get t
get Get FieldTable
-> (FieldTable -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \FieldTable
h ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16
-> ShortString
-> Bit
-> Bit
-> Bit
-> Bit
-> Bit
-> FieldTable
-> MethodPayload
Queue_declare Word16
a ShortString
b Bit
c Bit
d Bit
e Bit
f Bit
g FieldTable
h)
            (Word16
50,Word16
11) -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
a -> Get LongInt
forall t. Binary t => Get t
get Get LongInt -> (LongInt -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongInt
b -> Get LongInt
forall t. Binary t => Get t
get Get LongInt -> (LongInt -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongInt
c ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ShortString -> LongInt -> LongInt -> MethodPayload
Queue_declare_ok ShortString
a LongInt
b LongInt
c)
            (Word16
50,Word16
20) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
c -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
d -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
e -> Get FieldTable
forall t. Binary t => Get t
get Get FieldTable
-> (FieldTable -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \FieldTable
f ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16
-> ShortString
-> ShortString
-> ShortString
-> Bit
-> FieldTable
-> MethodPayload
Queue_bind Word16
a ShortString
b ShortString
c ShortString
d Bit
e FieldTable
f)
            (Word16
50,Word16
21) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Queue_bind_ok
            (Word16
50,Word16
50) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
c -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
d -> Get FieldTable
forall t. Binary t => Get t
get Get FieldTable
-> (FieldTable -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \FieldTable
e ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16
-> ShortString
-> ShortString
-> ShortString
-> FieldTable
-> MethodPayload
Queue_unbind Word16
a ShortString
b ShortString
c ShortString
d FieldTable
e)
            (Word16
50,Word16
51) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Queue_unbind_ok
            (Word16
50,Word16
30) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
c ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16 -> ShortString -> Bit -> MethodPayload
Queue_purge Word16
a ShortString
b Bit
c)
            (Word16
50,Word16
31) -> Get LongInt
forall t. Binary t => Get t
get Get LongInt -> (LongInt -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongInt
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (LongInt -> MethodPayload
Queue_purge_ok LongInt
a)
            (Word16
50,Word16
40) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Int -> Get [Bit]
getBits Int
3 Get [Bit] -> ([Bit] -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[Bit
c,Bit
d,Bit
e] ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16 -> ShortString -> Bit -> Bit -> Bit -> MethodPayload
Queue_delete Word16
a ShortString
b Bit
c Bit
d Bit
e)
            (Word16
50,Word16
41) -> Get LongInt
forall t. Binary t => Get t
get Get LongInt -> (LongInt -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongInt
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (LongInt -> MethodPayload
Queue_delete_ok LongInt
a)
            (Word16
60,Word16
10) -> Get LongInt
forall t. Binary t => Get t
get Get LongInt -> (LongInt -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongInt
a -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
b -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
c ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (LongInt -> Word16 -> Bit -> MethodPayload
Basic_qos LongInt
a Word16
b Bit
c)
            (Word16
60,Word16
11) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Basic_qos_ok
            (Word16
60,Word16
20) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
c -> Int -> Get [Bit]
getBits Int
4 Get [Bit] -> ([Bit] -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[Bit
d,Bit
e,Bit
f,Bit
g] -> Get FieldTable
forall t. Binary t => Get t
get Get FieldTable
-> (FieldTable -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \FieldTable
h ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16
-> ShortString
-> ShortString
-> Bit
-> Bit
-> Bit
-> Bit
-> FieldTable
-> MethodPayload
Basic_consume Word16
a ShortString
b ShortString
c Bit
d Bit
e Bit
f Bit
g FieldTable
h)
            (Word16
60,Word16
21) -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ShortString -> MethodPayload
Basic_consume_ok ShortString
a)
            (Word16
60,Word16
30) -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
a -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
b ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ShortString -> Bit -> MethodPayload
Basic_cancel ShortString
a Bit
b)
            (Word16
60,Word16
31) -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ShortString -> MethodPayload
Basic_cancel_ok ShortString
a)
            (Word16
60,Word16
40) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
c -> Int -> Get [Bit]
getBits Int
2 Get [Bit] -> ([Bit] -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[Bit
d,Bit
e] ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16 -> ShortString -> ShortString -> Bit -> Bit -> MethodPayload
Basic_publish Word16
a ShortString
b ShortString
c Bit
d Bit
e)
            (Word16
60,Word16
50) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
c -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
d ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16
-> ShortString -> ShortString -> ShortString -> MethodPayload
Basic_return Word16
a ShortString
b ShortString
c ShortString
d)
            (Word16
60,Word16
60) -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
a -> Get Timestamp
forall t. Binary t => Get t
get Get Timestamp
-> (Timestamp -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Timestamp
b -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
c -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
d -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
e ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ShortString
-> Timestamp -> Bit -> ShortString -> ShortString -> MethodPayload
Basic_deliver ShortString
a Timestamp
b Bit
c ShortString
d ShortString
e)
            (Word16
60,Word16
70) -> Get Word16
forall t. Binary t => Get t
get Get Word16 -> (Word16 -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Word16
a -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
b -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
c ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Word16 -> ShortString -> Bit -> MethodPayload
Basic_get Word16
a ShortString
b Bit
c)
            (Word16
60,Word16
71) -> Get Timestamp
forall t. Binary t => Get t
get Get Timestamp
-> (Timestamp -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Timestamp
a -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
b -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
c -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
d -> Get LongInt
forall t. Binary t => Get t
get Get LongInt -> (LongInt -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \LongInt
e ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Timestamp
-> Bit -> ShortString -> ShortString -> LongInt -> MethodPayload
Basic_get_ok Timestamp
a Bit
b ShortString
c ShortString
d LongInt
e)
            (Word16
60,Word16
72) -> Get ShortString
forall t. Binary t => Get t
get Get ShortString
-> (ShortString -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \ShortString
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (ShortString -> MethodPayload
Basic_get_empty ShortString
a)
            (Word16
60,Word16
80) -> Get Timestamp
forall t. Binary t => Get t
get Get Timestamp
-> (Timestamp -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Timestamp
a -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
b ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Timestamp -> Bit -> MethodPayload
Basic_ack Timestamp
a Bit
b)
            (Word16
60,Word16
90) -> Get Timestamp
forall t. Binary t => Get t
get Get Timestamp
-> (Timestamp -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Timestamp
a -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
b ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Timestamp -> Bit -> MethodPayload
Basic_reject Timestamp
a Bit
b)
            (Word16
60,Word16
100) -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bit -> MethodPayload
Basic_recover_async Bit
a)
            (Word16
60,Word16
110) -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bit -> MethodPayload
Basic_recover Bit
a)
            (Word16
60,Word16
111) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Basic_recover_ok
            (Word16
60,Word16
120) -> Get Timestamp
forall t. Binary t => Get t
get Get Timestamp
-> (Timestamp -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Timestamp
a -> Int -> Get [Bit]
getBits Int
2 Get [Bit] -> ([Bit] -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \[Bit
b,Bit
c] ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Timestamp -> Bit -> Bit -> MethodPayload
Basic_nack Timestamp
a Bit
b Bit
c)
            (Word16
90,Word16
10) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Tx_select
            (Word16
90,Word16
11) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Tx_select_ok
            (Word16
90,Word16
20) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Tx_commit
            (Word16
90,Word16
21) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Tx_commit_ok
            (Word16
90,Word16
30) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Tx_rollback
            (Word16
90,Word16
31) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Tx_rollback_ok
            (Word16
85,Word16
10) -> Get Bit
forall t. Binary t => Get t
get Get Bit -> (Bit -> Get MethodPayload) -> Get MethodPayload
forall a b. Get a -> (a -> Get b) -> Get b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Bit
a ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bit -> MethodPayload
Confirm_select Bit
a)
            (Word16
85,Word16
11) ->  MethodPayload -> Get MethodPayload
forall a. a -> Get a
forall (m :: * -> *) a. Monad m => a -> m a
return MethodPayload
Confirm_select_ok
            (Word16, Word16)
x -> [Char] -> Get MethodPayload
forall a. HasCallStack => [Char] -> a
error ([Char]
"Unexpected classID and methodID: " [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ (Word16, Word16) -> [Char]
forall a. Show a => a -> [Char]
show (Word16, Word16)
x)
data MethodPayload =

    Connection_start
        Octet -- version-major

        Octet -- version-minor

        FieldTable -- server-properties

        LongString -- mechanisms

        LongString -- locales

    |
    Connection_start_ok
        FieldTable -- client-properties

        ShortString -- mechanism

        LongString -- response

        ShortString -- locale

    |
    Connection_secure
        LongString -- challenge

    |
    Connection_secure_ok
        LongString -- response

    |
    Connection_tune
        ShortInt -- channel-max

        LongInt -- frame-max

        ShortInt -- heartbeat

    |
    Connection_tune_ok
        ShortInt -- channel-max

        LongInt -- frame-max

        ShortInt -- heartbeat

    |
    Connection_open
        ShortString -- virtual-host

        ShortString -- reserved-1

        Bit -- reserved-2

    |
    Connection_open_ok
        ShortString -- reserved-1

    |
    Connection_close
        ShortInt -- reply-code

        ShortString -- reply-text

        ShortInt -- class-id

        ShortInt -- method-id

    |
    Connection_close_ok

    |
    Connection_blocked
        ShortString -- reason

    |
    Connection_unblocked

    |
    Channel_open
        ShortString -- reserved-1

    |
    Channel_open_ok
        LongString -- reserved-1

    |
    Channel_flow
        Bit -- active

    |
    Channel_flow_ok
        Bit -- active

    |
    Channel_close
        ShortInt -- reply-code

        ShortString -- reply-text

        ShortInt -- class-id

        ShortInt -- method-id

    |
    Channel_close_ok

    |
    Exchange_declare
        ShortInt -- reserved-1

        ShortString -- exchange

        ShortString -- typ

        Bit -- passive

        Bit -- durable

        Bit -- auto-delete

        Bit -- internal

        Bit -- no-wait

        FieldTable -- arguments

    |
    Exchange_declare_ok

    |
    Exchange_delete
        ShortInt -- reserved-1

        ShortString -- exchange

        Bit -- if-unused

        Bit -- no-wait

    |
    Exchange_delete_ok

    |
    Exchange_bind
        ShortInt -- reserved-1

        ShortString -- destination

        ShortString -- source

        ShortString -- routing-key

        Bit -- no-wait

        FieldTable -- arguments

    |
    Exchange_bind_ok

    |
    Exchange_unbind
        ShortInt -- reserved-1

        ShortString -- destination

        ShortString -- source

        ShortString -- routing-key

        Bit -- no-wait

        FieldTable -- arguments

    |
    Exchange_unbind_ok

    |
    Queue_declare
        ShortInt -- reserved-1

        ShortString -- queue

        Bit -- passive

        Bit -- durable

        Bit -- exclusive

        Bit -- auto-delete

        Bit -- no-wait

        FieldTable -- arguments

    |
    Queue_declare_ok
        ShortString -- queue

        LongInt -- message-count

        LongInt -- consumer-count

    |
    Queue_bind
        ShortInt -- reserved-1

        ShortString -- queue

        ShortString -- exchange

        ShortString -- routing-key

        Bit -- no-wait

        FieldTable -- arguments

    |
    Queue_bind_ok

    |
    Queue_unbind
        ShortInt -- reserved-1

        ShortString -- queue

        ShortString -- exchange

        ShortString -- routing-key

        FieldTable -- arguments

    |
    Queue_unbind_ok

    |
    Queue_purge
        ShortInt -- reserved-1

        ShortString -- queue

        Bit -- no-wait

    |
    Queue_purge_ok
        LongInt -- message-count

    |
    Queue_delete
        ShortInt -- reserved-1

        ShortString -- queue

        Bit -- if-unused

        Bit -- if-empty

        Bit -- no-wait

    |
    Queue_delete_ok
        LongInt -- message-count

    |
    Basic_qos
        LongInt -- prefetch-size

        ShortInt -- prefetch-count

        Bit -- global

    |
    Basic_qos_ok

    |
    Basic_consume
        ShortInt -- reserved-1

        ShortString -- queue

        ShortString -- consumer-tag

        Bit -- no-local

        Bit -- no-ack

        Bit -- exclusive

        Bit -- no-wait

        FieldTable -- arguments

    |
    Basic_consume_ok
        ShortString -- consumer-tag

    |
    Basic_cancel
        ShortString -- consumer-tag

        Bit -- no-wait

    |
    Basic_cancel_ok
        ShortString -- consumer-tag

    |
    Basic_publish
        ShortInt -- reserved-1

        ShortString -- exchange

        ShortString -- routing-key

        Bit -- mandatory

        Bit -- immediate

    |
    Basic_return
        ShortInt -- reply-code

        ShortString -- reply-text

        ShortString -- exchange

        ShortString -- routing-key

    |
    Basic_deliver
        ShortString -- consumer-tag

        LongLongInt -- delivery-tag

        Bit -- redelivered

        ShortString -- exchange

        ShortString -- routing-key

    |
    Basic_get
        ShortInt -- reserved-1

        ShortString -- queue

        Bit -- no-ack

    |
    Basic_get_ok
        LongLongInt -- delivery-tag

        Bit -- redelivered

        ShortString -- exchange

        ShortString -- routing-key

        LongInt -- message-count

    |
    Basic_get_empty
        ShortString -- reserved-1

    |
    Basic_ack
        LongLongInt -- delivery-tag

        Bit -- multiple

    |
    Basic_reject
        LongLongInt -- delivery-tag

        Bit -- requeue

    |
    Basic_recover_async
        Bit -- requeue

    |
    Basic_recover
        Bit -- requeue

    |
    Basic_recover_ok

    |
    Basic_nack
        LongLongInt -- delivery-tag

        Bit -- multiple

        Bit -- requeue

    |
    Tx_select

    |
    Tx_select_ok

    |
    Tx_commit

    |
    Tx_commit_ok

    |
    Tx_rollback

    |
    Tx_rollback_ok

    |
    Confirm_select
        Bit -- nowait

    |
    Confirm_select_ok


    deriving Int -> MethodPayload -> [Char] -> [Char]
[MethodPayload] -> [Char] -> [Char]
MethodPayload -> [Char]
(Int -> MethodPayload -> [Char] -> [Char])
-> (MethodPayload -> [Char])
-> ([MethodPayload] -> [Char] -> [Char])
-> Show MethodPayload
forall a.
(Int -> a -> [Char] -> [Char])
-> (a -> [Char]) -> ([a] -> [Char] -> [Char]) -> Show a
$cshowsPrec :: Int -> MethodPayload -> [Char] -> [Char]
showsPrec :: Int -> MethodPayload -> [Char] -> [Char]
$cshow :: MethodPayload -> [Char]
show :: MethodPayload -> [Char]
$cshowList :: [MethodPayload] -> [Char] -> [Char]
showList :: [MethodPayload] -> [Char] -> [Char]
Show