protobuf-simple-0.1.0.0: test/Types/SFixed64Msg.hs
-- Generated by protobuf-simple. DO NOT EDIT!
module Types.SFixed64Msg where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
newtype SFixed64Msg = SFixed64Msg
{ value :: PB.Int64
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default SFixed64Msg where
defaultVal = SFixed64Msg
{ value = PB.defaultVal
}
instance PB.Mergeable SFixed64Msg where
merge a b = SFixed64Msg
{ value = PB.merge (value a) (value b)
}
instance PB.Required SFixed64Msg where
reqTags _ = PB.fromList [PB.WireTag 1 PB.Bit64]
instance PB.WireMessage SFixed64Msg where
fieldToValue (PB.WireTag 1 PB.Bit64) self = (\v -> self{value = PB.merge (value self) v}) <$> PB.getSFixed64
fieldToValue tag self = PB.getUnknown tag self
messageToFields self = do
PB.putSFixed64 (PB.WireTag 1 PB.Bit64) (value self)