{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Contains metrics collected while loading a [class/@message@/] either from the
-- network or the disk cache.
-- 
-- Metrics are not collected by default for a [class/@message@/], you need to add the
-- flag 'GI.Soup.Flags.MessageFlagsCollectMetrics' to enable the feature.
-- 
-- Temporal metrics are expressed as a monotonic time and always start with a
-- fetch start event and finish with response end. All other events are optional.
-- An event can be 0 because it hasn\'t happened yet, because it\'s optional or
-- because the load failed before the event reached.
-- 
-- Size metrics are expressed in bytes and are updated while the [class/@message@/] is
-- being loaded. You can connect to different [class/@message@/] signals to get the
-- final result of every value.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Soup.Structs.MessageMetrics
    ( 

-- * Exported types
    MessageMetrics(..)                      ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [copy]("GI.Soup.Structs.MessageMetrics#g:method:copy"), [free]("GI.Soup.Structs.MessageMetrics#g:method:free").
-- 
-- ==== Getters
-- [getConnectEnd]("GI.Soup.Structs.MessageMetrics#g:method:getConnectEnd"), [getConnectStart]("GI.Soup.Structs.MessageMetrics#g:method:getConnectStart"), [getDnsEnd]("GI.Soup.Structs.MessageMetrics#g:method:getDnsEnd"), [getDnsStart]("GI.Soup.Structs.MessageMetrics#g:method:getDnsStart"), [getFetchStart]("GI.Soup.Structs.MessageMetrics#g:method:getFetchStart"), [getRequestBodyBytesSent]("GI.Soup.Structs.MessageMetrics#g:method:getRequestBodyBytesSent"), [getRequestBodySize]("GI.Soup.Structs.MessageMetrics#g:method:getRequestBodySize"), [getRequestHeaderBytesSent]("GI.Soup.Structs.MessageMetrics#g:method:getRequestHeaderBytesSent"), [getRequestStart]("GI.Soup.Structs.MessageMetrics#g:method:getRequestStart"), [getResponseBodyBytesReceived]("GI.Soup.Structs.MessageMetrics#g:method:getResponseBodyBytesReceived"), [getResponseBodySize]("GI.Soup.Structs.MessageMetrics#g:method:getResponseBodySize"), [getResponseEnd]("GI.Soup.Structs.MessageMetrics#g:method:getResponseEnd"), [getResponseHeaderBytesReceived]("GI.Soup.Structs.MessageMetrics#g:method:getResponseHeaderBytesReceived"), [getResponseStart]("GI.Soup.Structs.MessageMetrics#g:method:getResponseStart"), [getTlsStart]("GI.Soup.Structs.MessageMetrics#g:method:getTlsStart").
-- 
-- ==== Setters
-- /None/.

#if defined(ENABLE_OVERLOADING)
    ResolveMessageMetricsMethod             ,
#endif

-- ** copy #method:copy#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsCopyMethodInfo            ,
#endif
    messageMetricsCopy                      ,


-- ** free #method:free#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsFreeMethodInfo            ,
#endif
    messageMetricsFree                      ,


-- ** getConnectEnd #method:getConnectEnd#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetConnectEndMethodInfo   ,
#endif
    messageMetricsGetConnectEnd             ,


-- ** getConnectStart #method:getConnectStart#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetConnectStartMethodInfo ,
#endif
    messageMetricsGetConnectStart           ,


-- ** getDnsEnd #method:getDnsEnd#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetDnsEndMethodInfo       ,
#endif
    messageMetricsGetDnsEnd                 ,


-- ** getDnsStart #method:getDnsStart#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetDnsStartMethodInfo     ,
#endif
    messageMetricsGetDnsStart               ,


-- ** getFetchStart #method:getFetchStart#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetFetchStartMethodInfo   ,
#endif
    messageMetricsGetFetchStart             ,


-- ** getRequestBodyBytesSent #method:getRequestBodyBytesSent#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetRequestBodyBytesSentMethodInfo,
#endif
    messageMetricsGetRequestBodyBytesSent   ,


-- ** getRequestBodySize #method:getRequestBodySize#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetRequestBodySizeMethodInfo,
#endif
    messageMetricsGetRequestBodySize        ,


-- ** getRequestHeaderBytesSent #method:getRequestHeaderBytesSent#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetRequestHeaderBytesSentMethodInfo,
#endif
    messageMetricsGetRequestHeaderBytesSent ,


-- ** getRequestStart #method:getRequestStart#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetRequestStartMethodInfo ,
#endif
    messageMetricsGetRequestStart           ,


-- ** getResponseBodyBytesReceived #method:getResponseBodyBytesReceived#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetResponseBodyBytesReceivedMethodInfo,
#endif
    messageMetricsGetResponseBodyBytesReceived,


-- ** getResponseBodySize #method:getResponseBodySize#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetResponseBodySizeMethodInfo,
#endif
    messageMetricsGetResponseBodySize       ,


-- ** getResponseEnd #method:getResponseEnd#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetResponseEndMethodInfo  ,
#endif
    messageMetricsGetResponseEnd            ,


-- ** getResponseHeaderBytesReceived #method:getResponseHeaderBytesReceived#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetResponseHeaderBytesReceivedMethodInfo,
#endif
    messageMetricsGetResponseHeaderBytesReceived,


-- ** getResponseStart #method:getResponseStart#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetResponseStartMethodInfo,
#endif
    messageMetricsGetResponseStart          ,


-- ** getTlsStart #method:getTlsStart#

#if defined(ENABLE_OVERLOADING)
    MessageMetricsGetTlsStartMethodInfo     ,
#endif
    messageMetricsGetTlsStart               ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R


-- | Memory-managed wrapper type.
newtype MessageMetrics = MessageMetrics (SP.ManagedPtr MessageMetrics)
    deriving (MessageMetrics -> MessageMetrics -> Bool
(MessageMetrics -> MessageMetrics -> Bool)
-> (MessageMetrics -> MessageMetrics -> Bool) -> Eq MessageMetrics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MessageMetrics -> MessageMetrics -> Bool
== :: MessageMetrics -> MessageMetrics -> Bool
$c/= :: MessageMetrics -> MessageMetrics -> Bool
/= :: MessageMetrics -> MessageMetrics -> Bool
Eq)

instance SP.ManagedPtrNewtype MessageMetrics where
    toManagedPtr :: MessageMetrics -> ManagedPtr MessageMetrics
toManagedPtr (MessageMetrics ManagedPtr MessageMetrics
p) = ManagedPtr MessageMetrics
p

foreign import ccall "soup_message_metrics_get_type" c_soup_message_metrics_get_type :: 
    IO GType

type instance O.ParentTypes MessageMetrics = '[]
instance O.HasParentTypes MessageMetrics

instance B.Types.TypedObject MessageMetrics where
    glibType :: IO GType
glibType = IO GType
c_soup_message_metrics_get_type

instance B.Types.GBoxed MessageMetrics

-- | Convert 'MessageMetrics' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe MessageMetrics) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_soup_message_metrics_get_type
    gvalueSet_ :: Ptr GValue -> Maybe MessageMetrics -> IO ()
gvalueSet_ Ptr GValue
gv Maybe MessageMetrics
P.Nothing = Ptr GValue -> Ptr MessageMetrics -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr MessageMetrics
forall a. Ptr a
FP.nullPtr :: FP.Ptr MessageMetrics)
    gvalueSet_ Ptr GValue
gv (P.Just MessageMetrics
obj) = MessageMetrics -> (Ptr MessageMetrics -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr MessageMetrics
obj (Ptr GValue -> Ptr MessageMetrics -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe MessageMetrics)
gvalueGet_ Ptr GValue
gv = do
        Ptr MessageMetrics
ptr <- Ptr GValue -> IO (Ptr MessageMetrics)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr MessageMetrics)
        if Ptr MessageMetrics
ptr Ptr MessageMetrics -> Ptr MessageMetrics -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr MessageMetrics
forall a. Ptr a
FP.nullPtr
        then MessageMetrics -> Maybe MessageMetrics
forall a. a -> Maybe a
P.Just (MessageMetrics -> Maybe MessageMetrics)
-> IO MessageMetrics -> IO (Maybe MessageMetrics)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr MessageMetrics -> MessageMetrics)
-> Ptr MessageMetrics -> IO MessageMetrics
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr MessageMetrics -> MessageMetrics
MessageMetrics Ptr MessageMetrics
ptr
        else Maybe MessageMetrics -> IO (Maybe MessageMetrics)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MessageMetrics
forall a. Maybe a
P.Nothing
        
    


#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList MessageMetrics
type instance O.AttributeList MessageMetrics = MessageMetricsAttributeList
type MessageMetricsAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif

-- method MessageMetrics::copy
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Soup" , name = "MessageMetrics" })
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_copy" soup_message_metrics_copy :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO (Ptr MessageMetrics)

-- | Copies /@metrics@/.
messageMetricsCopy ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m MessageMetrics
    -- ^ __Returns:__ a copy of /@metrics@/
messageMetricsCopy :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m MessageMetrics
messageMetricsCopy MessageMetrics
metrics = IO MessageMetrics -> m MessageMetrics
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MessageMetrics -> m MessageMetrics)
-> IO MessageMetrics -> m MessageMetrics
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Ptr MessageMetrics
result <- Ptr MessageMetrics -> IO (Ptr MessageMetrics)
soup_message_metrics_copy Ptr MessageMetrics
metrics'
    Text -> Ptr MessageMetrics -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"messageMetricsCopy" Ptr MessageMetrics
result
    MessageMetrics
result' <- ((ManagedPtr MessageMetrics -> MessageMetrics)
-> Ptr MessageMetrics -> IO MessageMetrics
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr MessageMetrics -> MessageMetrics
MessageMetrics) Ptr MessageMetrics
result
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    MessageMetrics -> IO MessageMetrics
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return MessageMetrics
result'

#if defined(ENABLE_OVERLOADING)
data MessageMetricsCopyMethodInfo
instance (signature ~ (m MessageMetrics), MonadIO m) => O.OverloadedMethod MessageMetricsCopyMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsCopy

instance O.OverloadedMethodInfo MessageMetricsCopyMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsCopy",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsCopy"
        })


#endif

-- method MessageMetrics::free
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_free" soup_message_metrics_free :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO ()

-- | Frees /@metrics@/.
messageMetricsFree ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m ()
messageMetricsFree :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m ()
messageMetricsFree MessageMetrics
metrics = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Ptr MessageMetrics -> IO ()
soup_message_metrics_free Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data MessageMetricsFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod MessageMetricsFreeMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsFree

instance O.OverloadedMethodInfo MessageMetricsFreeMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsFree",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsFree"
        })


#endif

-- method MessageMetrics::get_connect_end
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_connect_end" soup_message_metrics_get_connect_end :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the time immediately after the [class/@message@/] completed the
-- connection to the server. This includes the time for the proxy
-- negotiation and TLS handshake.
-- 
-- It will be 0 if no network connection was required to fetch the resource (a
-- persistent connection was used or resource was loaded from the local disk
-- cache).
messageMetricsGetConnectEnd ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the connection end time
messageMetricsGetConnectEnd :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetConnectEnd MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_connect_end Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetConnectEndMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetConnectEndMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetConnectEnd

instance O.OverloadedMethodInfo MessageMetricsGetConnectEndMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetConnectEnd",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetConnectEnd"
        })


#endif

-- method MessageMetrics::get_connect_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_connect_start" soup_message_metrics_get_connect_start :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the time immediately before the [class/@message@/] started to
-- establish the connection to the server.
-- 
-- It will be 0 if no network connection was required to fetch the resource (a
-- persistent connection was used or resource was loaded from the local disk
-- cache).
messageMetricsGetConnectStart ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the connection start time
messageMetricsGetConnectStart :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetConnectStart MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_connect_start Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetConnectStartMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetConnectStartMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetConnectStart

instance O.OverloadedMethodInfo MessageMetricsGetConnectStartMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetConnectStart",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetConnectStart"
        })


#endif

-- method MessageMetrics::get_dns_end
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_dns_end" soup_message_metrics_get_dns_end :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the time immediately after the [class/@message@/] completed the
-- domain lookup name for the resource.
-- 
-- It will be 0 if no domain lookup was required to fetch the resource (a
-- persistent connection was used or resource was loaded from the local disk
-- cache).
messageMetricsGetDnsEnd ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the domain lookup end time
messageMetricsGetDnsEnd :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetDnsEnd MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_dns_end Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetDnsEndMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetDnsEndMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetDnsEnd

instance O.OverloadedMethodInfo MessageMetricsGetDnsEndMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetDnsEnd",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetDnsEnd"
        })


#endif

-- method MessageMetrics::get_dns_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_dns_start" soup_message_metrics_get_dns_start :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the time immediately before the [class/@message@/] started the
-- domain lookup name for the resource.
-- 
-- It will be 0 if no domain lookup was required to fetch the resource (a
-- persistent connection was used or resource was loaded from the local disk
-- cache).
messageMetricsGetDnsStart ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the domain lookup start time
messageMetricsGetDnsStart :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetDnsStart MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_dns_start Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetDnsStartMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetDnsStartMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetDnsStart

instance O.OverloadedMethodInfo MessageMetricsGetDnsStartMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetDnsStart",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetDnsStart"
        })


#endif

-- method MessageMetrics::get_fetch_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_fetch_start" soup_message_metrics_get_fetch_start :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the time immediately before the [class/@message@/] started to
-- fetch a resource either from a remote server or local disk cache.
messageMetricsGetFetchStart ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the fetch start time
messageMetricsGetFetchStart :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetFetchStart MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_fetch_start Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetFetchStartMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetFetchStartMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetFetchStart

instance O.OverloadedMethodInfo MessageMetricsGetFetchStartMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetFetchStart",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetFetchStart"
        })


#endif

-- method MessageMetrics::get_request_body_bytes_sent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_request_body_bytes_sent" soup_message_metrics_get_request_body_bytes_sent :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the number of bytes sent to the network for the request body.
-- 
-- This is the size of the body sent, after encodings are applied, so it might
-- be greater than the value returned by
-- [method/@messageMetrics@/.get_request_body_size]. This value is available right
-- before [signal/@message@/[wroteBody](#g:signal:wroteBody)] signal is emitted, but you might get an
-- intermediate value if called before.
messageMetricsGetRequestBodyBytesSent ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the request body bytes sent
messageMetricsGetRequestBodyBytesSent :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetRequestBodyBytesSent MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_request_body_bytes_sent Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetRequestBodyBytesSentMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetRequestBodyBytesSentMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetRequestBodyBytesSent

instance O.OverloadedMethodInfo MessageMetricsGetRequestBodyBytesSentMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetRequestBodyBytesSent",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetRequestBodyBytesSent"
        })


#endif

-- method MessageMetrics::get_request_body_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_request_body_size" soup_message_metrics_get_request_body_size :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the request body size in bytes. This is the size of the original body
-- given to the request before any encoding is applied.
-- 
-- This value is available right before [signal/@message@/[wroteBody](#g:signal:wroteBody)] signal is
-- emitted, but you might get an intermediate value if called before.
messageMetricsGetRequestBodySize ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the request body size
messageMetricsGetRequestBodySize :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetRequestBodySize MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_request_body_size Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetRequestBodySizeMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetRequestBodySizeMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetRequestBodySize

instance O.OverloadedMethodInfo MessageMetricsGetRequestBodySizeMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetRequestBodySize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetRequestBodySize"
        })


#endif

-- method MessageMetrics::get_request_header_bytes_sent
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_request_header_bytes_sent" soup_message_metrics_get_request_header_bytes_sent :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the number of bytes sent to the network for the request headers.
-- 
-- This value is available right before [signal/@message@/[wroteHeaders](#g:signal:wroteHeaders)] signal
-- is emitted, but you might get an intermediate value if called before.
messageMetricsGetRequestHeaderBytesSent ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the request headers bytes sent
messageMetricsGetRequestHeaderBytesSent :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetRequestHeaderBytesSent MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_request_header_bytes_sent Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetRequestHeaderBytesSentMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetRequestHeaderBytesSentMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetRequestHeaderBytesSent

instance O.OverloadedMethodInfo MessageMetricsGetRequestHeaderBytesSentMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetRequestHeaderBytesSent",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetRequestHeaderBytesSent"
        })


#endif

-- method MessageMetrics::get_request_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_request_start" soup_message_metrics_get_request_start :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the time immediately before the [class/@message@/] started the
-- request of the resource from the server or the local disk cache.
messageMetricsGetRequestStart ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the request start time
messageMetricsGetRequestStart :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetRequestStart MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_request_start Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetRequestStartMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetRequestStartMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetRequestStart

instance O.OverloadedMethodInfo MessageMetricsGetRequestStartMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetRequestStart",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetRequestStart"
        })


#endif

-- method MessageMetrics::get_response_body_bytes_received
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_response_body_bytes_received" soup_message_metrics_get_response_body_bytes_received :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the number of bytes received from the network for the response body.
-- 
-- This value is available right before [signal/@message@/[gotBody](#g:signal:gotBody)] signal is
-- emitted, but you might get an intermediate value if called before. For
-- resources loaded from the disk cache this value is always 0.
messageMetricsGetResponseBodyBytesReceived ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the response body bytes received
messageMetricsGetResponseBodyBytesReceived :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetResponseBodyBytesReceived MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_response_body_bytes_received Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetResponseBodyBytesReceivedMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetResponseBodyBytesReceivedMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetResponseBodyBytesReceived

instance O.OverloadedMethodInfo MessageMetricsGetResponseBodyBytesReceivedMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetResponseBodyBytesReceived",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetResponseBodyBytesReceived"
        })


#endif

-- method MessageMetrics::get_response_body_size
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_response_body_size" soup_message_metrics_get_response_body_size :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the response body size in bytes.
-- 
-- This is the size of the body as given to the user after all encodings are
-- applied, so it might be greater than the value returned by
-- [method/@messageMetrics@/.get_response_body_bytes_received]. This value is
-- available right before [signal/@message@/[gotBody](#g:signal:gotBody)] signal is emitted, but you
-- might get an intermediate value if called before.
messageMetricsGetResponseBodySize ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the response body size
messageMetricsGetResponseBodySize :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetResponseBodySize MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_response_body_size Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetResponseBodySizeMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetResponseBodySizeMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetResponseBodySize

instance O.OverloadedMethodInfo MessageMetricsGetResponseBodySizeMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetResponseBodySize",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetResponseBodySize"
        })


#endif

-- method MessageMetrics::get_response_end
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_response_end" soup_message_metrics_get_response_end :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the time immediately after the [class/@message@/] received the last
-- bytes of the response from the server or the local disk cache.
-- 
-- In case of load failure, this returns the time immediately before the
-- fetch is aborted.
messageMetricsGetResponseEnd ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the response end time
messageMetricsGetResponseEnd :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetResponseEnd MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_response_end Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetResponseEndMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetResponseEndMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetResponseEnd

instance O.OverloadedMethodInfo MessageMetricsGetResponseEndMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetResponseEnd",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetResponseEnd"
        })


#endif

-- method MessageMetrics::get_response_header_bytes_received
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_response_header_bytes_received" soup_message_metrics_get_response_header_bytes_received :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the number of bytes received from the network for the response headers.
-- 
-- This value is available right before [signal/@message@/[gotHeaders](#g:signal:gotHeaders)] signal
-- is emitted, but you might get an intermediate value if called before.
-- For resources loaded from the disk cache this value is always 0.
messageMetricsGetResponseHeaderBytesReceived ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the response headers bytes received
messageMetricsGetResponseHeaderBytesReceived :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetResponseHeaderBytesReceived MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_response_header_bytes_received Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetResponseHeaderBytesReceivedMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetResponseHeaderBytesReceivedMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetResponseHeaderBytesReceived

instance O.OverloadedMethodInfo MessageMetricsGetResponseHeaderBytesReceivedMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetResponseHeaderBytesReceived",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetResponseHeaderBytesReceived"
        })


#endif

-- method MessageMetrics::get_response_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_response_start" soup_message_metrics_get_response_start :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the time immediately after the [class/@message@/] received the first
-- bytes of the response from the server or the local disk cache.
messageMetricsGetResponseStart ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the response start time
messageMetricsGetResponseStart :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetResponseStart MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_response_start Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetResponseStartMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetResponseStartMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetResponseStart

instance O.OverloadedMethodInfo MessageMetricsGetResponseStartMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetResponseStart",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetResponseStart"
        })


#endif

-- method MessageMetrics::get_tls_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "metrics"
--           , argType =
--               TInterface Name { namespace = "Soup" , name = "MessageMetrics" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #SoupMessageMetrics"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "soup_message_metrics_get_tls_start" soup_message_metrics_get_tls_start :: 
    Ptr MessageMetrics ->                   -- metrics : TInterface (Name {namespace = "Soup", name = "MessageMetrics"})
    IO Word64

-- | Get the time immediately before the [class/@message@/] started the
-- TLS handshake.
-- 
-- It will be 0 if no TLS handshake was required to fetch the resource
-- (connection was not secure, a persistent connection was used or resource was
-- loaded from the local disk cache).
messageMetricsGetTlsStart ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    MessageMetrics
    -- ^ /@metrics@/: a t'GI.Soup.Structs.MessageMetrics.MessageMetrics'
    -> m Word64
    -- ^ __Returns:__ the tls start time
messageMetricsGetTlsStart :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
MessageMetrics -> m Word64
messageMetricsGetTlsStart MessageMetrics
metrics = IO Word64 -> m Word64
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
    Ptr MessageMetrics
metrics' <- MessageMetrics -> IO (Ptr MessageMetrics)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr MessageMetrics
metrics
    Word64
result <- Ptr MessageMetrics -> IO Word64
soup_message_metrics_get_tls_start Ptr MessageMetrics
metrics'
    MessageMetrics -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr MessageMetrics
metrics
    Word64 -> IO Word64
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result

#if defined(ENABLE_OVERLOADING)
data MessageMetricsGetTlsStartMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.OverloadedMethod MessageMetricsGetTlsStartMethodInfo MessageMetrics signature where
    overloadedMethod = messageMetricsGetTlsStart

instance O.OverloadedMethodInfo MessageMetricsGetTlsStartMethodInfo MessageMetrics where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Soup.Structs.MessageMetrics.messageMetricsGetTlsStart",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-soup-3.0.2/docs/GI-Soup-Structs-MessageMetrics.html#v:messageMetricsGetTlsStart"
        })


#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveMessageMetricsMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveMessageMetricsMethod "copy" o = MessageMetricsCopyMethodInfo
    ResolveMessageMetricsMethod "free" o = MessageMetricsFreeMethodInfo
    ResolveMessageMetricsMethod "getConnectEnd" o = MessageMetricsGetConnectEndMethodInfo
    ResolveMessageMetricsMethod "getConnectStart" o = MessageMetricsGetConnectStartMethodInfo
    ResolveMessageMetricsMethod "getDnsEnd" o = MessageMetricsGetDnsEndMethodInfo
    ResolveMessageMetricsMethod "getDnsStart" o = MessageMetricsGetDnsStartMethodInfo
    ResolveMessageMetricsMethod "getFetchStart" o = MessageMetricsGetFetchStartMethodInfo
    ResolveMessageMetricsMethod "getRequestBodyBytesSent" o = MessageMetricsGetRequestBodyBytesSentMethodInfo
    ResolveMessageMetricsMethod "getRequestBodySize" o = MessageMetricsGetRequestBodySizeMethodInfo
    ResolveMessageMetricsMethod "getRequestHeaderBytesSent" o = MessageMetricsGetRequestHeaderBytesSentMethodInfo
    ResolveMessageMetricsMethod "getRequestStart" o = MessageMetricsGetRequestStartMethodInfo
    ResolveMessageMetricsMethod "getResponseBodyBytesReceived" o = MessageMetricsGetResponseBodyBytesReceivedMethodInfo
    ResolveMessageMetricsMethod "getResponseBodySize" o = MessageMetricsGetResponseBodySizeMethodInfo
    ResolveMessageMetricsMethod "getResponseEnd" o = MessageMetricsGetResponseEndMethodInfo
    ResolveMessageMetricsMethod "getResponseHeaderBytesReceived" o = MessageMetricsGetResponseHeaderBytesReceivedMethodInfo
    ResolveMessageMetricsMethod "getResponseStart" o = MessageMetricsGetResponseStartMethodInfo
    ResolveMessageMetricsMethod "getTlsStart" o = MessageMetricsGetTlsStartMethodInfo
    ResolveMessageMetricsMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveMessageMetricsMethod t MessageMetrics, O.OverloadedMethod info MessageMetrics p) => OL.IsLabel t (MessageMetrics -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveMessageMetricsMethod t MessageMetrics, O.OverloadedMethod info MessageMetrics p, R.HasField t MessageMetrics p) => R.HasField t MessageMetrics p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveMessageMetricsMethod t MessageMetrics, O.OverloadedMethodInfo info MessageMetrics) => OL.IsLabel t (O.MethodProxy info MessageMetrics) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif