-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

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

module GI.Soup.Enums
    ( 

 -- * Enumerations
-- ** AddressFamily #enum:AddressFamily#

    AddressFamily(..)                       ,


-- ** CacheResponse #enum:CacheResponse#

    CacheResponse(..)                       ,


-- ** CacheType #enum:CacheType#

    CacheType(..)                           ,


-- ** ConnectionState #enum:ConnectionState#

    ConnectionState(..)                     ,


-- ** CookieJarAcceptPolicy #enum:CookieJarAcceptPolicy#

    CookieJarAcceptPolicy(..)               ,


-- ** DateFormat #enum:DateFormat#

    DateFormat(..)                          ,


-- ** Encoding #enum:Encoding#

    Encoding(..)                            ,


-- ** HTTPVersion #enum:HTTPVersion#

    HTTPVersion(..)                         ,


-- ** KnownStatusCode #enum:KnownStatusCode#

    KnownStatusCode(..)                     ,


-- ** LoggerLogLevel #enum:LoggerLogLevel#

    LoggerLogLevel(..)                      ,


-- ** MemoryUse #enum:MemoryUse#

    MemoryUse(..)                           ,


-- ** MessageHeadersType #enum:MessageHeadersType#

    MessageHeadersType(..)                  ,


-- ** MessagePriority #enum:MessagePriority#

    MessagePriority(..)                     ,


-- ** RequestError #enum:RequestError#

    RequestError(..)                        ,
    catchRequestError                       ,
    handleRequestError                      ,


-- ** RequesterError #enum:RequesterError#

    RequesterError(..)                      ,
    catchRequesterError                     ,
    handleRequesterError                    ,


-- ** SocketIOStatus #enum:SocketIOStatus#

    SocketIOStatus(..)                      ,


-- ** Status #enum:Status#

    Status(..)                              ,


-- ** TLDError #enum:TLDError#

    TLDError(..)                            ,
    catchTLDError                           ,
    handleTLDError                          ,


-- ** WebsocketCloseCode #enum:WebsocketCloseCode#

    WebsocketCloseCode(..)                  ,


-- ** WebsocketConnectionType #enum:WebsocketConnectionType#

    WebsocketConnectionType(..)             ,


-- ** WebsocketDataType #enum:WebsocketDataType#

    WebsocketDataType(..)                   ,


-- ** WebsocketError #enum:WebsocketError#

    WebsocketError(..)                      ,


-- ** WebsocketState #enum:WebsocketState#

    WebsocketState(..)                      ,


-- ** XMLRPCError #enum:XMLRPCError#

    XMLRPCError(..)                         ,
    catchXMLRPCError                        ,
    handleXMLRPCError                       ,


-- ** XMLRPCFault #enum:XMLRPCFault#

    XMLRPCFault(..)                         ,




    ) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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 Data.Text as T
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


-- Enum XMLRPCFault
-- | Pre-defined XML-RPC fault codes from \<ulink
-- url=\"http:\/\/xmlrpc-epi.sourceforge.net\/specs\/rfc.fault_codes.php\">http:\/\/xmlrpc-epi.sourceforge.net\/specs\/rfc.fault_codes.php\<\/ulink>.
-- These are an extension, not part of the XML-RPC spec; you can\'t
-- assume servers will use them.
data XMLRPCFault = 
      XMLRPCFaultParseErrorNotWellFormed
    -- ^ request was not
    --   well-formed
    | XMLRPCFaultParseErrorUnsupportedEncoding
    -- ^ request was in
    --   an unsupported encoding
    | XMLRPCFaultParseErrorInvalidCharacterForEncoding
    -- ^ request contained an invalid character
    | XMLRPCFaultServerErrorInvalidXmlRpc
    -- ^ request was not
    --   valid XML-RPC
    | XMLRPCFaultServerErrorRequestedMethodNotFound
    -- ^ method
    --   not found
    | XMLRPCFaultServerErrorInvalidMethodParameters
    -- ^ invalid
    --   parameters
    | XMLRPCFaultServerErrorInternalXmlRpcError
    -- ^ internal
    --   error
    | XMLRPCFaultApplicationError
    -- ^ start of reserved range for
    --   application error codes
    | XMLRPCFaultSystemError
    -- ^ start of reserved range for
    --   system error codes
    | XMLRPCFaultTransportError
    -- ^ start of reserved range for
    --   transport error codes
    | AnotherXMLRPCFault Int
    -- ^ Catch-all for unknown values
    deriving (Int -> XMLRPCFault -> ShowS
[XMLRPCFault] -> ShowS
XMLRPCFault -> String
(Int -> XMLRPCFault -> ShowS)
-> (XMLRPCFault -> String)
-> ([XMLRPCFault] -> ShowS)
-> Show XMLRPCFault
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XMLRPCFault] -> ShowS
$cshowList :: [XMLRPCFault] -> ShowS
show :: XMLRPCFault -> String
$cshow :: XMLRPCFault -> String
showsPrec :: Int -> XMLRPCFault -> ShowS
$cshowsPrec :: Int -> XMLRPCFault -> ShowS
Show, XMLRPCFault -> XMLRPCFault -> Bool
(XMLRPCFault -> XMLRPCFault -> Bool)
-> (XMLRPCFault -> XMLRPCFault -> Bool) -> Eq XMLRPCFault
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XMLRPCFault -> XMLRPCFault -> Bool
$c/= :: XMLRPCFault -> XMLRPCFault -> Bool
== :: XMLRPCFault -> XMLRPCFault -> Bool
$c== :: XMLRPCFault -> XMLRPCFault -> Bool
Eq)

instance P.Enum XMLRPCFault where
    fromEnum :: XMLRPCFault -> Int
fromEnum XMLRPCFaultParseErrorNotWellFormed = -32700
    fromEnum XMLRPCFaultParseErrorUnsupportedEncoding = -32701
    fromEnum XMLRPCFaultParseErrorInvalidCharacterForEncoding = -32702
    fromEnum XMLRPCFaultServerErrorInvalidXmlRpc = -32600
    fromEnum XMLRPCFaultServerErrorRequestedMethodNotFound = -32601
    fromEnum XMLRPCFaultServerErrorInvalidMethodParameters = -32602
    fromEnum XMLRPCFaultServerErrorInternalXmlRpcError = -32603
    fromEnum XMLRPCFaultApplicationError = -32500
    fromEnum XMLRPCFaultSystemError = -32400
    fromEnum XMLRPCFaultTransportError = -32300
    fromEnum (AnotherXMLRPCFault k :: Int
k) = Int
k

    toEnum :: Int -> XMLRPCFault
toEnum -32700 = XMLRPCFault
XMLRPCFaultParseErrorNotWellFormed
    toEnum -32701 = XMLRPCFault
XMLRPCFaultParseErrorUnsupportedEncoding
    toEnum -32702 = XMLRPCFault
XMLRPCFaultParseErrorInvalidCharacterForEncoding
    toEnum -32600 = XMLRPCFault
XMLRPCFaultServerErrorInvalidXmlRpc
    toEnum -32601 = XMLRPCFault
XMLRPCFaultServerErrorRequestedMethodNotFound
    toEnum -32602 = XMLRPCFault
XMLRPCFaultServerErrorInvalidMethodParameters
    toEnum -32603 = XMLRPCFault
XMLRPCFaultServerErrorInternalXmlRpcError
    toEnum -32500 = XMLRPCFault
XMLRPCFaultApplicationError
    toEnum -32400 = XMLRPCFault
XMLRPCFaultSystemError
    toEnum -32300 = XMLRPCFault
XMLRPCFaultTransportError
    toEnum k :: Int
k = Int -> XMLRPCFault
AnotherXMLRPCFault Int
k

instance P.Ord XMLRPCFault where
    compare :: XMLRPCFault -> XMLRPCFault -> Ordering
compare a :: XMLRPCFault
a b :: XMLRPCFault
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (XMLRPCFault -> Int
forall a. Enum a => a -> Int
P.fromEnum XMLRPCFault
a) (XMLRPCFault -> Int
forall a. Enum a => a -> Int
P.fromEnum XMLRPCFault
b)

foreign import ccall "soup_xmlrpc_fault_get_type" c_soup_xmlrpc_fault_get_type :: 
    IO GType

instance BoxedEnum XMLRPCFault where
    boxedEnumType :: XMLRPCFault -> IO GType
boxedEnumType _ = IO GType
c_soup_xmlrpc_fault_get_type

-- Enum XMLRPCError
-- | /No description available in the introspection data./
data XMLRPCError = 
      XMLRPCErrorArguments
    -- ^ /No description available in the introspection data./
    | XMLRPCErrorRetval
    -- ^ /No description available in the introspection data./
    | AnotherXMLRPCError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> XMLRPCError -> ShowS
[XMLRPCError] -> ShowS
XMLRPCError -> String
(Int -> XMLRPCError -> ShowS)
-> (XMLRPCError -> String)
-> ([XMLRPCError] -> ShowS)
-> Show XMLRPCError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XMLRPCError] -> ShowS
$cshowList :: [XMLRPCError] -> ShowS
show :: XMLRPCError -> String
$cshow :: XMLRPCError -> String
showsPrec :: Int -> XMLRPCError -> ShowS
$cshowsPrec :: Int -> XMLRPCError -> ShowS
Show, XMLRPCError -> XMLRPCError -> Bool
(XMLRPCError -> XMLRPCError -> Bool)
-> (XMLRPCError -> XMLRPCError -> Bool) -> Eq XMLRPCError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XMLRPCError -> XMLRPCError -> Bool
$c/= :: XMLRPCError -> XMLRPCError -> Bool
== :: XMLRPCError -> XMLRPCError -> Bool
$c== :: XMLRPCError -> XMLRPCError -> Bool
Eq)

instance P.Enum XMLRPCError where
    fromEnum :: XMLRPCError -> Int
fromEnum XMLRPCErrorArguments = 0
    fromEnum XMLRPCErrorRetval = 1
    fromEnum (AnotherXMLRPCError k :: Int
k) = Int
k

    toEnum :: Int -> XMLRPCError
toEnum 0 = XMLRPCError
XMLRPCErrorArguments
    toEnum 1 = XMLRPCError
XMLRPCErrorRetval
    toEnum k :: Int
k = Int -> XMLRPCError
AnotherXMLRPCError Int
k

instance P.Ord XMLRPCError where
    compare :: XMLRPCError -> XMLRPCError -> Ordering
compare a :: XMLRPCError
a b :: XMLRPCError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (XMLRPCError -> Int
forall a. Enum a => a -> Int
P.fromEnum XMLRPCError
a) (XMLRPCError -> Int
forall a. Enum a => a -> Int
P.fromEnum XMLRPCError
b)

instance GErrorClass XMLRPCError where
    gerrorClassDomain :: XMLRPCError -> Text
gerrorClassDomain _ = "soup_xmlrpc_error_quark"

-- | Catch exceptions of type `XMLRPCError`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchXMLRPCError ::
    IO a ->
    (XMLRPCError -> GErrorMessage -> IO a) ->
    IO a
catchXMLRPCError :: IO a -> (XMLRPCError -> Text -> IO a) -> IO a
catchXMLRPCError = IO a -> (XMLRPCError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `XMLRPCError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleXMLRPCError ::
    (XMLRPCError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleXMLRPCError :: (XMLRPCError -> Text -> IO a) -> IO a -> IO a
handleXMLRPCError = (XMLRPCError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

foreign import ccall "soup_xmlrpc_error_get_type" c_soup_xmlrpc_error_get_type :: 
    IO GType

instance BoxedEnum XMLRPCError where
    boxedEnumType :: XMLRPCError -> IO GType
boxedEnumType _ = IO GType
c_soup_xmlrpc_error_get_type

-- Enum WebsocketState
-- | The state of the WebSocket connection.
-- 
-- /Since: 2.50/
data WebsocketState = 
      WebsocketStateOpen
    -- ^ the connection is ready to send messages
    | WebsocketStateClosing
    -- ^ the connection is in the process of
    --   closing down; messages may be received, but not sent
    | WebsocketStateClosed
    -- ^ the connection is completely closed down
    | AnotherWebsocketState Int
    -- ^ Catch-all for unknown values
    deriving (Int -> WebsocketState -> ShowS
[WebsocketState] -> ShowS
WebsocketState -> String
(Int -> WebsocketState -> ShowS)
-> (WebsocketState -> String)
-> ([WebsocketState] -> ShowS)
-> Show WebsocketState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WebsocketState] -> ShowS
$cshowList :: [WebsocketState] -> ShowS
show :: WebsocketState -> String
$cshow :: WebsocketState -> String
showsPrec :: Int -> WebsocketState -> ShowS
$cshowsPrec :: Int -> WebsocketState -> ShowS
Show, WebsocketState -> WebsocketState -> Bool
(WebsocketState -> WebsocketState -> Bool)
-> (WebsocketState -> WebsocketState -> Bool) -> Eq WebsocketState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WebsocketState -> WebsocketState -> Bool
$c/= :: WebsocketState -> WebsocketState -> Bool
== :: WebsocketState -> WebsocketState -> Bool
$c== :: WebsocketState -> WebsocketState -> Bool
Eq)

instance P.Enum WebsocketState where
    fromEnum :: WebsocketState -> Int
fromEnum WebsocketStateOpen = 1
    fromEnum WebsocketStateClosing = 2
    fromEnum WebsocketStateClosed = 3
    fromEnum (AnotherWebsocketState k :: Int
k) = Int
k

    toEnum :: Int -> WebsocketState
toEnum 1 = WebsocketState
WebsocketStateOpen
    toEnum 2 = WebsocketState
WebsocketStateClosing
    toEnum 3 = WebsocketState
WebsocketStateClosed
    toEnum k :: Int
k = Int -> WebsocketState
AnotherWebsocketState Int
k

instance P.Ord WebsocketState where
    compare :: WebsocketState -> WebsocketState -> Ordering
compare a :: WebsocketState
a b :: WebsocketState
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (WebsocketState -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketState
a) (WebsocketState -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketState
b)

foreign import ccall "soup_websocket_state_get_type" c_soup_websocket_state_get_type :: 
    IO GType

instance BoxedEnum WebsocketState where
    boxedEnumType :: WebsocketState -> IO GType
boxedEnumType _ = IO GType
c_soup_websocket_state_get_type

-- Enum WebsocketError
-- | WebSocket-related errors.
-- 
-- /Since: 2.50/
data WebsocketError = 
      WebsocketErrorFailed
    -- ^ a generic error
    | WebsocketErrorNotWebsocket
    -- ^ attempted to handshake with a
    --   server that does not appear to understand WebSockets.
    | WebsocketErrorBadHandshake
    -- ^ the WebSocket handshake failed
    --   because some detail was invalid (eg, incorrect accept key).
    | WebsocketErrorBadOrigin
    -- ^ the WebSocket handshake failed
    --   because the \"Origin\" header was not an allowed value.
    | AnotherWebsocketError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> WebsocketError -> ShowS
[WebsocketError] -> ShowS
WebsocketError -> String
(Int -> WebsocketError -> ShowS)
-> (WebsocketError -> String)
-> ([WebsocketError] -> ShowS)
-> Show WebsocketError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WebsocketError] -> ShowS
$cshowList :: [WebsocketError] -> ShowS
show :: WebsocketError -> String
$cshow :: WebsocketError -> String
showsPrec :: Int -> WebsocketError -> ShowS
$cshowsPrec :: Int -> WebsocketError -> ShowS
Show, WebsocketError -> WebsocketError -> Bool
(WebsocketError -> WebsocketError -> Bool)
-> (WebsocketError -> WebsocketError -> Bool) -> Eq WebsocketError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WebsocketError -> WebsocketError -> Bool
$c/= :: WebsocketError -> WebsocketError -> Bool
== :: WebsocketError -> WebsocketError -> Bool
$c== :: WebsocketError -> WebsocketError -> Bool
Eq)

instance P.Enum WebsocketError where
    fromEnum :: WebsocketError -> Int
fromEnum WebsocketErrorFailed = 0
    fromEnum WebsocketErrorNotWebsocket = 1
    fromEnum WebsocketErrorBadHandshake = 2
    fromEnum WebsocketErrorBadOrigin = 3
    fromEnum (AnotherWebsocketError k :: Int
k) = Int
k

    toEnum :: Int -> WebsocketError
toEnum 0 = WebsocketError
WebsocketErrorFailed
    toEnum 1 = WebsocketError
WebsocketErrorNotWebsocket
    toEnum 2 = WebsocketError
WebsocketErrorBadHandshake
    toEnum 3 = WebsocketError
WebsocketErrorBadOrigin
    toEnum k :: Int
k = Int -> WebsocketError
AnotherWebsocketError Int
k

instance P.Ord WebsocketError where
    compare :: WebsocketError -> WebsocketError -> Ordering
compare a :: WebsocketError
a b :: WebsocketError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (WebsocketError -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketError
a) (WebsocketError -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketError
b)

foreign import ccall "soup_websocket_error_get_type" c_soup_websocket_error_get_type :: 
    IO GType

instance BoxedEnum WebsocketError where
    boxedEnumType :: WebsocketError -> IO GType
boxedEnumType _ = IO GType
c_soup_websocket_error_get_type

-- Enum WebsocketDataType
-- | The type of data contained in a [message]("GI.Soup.Objects.WebsocketConnection#signal:message")
-- signal.
-- 
-- /Since: 2.50/
data WebsocketDataType = 
      WebsocketDataTypeText
    -- ^ UTF-8 text
    | WebsocketDataTypeBinary
    -- ^ binary data
    | AnotherWebsocketDataType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> WebsocketDataType -> ShowS
[WebsocketDataType] -> ShowS
WebsocketDataType -> String
(Int -> WebsocketDataType -> ShowS)
-> (WebsocketDataType -> String)
-> ([WebsocketDataType] -> ShowS)
-> Show WebsocketDataType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WebsocketDataType] -> ShowS
$cshowList :: [WebsocketDataType] -> ShowS
show :: WebsocketDataType -> String
$cshow :: WebsocketDataType -> String
showsPrec :: Int -> WebsocketDataType -> ShowS
$cshowsPrec :: Int -> WebsocketDataType -> ShowS
Show, WebsocketDataType -> WebsocketDataType -> Bool
(WebsocketDataType -> WebsocketDataType -> Bool)
-> (WebsocketDataType -> WebsocketDataType -> Bool)
-> Eq WebsocketDataType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WebsocketDataType -> WebsocketDataType -> Bool
$c/= :: WebsocketDataType -> WebsocketDataType -> Bool
== :: WebsocketDataType -> WebsocketDataType -> Bool
$c== :: WebsocketDataType -> WebsocketDataType -> Bool
Eq)

instance P.Enum WebsocketDataType where
    fromEnum :: WebsocketDataType -> Int
fromEnum WebsocketDataTypeText = 1
    fromEnum WebsocketDataTypeBinary = 2
    fromEnum (AnotherWebsocketDataType k :: Int
k) = Int
k

    toEnum :: Int -> WebsocketDataType
toEnum 1 = WebsocketDataType
WebsocketDataTypeText
    toEnum 2 = WebsocketDataType
WebsocketDataTypeBinary
    toEnum k :: Int
k = Int -> WebsocketDataType
AnotherWebsocketDataType Int
k

instance P.Ord WebsocketDataType where
    compare :: WebsocketDataType -> WebsocketDataType -> Ordering
compare a :: WebsocketDataType
a b :: WebsocketDataType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (WebsocketDataType -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketDataType
a) (WebsocketDataType -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketDataType
b)

foreign import ccall "soup_websocket_data_type_get_type" c_soup_websocket_data_type_get_type :: 
    IO GType

instance BoxedEnum WebsocketDataType where
    boxedEnumType :: WebsocketDataType -> IO GType
boxedEnumType _ = IO GType
c_soup_websocket_data_type_get_type

-- Enum WebsocketConnectionType
-- | The type of a t'GI.Soup.Objects.WebsocketConnection.WebsocketConnection'.
-- 
-- /Since: 2.50/
data WebsocketConnectionType = 
      WebsocketConnectionTypeUnknown
    -- ^ unknown\/invalid connection
    | WebsocketConnectionTypeClient
    -- ^ a client-side connection
    | WebsocketConnectionTypeServer
    -- ^ a server-side connection
    | AnotherWebsocketConnectionType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> WebsocketConnectionType -> ShowS
[WebsocketConnectionType] -> ShowS
WebsocketConnectionType -> String
(Int -> WebsocketConnectionType -> ShowS)
-> (WebsocketConnectionType -> String)
-> ([WebsocketConnectionType] -> ShowS)
-> Show WebsocketConnectionType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WebsocketConnectionType] -> ShowS
$cshowList :: [WebsocketConnectionType] -> ShowS
show :: WebsocketConnectionType -> String
$cshow :: WebsocketConnectionType -> String
showsPrec :: Int -> WebsocketConnectionType -> ShowS
$cshowsPrec :: Int -> WebsocketConnectionType -> ShowS
Show, WebsocketConnectionType -> WebsocketConnectionType -> Bool
(WebsocketConnectionType -> WebsocketConnectionType -> Bool)
-> (WebsocketConnectionType -> WebsocketConnectionType -> Bool)
-> Eq WebsocketConnectionType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WebsocketConnectionType -> WebsocketConnectionType -> Bool
$c/= :: WebsocketConnectionType -> WebsocketConnectionType -> Bool
== :: WebsocketConnectionType -> WebsocketConnectionType -> Bool
$c== :: WebsocketConnectionType -> WebsocketConnectionType -> Bool
Eq)

instance P.Enum WebsocketConnectionType where
    fromEnum :: WebsocketConnectionType -> Int
fromEnum WebsocketConnectionTypeUnknown = 0
    fromEnum WebsocketConnectionTypeClient = 1
    fromEnum WebsocketConnectionTypeServer = 2
    fromEnum (AnotherWebsocketConnectionType k :: Int
k) = Int
k

    toEnum :: Int -> WebsocketConnectionType
toEnum 0 = WebsocketConnectionType
WebsocketConnectionTypeUnknown
    toEnum 1 = WebsocketConnectionType
WebsocketConnectionTypeClient
    toEnum 2 = WebsocketConnectionType
WebsocketConnectionTypeServer
    toEnum k :: Int
k = Int -> WebsocketConnectionType
AnotherWebsocketConnectionType Int
k

instance P.Ord WebsocketConnectionType where
    compare :: WebsocketConnectionType -> WebsocketConnectionType -> Ordering
compare a :: WebsocketConnectionType
a b :: WebsocketConnectionType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (WebsocketConnectionType -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketConnectionType
a) (WebsocketConnectionType -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketConnectionType
b)

foreign import ccall "soup_websocket_connection_type_get_type" c_soup_websocket_connection_type_get_type :: 
    IO GType

instance BoxedEnum WebsocketConnectionType where
    boxedEnumType :: WebsocketConnectionType -> IO GType
boxedEnumType _ = IO GType
c_soup_websocket_connection_type_get_type

-- Enum WebsocketCloseCode
-- | Pre-defined close codes that can be passed to
-- 'GI.Soup.Objects.WebsocketConnection.websocketConnectionClose' or received from
-- 'GI.Soup.Objects.WebsocketConnection.websocketConnectionGetCloseCode'. (However, other codes
-- are also allowed.)
-- 
-- /Since: 2.50/
data WebsocketCloseCode = 
      WebsocketCloseCodeNormal
    -- ^ a normal, non-error close
    | WebsocketCloseCodeGoingAway
    -- ^ the client\/server is going away
    | WebsocketCloseCodeProtocolError
    -- ^ a protocol error occurred
    | WebsocketCloseCodeUnsupportedData
    -- ^ the endpoint received data
    --   of a type that it does not support.
    | WebsocketCloseCodeNoStatus
    -- ^ reserved value indicating that
    --   no close code was present; must not be sent.
    | WebsocketCloseCodeAbnormal
    -- ^ reserved value indicating that
    --   the connection was closed abnormally; must not be sent.
    | WebsocketCloseCodeBadData
    -- ^ the endpoint received data that
    --   was invalid (eg, non-UTF-8 data in a text message).
    | WebsocketCloseCodePolicyViolation
    -- ^ generic error code
    --   indicating some sort of policy violation.
    | WebsocketCloseCodeTooBig
    -- ^ the endpoint received a message
    --   that is too big to process.
    | WebsocketCloseCodeNoExtension
    -- ^ the client is closing the
    --   connection because the server failed to negotiate a required
    --   extension.
    | WebsocketCloseCodeServerError
    -- ^ the server is closing the
    --   connection because it was unable to fulfill the request.
    | WebsocketCloseCodeTlsHandshake
    -- ^ reserved value indicating that
    --   the TLS handshake failed; must not be sent.
    | AnotherWebsocketCloseCode Int
    -- ^ Catch-all for unknown values
    deriving (Int -> WebsocketCloseCode -> ShowS
[WebsocketCloseCode] -> ShowS
WebsocketCloseCode -> String
(Int -> WebsocketCloseCode -> ShowS)
-> (WebsocketCloseCode -> String)
-> ([WebsocketCloseCode] -> ShowS)
-> Show WebsocketCloseCode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WebsocketCloseCode] -> ShowS
$cshowList :: [WebsocketCloseCode] -> ShowS
show :: WebsocketCloseCode -> String
$cshow :: WebsocketCloseCode -> String
showsPrec :: Int -> WebsocketCloseCode -> ShowS
$cshowsPrec :: Int -> WebsocketCloseCode -> ShowS
Show, WebsocketCloseCode -> WebsocketCloseCode -> Bool
(WebsocketCloseCode -> WebsocketCloseCode -> Bool)
-> (WebsocketCloseCode -> WebsocketCloseCode -> Bool)
-> Eq WebsocketCloseCode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WebsocketCloseCode -> WebsocketCloseCode -> Bool
$c/= :: WebsocketCloseCode -> WebsocketCloseCode -> Bool
== :: WebsocketCloseCode -> WebsocketCloseCode -> Bool
$c== :: WebsocketCloseCode -> WebsocketCloseCode -> Bool
Eq)

instance P.Enum WebsocketCloseCode where
    fromEnum :: WebsocketCloseCode -> Int
fromEnum WebsocketCloseCodeNormal = 1000
    fromEnum WebsocketCloseCodeGoingAway = 1001
    fromEnum WebsocketCloseCodeProtocolError = 1002
    fromEnum WebsocketCloseCodeUnsupportedData = 1003
    fromEnum WebsocketCloseCodeNoStatus = 1005
    fromEnum WebsocketCloseCodeAbnormal = 1006
    fromEnum WebsocketCloseCodeBadData = 1007
    fromEnum WebsocketCloseCodePolicyViolation = 1008
    fromEnum WebsocketCloseCodeTooBig = 1009
    fromEnum WebsocketCloseCodeNoExtension = 1010
    fromEnum WebsocketCloseCodeServerError = 1011
    fromEnum WebsocketCloseCodeTlsHandshake = 1015
    fromEnum (AnotherWebsocketCloseCode k :: Int
k) = Int
k

    toEnum :: Int -> WebsocketCloseCode
toEnum 1000 = WebsocketCloseCode
WebsocketCloseCodeNormal
    toEnum 1001 = WebsocketCloseCode
WebsocketCloseCodeGoingAway
    toEnum 1002 = WebsocketCloseCode
WebsocketCloseCodeProtocolError
    toEnum 1003 = WebsocketCloseCode
WebsocketCloseCodeUnsupportedData
    toEnum 1005 = WebsocketCloseCode
WebsocketCloseCodeNoStatus
    toEnum 1006 = WebsocketCloseCode
WebsocketCloseCodeAbnormal
    toEnum 1007 = WebsocketCloseCode
WebsocketCloseCodeBadData
    toEnum 1008 = WebsocketCloseCode
WebsocketCloseCodePolicyViolation
    toEnum 1009 = WebsocketCloseCode
WebsocketCloseCodeTooBig
    toEnum 1010 = WebsocketCloseCode
WebsocketCloseCodeNoExtension
    toEnum 1011 = WebsocketCloseCode
WebsocketCloseCodeServerError
    toEnum 1015 = WebsocketCloseCode
WebsocketCloseCodeTlsHandshake
    toEnum k :: Int
k = Int -> WebsocketCloseCode
AnotherWebsocketCloseCode Int
k

instance P.Ord WebsocketCloseCode where
    compare :: WebsocketCloseCode -> WebsocketCloseCode -> Ordering
compare a :: WebsocketCloseCode
a b :: WebsocketCloseCode
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (WebsocketCloseCode -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketCloseCode
a) (WebsocketCloseCode -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketCloseCode
b)

foreign import ccall "soup_websocket_close_code_get_type" c_soup_websocket_close_code_get_type :: 
    IO GType

instance BoxedEnum WebsocketCloseCode where
    boxedEnumType :: WebsocketCloseCode -> IO GType
boxedEnumType _ = IO GType
c_soup_websocket_close_code_get_type

-- Enum TLDError
-- | Error codes for @/SOUP_TLD_ERROR/@.
-- 
-- /Since: 2.40/
data TLDError = 
      TLDErrorInvalidHostname
    -- ^ A hostname was syntactically
    --   invalid.
    | TLDErrorIsIpAddress
    -- ^ The passed-in \"hostname\" was
    --   actually an IP address (and thus has no base domain or
    --   public suffix).
    | TLDErrorNotEnoughDomains
    -- ^ The passed-in hostname
    --   did not have enough components. Eg, calling
    --   'GI.Soup.Functions.tldGetBaseDomain' on \<literal>\"co.uk\"\<\/literal>.
    | TLDErrorNoBaseDomain
    -- ^ The passed-in hostname has
    --   no recognized public suffix.
    | TLDErrorNoPslData
    -- ^ /No description available in the introspection data./
    | AnotherTLDError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> TLDError -> ShowS
[TLDError] -> ShowS
TLDError -> String
(Int -> TLDError -> ShowS)
-> (TLDError -> String) -> ([TLDError] -> ShowS) -> Show TLDError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TLDError] -> ShowS
$cshowList :: [TLDError] -> ShowS
show :: TLDError -> String
$cshow :: TLDError -> String
showsPrec :: Int -> TLDError -> ShowS
$cshowsPrec :: Int -> TLDError -> ShowS
Show, TLDError -> TLDError -> Bool
(TLDError -> TLDError -> Bool)
-> (TLDError -> TLDError -> Bool) -> Eq TLDError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TLDError -> TLDError -> Bool
$c/= :: TLDError -> TLDError -> Bool
== :: TLDError -> TLDError -> Bool
$c== :: TLDError -> TLDError -> Bool
Eq)

instance P.Enum TLDError where
    fromEnum :: TLDError -> Int
fromEnum TLDErrorInvalidHostname = 0
    fromEnum TLDErrorIsIpAddress = 1
    fromEnum TLDErrorNotEnoughDomains = 2
    fromEnum TLDErrorNoBaseDomain = 3
    fromEnum TLDErrorNoPslData = 4
    fromEnum (AnotherTLDError k :: Int
k) = Int
k

    toEnum :: Int -> TLDError
toEnum 0 = TLDError
TLDErrorInvalidHostname
    toEnum 1 = TLDError
TLDErrorIsIpAddress
    toEnum 2 = TLDError
TLDErrorNotEnoughDomains
    toEnum 3 = TLDError
TLDErrorNoBaseDomain
    toEnum 4 = TLDError
TLDErrorNoPslData
    toEnum k :: Int
k = Int -> TLDError
AnotherTLDError Int
k

instance P.Ord TLDError where
    compare :: TLDError -> TLDError -> Ordering
compare a :: TLDError
a b :: TLDError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (TLDError -> Int
forall a. Enum a => a -> Int
P.fromEnum TLDError
a) (TLDError -> Int
forall a. Enum a => a -> Int
P.fromEnum TLDError
b)

instance GErrorClass TLDError where
    gerrorClassDomain :: TLDError -> Text
gerrorClassDomain _ = "soup_tld_error_quark"

-- | Catch exceptions of type `TLDError`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchTLDError ::
    IO a ->
    (TLDError -> GErrorMessage -> IO a) ->
    IO a
catchTLDError :: IO a -> (TLDError -> Text -> IO a) -> IO a
catchTLDError = IO a -> (TLDError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `TLDError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleTLDError ::
    (TLDError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleTLDError :: (TLDError -> Text -> IO a) -> IO a -> IO a
handleTLDError = (TLDError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

foreign import ccall "soup_tld_error_get_type" c_soup_tld_error_get_type :: 
    IO GType

instance BoxedEnum TLDError where
    boxedEnumType :: TLDError -> IO GType
boxedEnumType _ = IO GType
c_soup_tld_error_get_type

-- Enum Status
-- | These represent the known HTTP status code values, plus various
-- network and internal errors.
-- 
-- Note that no libsoup functions take or return this type directly;
-- any function that works with status codes will accept unrecognized
-- status codes as well.
-- 
-- Prior to 2.44 this type was called
-- \<literal>SoupKnownStatusCode\<\/literal>, but the individual values
-- have always had the names they have now.
data Status = 
      StatusNone
    -- ^ No status available. (Eg, the message has not
    -- been sent yet)
    | StatusCancelled
    -- ^ Message was cancelled locally
    | StatusCantResolve
    -- ^ Unable to resolve destination host name
    | StatusCantResolveProxy
    -- ^ Unable to resolve proxy host name
    | StatusCantConnect
    -- ^ Unable to connect to remote host
    | StatusCantConnectProxy
    -- ^ Unable to connect to proxy
    | StatusSslFailed
    -- ^ SSL\/TLS negotiation failed
    | StatusIoError
    -- ^ A network error occurred, or the other end
    -- closed the connection unexpectedly
    | StatusMalformed
    -- ^ Malformed data (usually a programmer error)
    | StatusTryAgain
    -- ^ Used internally
    | StatusTooManyRedirects
    -- ^ There were too many redirections
    | StatusTlsFailed
    -- ^ Used internally
    | StatusContinue
    -- ^ 100 Continue (HTTP)
    | StatusSwitchingProtocols
    -- ^ 101 Switching Protocols (HTTP)
    | StatusProcessing
    -- ^ 102 Processing (WebDAV)
    | StatusOk
    -- ^ 200 Success (HTTP). Also used by many lower-level
    -- soup routines to indicate success.
    | StatusCreated
    -- ^ 201 Created (HTTP)
    | StatusAccepted
    -- ^ 202 Accepted (HTTP)
    | StatusNonAuthoritative
    -- ^ 203 Non-Authoritative Information
    -- (HTTP)
    | StatusNoContent
    -- ^ 204 No Content (HTTP)
    | StatusResetContent
    -- ^ 205 Reset Content (HTTP)
    | StatusPartialContent
    -- ^ 206 Partial Content (HTTP)
    | StatusMultiStatus
    -- ^ 207 Multi-Status (WebDAV)
    | StatusMultipleChoices
    -- ^ 300 Multiple Choices (HTTP)
    | StatusMovedPermanently
    -- ^ 301 Moved Permanently (HTTP)
    | StatusFound
    -- ^ 302 Found (HTTP)
    | StatusMovedTemporarily
    -- ^ 302 Moved Temporarily (old name,
    -- RFC 2068)
    | StatusSeeOther
    -- ^ 303 See Other (HTTP)
    | StatusNotModified
    -- ^ 304 Not Modified (HTTP)
    | StatusUseProxy
    -- ^ 305 Use Proxy (HTTP)
    | StatusNotAppearingInThisProtocol
    -- ^ 306 [Unused] (HTTP)
    | StatusTemporaryRedirect
    -- ^ 307 Temporary Redirect (HTTP)
    | StatusBadRequest
    -- ^ 400 Bad Request (HTTP)
    | StatusUnauthorized
    -- ^ 401 Unauthorized (HTTP)
    | StatusPaymentRequired
    -- ^ 402 Payment Required (HTTP)
    | StatusForbidden
    -- ^ 403 Forbidden (HTTP)
    | StatusNotFound
    -- ^ 404 Not Found (HTTP)
    | StatusMethodNotAllowed
    -- ^ 405 Method Not Allowed (HTTP)
    | StatusNotAcceptable
    -- ^ 406 Not Acceptable (HTTP)
    | StatusProxyAuthenticationRequired
    -- ^ 407 Proxy Authentication
    -- Required (HTTP)
    | StatusProxyUnauthorized
    -- ^ shorter alias for
    -- 'GI.Soup.Enums.StatusProxyAuthenticationRequired'
    | StatusRequestTimeout
    -- ^ 408 Request Timeout (HTTP)
    | StatusConflict
    -- ^ 409 Conflict (HTTP)
    | StatusGone
    -- ^ 410 Gone (HTTP)
    | StatusLengthRequired
    -- ^ 411 Length Required (HTTP)
    | StatusPreconditionFailed
    -- ^ 412 Precondition Failed (HTTP)
    | StatusRequestEntityTooLarge
    -- ^ 413 Request Entity Too Large
    -- (HTTP)
    | StatusRequestUriTooLong
    -- ^ 414 Request-URI Too Long (HTTP)
    | StatusUnsupportedMediaType
    -- ^ 415 Unsupported Media Type
    -- (HTTP)
    | StatusRequestedRangeNotSatisfiable
    -- ^ 416 Requested Range
    -- Not Satisfiable (HTTP)
    | StatusInvalidRange
    -- ^ shorter alias for
    -- 'GI.Soup.Enums.StatusRequestedRangeNotSatisfiable'
    | StatusExpectationFailed
    -- ^ 417 Expectation Failed (HTTP)
    | StatusUnprocessableEntity
    -- ^ 422 Unprocessable Entity
    -- (WebDAV)
    | StatusLocked
    -- ^ 423 Locked (WebDAV)
    | StatusFailedDependency
    -- ^ 424 Failed Dependency (WebDAV)
    | StatusInternalServerError
    -- ^ 500 Internal Server Error
    -- (HTTP)
    | StatusNotImplemented
    -- ^ 501 Not Implemented (HTTP)
    | StatusBadGateway
    -- ^ 502 Bad Gateway (HTTP)
    | StatusServiceUnavailable
    -- ^ 503 Service Unavailable (HTTP)
    | StatusGatewayTimeout
    -- ^ 504 Gateway Timeout (HTTP)
    | StatusHttpVersionNotSupported
    -- ^ 505 HTTP Version Not
    -- Supported (HTTP)
    | StatusInsufficientStorage
    -- ^ 507 Insufficient Storage
    -- (WebDAV)
    | StatusNotExtended
    -- ^ 510 Not Extended (RFC 2774)
    | AnotherStatus Int
    -- ^ Catch-all for unknown values
    deriving (Int -> Status -> ShowS
[Status] -> ShowS
Status -> String
(Int -> Status -> ShowS)
-> (Status -> String) -> ([Status] -> ShowS) -> Show Status
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Status] -> ShowS
$cshowList :: [Status] -> ShowS
show :: Status -> String
$cshow :: Status -> String
showsPrec :: Int -> Status -> ShowS
$cshowsPrec :: Int -> Status -> ShowS
Show, Status -> Status -> Bool
(Status -> Status -> Bool)
-> (Status -> Status -> Bool) -> Eq Status
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Status -> Status -> Bool
$c/= :: Status -> Status -> Bool
== :: Status -> Status -> Bool
$c== :: Status -> Status -> Bool
Eq)

instance P.Enum Status where
    fromEnum :: Status -> Int
fromEnum StatusNone = 0
    fromEnum StatusCancelled = 1
    fromEnum StatusCantResolve = 2
    fromEnum StatusCantResolveProxy = 3
    fromEnum StatusCantConnect = 4
    fromEnum StatusCantConnectProxy = 5
    fromEnum StatusSslFailed = 6
    fromEnum StatusIoError = 7
    fromEnum StatusMalformed = 8
    fromEnum StatusTryAgain = 9
    fromEnum StatusTooManyRedirects = 10
    fromEnum StatusTlsFailed = 11
    fromEnum StatusContinue = 100
    fromEnum StatusSwitchingProtocols = 101
    fromEnum StatusProcessing = 102
    fromEnum StatusOk = 200
    fromEnum StatusCreated = 201
    fromEnum StatusAccepted = 202
    fromEnum StatusNonAuthoritative = 203
    fromEnum StatusNoContent = 204
    fromEnum StatusResetContent = 205
    fromEnum StatusPartialContent = 206
    fromEnum StatusMultiStatus = 207
    fromEnum StatusMultipleChoices = 300
    fromEnum StatusMovedPermanently = 301
    fromEnum StatusFound = 302
    fromEnum StatusMovedTemporarily = 302
    fromEnum StatusSeeOther = 303
    fromEnum StatusNotModified = 304
    fromEnum StatusUseProxy = 305
    fromEnum StatusNotAppearingInThisProtocol = 306
    fromEnum StatusTemporaryRedirect = 307
    fromEnum StatusBadRequest = 400
    fromEnum StatusUnauthorized = 401
    fromEnum StatusPaymentRequired = 402
    fromEnum StatusForbidden = 403
    fromEnum StatusNotFound = 404
    fromEnum StatusMethodNotAllowed = 405
    fromEnum StatusNotAcceptable = 406
    fromEnum StatusProxyAuthenticationRequired = 407
    fromEnum StatusProxyUnauthorized = 407
    fromEnum StatusRequestTimeout = 408
    fromEnum StatusConflict = 409
    fromEnum StatusGone = 410
    fromEnum StatusLengthRequired = 411
    fromEnum StatusPreconditionFailed = 412
    fromEnum StatusRequestEntityTooLarge = 413
    fromEnum StatusRequestUriTooLong = 414
    fromEnum StatusUnsupportedMediaType = 415
    fromEnum StatusRequestedRangeNotSatisfiable = 416
    fromEnum StatusInvalidRange = 416
    fromEnum StatusExpectationFailed = 417
    fromEnum StatusUnprocessableEntity = 422
    fromEnum StatusLocked = 423
    fromEnum StatusFailedDependency = 424
    fromEnum StatusInternalServerError = 500
    fromEnum StatusNotImplemented = 501
    fromEnum StatusBadGateway = 502
    fromEnum StatusServiceUnavailable = 503
    fromEnum StatusGatewayTimeout = 504
    fromEnum StatusHttpVersionNotSupported = 505
    fromEnum StatusInsufficientStorage = 507
    fromEnum StatusNotExtended = 510
    fromEnum (AnotherStatus k :: Int
k) = Int
k

    toEnum :: Int -> Status
toEnum 0 = Status
StatusNone
    toEnum 1 = Status
StatusCancelled
    toEnum 2 = Status
StatusCantResolve
    toEnum 3 = Status
StatusCantResolveProxy
    toEnum 4 = Status
StatusCantConnect
    toEnum 5 = Status
StatusCantConnectProxy
    toEnum 6 = Status
StatusSslFailed
    toEnum 7 = Status
StatusIoError
    toEnum 8 = Status
StatusMalformed
    toEnum 9 = Status
StatusTryAgain
    toEnum 10 = Status
StatusTooManyRedirects
    toEnum 11 = Status
StatusTlsFailed
    toEnum 100 = Status
StatusContinue
    toEnum 101 = Status
StatusSwitchingProtocols
    toEnum 102 = Status
StatusProcessing
    toEnum 200 = Status
StatusOk
    toEnum 201 = Status
StatusCreated
    toEnum 202 = Status
StatusAccepted
    toEnum 203 = Status
StatusNonAuthoritative
    toEnum 204 = Status
StatusNoContent
    toEnum 205 = Status
StatusResetContent
    toEnum 206 = Status
StatusPartialContent
    toEnum 207 = Status
StatusMultiStatus
    toEnum 300 = Status
StatusMultipleChoices
    toEnum 301 = Status
StatusMovedPermanently
    toEnum 302 = Status
StatusFound
    toEnum 303 = Status
StatusSeeOther
    toEnum 304 = Status
StatusNotModified
    toEnum 305 = Status
StatusUseProxy
    toEnum 306 = Status
StatusNotAppearingInThisProtocol
    toEnum 307 = Status
StatusTemporaryRedirect
    toEnum 400 = Status
StatusBadRequest
    toEnum 401 = Status
StatusUnauthorized
    toEnum 402 = Status
StatusPaymentRequired
    toEnum 403 = Status
StatusForbidden
    toEnum 404 = Status
StatusNotFound
    toEnum 405 = Status
StatusMethodNotAllowed
    toEnum 406 = Status
StatusNotAcceptable
    toEnum 407 = Status
StatusProxyAuthenticationRequired
    toEnum 408 = Status
StatusRequestTimeout
    toEnum 409 = Status
StatusConflict
    toEnum 410 = Status
StatusGone
    toEnum 411 = Status
StatusLengthRequired
    toEnum 412 = Status
StatusPreconditionFailed
    toEnum 413 = Status
StatusRequestEntityTooLarge
    toEnum 414 = Status
StatusRequestUriTooLong
    toEnum 415 = Status
StatusUnsupportedMediaType
    toEnum 416 = Status
StatusRequestedRangeNotSatisfiable
    toEnum 417 = Status
StatusExpectationFailed
    toEnum 422 = Status
StatusUnprocessableEntity
    toEnum 423 = Status
StatusLocked
    toEnum 424 = Status
StatusFailedDependency
    toEnum 500 = Status
StatusInternalServerError
    toEnum 501 = Status
StatusNotImplemented
    toEnum 502 = Status
StatusBadGateway
    toEnum 503 = Status
StatusServiceUnavailable
    toEnum 504 = Status
StatusGatewayTimeout
    toEnum 505 = Status
StatusHttpVersionNotSupported
    toEnum 507 = Status
StatusInsufficientStorage
    toEnum 510 = Status
StatusNotExtended
    toEnum k :: Int
k = Int -> Status
AnotherStatus Int
k

instance P.Ord Status where
    compare :: Status -> Status -> Ordering
compare a :: Status
a b :: Status
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Status -> Int
forall a. Enum a => a -> Int
P.fromEnum Status
a) (Status -> Int
forall a. Enum a => a -> Int
P.fromEnum Status
b)

foreign import ccall "soup_status_get_type" c_soup_status_get_type :: 
    IO GType

instance BoxedEnum Status where
    boxedEnumType :: Status -> IO GType
boxedEnumType _ = IO GType
c_soup_status_get_type

-- Enum SocketIOStatus
-- | Return value from the t'GI.Soup.Objects.Socket.Socket' IO methods.
data SocketIOStatus = 
      SocketIOStatusOk
    -- ^ Success
    | SocketIOStatusWouldBlock
    -- ^ Cannot read\/write any more at this time
    | SocketIOStatusEof
    -- ^ End of file
    | SocketIOStatusError
    -- ^ Other error
    | AnotherSocketIOStatus Int
    -- ^ Catch-all for unknown values
    deriving (Int -> SocketIOStatus -> ShowS
[SocketIOStatus] -> ShowS
SocketIOStatus -> String
(Int -> SocketIOStatus -> ShowS)
-> (SocketIOStatus -> String)
-> ([SocketIOStatus] -> ShowS)
-> Show SocketIOStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SocketIOStatus] -> ShowS
$cshowList :: [SocketIOStatus] -> ShowS
show :: SocketIOStatus -> String
$cshow :: SocketIOStatus -> String
showsPrec :: Int -> SocketIOStatus -> ShowS
$cshowsPrec :: Int -> SocketIOStatus -> ShowS
Show, SocketIOStatus -> SocketIOStatus -> Bool
(SocketIOStatus -> SocketIOStatus -> Bool)
-> (SocketIOStatus -> SocketIOStatus -> Bool) -> Eq SocketIOStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SocketIOStatus -> SocketIOStatus -> Bool
$c/= :: SocketIOStatus -> SocketIOStatus -> Bool
== :: SocketIOStatus -> SocketIOStatus -> Bool
$c== :: SocketIOStatus -> SocketIOStatus -> Bool
Eq)

instance P.Enum SocketIOStatus where
    fromEnum :: SocketIOStatus -> Int
fromEnum SocketIOStatusOk = 0
    fromEnum SocketIOStatusWouldBlock = 1
    fromEnum SocketIOStatusEof = 2
    fromEnum SocketIOStatusError = 3
    fromEnum (AnotherSocketIOStatus k :: Int
k) = Int
k

    toEnum :: Int -> SocketIOStatus
toEnum 0 = SocketIOStatus
SocketIOStatusOk
    toEnum 1 = SocketIOStatus
SocketIOStatusWouldBlock
    toEnum 2 = SocketIOStatus
SocketIOStatusEof
    toEnum 3 = SocketIOStatus
SocketIOStatusError
    toEnum k :: Int
k = Int -> SocketIOStatus
AnotherSocketIOStatus Int
k

instance P.Ord SocketIOStatus where
    compare :: SocketIOStatus -> SocketIOStatus -> Ordering
compare a :: SocketIOStatus
a b :: SocketIOStatus
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (SocketIOStatus -> Int
forall a. Enum a => a -> Int
P.fromEnum SocketIOStatus
a) (SocketIOStatus -> Int
forall a. Enum a => a -> Int
P.fromEnum SocketIOStatus
b)

foreign import ccall "soup_socket_io_status_get_type" c_soup_socket_io_status_get_type :: 
    IO GType

instance BoxedEnum SocketIOStatus where
    boxedEnumType :: SocketIOStatus -> IO GType
boxedEnumType _ = IO GType
c_soup_socket_io_status_get_type

-- Enum RequesterError
-- | /No description available in the introspection data./
data RequesterError = 
      RequesterErrorBadUri
    -- ^ /No description available in the introspection data./
    | RequesterErrorUnsupportedUriScheme
    -- ^ /No description available in the introspection data./
    | AnotherRequesterError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> RequesterError -> ShowS
[RequesterError] -> ShowS
RequesterError -> String
(Int -> RequesterError -> ShowS)
-> (RequesterError -> String)
-> ([RequesterError] -> ShowS)
-> Show RequesterError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequesterError] -> ShowS
$cshowList :: [RequesterError] -> ShowS
show :: RequesterError -> String
$cshow :: RequesterError -> String
showsPrec :: Int -> RequesterError -> ShowS
$cshowsPrec :: Int -> RequesterError -> ShowS
Show, RequesterError -> RequesterError -> Bool
(RequesterError -> RequesterError -> Bool)
-> (RequesterError -> RequesterError -> Bool) -> Eq RequesterError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequesterError -> RequesterError -> Bool
$c/= :: RequesterError -> RequesterError -> Bool
== :: RequesterError -> RequesterError -> Bool
$c== :: RequesterError -> RequesterError -> Bool
Eq)

instance P.Enum RequesterError where
    fromEnum :: RequesterError -> Int
fromEnum RequesterErrorBadUri = 0
    fromEnum RequesterErrorUnsupportedUriScheme = 1
    fromEnum (AnotherRequesterError k :: Int
k) = Int
k

    toEnum :: Int -> RequesterError
toEnum 0 = RequesterError
RequesterErrorBadUri
    toEnum 1 = RequesterError
RequesterErrorUnsupportedUriScheme
    toEnum k :: Int
k = Int -> RequesterError
AnotherRequesterError Int
k

instance P.Ord RequesterError where
    compare :: RequesterError -> RequesterError -> Ordering
compare a :: RequesterError
a b :: RequesterError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (RequesterError -> Int
forall a. Enum a => a -> Int
P.fromEnum RequesterError
a) (RequesterError -> Int
forall a. Enum a => a -> Int
P.fromEnum RequesterError
b)

instance GErrorClass RequesterError where
    gerrorClassDomain :: RequesterError -> Text
gerrorClassDomain _ = "soup_requester_error_quark"

-- | Catch exceptions of type `RequesterError`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchRequesterError ::
    IO a ->
    (RequesterError -> GErrorMessage -> IO a) ->
    IO a
catchRequesterError :: IO a -> (RequesterError -> Text -> IO a) -> IO a
catchRequesterError = IO a -> (RequesterError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `RequesterError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleRequesterError ::
    (RequesterError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleRequesterError :: (RequesterError -> Text -> IO a) -> IO a -> IO a
handleRequesterError = (RequesterError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

foreign import ccall "soup_requester_error_get_type" c_soup_requester_error_get_type :: 
    IO GType

instance BoxedEnum RequesterError where
    boxedEnumType :: RequesterError -> IO GType
boxedEnumType _ = IO GType
c_soup_requester_error_get_type

-- Enum RequestError
-- | A t'GI.Soup.Objects.Request.Request' error.
-- 
-- /Since: 2.42/
data RequestError = 
      RequestErrorBadUri
    -- ^ the URI could not be parsed
    | RequestErrorUnsupportedUriScheme
    -- ^ the URI scheme is not
    --   supported by this t'GI.Soup.Objects.Session.Session'
    | RequestErrorParsing
    -- ^ the server\'s response could not
    --   be parsed
    | RequestErrorEncoding
    -- ^ the server\'s response was in an
    --   unsupported format
    | AnotherRequestError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> RequestError -> ShowS
[RequestError] -> ShowS
RequestError -> String
(Int -> RequestError -> ShowS)
-> (RequestError -> String)
-> ([RequestError] -> ShowS)
-> Show RequestError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RequestError] -> ShowS
$cshowList :: [RequestError] -> ShowS
show :: RequestError -> String
$cshow :: RequestError -> String
showsPrec :: Int -> RequestError -> ShowS
$cshowsPrec :: Int -> RequestError -> ShowS
Show, RequestError -> RequestError -> Bool
(RequestError -> RequestError -> Bool)
-> (RequestError -> RequestError -> Bool) -> Eq RequestError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RequestError -> RequestError -> Bool
$c/= :: RequestError -> RequestError -> Bool
== :: RequestError -> RequestError -> Bool
$c== :: RequestError -> RequestError -> Bool
Eq)

instance P.Enum RequestError where
    fromEnum :: RequestError -> Int
fromEnum RequestErrorBadUri = 0
    fromEnum RequestErrorUnsupportedUriScheme = 1
    fromEnum RequestErrorParsing = 2
    fromEnum RequestErrorEncoding = 3
    fromEnum (AnotherRequestError k :: Int
k) = Int
k

    toEnum :: Int -> RequestError
toEnum 0 = RequestError
RequestErrorBadUri
    toEnum 1 = RequestError
RequestErrorUnsupportedUriScheme
    toEnum 2 = RequestError
RequestErrorParsing
    toEnum 3 = RequestError
RequestErrorEncoding
    toEnum k :: Int
k = Int -> RequestError
AnotherRequestError Int
k

instance P.Ord RequestError where
    compare :: RequestError -> RequestError -> Ordering
compare a :: RequestError
a b :: RequestError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (RequestError -> Int
forall a. Enum a => a -> Int
P.fromEnum RequestError
a) (RequestError -> Int
forall a. Enum a => a -> Int
P.fromEnum RequestError
b)

instance GErrorClass RequestError where
    gerrorClassDomain :: RequestError -> Text
gerrorClassDomain _ = "soup_request_error_quark"

-- | Catch exceptions of type `RequestError`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchRequestError ::
    IO a ->
    (RequestError -> GErrorMessage -> IO a) ->
    IO a
catchRequestError :: IO a -> (RequestError -> Text -> IO a) -> IO a
catchRequestError = IO a -> (RequestError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `RequestError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleRequestError ::
    (RequestError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleRequestError :: (RequestError -> Text -> IO a) -> IO a -> IO a
handleRequestError = (RequestError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

foreign import ccall "soup_request_error_get_type" c_soup_request_error_get_type :: 
    IO GType

instance BoxedEnum RequestError where
    boxedEnumType :: RequestError -> IO GType
boxedEnumType _ = IO GType
c_soup_request_error_get_type

-- Enum MessagePriority
-- | Priorities that can be set on a t'GI.Soup.Objects.Message.Message' to instruct the
-- message queue to process it before any other message with lower
-- priority.
data MessagePriority = 
      MessagePriorityVeryLow
    -- ^ The lowest priority, the messages
    --   with this priority will be the last ones to be attended.
    | MessagePriorityLow
    -- ^ Use this for low priority messages, a
    --   t'GI.Soup.Objects.Message.Message' with the default priority will be processed first.
    | MessagePriorityNormal
    -- ^ The default priotity, this is the
    --   priority assigned to the t'GI.Soup.Objects.Message.Message' by default.
    | MessagePriorityHigh
    -- ^ High priority, a t'GI.Soup.Objects.Message.Message' with
    --   this priority will be processed before the ones with the default
    --   priority.
    | MessagePriorityVeryHigh
    -- ^ The highest priority, use this
    --   for very urgent t'GI.Soup.Objects.Message.Message' as they will be the first ones to be
    --   attended.
    | AnotherMessagePriority Int
    -- ^ Catch-all for unknown values
    deriving (Int -> MessagePriority -> ShowS
[MessagePriority] -> ShowS
MessagePriority -> String
(Int -> MessagePriority -> ShowS)
-> (MessagePriority -> String)
-> ([MessagePriority] -> ShowS)
-> Show MessagePriority
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MessagePriority] -> ShowS
$cshowList :: [MessagePriority] -> ShowS
show :: MessagePriority -> String
$cshow :: MessagePriority -> String
showsPrec :: Int -> MessagePriority -> ShowS
$cshowsPrec :: Int -> MessagePriority -> ShowS
Show, MessagePriority -> MessagePriority -> Bool
(MessagePriority -> MessagePriority -> Bool)
-> (MessagePriority -> MessagePriority -> Bool)
-> Eq MessagePriority
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MessagePriority -> MessagePriority -> Bool
$c/= :: MessagePriority -> MessagePriority -> Bool
== :: MessagePriority -> MessagePriority -> Bool
$c== :: MessagePriority -> MessagePriority -> Bool
Eq)

instance P.Enum MessagePriority where
    fromEnum :: MessagePriority -> Int
fromEnum MessagePriorityVeryLow = 0
    fromEnum MessagePriorityLow = 1
    fromEnum MessagePriorityNormal = 2
    fromEnum MessagePriorityHigh = 3
    fromEnum MessagePriorityVeryHigh = 4
    fromEnum (AnotherMessagePriority k :: Int
k) = Int
k

    toEnum :: Int -> MessagePriority
toEnum 0 = MessagePriority
MessagePriorityVeryLow
    toEnum 1 = MessagePriority
MessagePriorityLow
    toEnum 2 = MessagePriority
MessagePriorityNormal
    toEnum 3 = MessagePriority
MessagePriorityHigh
    toEnum 4 = MessagePriority
MessagePriorityVeryHigh
    toEnum k :: Int
k = Int -> MessagePriority
AnotherMessagePriority Int
k

instance P.Ord MessagePriority where
    compare :: MessagePriority -> MessagePriority -> Ordering
compare a :: MessagePriority
a b :: MessagePriority
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (MessagePriority -> Int
forall a. Enum a => a -> Int
P.fromEnum MessagePriority
a) (MessagePriority -> Int
forall a. Enum a => a -> Int
P.fromEnum MessagePriority
b)

foreign import ccall "soup_message_priority_get_type" c_soup_message_priority_get_type :: 
    IO GType

instance BoxedEnum MessagePriority where
    boxedEnumType :: MessagePriority -> IO GType
boxedEnumType _ = IO GType
c_soup_message_priority_get_type

-- Enum MessageHeadersType
-- | Value passed to 'GI.Soup.Structs.MessageHeaders.messageHeadersNew' to set certain default
-- behaviors.
data MessageHeadersType = 
      MessageHeadersTypeRequest
    -- ^ request headers
    | MessageHeadersTypeResponse
    -- ^ response headers
    | MessageHeadersTypeMultipart
    -- ^ multipart body part headers
    | AnotherMessageHeadersType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> MessageHeadersType -> ShowS
[MessageHeadersType] -> ShowS
MessageHeadersType -> String
(Int -> MessageHeadersType -> ShowS)
-> (MessageHeadersType -> String)
-> ([MessageHeadersType] -> ShowS)
-> Show MessageHeadersType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MessageHeadersType] -> ShowS
$cshowList :: [MessageHeadersType] -> ShowS
show :: MessageHeadersType -> String
$cshow :: MessageHeadersType -> String
showsPrec :: Int -> MessageHeadersType -> ShowS
$cshowsPrec :: Int -> MessageHeadersType -> ShowS
Show, MessageHeadersType -> MessageHeadersType -> Bool
(MessageHeadersType -> MessageHeadersType -> Bool)
-> (MessageHeadersType -> MessageHeadersType -> Bool)
-> Eq MessageHeadersType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MessageHeadersType -> MessageHeadersType -> Bool
$c/= :: MessageHeadersType -> MessageHeadersType -> Bool
== :: MessageHeadersType -> MessageHeadersType -> Bool
$c== :: MessageHeadersType -> MessageHeadersType -> Bool
Eq)

instance P.Enum MessageHeadersType where
    fromEnum :: MessageHeadersType -> Int
fromEnum MessageHeadersTypeRequest = 0
    fromEnum MessageHeadersTypeResponse = 1
    fromEnum MessageHeadersTypeMultipart = 2
    fromEnum (AnotherMessageHeadersType k :: Int
k) = Int
k

    toEnum :: Int -> MessageHeadersType
toEnum 0 = MessageHeadersType
MessageHeadersTypeRequest
    toEnum 1 = MessageHeadersType
MessageHeadersTypeResponse
    toEnum 2 = MessageHeadersType
MessageHeadersTypeMultipart
    toEnum k :: Int
k = Int -> MessageHeadersType
AnotherMessageHeadersType Int
k

instance P.Ord MessageHeadersType where
    compare :: MessageHeadersType -> MessageHeadersType -> Ordering
compare a :: MessageHeadersType
a b :: MessageHeadersType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (MessageHeadersType -> Int
forall a. Enum a => a -> Int
P.fromEnum MessageHeadersType
a) (MessageHeadersType -> Int
forall a. Enum a => a -> Int
P.fromEnum MessageHeadersType
b)

foreign import ccall "soup_message_headers_type_get_type" c_soup_message_headers_type_get_type :: 
    IO GType

instance BoxedEnum MessageHeadersType where
    boxedEnumType :: MessageHeadersType -> IO GType
boxedEnumType _ = IO GType
c_soup_message_headers_type_get_type

-- Enum MemoryUse
-- | Describes how t'GI.Soup.Structs.Buffer.Buffer' should use the data passed in by the
-- caller.
-- 
-- See also 'GI.Soup.Structs.Buffer.bufferNewWithOwner', which allows to you create a
-- buffer containing data which is owned by another object.
data MemoryUse = 
      MemoryUseStatic
    -- ^ The memory is statically allocated and
    -- constant; libsoup can use the passed-in buffer directly and not
    -- need to worry about it being modified or freed.
    | MemoryUseTake
    -- ^ The caller has allocated the memory for the
    -- t'GI.Soup.Structs.Buffer.Buffer'\'s use; libsoup will assume ownership of it and free it
    -- (with 'GI.GLib.Functions.free') when it is done with it.
    | MemoryUseCopy
    -- ^ The passed-in data belongs to the caller; the
    -- t'GI.Soup.Structs.Buffer.Buffer' will copy it into new memory, leaving the caller free
    -- to reuse the original memory.
    | MemoryUseTemporary
    -- ^ The passed-in data belongs to the caller,
    -- but will remain valid for the lifetime of the t'GI.Soup.Structs.Buffer.Buffer'. The
    -- difference between this and /@sOUPMEMORYSTATIC@/ is that if you copy
    -- a /@sOUPMEMORYTEMPORARY@/ buffer, it will make a copy of the memory
    -- as well, rather than reusing the original memory.
    | AnotherMemoryUse Int
    -- ^ Catch-all for unknown values
    deriving (Int -> MemoryUse -> ShowS
[MemoryUse] -> ShowS
MemoryUse -> String
(Int -> MemoryUse -> ShowS)
-> (MemoryUse -> String)
-> ([MemoryUse] -> ShowS)
-> Show MemoryUse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MemoryUse] -> ShowS
$cshowList :: [MemoryUse] -> ShowS
show :: MemoryUse -> String
$cshow :: MemoryUse -> String
showsPrec :: Int -> MemoryUse -> ShowS
$cshowsPrec :: Int -> MemoryUse -> ShowS
Show, MemoryUse -> MemoryUse -> Bool
(MemoryUse -> MemoryUse -> Bool)
-> (MemoryUse -> MemoryUse -> Bool) -> Eq MemoryUse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemoryUse -> MemoryUse -> Bool
$c/= :: MemoryUse -> MemoryUse -> Bool
== :: MemoryUse -> MemoryUse -> Bool
$c== :: MemoryUse -> MemoryUse -> Bool
Eq)

instance P.Enum MemoryUse where
    fromEnum :: MemoryUse -> Int
fromEnum MemoryUseStatic = 0
    fromEnum MemoryUseTake = 1
    fromEnum MemoryUseCopy = 2
    fromEnum MemoryUseTemporary = 3
    fromEnum (AnotherMemoryUse k :: Int
k) = Int
k

    toEnum :: Int -> MemoryUse
toEnum 0 = MemoryUse
MemoryUseStatic
    toEnum 1 = MemoryUse
MemoryUseTake
    toEnum 2 = MemoryUse
MemoryUseCopy
    toEnum 3 = MemoryUse
MemoryUseTemporary
    toEnum k :: Int
k = Int -> MemoryUse
AnotherMemoryUse Int
k

instance P.Ord MemoryUse where
    compare :: MemoryUse -> MemoryUse -> Ordering
compare a :: MemoryUse
a b :: MemoryUse
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (MemoryUse -> Int
forall a. Enum a => a -> Int
P.fromEnum MemoryUse
a) (MemoryUse -> Int
forall a. Enum a => a -> Int
P.fromEnum MemoryUse
b)

foreign import ccall "soup_memory_use_get_type" c_soup_memory_use_get_type :: 
    IO GType

instance BoxedEnum MemoryUse where
    boxedEnumType :: MemoryUse -> IO GType
boxedEnumType _ = IO GType
c_soup_memory_use_get_type

-- Enum LoggerLogLevel
-- | Describes the level of logging output to provide.
data LoggerLogLevel = 
      LoggerLogLevelNone
    -- ^ No logging
    | LoggerLogLevelMinimal
    -- ^ Log the Request-Line or Status-Line and
    -- the Soup-Debug pseudo-headers
    | LoggerLogLevelHeaders
    -- ^ Log the full request\/response headers
    | LoggerLogLevelBody
    -- ^ Log the full headers and request\/response
    -- bodies.
    | AnotherLoggerLogLevel Int
    -- ^ Catch-all for unknown values
    deriving (Int -> LoggerLogLevel -> ShowS
[LoggerLogLevel] -> ShowS
LoggerLogLevel -> String
(Int -> LoggerLogLevel -> ShowS)
-> (LoggerLogLevel -> String)
-> ([LoggerLogLevel] -> ShowS)
-> Show LoggerLogLevel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LoggerLogLevel] -> ShowS
$cshowList :: [LoggerLogLevel] -> ShowS
show :: LoggerLogLevel -> String
$cshow :: LoggerLogLevel -> String
showsPrec :: Int -> LoggerLogLevel -> ShowS
$cshowsPrec :: Int -> LoggerLogLevel -> ShowS
Show, LoggerLogLevel -> LoggerLogLevel -> Bool
(LoggerLogLevel -> LoggerLogLevel -> Bool)
-> (LoggerLogLevel -> LoggerLogLevel -> Bool) -> Eq LoggerLogLevel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LoggerLogLevel -> LoggerLogLevel -> Bool
$c/= :: LoggerLogLevel -> LoggerLogLevel -> Bool
== :: LoggerLogLevel -> LoggerLogLevel -> Bool
$c== :: LoggerLogLevel -> LoggerLogLevel -> Bool
Eq)

instance P.Enum LoggerLogLevel where
    fromEnum :: LoggerLogLevel -> Int
fromEnum LoggerLogLevelNone = 0
    fromEnum LoggerLogLevelMinimal = 1
    fromEnum LoggerLogLevelHeaders = 2
    fromEnum LoggerLogLevelBody = 3
    fromEnum (AnotherLoggerLogLevel k :: Int
k) = Int
k

    toEnum :: Int -> LoggerLogLevel
toEnum 0 = LoggerLogLevel
LoggerLogLevelNone
    toEnum 1 = LoggerLogLevel
LoggerLogLevelMinimal
    toEnum 2 = LoggerLogLevel
LoggerLogLevelHeaders
    toEnum 3 = LoggerLogLevel
LoggerLogLevelBody
    toEnum k :: Int
k = Int -> LoggerLogLevel
AnotherLoggerLogLevel Int
k

instance P.Ord LoggerLogLevel where
    compare :: LoggerLogLevel -> LoggerLogLevel -> Ordering
compare a :: LoggerLogLevel
a b :: LoggerLogLevel
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (LoggerLogLevel -> Int
forall a. Enum a => a -> Int
P.fromEnum LoggerLogLevel
a) (LoggerLogLevel -> Int
forall a. Enum a => a -> Int
P.fromEnum LoggerLogLevel
b)

foreign import ccall "soup_logger_log_level_get_type" c_soup_logger_log_level_get_type :: 
    IO GType

instance BoxedEnum LoggerLogLevel where
    boxedEnumType :: LoggerLogLevel -> IO GType
boxedEnumType _ = IO GType
c_soup_logger_log_level_get_type

-- Enum KnownStatusCode
-- | /No description available in the introspection data./
data KnownStatusCode = 
      KnownStatusCodeNone
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeCancelled
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeCantResolve
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeCantResolveProxy
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeCantConnect
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeCantConnectProxy
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeSslFailed
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeIoError
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeMalformed
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeTryAgain
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeTooManyRedirects
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeTlsFailed
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeContinue
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeSwitchingProtocols
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeProcessing
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeOk
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeCreated
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeAccepted
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeNonAuthoritative
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeNoContent
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeResetContent
    -- ^ /No description available in the introspection data./
    | KnownStatusCodePartialContent
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeMultiStatus
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeMultipleChoices
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeMovedPermanently
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeFound
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeMovedTemporarily
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeSeeOther
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeNotModified
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeUseProxy
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeNotAppearingInThisProtocol
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeTemporaryRedirect
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeBadRequest
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeUnauthorized
    -- ^ /No description available in the introspection data./
    | KnownStatusCodePaymentRequired
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeForbidden
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeNotFound
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeMethodNotAllowed
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeNotAcceptable
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeProxyAuthenticationRequired
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeProxyUnauthorized
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeRequestTimeout
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeConflict
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeGone
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeLengthRequired
    -- ^ /No description available in the introspection data./
    | KnownStatusCodePreconditionFailed
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeRequestEntityTooLarge
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeRequestUriTooLong
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeUnsupportedMediaType
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeRequestedRangeNotSatisfiable
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeInvalidRange
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeExpectationFailed
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeUnprocessableEntity
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeLocked
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeFailedDependency
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeInternalServerError
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeNotImplemented
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeBadGateway
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeServiceUnavailable
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeGatewayTimeout
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeHttpVersionNotSupported
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeInsufficientStorage
    -- ^ /No description available in the introspection data./
    | KnownStatusCodeNotExtended
    -- ^ /No description available in the introspection data./
    | AnotherKnownStatusCode Int
    -- ^ Catch-all for unknown values
    deriving (Int -> KnownStatusCode -> ShowS
[KnownStatusCode] -> ShowS
KnownStatusCode -> String
(Int -> KnownStatusCode -> ShowS)
-> (KnownStatusCode -> String)
-> ([KnownStatusCode] -> ShowS)
-> Show KnownStatusCode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [KnownStatusCode] -> ShowS
$cshowList :: [KnownStatusCode] -> ShowS
show :: KnownStatusCode -> String
$cshow :: KnownStatusCode -> String
showsPrec :: Int -> KnownStatusCode -> ShowS
$cshowsPrec :: Int -> KnownStatusCode -> ShowS
Show, KnownStatusCode -> KnownStatusCode -> Bool
(KnownStatusCode -> KnownStatusCode -> Bool)
-> (KnownStatusCode -> KnownStatusCode -> Bool)
-> Eq KnownStatusCode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: KnownStatusCode -> KnownStatusCode -> Bool
$c/= :: KnownStatusCode -> KnownStatusCode -> Bool
== :: KnownStatusCode -> KnownStatusCode -> Bool
$c== :: KnownStatusCode -> KnownStatusCode -> Bool
Eq)

instance P.Enum KnownStatusCode where
    fromEnum :: KnownStatusCode -> Int
fromEnum KnownStatusCodeNone = 0
    fromEnum KnownStatusCodeCancelled = 1
    fromEnum KnownStatusCodeCantResolve = 2
    fromEnum KnownStatusCodeCantResolveProxy = 3
    fromEnum KnownStatusCodeCantConnect = 4
    fromEnum KnownStatusCodeCantConnectProxy = 5
    fromEnum KnownStatusCodeSslFailed = 6
    fromEnum KnownStatusCodeIoError = 7
    fromEnum KnownStatusCodeMalformed = 8
    fromEnum KnownStatusCodeTryAgain = 9
    fromEnum KnownStatusCodeTooManyRedirects = 10
    fromEnum KnownStatusCodeTlsFailed = 11
    fromEnum KnownStatusCodeContinue = 100
    fromEnum KnownStatusCodeSwitchingProtocols = 101
    fromEnum KnownStatusCodeProcessing = 102
    fromEnum KnownStatusCodeOk = 200
    fromEnum KnownStatusCodeCreated = 201
    fromEnum KnownStatusCodeAccepted = 202
    fromEnum KnownStatusCodeNonAuthoritative = 203
    fromEnum KnownStatusCodeNoContent = 204
    fromEnum KnownStatusCodeResetContent = 205
    fromEnum KnownStatusCodePartialContent = 206
    fromEnum KnownStatusCodeMultiStatus = 207
    fromEnum KnownStatusCodeMultipleChoices = 300
    fromEnum KnownStatusCodeMovedPermanently = 301
    fromEnum KnownStatusCodeFound = 302
    fromEnum KnownStatusCodeMovedTemporarily = 302
    fromEnum KnownStatusCodeSeeOther = 303
    fromEnum KnownStatusCodeNotModified = 304
    fromEnum KnownStatusCodeUseProxy = 305
    fromEnum KnownStatusCodeNotAppearingInThisProtocol = 306
    fromEnum KnownStatusCodeTemporaryRedirect = 307
    fromEnum KnownStatusCodeBadRequest = 400
    fromEnum KnownStatusCodeUnauthorized = 401
    fromEnum KnownStatusCodePaymentRequired = 402
    fromEnum KnownStatusCodeForbidden = 403
    fromEnum KnownStatusCodeNotFound = 404
    fromEnum KnownStatusCodeMethodNotAllowed = 405
    fromEnum KnownStatusCodeNotAcceptable = 406
    fromEnum KnownStatusCodeProxyAuthenticationRequired = 407
    fromEnum KnownStatusCodeProxyUnauthorized = 407
    fromEnum KnownStatusCodeRequestTimeout = 408
    fromEnum KnownStatusCodeConflict = 409
    fromEnum KnownStatusCodeGone = 410
    fromEnum KnownStatusCodeLengthRequired = 411
    fromEnum KnownStatusCodePreconditionFailed = 412
    fromEnum KnownStatusCodeRequestEntityTooLarge = 413
    fromEnum KnownStatusCodeRequestUriTooLong = 414
    fromEnum KnownStatusCodeUnsupportedMediaType = 415
    fromEnum KnownStatusCodeRequestedRangeNotSatisfiable = 416
    fromEnum KnownStatusCodeInvalidRange = 416
    fromEnum KnownStatusCodeExpectationFailed = 417
    fromEnum KnownStatusCodeUnprocessableEntity = 422
    fromEnum KnownStatusCodeLocked = 423
    fromEnum KnownStatusCodeFailedDependency = 424
    fromEnum KnownStatusCodeInternalServerError = 500
    fromEnum KnownStatusCodeNotImplemented = 501
    fromEnum KnownStatusCodeBadGateway = 502
    fromEnum KnownStatusCodeServiceUnavailable = 503
    fromEnum KnownStatusCodeGatewayTimeout = 504
    fromEnum KnownStatusCodeHttpVersionNotSupported = 505
    fromEnum KnownStatusCodeInsufficientStorage = 507
    fromEnum KnownStatusCodeNotExtended = 510
    fromEnum (AnotherKnownStatusCode k :: Int
k) = Int
k

    toEnum :: Int -> KnownStatusCode
toEnum 0 = KnownStatusCode
KnownStatusCodeNone
    toEnum 1 = KnownStatusCode
KnownStatusCodeCancelled
    toEnum 2 = KnownStatusCode
KnownStatusCodeCantResolve
    toEnum 3 = KnownStatusCode
KnownStatusCodeCantResolveProxy
    toEnum 4 = KnownStatusCode
KnownStatusCodeCantConnect
    toEnum 5 = KnownStatusCode
KnownStatusCodeCantConnectProxy
    toEnum 6 = KnownStatusCode
KnownStatusCodeSslFailed
    toEnum 7 = KnownStatusCode
KnownStatusCodeIoError
    toEnum 8 = KnownStatusCode
KnownStatusCodeMalformed
    toEnum 9 = KnownStatusCode
KnownStatusCodeTryAgain
    toEnum 10 = KnownStatusCode
KnownStatusCodeTooManyRedirects
    toEnum 11 = KnownStatusCode
KnownStatusCodeTlsFailed
    toEnum 100 = KnownStatusCode
KnownStatusCodeContinue
    toEnum 101 = KnownStatusCode
KnownStatusCodeSwitchingProtocols
    toEnum 102 = KnownStatusCode
KnownStatusCodeProcessing
    toEnum 200 = KnownStatusCode
KnownStatusCodeOk
    toEnum 201 = KnownStatusCode
KnownStatusCodeCreated
    toEnum 202 = KnownStatusCode
KnownStatusCodeAccepted
    toEnum 203 = KnownStatusCode
KnownStatusCodeNonAuthoritative
    toEnum 204 = KnownStatusCode
KnownStatusCodeNoContent
    toEnum 205 = KnownStatusCode
KnownStatusCodeResetContent
    toEnum 206 = KnownStatusCode
KnownStatusCodePartialContent
    toEnum 207 = KnownStatusCode
KnownStatusCodeMultiStatus
    toEnum 300 = KnownStatusCode
KnownStatusCodeMultipleChoices
    toEnum 301 = KnownStatusCode
KnownStatusCodeMovedPermanently
    toEnum 302 = KnownStatusCode
KnownStatusCodeFound
    toEnum 303 = KnownStatusCode
KnownStatusCodeSeeOther
    toEnum 304 = KnownStatusCode
KnownStatusCodeNotModified
    toEnum 305 = KnownStatusCode
KnownStatusCodeUseProxy
    toEnum 306 = KnownStatusCode
KnownStatusCodeNotAppearingInThisProtocol
    toEnum 307 = KnownStatusCode
KnownStatusCodeTemporaryRedirect
    toEnum 400 = KnownStatusCode
KnownStatusCodeBadRequest
    toEnum 401 = KnownStatusCode
KnownStatusCodeUnauthorized
    toEnum 402 = KnownStatusCode
KnownStatusCodePaymentRequired
    toEnum 403 = KnownStatusCode
KnownStatusCodeForbidden
    toEnum 404 = KnownStatusCode
KnownStatusCodeNotFound
    toEnum 405 = KnownStatusCode
KnownStatusCodeMethodNotAllowed
    toEnum 406 = KnownStatusCode
KnownStatusCodeNotAcceptable
    toEnum 407 = KnownStatusCode
KnownStatusCodeProxyAuthenticationRequired
    toEnum 408 = KnownStatusCode
KnownStatusCodeRequestTimeout
    toEnum 409 = KnownStatusCode
KnownStatusCodeConflict
    toEnum 410 = KnownStatusCode
KnownStatusCodeGone
    toEnum 411 = KnownStatusCode
KnownStatusCodeLengthRequired
    toEnum 412 = KnownStatusCode
KnownStatusCodePreconditionFailed
    toEnum 413 = KnownStatusCode
KnownStatusCodeRequestEntityTooLarge
    toEnum 414 = KnownStatusCode
KnownStatusCodeRequestUriTooLong
    toEnum 415 = KnownStatusCode
KnownStatusCodeUnsupportedMediaType
    toEnum 416 = KnownStatusCode
KnownStatusCodeRequestedRangeNotSatisfiable
    toEnum 417 = KnownStatusCode
KnownStatusCodeExpectationFailed
    toEnum 422 = KnownStatusCode
KnownStatusCodeUnprocessableEntity
    toEnum 423 = KnownStatusCode
KnownStatusCodeLocked
    toEnum 424 = KnownStatusCode
KnownStatusCodeFailedDependency
    toEnum 500 = KnownStatusCode
KnownStatusCodeInternalServerError
    toEnum 501 = KnownStatusCode
KnownStatusCodeNotImplemented
    toEnum 502 = KnownStatusCode
KnownStatusCodeBadGateway
    toEnum 503 = KnownStatusCode
KnownStatusCodeServiceUnavailable
    toEnum 504 = KnownStatusCode
KnownStatusCodeGatewayTimeout
    toEnum 505 = KnownStatusCode
KnownStatusCodeHttpVersionNotSupported
    toEnum 507 = KnownStatusCode
KnownStatusCodeInsufficientStorage
    toEnum 510 = KnownStatusCode
KnownStatusCodeNotExtended
    toEnum k :: Int
k = Int -> KnownStatusCode
AnotherKnownStatusCode Int
k

instance P.Ord KnownStatusCode where
    compare :: KnownStatusCode -> KnownStatusCode -> Ordering
compare a :: KnownStatusCode
a b :: KnownStatusCode
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (KnownStatusCode -> Int
forall a. Enum a => a -> Int
P.fromEnum KnownStatusCode
a) (KnownStatusCode -> Int
forall a. Enum a => a -> Int
P.fromEnum KnownStatusCode
b)

foreign import ccall "soup_known_status_code_get_type" c_soup_known_status_code_get_type :: 
    IO GType

instance BoxedEnum KnownStatusCode where
    boxedEnumType :: KnownStatusCode -> IO GType
boxedEnumType _ = IO GType
c_soup_known_status_code_get_type

-- Enum HTTPVersion
-- | Indicates the HTTP protocol version being used.
data HTTPVersion = 
      HTTPVersionHttp10
    -- ^ HTTP 1.0 (RFC 1945)
    | HTTPVersionHttp11
    -- ^ HTTP 1.1 (RFC 2616)
    | AnotherHTTPVersion Int
    -- ^ Catch-all for unknown values
    deriving (Int -> HTTPVersion -> ShowS
[HTTPVersion] -> ShowS
HTTPVersion -> String
(Int -> HTTPVersion -> ShowS)
-> (HTTPVersion -> String)
-> ([HTTPVersion] -> ShowS)
-> Show HTTPVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HTTPVersion] -> ShowS
$cshowList :: [HTTPVersion] -> ShowS
show :: HTTPVersion -> String
$cshow :: HTTPVersion -> String
showsPrec :: Int -> HTTPVersion -> ShowS
$cshowsPrec :: Int -> HTTPVersion -> ShowS
Show, HTTPVersion -> HTTPVersion -> Bool
(HTTPVersion -> HTTPVersion -> Bool)
-> (HTTPVersion -> HTTPVersion -> Bool) -> Eq HTTPVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HTTPVersion -> HTTPVersion -> Bool
$c/= :: HTTPVersion -> HTTPVersion -> Bool
== :: HTTPVersion -> HTTPVersion -> Bool
$c== :: HTTPVersion -> HTTPVersion -> Bool
Eq)

instance P.Enum HTTPVersion where
    fromEnum :: HTTPVersion -> Int
fromEnum HTTPVersionHttp10 = 0
    fromEnum HTTPVersionHttp11 = 1
    fromEnum (AnotherHTTPVersion k :: Int
k) = Int
k

    toEnum :: Int -> HTTPVersion
toEnum 0 = HTTPVersion
HTTPVersionHttp10
    toEnum 1 = HTTPVersion
HTTPVersionHttp11
    toEnum k :: Int
k = Int -> HTTPVersion
AnotherHTTPVersion Int
k

instance P.Ord HTTPVersion where
    compare :: HTTPVersion -> HTTPVersion -> Ordering
compare a :: HTTPVersion
a b :: HTTPVersion
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (HTTPVersion -> Int
forall a. Enum a => a -> Int
P.fromEnum HTTPVersion
a) (HTTPVersion -> Int
forall a. Enum a => a -> Int
P.fromEnum HTTPVersion
b)

foreign import ccall "soup_http_version_get_type" c_soup_http_version_get_type :: 
    IO GType

instance BoxedEnum HTTPVersion where
    boxedEnumType :: HTTPVersion -> IO GType
boxedEnumType _ = IO GType
c_soup_http_version_get_type

-- Enum Encoding
-- | How a message body is encoded for transport
data Encoding = 
      EncodingUnrecognized
    -- ^ unknown \/ error
    | EncodingNone
    -- ^ no body is present (which is not the same as a
    -- 0-length body, and only occurs in certain places)
    | EncodingContentLength
    -- ^ Content-Length encoding
    | EncodingEof
    -- ^ Response body ends when the connection is closed
    | EncodingChunked
    -- ^ chunked encoding (currently only supported
    -- for response)
    | EncodingByteranges
    -- ^ multipart\/byteranges (Reserved for future
    -- use: NOT CURRENTLY IMPLEMENTED)
    | AnotherEncoding Int
    -- ^ Catch-all for unknown values
    deriving (Int -> Encoding -> ShowS
[Encoding] -> ShowS
Encoding -> String
(Int -> Encoding -> ShowS)
-> (Encoding -> String) -> ([Encoding] -> ShowS) -> Show Encoding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Encoding] -> ShowS
$cshowList :: [Encoding] -> ShowS
show :: Encoding -> String
$cshow :: Encoding -> String
showsPrec :: Int -> Encoding -> ShowS
$cshowsPrec :: Int -> Encoding -> ShowS
Show, Encoding -> Encoding -> Bool
(Encoding -> Encoding -> Bool)
-> (Encoding -> Encoding -> Bool) -> Eq Encoding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Encoding -> Encoding -> Bool
$c/= :: Encoding -> Encoding -> Bool
== :: Encoding -> Encoding -> Bool
$c== :: Encoding -> Encoding -> Bool
Eq)

instance P.Enum Encoding where
    fromEnum :: Encoding -> Int
fromEnum EncodingUnrecognized = 0
    fromEnum EncodingNone = 1
    fromEnum EncodingContentLength = 2
    fromEnum EncodingEof = 3
    fromEnum EncodingChunked = 4
    fromEnum EncodingByteranges = 5
    fromEnum (AnotherEncoding k :: Int
k) = Int
k

    toEnum :: Int -> Encoding
toEnum 0 = Encoding
EncodingUnrecognized
    toEnum 1 = Encoding
EncodingNone
    toEnum 2 = Encoding
EncodingContentLength
    toEnum 3 = Encoding
EncodingEof
    toEnum 4 = Encoding
EncodingChunked
    toEnum 5 = Encoding
EncodingByteranges
    toEnum k :: Int
k = Int -> Encoding
AnotherEncoding Int
k

instance P.Ord Encoding where
    compare :: Encoding -> Encoding -> Ordering
compare a :: Encoding
a b :: Encoding
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Encoding -> Int
forall a. Enum a => a -> Int
P.fromEnum Encoding
a) (Encoding -> Int
forall a. Enum a => a -> Int
P.fromEnum Encoding
b)

foreign import ccall "soup_encoding_get_type" c_soup_encoding_get_type :: 
    IO GType

instance BoxedEnum Encoding where
    boxedEnumType :: Encoding -> IO GType
boxedEnumType _ = IO GType
c_soup_encoding_get_type

-- Enum DateFormat
-- | Date formats that 'GI.Soup.Structs.Date.dateToString' can use.
-- 
-- /@sOUPDATEHTTP@/ and /@sOUPDATECOOKIE@/ always coerce the time to
-- UTC. /@sOUPDATEISO8601XMLRPC@/ uses the time as given, ignoring the
-- offset completely. /@sOUPDATERFC2822@/ and the other ISO 8601
-- variants use the local time, appending the offset information if
-- available.
-- 
-- This enum may be extended with more values in future releases.
data DateFormat = 
      DateFormatHttp
    -- ^ RFC 1123 format, used by the HTTP \"Date\" header. Eg
    -- \"Sun, 06 Nov 1994 08:49:37 GMT\"
    | DateFormatCookie
    -- ^ The format for the \"Expires\" timestamp in the
    -- Netscape cookie specification. Eg, \"Sun, 06-Nov-1994 08:49:37 GMT\".
    | DateFormatRfc2822
    -- ^ RFC 2822 format, eg \"Sun, 6 Nov 1994 09:49:37 -0100\"
    | DateFormatIso8601Compact
    -- ^ ISO 8601 date\/time with no optional
    -- punctuation. Eg, \"19941106T094937-0100\".
    | DateFormatIso8601Full
    -- ^ ISO 8601 date\/time with all optional
    -- punctuation. Eg, \"1994-11-06T09:49:37-01:00\".
    | DateFormatIso8601
    -- ^ An alias for /@sOUPDATEISO8601FULL@/.
    | DateFormatIso8601Xmlrpc
    -- ^ ISO 8601 date\/time as used by XML-RPC.
    -- Eg, \"19941106T09:49:37\".
    | AnotherDateFormat Int
    -- ^ Catch-all for unknown values
    deriving (Int -> DateFormat -> ShowS
[DateFormat] -> ShowS
DateFormat -> String
(Int -> DateFormat -> ShowS)
-> (DateFormat -> String)
-> ([DateFormat] -> ShowS)
-> Show DateFormat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DateFormat] -> ShowS
$cshowList :: [DateFormat] -> ShowS
show :: DateFormat -> String
$cshow :: DateFormat -> String
showsPrec :: Int -> DateFormat -> ShowS
$cshowsPrec :: Int -> DateFormat -> ShowS
Show, DateFormat -> DateFormat -> Bool
(DateFormat -> DateFormat -> Bool)
-> (DateFormat -> DateFormat -> Bool) -> Eq DateFormat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DateFormat -> DateFormat -> Bool
$c/= :: DateFormat -> DateFormat -> Bool
== :: DateFormat -> DateFormat -> Bool
$c== :: DateFormat -> DateFormat -> Bool
Eq)

instance P.Enum DateFormat where
    fromEnum :: DateFormat -> Int
fromEnum DateFormatHttp = 1
    fromEnum DateFormatCookie = 2
    fromEnum DateFormatRfc2822 = 3
    fromEnum DateFormatIso8601Compact = 4
    fromEnum DateFormatIso8601Full = 5
    fromEnum DateFormatIso8601 = 5
    fromEnum DateFormatIso8601Xmlrpc = 6
    fromEnum (AnotherDateFormat k :: Int
k) = Int
k

    toEnum :: Int -> DateFormat
toEnum 1 = DateFormat
DateFormatHttp
    toEnum 2 = DateFormat
DateFormatCookie
    toEnum 3 = DateFormat
DateFormatRfc2822
    toEnum 4 = DateFormat
DateFormatIso8601Compact
    toEnum 5 = DateFormat
DateFormatIso8601Full
    toEnum 6 = DateFormat
DateFormatIso8601Xmlrpc
    toEnum k :: Int
k = Int -> DateFormat
AnotherDateFormat Int
k

instance P.Ord DateFormat where
    compare :: DateFormat -> DateFormat -> Ordering
compare a :: DateFormat
a b :: DateFormat
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (DateFormat -> Int
forall a. Enum a => a -> Int
P.fromEnum DateFormat
a) (DateFormat -> Int
forall a. Enum a => a -> Int
P.fromEnum DateFormat
b)

foreign import ccall "soup_date_format_get_type" c_soup_date_format_get_type :: 
    IO GType

instance BoxedEnum DateFormat where
    boxedEnumType :: DateFormat -> IO GType
boxedEnumType _ = IO GType
c_soup_date_format_get_type

-- Enum CookieJarAcceptPolicy
-- | The policy for accepting or rejecting cookies returned in
-- responses.
-- 
-- /Since: 2.30/
data CookieJarAcceptPolicy = 
      CookieJarAcceptPolicyAlways
    -- ^ accept all cookies unconditionally.
    | CookieJarAcceptPolicyNever
    -- ^ reject all cookies unconditionally.
    | CookieJarAcceptPolicyNoThirdParty
    -- ^ accept all cookies set by
    -- the main document loaded in the application using libsoup. An
    -- example of the most common case, web browsers, would be: If
    -- http:\/\/www.example.com is the page loaded, accept all cookies set
    -- by example.com, but if a resource from http:\/\/www.third-party.com
    -- is loaded from that page reject any cookie that it could try to
    -- set. For libsoup to be able to tell apart first party cookies from
    -- the rest, the application must call 'GI.Soup.Objects.Message.messageSetFirstParty'
    -- on each outgoing t'GI.Soup.Objects.Message.Message', setting the t'GI.Soup.Structs.URI.URI' of the main
    -- document. If no first party is set in a message when this policy is
    -- in effect, cookies will be assumed to be third party by default.
    | AnotherCookieJarAcceptPolicy Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CookieJarAcceptPolicy -> ShowS
[CookieJarAcceptPolicy] -> ShowS
CookieJarAcceptPolicy -> String
(Int -> CookieJarAcceptPolicy -> ShowS)
-> (CookieJarAcceptPolicy -> String)
-> ([CookieJarAcceptPolicy] -> ShowS)
-> Show CookieJarAcceptPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CookieJarAcceptPolicy] -> ShowS
$cshowList :: [CookieJarAcceptPolicy] -> ShowS
show :: CookieJarAcceptPolicy -> String
$cshow :: CookieJarAcceptPolicy -> String
showsPrec :: Int -> CookieJarAcceptPolicy -> ShowS
$cshowsPrec :: Int -> CookieJarAcceptPolicy -> ShowS
Show, CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool
(CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool)
-> (CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool)
-> Eq CookieJarAcceptPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool
$c/= :: CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool
== :: CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool
$c== :: CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool
Eq)

instance P.Enum CookieJarAcceptPolicy where
    fromEnum :: CookieJarAcceptPolicy -> Int
fromEnum CookieJarAcceptPolicyAlways = 0
    fromEnum CookieJarAcceptPolicyNever = 1
    fromEnum CookieJarAcceptPolicyNoThirdParty = 2
    fromEnum (AnotherCookieJarAcceptPolicy k :: Int
k) = Int
k

    toEnum :: Int -> CookieJarAcceptPolicy
toEnum 0 = CookieJarAcceptPolicy
CookieJarAcceptPolicyAlways
    toEnum 1 = CookieJarAcceptPolicy
CookieJarAcceptPolicyNever
    toEnum 2 = CookieJarAcceptPolicy
CookieJarAcceptPolicyNoThirdParty
    toEnum k :: Int
k = Int -> CookieJarAcceptPolicy
AnotherCookieJarAcceptPolicy Int
k

instance P.Ord CookieJarAcceptPolicy where
    compare :: CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Ordering
compare a :: CookieJarAcceptPolicy
a b :: CookieJarAcceptPolicy
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CookieJarAcceptPolicy -> Int
forall a. Enum a => a -> Int
P.fromEnum CookieJarAcceptPolicy
a) (CookieJarAcceptPolicy -> Int
forall a. Enum a => a -> Int
P.fromEnum CookieJarAcceptPolicy
b)

foreign import ccall "soup_cookie_jar_accept_policy_get_type" c_soup_cookie_jar_accept_policy_get_type :: 
    IO GType

instance BoxedEnum CookieJarAcceptPolicy where
    boxedEnumType :: CookieJarAcceptPolicy -> IO GType
boxedEnumType _ = IO GType
c_soup_cookie_jar_accept_policy_get_type

-- Enum ConnectionState
-- | /No description available in the introspection data./
data ConnectionState = 
      ConnectionStateNew
    -- ^ /No description available in the introspection data./
    | ConnectionStateConnecting
    -- ^ /No description available in the introspection data./
    | ConnectionStateIdle
    -- ^ /No description available in the introspection data./
    | ConnectionStateInUse
    -- ^ /No description available in the introspection data./
    | ConnectionStateRemoteDisconnected
    -- ^ /No description available in the introspection data./
    | ConnectionStateDisconnected
    -- ^ /No description available in the introspection data./
    | AnotherConnectionState Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ConnectionState -> ShowS
[ConnectionState] -> ShowS
ConnectionState -> String
(Int -> ConnectionState -> ShowS)
-> (ConnectionState -> String)
-> ([ConnectionState] -> ShowS)
-> Show ConnectionState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectionState] -> ShowS
$cshowList :: [ConnectionState] -> ShowS
show :: ConnectionState -> String
$cshow :: ConnectionState -> String
showsPrec :: Int -> ConnectionState -> ShowS
$cshowsPrec :: Int -> ConnectionState -> ShowS
Show, ConnectionState -> ConnectionState -> Bool
(ConnectionState -> ConnectionState -> Bool)
-> (ConnectionState -> ConnectionState -> Bool)
-> Eq ConnectionState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectionState -> ConnectionState -> Bool
$c/= :: ConnectionState -> ConnectionState -> Bool
== :: ConnectionState -> ConnectionState -> Bool
$c== :: ConnectionState -> ConnectionState -> Bool
Eq)

instance P.Enum ConnectionState where
    fromEnum :: ConnectionState -> Int
fromEnum ConnectionStateNew = 0
    fromEnum ConnectionStateConnecting = 1
    fromEnum ConnectionStateIdle = 2
    fromEnum ConnectionStateInUse = 3
    fromEnum ConnectionStateRemoteDisconnected = 4
    fromEnum ConnectionStateDisconnected = 5
    fromEnum (AnotherConnectionState k :: Int
k) = Int
k

    toEnum :: Int -> ConnectionState
toEnum 0 = ConnectionState
ConnectionStateNew
    toEnum 1 = ConnectionState
ConnectionStateConnecting
    toEnum 2 = ConnectionState
ConnectionStateIdle
    toEnum 3 = ConnectionState
ConnectionStateInUse
    toEnum 4 = ConnectionState
ConnectionStateRemoteDisconnected
    toEnum 5 = ConnectionState
ConnectionStateDisconnected
    toEnum k :: Int
k = Int -> ConnectionState
AnotherConnectionState Int
k

instance P.Ord ConnectionState where
    compare :: ConnectionState -> ConnectionState -> Ordering
compare a :: ConnectionState
a b :: ConnectionState
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (ConnectionState -> Int
forall a. Enum a => a -> Int
P.fromEnum ConnectionState
a) (ConnectionState -> Int
forall a. Enum a => a -> Int
P.fromEnum ConnectionState
b)

foreign import ccall "soup_connection_state_get_type" c_soup_connection_state_get_type :: 
    IO GType

instance BoxedEnum ConnectionState where
    boxedEnumType :: ConnectionState -> IO GType
boxedEnumType _ = IO GType
c_soup_connection_state_get_type

-- Enum CacheType
-- | The type of cache; this affects what kinds of responses will be
-- saved.
-- 
-- /Since: 2.34/
data CacheType = 
      CacheTypeSingleUser
    -- ^ a single-user cache
    | CacheTypeShared
    -- ^ a shared cache
    | AnotherCacheType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CacheType -> ShowS
[CacheType] -> ShowS
CacheType -> String
(Int -> CacheType -> ShowS)
-> (CacheType -> String)
-> ([CacheType] -> ShowS)
-> Show CacheType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CacheType] -> ShowS
$cshowList :: [CacheType] -> ShowS
show :: CacheType -> String
$cshow :: CacheType -> String
showsPrec :: Int -> CacheType -> ShowS
$cshowsPrec :: Int -> CacheType -> ShowS
Show, CacheType -> CacheType -> Bool
(CacheType -> CacheType -> Bool)
-> (CacheType -> CacheType -> Bool) -> Eq CacheType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CacheType -> CacheType -> Bool
$c/= :: CacheType -> CacheType -> Bool
== :: CacheType -> CacheType -> Bool
$c== :: CacheType -> CacheType -> Bool
Eq)

instance P.Enum CacheType where
    fromEnum :: CacheType -> Int
fromEnum CacheTypeSingleUser = 0
    fromEnum CacheTypeShared = 1
    fromEnum (AnotherCacheType k :: Int
k) = Int
k

    toEnum :: Int -> CacheType
toEnum 0 = CacheType
CacheTypeSingleUser
    toEnum 1 = CacheType
CacheTypeShared
    toEnum k :: Int
k = Int -> CacheType
AnotherCacheType Int
k

instance P.Ord CacheType where
    compare :: CacheType -> CacheType -> Ordering
compare a :: CacheType
a b :: CacheType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CacheType -> Int
forall a. Enum a => a -> Int
P.fromEnum CacheType
a) (CacheType -> Int
forall a. Enum a => a -> Int
P.fromEnum CacheType
b)

foreign import ccall "soup_cache_type_get_type" c_soup_cache_type_get_type :: 
    IO GType

instance BoxedEnum CacheType where
    boxedEnumType :: CacheType -> IO GType
boxedEnumType _ = IO GType
c_soup_cache_type_get_type

-- Enum CacheResponse
-- | /No description available in the introspection data./
data CacheResponse = 
      CacheResponseFresh
    -- ^ /No description available in the introspection data./
    | CacheResponseNeedsValidation
    -- ^ /No description available in the introspection data./
    | CacheResponseStale
    -- ^ /No description available in the introspection data./
    | AnotherCacheResponse Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CacheResponse -> ShowS
[CacheResponse] -> ShowS
CacheResponse -> String
(Int -> CacheResponse -> ShowS)
-> (CacheResponse -> String)
-> ([CacheResponse] -> ShowS)
-> Show CacheResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CacheResponse] -> ShowS
$cshowList :: [CacheResponse] -> ShowS
show :: CacheResponse -> String
$cshow :: CacheResponse -> String
showsPrec :: Int -> CacheResponse -> ShowS
$cshowsPrec :: Int -> CacheResponse -> ShowS
Show, CacheResponse -> CacheResponse -> Bool
(CacheResponse -> CacheResponse -> Bool)
-> (CacheResponse -> CacheResponse -> Bool) -> Eq CacheResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CacheResponse -> CacheResponse -> Bool
$c/= :: CacheResponse -> CacheResponse -> Bool
== :: CacheResponse -> CacheResponse -> Bool
$c== :: CacheResponse -> CacheResponse -> Bool
Eq)

instance P.Enum CacheResponse where
    fromEnum :: CacheResponse -> Int
fromEnum CacheResponseFresh = 0
    fromEnum CacheResponseNeedsValidation = 1
    fromEnum CacheResponseStale = 2
    fromEnum (AnotherCacheResponse k :: Int
k) = Int
k

    toEnum :: Int -> CacheResponse
toEnum 0 = CacheResponse
CacheResponseFresh
    toEnum 1 = CacheResponse
CacheResponseNeedsValidation
    toEnum 2 = CacheResponse
CacheResponseStale
    toEnum k :: Int
k = Int -> CacheResponse
AnotherCacheResponse Int
k

instance P.Ord CacheResponse where
    compare :: CacheResponse -> CacheResponse -> Ordering
compare a :: CacheResponse
a b :: CacheResponse
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CacheResponse -> Int
forall a. Enum a => a -> Int
P.fromEnum CacheResponse
a) (CacheResponse -> Int
forall a. Enum a => a -> Int
P.fromEnum CacheResponse
b)

foreign import ccall "soup_cache_response_get_type" c_soup_cache_response_get_type :: 
    IO GType

instance BoxedEnum CacheResponse where
    boxedEnumType :: CacheResponse -> IO GType
boxedEnumType _ = IO GType
c_soup_cache_response_get_type

-- Enum AddressFamily
-- | The supported address families.
data AddressFamily = 
      AddressFamilyInvalid
    -- ^ an invalid @/SoupAddress/@
    | AddressFamilyIpv4
    -- ^ an IPv4 address
    | AddressFamilyIpv6
    -- ^ an IPv6 address
    | AnotherAddressFamily Int
    -- ^ Catch-all for unknown values
    deriving (Int -> AddressFamily -> ShowS
[AddressFamily] -> ShowS
AddressFamily -> String
(Int -> AddressFamily -> ShowS)
-> (AddressFamily -> String)
-> ([AddressFamily] -> ShowS)
-> Show AddressFamily
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddressFamily] -> ShowS
$cshowList :: [AddressFamily] -> ShowS
show :: AddressFamily -> String
$cshow :: AddressFamily -> String
showsPrec :: Int -> AddressFamily -> ShowS
$cshowsPrec :: Int -> AddressFamily -> ShowS
Show, AddressFamily -> AddressFamily -> Bool
(AddressFamily -> AddressFamily -> Bool)
-> (AddressFamily -> AddressFamily -> Bool) -> Eq AddressFamily
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddressFamily -> AddressFamily -> Bool
$c/= :: AddressFamily -> AddressFamily -> Bool
== :: AddressFamily -> AddressFamily -> Bool
$c== :: AddressFamily -> AddressFamily -> Bool
Eq)

instance P.Enum AddressFamily where
    fromEnum :: AddressFamily -> Int
fromEnum AddressFamilyInvalid = -1
    fromEnum AddressFamilyIpv4 = 2
    fromEnum AddressFamilyIpv6 = 10
    fromEnum (AnotherAddressFamily k :: Int
k) = Int
k

    toEnum :: Int -> AddressFamily
toEnum -1 = AddressFamily
AddressFamilyInvalid
    toEnum 2 = AddressFamily
AddressFamilyIpv4
    toEnum 10 = AddressFamily
AddressFamilyIpv6
    toEnum k :: Int
k = Int -> AddressFamily
AnotherAddressFamily Int
k

instance P.Ord AddressFamily where
    compare :: AddressFamily -> AddressFamily -> Ordering
compare a :: AddressFamily
a b :: AddressFamily
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (AddressFamily -> Int
forall a. Enum a => a -> Int
P.fromEnum AddressFamily
a) (AddressFamily -> Int
forall a. Enum a => a -> Int
P.fromEnum AddressFamily
b)

foreign import ccall "soup_address_family_get_type" c_soup_address_family_get_type :: 
    IO GType

instance BoxedEnum AddressFamily where
    boxedEnumType :: AddressFamily -> IO GType
boxedEnumType _ = IO GType
c_soup_address_family_get_type