module Network.GRPC.Spec.MessageMeta (
OutboundMeta(..)
, InboundMeta(..)
) where
import Control.DeepSeq (NFData)
import Data.Default
import Data.Word
import GHC.Generics (Generic)
data OutboundMeta = OutboundMeta {
OutboundMeta -> Bool
outboundEnableCompression :: Bool
}
deriving stock (Int -> OutboundMeta -> ShowS
[OutboundMeta] -> ShowS
OutboundMeta -> String
(Int -> OutboundMeta -> ShowS)
-> (OutboundMeta -> String)
-> ([OutboundMeta] -> ShowS)
-> Show OutboundMeta
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> OutboundMeta -> ShowS
showsPrec :: Int -> OutboundMeta -> ShowS
$cshow :: OutboundMeta -> String
show :: OutboundMeta -> String
$cshowList :: [OutboundMeta] -> ShowS
showList :: [OutboundMeta] -> ShowS
Show, (forall x. OutboundMeta -> Rep OutboundMeta x)
-> (forall x. Rep OutboundMeta x -> OutboundMeta)
-> Generic OutboundMeta
forall x. Rep OutboundMeta x -> OutboundMeta
forall x. OutboundMeta -> Rep OutboundMeta x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. OutboundMeta -> Rep OutboundMeta x
from :: forall x. OutboundMeta -> Rep OutboundMeta x
$cto :: forall x. Rep OutboundMeta x -> OutboundMeta
to :: forall x. Rep OutboundMeta x -> OutboundMeta
Generic)
deriving anyclass (OutboundMeta -> ()
(OutboundMeta -> ()) -> NFData OutboundMeta
forall a. (a -> ()) -> NFData a
$crnf :: OutboundMeta -> ()
rnf :: OutboundMeta -> ()
NFData)
instance Default OutboundMeta where
def :: OutboundMeta
def = OutboundMeta {
outboundEnableCompression :: Bool
outboundEnableCompression = Bool
True
}
data InboundMeta = InboundMeta {
InboundMeta -> Maybe Word32
inboundCompressedSize :: Maybe Word32
, InboundMeta -> Word32
inboundUncompressedSize :: Word32
}
deriving stock (Int -> InboundMeta -> ShowS
[InboundMeta] -> ShowS
InboundMeta -> String
(Int -> InboundMeta -> ShowS)
-> (InboundMeta -> String)
-> ([InboundMeta] -> ShowS)
-> Show InboundMeta
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> InboundMeta -> ShowS
showsPrec :: Int -> InboundMeta -> ShowS
$cshow :: InboundMeta -> String
show :: InboundMeta -> String
$cshowList :: [InboundMeta] -> ShowS
showList :: [InboundMeta] -> ShowS
Show)