{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE EmptyDataDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UndecidableSuperClasses #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-dodgy-exports #-}
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-orphans #-}
{-# OPTIONS_GHC -Wno-unticked-promoted-constructors #-}
{-# OPTIONS_GHC -Wno-name-shadowing #-}
module Capnp.Gen.Capnp.Persistent.New where
import qualified Capnp.Repr as R
import qualified Capnp.Repr.Parsed as RP
import qualified Capnp.New.Basics as Basics
import qualified GHC.OverloadedLabels as OL
import qualified Capnp.GenHelpers.New as GH
import qualified Capnp.New.Classes as C
import qualified GHC.Generics as Generics
import qualified Capnp.GenHelpers.ReExports.Data.ByteString as BS
import qualified Prelude as Std_
import qualified Data.Word as Std_
import qualified Data.Int as Std_
import Prelude ((<$>), (<*>), (>>=))
data Persistent sturdyRef owner
type instance (R.ReprFor (Persistent sturdyRef owner)) = (R.Ptr (Std_.Just R.Cap))
instance (C.HasTypeId (Persistent sturdyRef owner)) where
    typeId :: Word64
typeId  = Word64
14468694717054801553
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.Parse (Persistent sturdyRef owner) (GH.Client (Persistent sturdyRef owner))) where
    parse :: Raw 'Const (Persistent sturdyRef owner)
-> m (Client (Persistent sturdyRef owner))
parse  = Raw 'Const (Persistent sturdyRef owner)
-> m (Client (Persistent sturdyRef owner))
forall a (m :: * -> *).
(IsCap a, ReadCtx m 'Const) =>
Raw 'Const a -> m (Client a)
GH.parseCap
    encode :: Message ('Mut s)
-> Client (Persistent sturdyRef owner)
-> m (Raw ('Mut s) (Persistent sturdyRef owner))
encode  = Message ('Mut s)
-> Client (Persistent sturdyRef owner)
-> m (Raw ('Mut s) (Persistent sturdyRef owner))
forall a (m :: * -> *) s.
(IsCap a, RWCtx m s) =>
Message ('Mut s) -> Client a -> m (Raw ('Mut s) a)
GH.encodeCap
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (GH.Export (Persistent sturdyRef owner)) where
    type Server (Persistent sturdyRef owner) = (Persistent'server_ sturdyRef owner)
    methodHandlerTree :: Proxy (Persistent sturdyRef owner) -> s -> MethodHandlerTree
methodHandlerTree Proxy (Persistent sturdyRef owner)
_ s
s_ = (Word64
-> [UntypedMethodHandler]
-> [MethodHandlerTree]
-> MethodHandlerTree
GH.MethodHandlerTree (HasTypeId (Persistent sturdyRef owner) => Word64
forall a. HasTypeId a => Word64
C.typeId @((Persistent sturdyRef owner))) [(MethodHandler
  (Persistent'SaveParams sturdyRef owner)
  (Persistent'SaveResults sturdyRef owner)
-> UntypedMethodHandler
forall p r.
(IsStruct p, IsStruct r) =>
MethodHandler p r -> UntypedMethodHandler
GH.toUntypedMethodHandler ((s
-> MethodHandler
     (Persistent'SaveParams sturdyRef owner)
     (Persistent'SaveResults sturdyRef owner)
forall sturdyRef owner s_.
Persistent'server_ sturdyRef owner s_ =>
s_
-> MethodHandler
     (Persistent'SaveParams sturdyRef owner)
     (Persistent'SaveResults sturdyRef owner)
persistent'save @(sturdyRef) @(owner)) s
s_))] [])
class (Persistent'server_ sturdyRef owner s_) where
    persistent'save :: s_ -> (GH.MethodHandler (Persistent'SaveParams sturdyRef owner) (Persistent'SaveResults sturdyRef owner))
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (GH.HasMethod "save" (Persistent sturdyRef owner) (Persistent'SaveParams sturdyRef owner) (Persistent'SaveResults sturdyRef owner)) where
    methodByLabel :: Method
  (Persistent sturdyRef owner)
  (Persistent'SaveParams sturdyRef owner)
  (Persistent'SaveResults sturdyRef owner)
methodByLabel  = (Word64
-> Word16
-> Method
     (Persistent sturdyRef owner)
     (Persistent'SaveParams sturdyRef owner)
     (Persistent'SaveResults sturdyRef owner)
forall c p r. Word64 -> Word16 -> Method c p r
GH.Method Word64
14468694717054801553 Word16
0)
data Persistent'SaveParams sturdyRef owner
type instance (R.ReprFor (Persistent'SaveParams sturdyRef owner)) = (R.Ptr (Std_.Just R.Struct))
instance (C.HasTypeId (Persistent'SaveParams sturdyRef owner)) where
    typeId :: Word64
typeId  = Word64
17829674341603767205
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.TypedStruct (Persistent'SaveParams sturdyRef owner)) where
    numStructWords :: Word16
numStructWords  = Word16
0
    numStructPtrs :: Word16
numStructPtrs  = Word16
1
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.Allocate (Persistent'SaveParams sturdyRef owner)) where
    type AllocHint (Persistent'SaveParams sturdyRef owner) = ()
    new :: AllocHint (Persistent'SaveParams sturdyRef owner)
-> Message ('Mut s)
-> m (Raw ('Mut s) (Persistent'SaveParams sturdyRef owner))
new AllocHint (Persistent'SaveParams sturdyRef owner)
_ = Message ('Mut s)
-> m (Raw ('Mut s) (Persistent'SaveParams sturdyRef owner))
forall a (m :: * -> *) s.
(TypedStruct a, RWCtx m s) =>
Message ('Mut s) -> m (Raw ('Mut s) a)
C.newTypedStruct
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.EstimateAlloc (Persistent'SaveParams sturdyRef owner) (C.Parsed (Persistent'SaveParams sturdyRef owner)))
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.AllocateList (Persistent'SaveParams sturdyRef owner)) where
    type ListAllocHint (Persistent'SaveParams sturdyRef owner) = Std_.Int
    newList :: ListAllocHint (Persistent'SaveParams sturdyRef owner)
-> Message ('Mut s)
-> m (Raw ('Mut s) (List (Persistent'SaveParams sturdyRef owner)))
newList  = ListAllocHint (Persistent'SaveParams sturdyRef owner)
-> Message ('Mut s)
-> m (Raw ('Mut s) (List (Persistent'SaveParams sturdyRef owner)))
forall a (m :: * -> *) s.
(TypedStruct a, RWCtx m s) =>
Int -> Message ('Mut s) -> m (Raw ('Mut s) (List a))
C.newTypedStructList
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.EstimateListAlloc (Persistent'SaveParams sturdyRef owner) (C.Parsed (Persistent'SaveParams sturdyRef owner)))
data instance C.Parsed (Persistent'SaveParams sturdyRef owner)
    = Persistent'SaveParams 
        {Parsed (Persistent'SaveParams sturdyRef owner) -> Parsed owner
sealFor :: (RP.Parsed owner)}
    deriving((forall x.
 Parsed (Persistent'SaveParams sturdyRef owner)
 -> Rep (Parsed (Persistent'SaveParams sturdyRef owner)) x)
-> (forall x.
    Rep (Parsed (Persistent'SaveParams sturdyRef owner)) x
    -> Parsed (Persistent'SaveParams sturdyRef owner))
-> Generic (Parsed (Persistent'SaveParams sturdyRef owner))
forall x.
Rep (Parsed (Persistent'SaveParams sturdyRef owner)) x
-> Parsed (Persistent'SaveParams sturdyRef owner)
forall x.
Parsed (Persistent'SaveParams sturdyRef owner)
-> Rep (Parsed (Persistent'SaveParams sturdyRef owner)) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall sturdyRef owner x.
Rep (Parsed (Persistent'SaveParams sturdyRef owner)) x
-> Parsed (Persistent'SaveParams sturdyRef owner)
forall sturdyRef owner x.
Parsed (Persistent'SaveParams sturdyRef owner)
-> Rep (Parsed (Persistent'SaveParams sturdyRef owner)) x
$cto :: forall sturdyRef owner x.
Rep (Parsed (Persistent'SaveParams sturdyRef owner)) x
-> Parsed (Persistent'SaveParams sturdyRef owner)
$cfrom :: forall sturdyRef owner x.
Parsed (Persistent'SaveParams sturdyRef owner)
-> Rep (Parsed (Persistent'SaveParams sturdyRef owner)) x
Generics.Generic)
deriving instance ((Std_.Show (RP.Parsed sturdyRef))
                  ,(Std_.Show (RP.Parsed owner))) => (Std_.Show (C.Parsed (Persistent'SaveParams sturdyRef owner)))
deriving instance ((Std_.Eq (RP.Parsed sturdyRef))
                  ,(Std_.Eq (RP.Parsed owner))) => (Std_.Eq (C.Parsed (Persistent'SaveParams sturdyRef owner)))
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.Parse (Persistent'SaveParams sturdyRef owner) (C.Parsed (Persistent'SaveParams sturdyRef owner))) where
    parse :: Raw 'Const (Persistent'SaveParams sturdyRef owner)
-> m (Parsed (Persistent'SaveParams sturdyRef owner))
parse Raw 'Const (Persistent'SaveParams sturdyRef owner)
raw_ = (ParsedByRepr (ReprFor owner) owner
-> Parsed (Persistent'SaveParams sturdyRef owner)
forall sturdyRef owner.
Parsed owner -> Parsed (Persistent'SaveParams sturdyRef owner)
Persistent'SaveParams (ParsedByRepr (ReprFor owner) owner
 -> Parsed (Persistent'SaveParams sturdyRef owner))
-> m (ParsedByRepr (ReprFor owner) owner)
-> m (Parsed (Persistent'SaveParams sturdyRef owner))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Field 'Slot (Persistent'SaveParams sturdyRef owner) owner
-> Raw 'Const (Persistent'SaveParams sturdyRef owner)
-> m (ParsedByRepr (ReprFor owner) owner)
forall a b bp (m :: * -> *) (k :: FieldKind).
(IsStruct a, Parse b bp, ReadCtx m 'Const) =>
Field k a b -> Raw 'Const a -> m bp
GH.parseField IsLabel
  "sealFor"
  (Field 'Slot (Persistent'SaveParams sturdyRef owner) owner)
Field 'Slot (Persistent'SaveParams sturdyRef owner) owner
#sealFor Raw 'Const (Persistent'SaveParams sturdyRef owner)
raw_))
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.Marshal (Persistent'SaveParams sturdyRef owner) (C.Parsed (Persistent'SaveParams sturdyRef owner))) where
    marshalInto :: Raw ('Mut s) (Persistent'SaveParams sturdyRef owner)
-> Parsed (Persistent'SaveParams sturdyRef owner) -> m ()
marshalInto Raw ('Mut s) (Persistent'SaveParams sturdyRef owner)
raw_ Persistent'SaveParams{..} = (do
        (Field 'Slot (Persistent'SaveParams sturdyRef owner) owner
-> ParsedByRepr (ReprFor owner) owner
-> Raw ('Mut s) (Persistent'SaveParams sturdyRef owner)
-> m ()
forall a b (m :: * -> *) s bp.
(IsStruct a, Parse b bp, RWCtx m s) =>
Field 'Slot a b -> bp -> Raw ('Mut s) a -> m ()
GH.encodeField IsLabel
  "sealFor"
  (Field 'Slot (Persistent'SaveParams sturdyRef owner) owner)
Field 'Slot (Persistent'SaveParams sturdyRef owner) owner
#sealFor ParsedByRepr (ReprFor owner) owner
sealFor Raw ('Mut s) (Persistent'SaveParams sturdyRef owner)
raw_)
        (() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
        )
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (GH.HasField "sealFor" GH.Slot (Persistent'SaveParams sturdyRef owner) owner) where
    fieldByLabel :: Field 'Slot (Persistent'SaveParams sturdyRef owner) owner
fieldByLabel  = (Word16 -> Field 'Slot (Persistent'SaveParams sturdyRef owner) owner
forall a b. IsPtr b => Word16 -> Field 'Slot a b
GH.ptrField Word16
0)
data Persistent'SaveResults sturdyRef owner
type instance (R.ReprFor (Persistent'SaveResults sturdyRef owner)) = (R.Ptr (Std_.Just R.Struct))
instance (C.HasTypeId (Persistent'SaveResults sturdyRef owner)) where
    typeId :: Word64
typeId  = Word64
13215893102637674431
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.TypedStruct (Persistent'SaveResults sturdyRef owner)) where
    numStructWords :: Word16
numStructWords  = Word16
0
    numStructPtrs :: Word16
numStructPtrs  = Word16
1
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.Allocate (Persistent'SaveResults sturdyRef owner)) where
    type AllocHint (Persistent'SaveResults sturdyRef owner) = ()
    new :: AllocHint (Persistent'SaveResults sturdyRef owner)
-> Message ('Mut s)
-> m (Raw ('Mut s) (Persistent'SaveResults sturdyRef owner))
new AllocHint (Persistent'SaveResults sturdyRef owner)
_ = Message ('Mut s)
-> m (Raw ('Mut s) (Persistent'SaveResults sturdyRef owner))
forall a (m :: * -> *) s.
(TypedStruct a, RWCtx m s) =>
Message ('Mut s) -> m (Raw ('Mut s) a)
C.newTypedStruct
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.EstimateAlloc (Persistent'SaveResults sturdyRef owner) (C.Parsed (Persistent'SaveResults sturdyRef owner)))
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.AllocateList (Persistent'SaveResults sturdyRef owner)) where
    type ListAllocHint (Persistent'SaveResults sturdyRef owner) = Std_.Int
    newList :: ListAllocHint (Persistent'SaveResults sturdyRef owner)
-> Message ('Mut s)
-> m (Raw ('Mut s) (List (Persistent'SaveResults sturdyRef owner)))
newList  = ListAllocHint (Persistent'SaveResults sturdyRef owner)
-> Message ('Mut s)
-> m (Raw ('Mut s) (List (Persistent'SaveResults sturdyRef owner)))
forall a (m :: * -> *) s.
(TypedStruct a, RWCtx m s) =>
Int -> Message ('Mut s) -> m (Raw ('Mut s) (List a))
C.newTypedStructList
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.EstimateListAlloc (Persistent'SaveResults sturdyRef owner) (C.Parsed (Persistent'SaveResults sturdyRef owner)))
data instance C.Parsed (Persistent'SaveResults sturdyRef owner)
    = Persistent'SaveResults 
        {Parsed (Persistent'SaveResults sturdyRef owner) -> Parsed sturdyRef
sturdyRef :: (RP.Parsed sturdyRef)}
    deriving((forall x.
 Parsed (Persistent'SaveResults sturdyRef owner)
 -> Rep (Parsed (Persistent'SaveResults sturdyRef owner)) x)
-> (forall x.
    Rep (Parsed (Persistent'SaveResults sturdyRef owner)) x
    -> Parsed (Persistent'SaveResults sturdyRef owner))
-> Generic (Parsed (Persistent'SaveResults sturdyRef owner))
forall x.
Rep (Parsed (Persistent'SaveResults sturdyRef owner)) x
-> Parsed (Persistent'SaveResults sturdyRef owner)
forall x.
Parsed (Persistent'SaveResults sturdyRef owner)
-> Rep (Parsed (Persistent'SaveResults sturdyRef owner)) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall sturdyRef owner x.
Rep (Parsed (Persistent'SaveResults sturdyRef owner)) x
-> Parsed (Persistent'SaveResults sturdyRef owner)
forall sturdyRef owner x.
Parsed (Persistent'SaveResults sturdyRef owner)
-> Rep (Parsed (Persistent'SaveResults sturdyRef owner)) x
$cto :: forall sturdyRef owner x.
Rep (Parsed (Persistent'SaveResults sturdyRef owner)) x
-> Parsed (Persistent'SaveResults sturdyRef owner)
$cfrom :: forall sturdyRef owner x.
Parsed (Persistent'SaveResults sturdyRef owner)
-> Rep (Parsed (Persistent'SaveResults sturdyRef owner)) x
Generics.Generic)
deriving instance ((Std_.Show (RP.Parsed sturdyRef))
                  ,(Std_.Show (RP.Parsed owner))) => (Std_.Show (C.Parsed (Persistent'SaveResults sturdyRef owner)))
deriving instance ((Std_.Eq (RP.Parsed sturdyRef))
                  ,(Std_.Eq (RP.Parsed owner))) => (Std_.Eq (C.Parsed (Persistent'SaveResults sturdyRef owner)))
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.Parse (Persistent'SaveResults sturdyRef owner) (C.Parsed (Persistent'SaveResults sturdyRef owner))) where
    parse :: Raw 'Const (Persistent'SaveResults sturdyRef owner)
-> m (Parsed (Persistent'SaveResults sturdyRef owner))
parse Raw 'Const (Persistent'SaveResults sturdyRef owner)
raw_ = (ParsedByRepr (ReprFor sturdyRef) sturdyRef
-> Parsed (Persistent'SaveResults sturdyRef owner)
forall sturdyRef owner.
Parsed sturdyRef -> Parsed (Persistent'SaveResults sturdyRef owner)
Persistent'SaveResults (ParsedByRepr (ReprFor sturdyRef) sturdyRef
 -> Parsed (Persistent'SaveResults sturdyRef owner))
-> m (ParsedByRepr (ReprFor sturdyRef) sturdyRef)
-> m (Parsed (Persistent'SaveResults sturdyRef owner))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Field 'Slot (Persistent'SaveResults sturdyRef owner) sturdyRef
-> Raw 'Const (Persistent'SaveResults sturdyRef owner)
-> m (ParsedByRepr (ReprFor sturdyRef) sturdyRef)
forall a b bp (m :: * -> *) (k :: FieldKind).
(IsStruct a, Parse b bp, ReadCtx m 'Const) =>
Field k a b -> Raw 'Const a -> m bp
GH.parseField IsLabel
  "sturdyRef"
  (Field 'Slot (Persistent'SaveResults sturdyRef owner) sturdyRef)
Field 'Slot (Persistent'SaveResults sturdyRef owner) sturdyRef
#sturdyRef Raw 'Const (Persistent'SaveResults sturdyRef owner)
raw_))
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (C.Marshal (Persistent'SaveResults sturdyRef owner) (C.Parsed (Persistent'SaveResults sturdyRef owner))) where
    marshalInto :: Raw ('Mut s) (Persistent'SaveResults sturdyRef owner)
-> Parsed (Persistent'SaveResults sturdyRef owner) -> m ()
marshalInto Raw ('Mut s) (Persistent'SaveResults sturdyRef owner)
raw_ Persistent'SaveResults{..} = (do
        (Field 'Slot (Persistent'SaveResults sturdyRef owner) sturdyRef
-> ParsedByRepr (ReprFor sturdyRef) sturdyRef
-> Raw ('Mut s) (Persistent'SaveResults sturdyRef owner)
-> m ()
forall a b (m :: * -> *) s bp.
(IsStruct a, Parse b bp, RWCtx m s) =>
Field 'Slot a b -> bp -> Raw ('Mut s) a -> m ()
GH.encodeField IsLabel
  "sturdyRef"
  (Field 'Slot (Persistent'SaveResults sturdyRef owner) sturdyRef)
Field 'Slot (Persistent'SaveResults sturdyRef owner) sturdyRef
#sturdyRef ParsedByRepr (ReprFor sturdyRef) sturdyRef
sturdyRef Raw ('Mut s) (Persistent'SaveResults sturdyRef owner)
raw_)
        (() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
        )
instance ((GH.TypeParam sturdyRef)
         ,(GH.TypeParam owner)) => (GH.HasField "sturdyRef" GH.Slot (Persistent'SaveResults sturdyRef owner) sturdyRef) where
    fieldByLabel :: Field 'Slot (Persistent'SaveResults sturdyRef owner) sturdyRef
fieldByLabel  = (Word16
-> Field 'Slot (Persistent'SaveResults sturdyRef owner) sturdyRef
forall a b. IsPtr b => Word16 -> Field 'Slot a b
GH.ptrField Word16
0)
data RealmGateway internalRef externalRef internalOwner externalOwner
type instance (R.ReprFor (RealmGateway internalRef externalRef internalOwner externalOwner)) = (R.Ptr (Std_.Just R.Cap))
instance (C.HasTypeId (RealmGateway internalRef externalRef internalOwner externalOwner)) where
    typeId :: Word64
typeId  = Word64
9583422979879616212
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.Parse (RealmGateway internalRef externalRef internalOwner externalOwner) (GH.Client (RealmGateway internalRef externalRef internalOwner externalOwner))) where
    parse :: Raw
  'Const
  (RealmGateway internalRef externalRef internalOwner externalOwner)
-> m (Client
        (RealmGateway internalRef externalRef internalOwner externalOwner))
parse  = Raw
  'Const
  (RealmGateway internalRef externalRef internalOwner externalOwner)
-> m (Client
        (RealmGateway internalRef externalRef internalOwner externalOwner))
forall a (m :: * -> *).
(IsCap a, ReadCtx m 'Const) =>
Raw 'Const a -> m (Client a)
GH.parseCap
    encode :: Message ('Mut s)
-> Client
     (RealmGateway internalRef externalRef internalOwner externalOwner)
-> m (Raw
        ('Mut s)
        (RealmGateway internalRef externalRef internalOwner externalOwner))
encode  = Message ('Mut s)
-> Client
     (RealmGateway internalRef externalRef internalOwner externalOwner)
-> m (Raw
        ('Mut s)
        (RealmGateway internalRef externalRef internalOwner externalOwner))
forall a (m :: * -> *) s.
(IsCap a, RWCtx m s) =>
Message ('Mut s) -> Client a -> m (Raw ('Mut s) a)
GH.encodeCap
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (GH.Export (RealmGateway internalRef externalRef internalOwner externalOwner)) where
    type Server (RealmGateway internalRef externalRef internalOwner externalOwner) = (RealmGateway'server_ internalRef externalRef internalOwner externalOwner)
    methodHandlerTree :: Proxy
  (RealmGateway internalRef externalRef internalOwner externalOwner)
-> s -> MethodHandlerTree
methodHandlerTree Proxy
  (RealmGateway internalRef externalRef internalOwner externalOwner)
_ s
s_ = (Word64
-> [UntypedMethodHandler]
-> [MethodHandlerTree]
-> MethodHandlerTree
GH.MethodHandlerTree (HasTypeId
  (RealmGateway
     internalRef externalRef internalOwner externalOwner) =>
Word64
forall a. HasTypeId a => Word64
C.typeId @((RealmGateway internalRef externalRef internalOwner externalOwner))) [(MethodHandler
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveResults internalRef internalOwner)
-> UntypedMethodHandler
forall p r.
(IsStruct p, IsStruct r) =>
MethodHandler p r -> UntypedMethodHandler
GH.toUntypedMethodHandler ((s
-> MethodHandler
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveResults internalRef internalOwner)
forall internalRef externalRef internalOwner externalOwner s_.
RealmGateway'server_
  internalRef externalRef internalOwner externalOwner s_ =>
s_
-> MethodHandler
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveResults internalRef internalOwner)
realmGateway'import_ @(internalRef) @(externalRef) @(internalOwner) @(externalOwner)) s
s_))
                                                                                                                                    ,(MethodHandler
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveResults externalRef externalOwner)
-> UntypedMethodHandler
forall p r.
(IsStruct p, IsStruct r) =>
MethodHandler p r -> UntypedMethodHandler
GH.toUntypedMethodHandler ((s
-> MethodHandler
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveResults externalRef externalOwner)
forall internalRef externalRef internalOwner externalOwner s_.
RealmGateway'server_
  internalRef externalRef internalOwner externalOwner s_ =>
s_
-> MethodHandler
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveResults externalRef externalOwner)
realmGateway'export @(internalRef) @(externalRef) @(internalOwner) @(externalOwner)) s
s_))] [])
class (RealmGateway'server_ internalRef externalRef internalOwner externalOwner s_) where
    realmGateway'import_ :: s_ -> (GH.MethodHandler (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Persistent'SaveResults internalRef internalOwner))
    realmGateway'export :: s_ -> (GH.MethodHandler (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Persistent'SaveResults externalRef externalOwner))
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (GH.HasMethod "import_" (RealmGateway internalRef externalRef internalOwner externalOwner) (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Persistent'SaveResults internalRef internalOwner)) where
    methodByLabel :: Method
  (RealmGateway internalRef externalRef internalOwner externalOwner)
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveResults internalRef internalOwner)
methodByLabel  = (Word64
-> Word16
-> Method
     (RealmGateway internalRef externalRef internalOwner externalOwner)
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveResults internalRef internalOwner)
forall c p r. Word64 -> Word16 -> Method c p r
GH.Method Word64
9583422979879616212 Word16
0)
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (GH.HasMethod "export" (RealmGateway internalRef externalRef internalOwner externalOwner) (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Persistent'SaveResults externalRef externalOwner)) where
    methodByLabel :: Method
  (RealmGateway internalRef externalRef internalOwner externalOwner)
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveResults externalRef externalOwner)
methodByLabel  = (Word64
-> Word16
-> Method
     (RealmGateway internalRef externalRef internalOwner externalOwner)
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveResults externalRef externalOwner)
forall c p r. Word64 -> Word16 -> Method c p r
GH.Method Word64
9583422979879616212 Word16
1)
data RealmGateway'import'params internalRef externalRef internalOwner externalOwner
type instance (R.ReprFor (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) = (R.Ptr (Std_.Just R.Struct))
instance (C.HasTypeId (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
    typeId :: Word64
typeId  = Word64
17348653140467603277
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.TypedStruct (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
    numStructWords :: Word16
numStructWords  = Word16
0
    numStructPtrs :: Word16
numStructPtrs  = Word16
2
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.Allocate (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
    type AllocHint (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) = ()
    new :: AllocHint
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
-> Message ('Mut s)
-> m (Raw
        ('Mut s)
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner))
new AllocHint
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
_ = Message ('Mut s)
-> m (Raw
        ('Mut s)
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner))
forall a (m :: * -> *) s.
(TypedStruct a, RWCtx m s) =>
Message ('Mut s) -> m (Raw ('Mut s) a)
C.newTypedStruct
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.EstimateAlloc (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (C.Parsed (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)))
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.AllocateList (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)) where
    type ListAllocHint (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) = Std_.Int
    newList :: ListAllocHint
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
-> Message ('Mut s)
-> m (Raw
        ('Mut s)
        (List
           (RealmGateway'import'params
              internalRef externalRef internalOwner externalOwner)))
newList  = ListAllocHint
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
-> Message ('Mut s)
-> m (Raw
        ('Mut s)
        (List
           (RealmGateway'import'params
              internalRef externalRef internalOwner externalOwner)))
forall a (m :: * -> *) s.
(TypedStruct a, RWCtx m s) =>
Int -> Message ('Mut s) -> m (Raw ('Mut s) (List a))
C.newTypedStructList
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.EstimateListAlloc (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (C.Parsed (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)))
data instance C.Parsed (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)
    = RealmGateway'import'params 
        {Parsed
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
-> Parsed (Persistent externalRef externalOwner)
cap :: (RP.Parsed (Persistent externalRef externalOwner))
        ,Parsed
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
-> Parsed (Persistent'SaveParams internalRef internalOwner)
params :: (RP.Parsed (Persistent'SaveParams internalRef internalOwner))}
    deriving((forall x.
 Parsed
   (RealmGateway'import'params
      internalRef externalRef internalOwner externalOwner)
 -> Rep
      (Parsed
         (RealmGateway'import'params
            internalRef externalRef internalOwner externalOwner))
      x)
-> (forall x.
    Rep
      (Parsed
         (RealmGateway'import'params
            internalRef externalRef internalOwner externalOwner))
      x
    -> Parsed
         (RealmGateway'import'params
            internalRef externalRef internalOwner externalOwner))
-> Generic
     (Parsed
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner))
forall x.
Rep
  (Parsed
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner))
  x
-> Parsed
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
forall x.
Parsed
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
-> Rep
     (Parsed
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner))
     x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall internalRef externalRef internalOwner externalOwner x.
Rep
  (Parsed
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner))
  x
-> Parsed
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
forall internalRef externalRef internalOwner externalOwner x.
Parsed
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
-> Rep
     (Parsed
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner))
     x
$cto :: forall internalRef externalRef internalOwner externalOwner x.
Rep
  (Parsed
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner))
  x
-> Parsed
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
$cfrom :: forall internalRef externalRef internalOwner externalOwner x.
Parsed
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
-> Rep
     (Parsed
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner))
     x
Generics.Generic)
deriving instance ((Std_.Show (RP.Parsed internalRef))
                  ,(Std_.Show (RP.Parsed externalRef))
                  ,(Std_.Show (RP.Parsed internalOwner))
                  ,(Std_.Show (RP.Parsed externalOwner))) => (Std_.Show (C.Parsed (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)))
deriving instance ((Std_.Eq (RP.Parsed internalRef))
                  ,(Std_.Eq (RP.Parsed externalRef))
                  ,(Std_.Eq (RP.Parsed internalOwner))
                  ,(Std_.Eq (RP.Parsed externalOwner))) => (Std_.Eq (C.Parsed (RealmGateway'import'params internalRef externalRef internalOwner externalOwner)))
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.Parse (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (C.Parsed (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))) where
    parse :: Raw
  'Const
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
-> m (Parsed
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner))
parse Raw
  'Const
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
raw_ = (Client (Persistent externalRef externalOwner)
-> Parsed (Persistent'SaveParams internalRef internalOwner)
-> Parsed
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
forall internalRef externalRef internalOwner externalOwner.
Parsed (Persistent externalRef externalOwner)
-> Parsed (Persistent'SaveParams internalRef internalOwner)
-> Parsed
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
RealmGateway'import'params (Client (Persistent externalRef externalOwner)
 -> Parsed (Persistent'SaveParams internalRef internalOwner)
 -> Parsed
      (RealmGateway'import'params
         internalRef externalRef internalOwner externalOwner))
-> m (Client (Persistent externalRef externalOwner))
-> m (Parsed (Persistent'SaveParams internalRef internalOwner)
      -> Parsed
           (RealmGateway'import'params
              internalRef externalRef internalOwner externalOwner))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Field
  'Slot
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent externalRef externalOwner)
-> Raw
     'Const
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
-> m (Client (Persistent externalRef externalOwner))
forall a b bp (m :: * -> *) (k :: FieldKind).
(IsStruct a, Parse b bp, ReadCtx m 'Const) =>
Field k a b -> Raw 'Const a -> m bp
GH.parseField IsLabel
  "cap"
  (Field
     'Slot
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent externalRef externalOwner))
Field
  'Slot
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent externalRef externalOwner)
#cap Raw
  'Const
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
raw_)
                                             m (Parsed (Persistent'SaveParams internalRef internalOwner)
   -> Parsed
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner))
-> m (Parsed (Persistent'SaveParams internalRef internalOwner))
-> m (Parsed
        (RealmGateway'import'params
           internalRef externalRef internalOwner externalOwner))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Field
  'Slot
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveParams internalRef internalOwner)
-> Raw
     'Const
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
-> m (Parsed (Persistent'SaveParams internalRef internalOwner))
forall a b bp (m :: * -> *) (k :: FieldKind).
(IsStruct a, Parse b bp, ReadCtx m 'Const) =>
Field k a b -> Raw 'Const a -> m bp
GH.parseField IsLabel
  "params"
  (Field
     'Slot
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveParams internalRef internalOwner))
Field
  'Slot
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveParams internalRef internalOwner)
#params Raw
  'Const
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
raw_))
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.Marshal (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (C.Parsed (RealmGateway'import'params internalRef externalRef internalOwner externalOwner))) where
    marshalInto :: Raw
  ('Mut s)
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
-> Parsed
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
-> m ()
marshalInto Raw
  ('Mut s)
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
raw_ RealmGateway'import'params{..} = (do
        (Field
  'Slot
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent externalRef externalOwner)
-> Client (Persistent externalRef externalOwner)
-> Raw
     ('Mut s)
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
-> m ()
forall a b (m :: * -> *) s bp.
(IsStruct a, Parse b bp, RWCtx m s) =>
Field 'Slot a b -> bp -> Raw ('Mut s) a -> m ()
GH.encodeField IsLabel
  "cap"
  (Field
     'Slot
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent externalRef externalOwner))
Field
  'Slot
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent externalRef externalOwner)
#cap Client (Persistent externalRef externalOwner)
Parsed (Persistent externalRef externalOwner)
cap Raw
  ('Mut s)
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
raw_)
        (Field
  'Slot
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveParams internalRef internalOwner)
-> Parsed (Persistent'SaveParams internalRef internalOwner)
-> Raw
     ('Mut s)
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
-> m ()
forall a b (m :: * -> *) s bp.
(IsStruct a, Parse b bp, RWCtx m s) =>
Field 'Slot a b -> bp -> Raw ('Mut s) a -> m ()
GH.encodeField IsLabel
  "params"
  (Field
     'Slot
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveParams internalRef internalOwner))
Field
  'Slot
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveParams internalRef internalOwner)
#params Parsed (Persistent'SaveParams internalRef internalOwner)
Parsed (Persistent'SaveParams internalRef internalOwner)
params Raw
  ('Mut s)
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
raw_)
        (() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
        )
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (GH.HasField "cap" GH.Slot (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Persistent externalRef externalOwner)) where
    fieldByLabel :: Field
  'Slot
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent externalRef externalOwner)
fieldByLabel  = (Word16
-> Field
     'Slot
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent externalRef externalOwner)
forall a b. IsPtr b => Word16 -> Field 'Slot a b
GH.ptrField Word16
0)
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (GH.HasField "params" GH.Slot (RealmGateway'import'params internalRef externalRef internalOwner externalOwner) (Persistent'SaveParams internalRef internalOwner)) where
    fieldByLabel :: Field
  'Slot
  (RealmGateway'import'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveParams internalRef internalOwner)
fieldByLabel  = (Word16
-> Field
     'Slot
     (RealmGateway'import'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveParams internalRef internalOwner)
forall a b. IsPtr b => Word16 -> Field 'Slot a b
GH.ptrField Word16
1)
data RealmGateway'export'params internalRef externalRef internalOwner externalOwner
type instance (R.ReprFor (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) = (R.Ptr (Std_.Just R.Struct))
instance (C.HasTypeId (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
    typeId :: Word64
typeId  = Word64
17055027933458834346
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.TypedStruct (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
    numStructWords :: Word16
numStructWords  = Word16
0
    numStructPtrs :: Word16
numStructPtrs  = Word16
2
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.Allocate (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
    type AllocHint (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) = ()
    new :: AllocHint
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
-> Message ('Mut s)
-> m (Raw
        ('Mut s)
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner))
new AllocHint
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
_ = Message ('Mut s)
-> m (Raw
        ('Mut s)
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner))
forall a (m :: * -> *) s.
(TypedStruct a, RWCtx m s) =>
Message ('Mut s) -> m (Raw ('Mut s) a)
C.newTypedStruct
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.EstimateAlloc (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (C.Parsed (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)))
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.AllocateList (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)) where
    type ListAllocHint (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) = Std_.Int
    newList :: ListAllocHint
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
-> Message ('Mut s)
-> m (Raw
        ('Mut s)
        (List
           (RealmGateway'export'params
              internalRef externalRef internalOwner externalOwner)))
newList  = ListAllocHint
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
-> Message ('Mut s)
-> m (Raw
        ('Mut s)
        (List
           (RealmGateway'export'params
              internalRef externalRef internalOwner externalOwner)))
forall a (m :: * -> *) s.
(TypedStruct a, RWCtx m s) =>
Int -> Message ('Mut s) -> m (Raw ('Mut s) (List a))
C.newTypedStructList
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.EstimateListAlloc (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (C.Parsed (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)))
data instance C.Parsed (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)
    = RealmGateway'export'params 
        {Parsed
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
-> Parsed (Persistent internalRef internalOwner)
cap :: (RP.Parsed (Persistent internalRef internalOwner))
        ,Parsed
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
-> Parsed (Persistent'SaveParams externalRef externalOwner)
params :: (RP.Parsed (Persistent'SaveParams externalRef externalOwner))}
    deriving((forall x.
 Parsed
   (RealmGateway'export'params
      internalRef externalRef internalOwner externalOwner)
 -> Rep
      (Parsed
         (RealmGateway'export'params
            internalRef externalRef internalOwner externalOwner))
      x)
-> (forall x.
    Rep
      (Parsed
         (RealmGateway'export'params
            internalRef externalRef internalOwner externalOwner))
      x
    -> Parsed
         (RealmGateway'export'params
            internalRef externalRef internalOwner externalOwner))
-> Generic
     (Parsed
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner))
forall x.
Rep
  (Parsed
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner))
  x
-> Parsed
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
forall x.
Parsed
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
-> Rep
     (Parsed
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner))
     x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall internalRef externalRef internalOwner externalOwner x.
Rep
  (Parsed
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner))
  x
-> Parsed
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
forall internalRef externalRef internalOwner externalOwner x.
Parsed
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
-> Rep
     (Parsed
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner))
     x
$cto :: forall internalRef externalRef internalOwner externalOwner x.
Rep
  (Parsed
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner))
  x
-> Parsed
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
$cfrom :: forall internalRef externalRef internalOwner externalOwner x.
Parsed
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
-> Rep
     (Parsed
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner))
     x
Generics.Generic)
deriving instance ((Std_.Show (RP.Parsed internalRef))
                  ,(Std_.Show (RP.Parsed externalRef))
                  ,(Std_.Show (RP.Parsed internalOwner))
                  ,(Std_.Show (RP.Parsed externalOwner))) => (Std_.Show (C.Parsed (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)))
deriving instance ((Std_.Eq (RP.Parsed internalRef))
                  ,(Std_.Eq (RP.Parsed externalRef))
                  ,(Std_.Eq (RP.Parsed internalOwner))
                  ,(Std_.Eq (RP.Parsed externalOwner))) => (Std_.Eq (C.Parsed (RealmGateway'export'params internalRef externalRef internalOwner externalOwner)))
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.Parse (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (C.Parsed (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))) where
    parse :: Raw
  'Const
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
-> m (Parsed
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner))
parse Raw
  'Const
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
raw_ = (Client (Persistent internalRef internalOwner)
-> Parsed (Persistent'SaveParams externalRef externalOwner)
-> Parsed
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
forall internalRef externalRef internalOwner externalOwner.
Parsed (Persistent internalRef internalOwner)
-> Parsed (Persistent'SaveParams externalRef externalOwner)
-> Parsed
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
RealmGateway'export'params (Client (Persistent internalRef internalOwner)
 -> Parsed (Persistent'SaveParams externalRef externalOwner)
 -> Parsed
      (RealmGateway'export'params
         internalRef externalRef internalOwner externalOwner))
-> m (Client (Persistent internalRef internalOwner))
-> m (Parsed (Persistent'SaveParams externalRef externalOwner)
      -> Parsed
           (RealmGateway'export'params
              internalRef externalRef internalOwner externalOwner))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Field
  'Slot
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent internalRef internalOwner)
-> Raw
     'Const
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
-> m (Client (Persistent internalRef internalOwner))
forall a b bp (m :: * -> *) (k :: FieldKind).
(IsStruct a, Parse b bp, ReadCtx m 'Const) =>
Field k a b -> Raw 'Const a -> m bp
GH.parseField IsLabel
  "cap"
  (Field
     'Slot
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent internalRef internalOwner))
Field
  'Slot
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent internalRef internalOwner)
#cap Raw
  'Const
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
raw_)
                                             m (Parsed (Persistent'SaveParams externalRef externalOwner)
   -> Parsed
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner))
-> m (Parsed (Persistent'SaveParams externalRef externalOwner))
-> m (Parsed
        (RealmGateway'export'params
           internalRef externalRef internalOwner externalOwner))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Field
  'Slot
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveParams externalRef externalOwner)
-> Raw
     'Const
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
-> m (Parsed (Persistent'SaveParams externalRef externalOwner))
forall a b bp (m :: * -> *) (k :: FieldKind).
(IsStruct a, Parse b bp, ReadCtx m 'Const) =>
Field k a b -> Raw 'Const a -> m bp
GH.parseField IsLabel
  "params"
  (Field
     'Slot
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveParams externalRef externalOwner))
Field
  'Slot
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveParams externalRef externalOwner)
#params Raw
  'Const
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
raw_))
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (C.Marshal (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (C.Parsed (RealmGateway'export'params internalRef externalRef internalOwner externalOwner))) where
    marshalInto :: Raw
  ('Mut s)
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
-> Parsed
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
-> m ()
marshalInto Raw
  ('Mut s)
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
raw_ RealmGateway'export'params{..} = (do
        (Field
  'Slot
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent internalRef internalOwner)
-> Client (Persistent internalRef internalOwner)
-> Raw
     ('Mut s)
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
-> m ()
forall a b (m :: * -> *) s bp.
(IsStruct a, Parse b bp, RWCtx m s) =>
Field 'Slot a b -> bp -> Raw ('Mut s) a -> m ()
GH.encodeField IsLabel
  "cap"
  (Field
     'Slot
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent internalRef internalOwner))
Field
  'Slot
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent internalRef internalOwner)
#cap Client (Persistent internalRef internalOwner)
Parsed (Persistent internalRef internalOwner)
cap Raw
  ('Mut s)
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
raw_)
        (Field
  'Slot
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveParams externalRef externalOwner)
-> Parsed (Persistent'SaveParams externalRef externalOwner)
-> Raw
     ('Mut s)
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
-> m ()
forall a b (m :: * -> *) s bp.
(IsStruct a, Parse b bp, RWCtx m s) =>
Field 'Slot a b -> bp -> Raw ('Mut s) a -> m ()
GH.encodeField IsLabel
  "params"
  (Field
     'Slot
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveParams externalRef externalOwner))
Field
  'Slot
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveParams externalRef externalOwner)
#params Parsed (Persistent'SaveParams externalRef externalOwner)
Parsed (Persistent'SaveParams externalRef externalOwner)
params Raw
  ('Mut s)
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
raw_)
        (() -> m ()
forall (f :: * -> *) a. Applicative f => a -> f a
Std_.pure ())
        )
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (GH.HasField "cap" GH.Slot (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Persistent internalRef internalOwner)) where
    fieldByLabel :: Field
  'Slot
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent internalRef internalOwner)
fieldByLabel  = (Word16
-> Field
     'Slot
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent internalRef internalOwner)
forall a b. IsPtr b => Word16 -> Field 'Slot a b
GH.ptrField Word16
0)
instance ((GH.TypeParam internalRef)
         ,(GH.TypeParam externalRef)
         ,(GH.TypeParam internalOwner)
         ,(GH.TypeParam externalOwner)) => (GH.HasField "params" GH.Slot (RealmGateway'export'params internalRef externalRef internalOwner externalOwner) (Persistent'SaveParams externalRef externalOwner)) where
    fieldByLabel :: Field
  'Slot
  (RealmGateway'export'params
     internalRef externalRef internalOwner externalOwner)
  (Persistent'SaveParams externalRef externalOwner)
fieldByLabel  = (Word16
-> Field
     'Slot
     (RealmGateway'export'params
        internalRef externalRef internalOwner externalOwner)
     (Persistent'SaveParams externalRef externalOwner)
forall a b. IsPtr b => Word16 -> Field 'Slot a b
GH.ptrField Word16
1)