    {-# LANGUAGE TypeApplications #-}

    -- | Copyright  : Will Thompson and Iñaki García Etxebarria
    -- License    : LGPL-2.1
    -- Maintainer : Iñaki García Etxebarria
    --
    -- Base class for output stream implementations that perform some
    -- kind of filtering operation on a base stream. Typical examples
    -- of filtering operations are character set conversion, compression
    -- and byte order flipping.

    #if !defined(__HADDOCK_VERSION__)
    #define ENABLE_OVERLOADING
    #endif

    module GI.Gio.Objects.FilterOutputStream
        (

    -- * Exported types
        FilterOutputStream(..)                  ,
        IsFilterOutputStream                    ,
        toFilterOutputStream                    ,

     -- * Methods
    -- |
    --
    --  === __Click to display all available methods, including inherited ones__
    -- ==== Methods
    -- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [clearPending]("GI.Gio.Objects.OutputStream#g:method:clearPending"), [close]("GI.Gio.Objects.OutputStream#g:method:close"), [closeAsync]("GI.Gio.Objects.OutputStream#g:method:closeAsync"), [closeFinish]("GI.Gio.Objects.OutputStream#g:method:closeFinish"), [flush]("GI.Gio.Objects.OutputStream#g:method:flush"), [flushAsync]("GI.Gio.Objects.OutputStream#g:method:flushAsync"), [flushFinish]("GI.Gio.Objects.OutputStream#g:method:flushFinish"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [hasPending]("GI.Gio.Objects.OutputStream#g:method:hasPending"), [isClosed]("GI.Gio.Objects.OutputStream#g:method:isClosed"), [isClosing]("GI.Gio.Objects.OutputStream#g:method:isClosing"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [splice]("GI.Gio.Objects.OutputStream#g:method:splice"), [spliceAsync]("GI.Gio.Objects.OutputStream#g:method:spliceAsync"), [spliceFinish]("GI.Gio.Objects.OutputStream#g:method:spliceFinish"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure"), [write]("GI.Gio.Objects.OutputStream#g:method:write"), [writeAll]("GI.Gio.Objects.OutputStream#g:method:writeAll"), [writeAllAsync]("GI.Gio.Objects.OutputStream#g:method:writeAllAsync"), [writeAllFinish]("GI.Gio.Objects.OutputStream#g:method:writeAllFinish"), [writeAsync]("GI.Gio.Objects.OutputStream#g:method:writeAsync"), [writeBytes]("GI.Gio.Objects.OutputStream#g:method:writeBytes"), [writeBytesAsync]("GI.Gio.Objects.OutputStream#g:method:writeBytesAsync"), [writeBytesFinish]("GI.Gio.Objects.OutputStream#g:method:writeBytesFinish"), [writeFinish]("GI.Gio.Objects.OutputStream#g:method:writeFinish"), [writev]("GI.Gio.Objects.OutputStream#g:method:writev"), [writevAll]("GI.Gio.Objects.OutputStream#g:method:writevAll"), [writevAllAsync]("GI.Gio.Objects.OutputStream#g:method:writevAllAsync"), [writevAllFinish]("GI.Gio.Objects.OutputStream#g:method:writevAllFinish"), [writevAsync]("GI.Gio.Objects.OutputStream#g:method:writevAsync"), [writevFinish]("GI.Gio.Objects.OutputStream#g:method:writevFinish").
    --
    -- ==== Getters
    -- [getBaseStream]("GI.Gio.Objects.FilterOutputStream#g:method:getBaseStream"), [getCloseBaseStream]("GI.Gio.Objects.FilterOutputStream#g:method:getCloseBaseStream"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
    --
    -- ==== Setters
    -- [setCloseBaseStream]("GI.Gio.Objects.FilterOutputStream#g:method:setCloseBaseStream"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setPending]("GI.Gio.Objects.OutputStream#g:method:setPending"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

    #if defined(ENABLE_OVERLOADING)
        ResolveFilterOutputStreamMethod         ,
    #endif

    -- ** getBaseStream #method:getBaseStream#

    #if defined(ENABLE_OVERLOADING)
        FilterOutputStreamGetBaseStreamMethodInfo,
    #endif
        filterOutputStreamGetBaseStream         ,

    -- ** getCloseBaseStream #method:getCloseBaseStream#

    #if defined(ENABLE_OVERLOADING)
        FilterOutputStreamGetCloseBaseStreamMethodInfo,
    #endif
        filterOutputStreamGetCloseBaseStream    ,

    -- ** setCloseBaseStream #method:setCloseBaseStream#

    #if defined(ENABLE_OVERLOADING)
        FilterOutputStreamSetCloseBaseStreamMethodInfo,
    #endif
        filterOutputStreamSetCloseBaseStream    ,

     -- * Properties

    -- ** baseStream #attr:baseStream#
    -- | /No description available in the introspection data./

    #if defined(ENABLE_OVERLOADING)
        FilterOutputStreamBaseStreamPropertyInfo,
    #endif
        constructFilterOutputStreamBaseStream   ,
    #if defined(ENABLE_OVERLOADING)
        filterOutputStreamBaseStream            ,
    #endif
        getFilterOutputStreamBaseStream         ,

    -- ** closeBaseStream #attr:closeBaseStream#
    -- | Whether the base stream should be closed when the filter stream is closed.

    #if defined(ENABLE_OVERLOADING)
        FilterOutputStreamCloseBaseStreamPropertyInfo,
    #endif
        constructFilterOutputStreamCloseBaseStream,
    #if defined(ENABLE_OVERLOADING)
        filterOutputStreamCloseBaseStream       ,
    #endif
        getFilterOutputStreamCloseBaseStream    ,

        ) where

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

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

    -- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
    #if MIN_VERSION_base(4,18,0)
    import qualified GI.GLib.Callbacks as GLib.Callbacks
    import qualified GI.GLib.Structs.Bytes as GLib.Bytes
    import qualified GI.GLib.Structs.PollFD as GLib.PollFD
    import qualified GI.GLib.Structs.Source as GLib.Source
    import qualified GI.GObject.Callbacks as GObject.Callbacks
    import qualified GI.GObject.Objects.Object as GObject.Object
    import qualified GI.Gio.Callbacks as Gio.Callbacks
    import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
    import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
    import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
    import {-# SOURCE #-} qualified GI.Gio.Objects.InputStream as Gio.InputStream
    import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
    import {-# SOURCE #-} qualified GI.Gio.Structs.OutputVector as Gio.OutputVector

    #else
    import qualified GI.GObject.Objects.Object as GObject.Object
    import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream

    #endif

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

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

    foreign import ccall "g_filter_output_stream_get_type"
        c_g_filter_output_stream_get_type :: IO B.Types.GType

    instance B.Types.TypedObject FilterOutputStream where
        glibType :: IO GType
    glibType = IO GType
    c_g_filter_output_stream_get_type

    instance B.Types.GObject FilterOutputStream

    -- | Type class for types which can be safely cast to `FilterOutputStream`, for instance with `toFilterOutputStream`.
    class (SP.GObject o, O.IsDescendantOf FilterOutputStream o) => IsFilterOutputStream o
    instance (SP.GObject o, O.IsDescendantOf FilterOutputStream o) => IsFilterOutputStream o

    instance O.HasParentTypes FilterOutputStream
    type instance O.ParentTypes FilterOutputStream = '[Gio.OutputStream.OutputStream, GObject.Object.Object]

    -- | Cast to `FilterOutputStream`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
    toFilterOutputStream :: (MIO.MonadIO m, IsFilterOutputStream o) => o -> m FilterOutputStream
    toFilterOutputStream :: forall (m :: * -> *) o.
    (MonadIO m, IsFilterOutputStream o) =>
    o -> m FilterOutputStream
    toFilterOutputStream = IO FilterOutputStream -> m FilterOutputStream
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO FilterOutputStream -> m FilterOutputStream)
    -> (o -> IO FilterOutputStream) -> o -> m FilterOutputStream
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ManagedPtr FilterOutputStream -> FilterOutputStream)
    -> o -> IO FilterOutputStream
    forall o o'.
    (HasCallStack, ManagedPtrNewtype o, TypedObject o,
     ManagedPtrNewtype o', TypedObject o') =>
    (ManagedPtr o' -> o') -> o -> IO o'
    B.ManagedPtr.unsafeCastTo ManagedPtr FilterOutputStream -> FilterOutputStream
    FilterOutputStream

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

    #if defined(ENABLE_OVERLOADING)
    type family ResolveFilterOutputStreamMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
        ResolveFilterOutputStreamMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolveFilterOutputStreamMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolveFilterOutputStreamMethod "clearPending" o = Gio.OutputStream.OutputStreamClearPendingMethodInfo
        ResolveFilterOutputStreamMethod "close" o = Gio.OutputStream.OutputStreamCloseMethodInfo
        ResolveFilterOutputStreamMethod "closeAsync" o = Gio.OutputStream.OutputStreamCloseAsyncMethodInfo
        ResolveFilterOutputStreamMethod "closeFinish" o = Gio.OutputStream.OutputStreamCloseFinishMethodInfo
        ResolveFilterOutputStreamMethod "flush" o = Gio.OutputStream.OutputStreamFlushMethodInfo
        ResolveFilterOutputStreamMethod "flushAsync" o = Gio.OutputStream.OutputStreamFlushAsyncMethodInfo
        ResolveFilterOutputStreamMethod "flushFinish" o = Gio.OutputStream.OutputStreamFlushFinishMethodInfo
        ResolveFilterOutputStreamMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolveFilterOutputStreamMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolveFilterOutputStreamMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolveFilterOutputStreamMethod "hasPending" o = Gio.OutputStream.OutputStreamHasPendingMethodInfo
        ResolveFilterOutputStreamMethod "isClosed" o = Gio.OutputStream.OutputStreamIsClosedMethodInfo
        ResolveFilterOutputStreamMethod "isClosing" o = Gio.OutputStream.OutputStreamIsClosingMethodInfo
        ResolveFilterOutputStreamMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolveFilterOutputStreamMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolveFilterOutputStreamMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolveFilterOutputStreamMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolveFilterOutputStreamMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolveFilterOutputStreamMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolveFilterOutputStreamMethod "splice" o = Gio.OutputStream.OutputStreamSpliceMethodInfo
        ResolveFilterOutputStreamMethod "spliceAsync" o = Gio.OutputStream.OutputStreamSpliceAsyncMethodInfo
        ResolveFilterOutputStreamMethod "spliceFinish" o = Gio.OutputStream.OutputStreamSpliceFinishMethodInfo
        ResolveFilterOutputStreamMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolveFilterOutputStreamMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolveFilterOutputStreamMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolveFilterOutputStreamMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolveFilterOutputStreamMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolveFilterOutputStreamMethod "write" o = Gio.OutputStream.OutputStreamWriteMethodInfo
        ResolveFilterOutputStreamMethod "writeAll" o = Gio.OutputStream.OutputStreamWriteAllMethodInfo
        ResolveFilterOutputStreamMethod "writeAllAsync" o = Gio.OutputStream.OutputStreamWriteAllAsyncMethodInfo
        ResolveFilterOutputStreamMethod "writeAllFinish" o = Gio.OutputStream.OutputStreamWriteAllFinishMethodInfo
        ResolveFilterOutputStreamMethod "writeAsync" o = Gio.OutputStream.OutputStreamWriteAsyncMethodInfo
        ResolveFilterOutputStreamMethod "writeBytes" o = Gio.OutputStream.OutputStreamWriteBytesMethodInfo
        ResolveFilterOutputStreamMethod "writeBytesAsync" o = Gio.OutputStream.OutputStreamWriteBytesAsyncMethodInfo
        ResolveFilterOutputStreamMethod "writeBytesFinish" o = Gio.OutputStream.OutputStreamWriteBytesFinishMethodInfo
        ResolveFilterOutputStreamMethod "writeFinish" o = Gio.OutputStream.OutputStreamWriteFinishMethodInfo
        ResolveFilterOutputStreamMethod "writev" o = Gio.OutputStream.OutputStreamWritevMethodInfo
        ResolveFilterOutputStreamMethod "writevAll" o = Gio.OutputStream.OutputStreamWritevAllMethodInfo
        ResolveFilterOutputStreamMethod "writevAllAsync" o = Gio.OutputStream.OutputStreamWritevAllAsyncMethodInfo
        ResolveFilterOutputStreamMethod "writevAllFinish" o = Gio.OutputStream.OutputStreamWritevAllFinishMethodInfo
        ResolveFilterOutputStreamMethod "writevAsync" o = Gio.OutputStream.OutputStreamWritevAsyncMethodInfo
        ResolveFilterOutputStreamMethod "writevFinish" o = Gio.OutputStream.OutputStreamWritevFinishMethodInfo
        ResolveFilterOutputStreamMethod "getBaseStream" o = FilterOutputStreamGetBaseStreamMethodInfo
        ResolveFilterOutputStreamMethod "getCloseBaseStream" o = FilterOutputStreamGetCloseBaseStreamMethodInfo
        ResolveFilterOutputStreamMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolveFilterOutputStreamMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolveFilterOutputStreamMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolveFilterOutputStreamMethod "setCloseBaseStream" o = FilterOutputStreamSetCloseBaseStreamMethodInfo
        ResolveFilterOutputStreamMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolveFilterOutputStreamMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
        ResolveFilterOutputStreamMethod "setPending" o = Gio.OutputStream.OutputStreamSetPendingMethodInfo
        ResolveFilterOutputStreamMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolveFilterOutputStreamMethod l o = O.MethodResolutionFailed l o

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

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

    #endif

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

    #endif

    -- VVV Prop "base-stream"
       -- Type: TInterface (Name {namespace = "Gio", name = "OutputStream"})
       -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
       -- Nullable: (Just False,Nothing)

    -- | Get the value of the “@base-stream@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' filterOutputStream #baseStream
    -- @
    getFilterOutputStreamBaseStream :: (MonadIO m, IsFilterOutputStream o) => o -> m Gio.OutputStream.OutputStream
    getFilterOutputStreamBaseStream :: forall (m :: * -> *) o.
    (MonadIO m, IsFilterOutputStream o) =>
    o -> m OutputStream
    getFilterOutputStreamBaseStream o
    obj = IO OutputStream -> m OutputStream
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO OutputStream -> m OutputStream)
    -> IO OutputStream -> m OutputStream
    forall a b. (a -> b) -> a -> b
    $ Text -> IO (Maybe OutputStream) -> IO OutputStream
    forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
    checkUnexpectedNothing Text
    "getFilterOutputStreamBaseStream" (IO (Maybe OutputStream) -> IO OutputStream)
    -> IO (Maybe OutputStream) -> IO OutputStream
    forall a b. (a -> b) -> a -> b
    $ o
    -> String
    -> (ManagedPtr OutputStream -> OutputStream)
    -> IO (Maybe OutputStream)
    forall a b.
    (GObject a, GObject b) =>
    a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
    B.Properties.getObjectPropertyObject o
    obj String
    "base-stream" ManagedPtr OutputStream -> OutputStream
    Gio.OutputStream.OutputStream

    -- | Construct a `GValueConstruct` with valid value for the “@base-stream@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructFilterOutputStreamBaseStream :: (IsFilterOutputStream o, MIO.MonadIO m, Gio.OutputStream.IsOutputStream a) => a -> m (GValueConstruct o)
    constructFilterOutputStreamBaseStream :: forall o (m :: * -> *) a.
    (IsFilterOutputStream o, MonadIO m, IsOutputStream a) =>
    a -> m (GValueConstruct o)
    constructFilterOutputStreamBaseStream a
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Maybe a -> IO (GValueConstruct o)
    forall a o.
    GObject a =>
    String -> Maybe a -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyObject String
    "base-stream" (a -> Maybe a
    forall a. a -> Maybe a
    P.Just a
    val)

    #if defined(ENABLE_OVERLOADING)
    data FilterOutputStreamBaseStreamPropertyInfo
    instance AttrInfo FilterOutputStreamBaseStreamPropertyInfo where
        type AttrAllowedOps FilterOutputStreamBaseStreamPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
        type AttrBaseTypeConstraint FilterOutputStreamBaseStreamPropertyInfo = IsFilterOutputStream
        type AttrSetTypeConstraint FilterOutputStreamBaseStreamPropertyInfo = Gio.OutputStream.IsOutputStream
        type AttrTransferTypeConstraint FilterOutputStreamBaseStreamPropertyInfo = Gio.OutputStream.IsOutputStream
        type AttrTransferType FilterOutputStreamBaseStreamPropertyInfo = Gio.OutputStream.OutputStream
        type AttrGetType FilterOutputStreamBaseStreamPropertyInfo = Gio.OutputStream.OutputStream
        type AttrLabel FilterOutputStreamBaseStreamPropertyInfo = "base-stream"
        type AttrOrigin FilterOutputStreamBaseStreamPropertyInfo = FilterOutputStream
        attrGet = getFilterOutputStreamBaseStream
        attrSet = undefined
        attrTransfer _ v = do
            unsafeCastTo Gio.OutputStream.OutputStream v
        attrConstruct = constructFilterOutputStreamBaseStream
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.FilterOutputStream.baseStream"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FilterOutputStream.html#g:attr:baseStream"
            })
    #endif

    -- VVV Prop "close-base-stream"
       -- Type: TBasicType TBoolean
       -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
       -- Nullable: (Just False,Just False)

    -- | Get the value of the “@close-base-stream@” property.
    -- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
    --
    -- @
    -- 'Data.GI.Base.Attributes.get' filterOutputStream #closeBaseStream
    -- @
    getFilterOutputStreamCloseBaseStream :: (MonadIO m, IsFilterOutputStream o) => o -> m Bool
    getFilterOutputStreamCloseBaseStream :: forall (m :: * -> *) o.
    (MonadIO m, IsFilterOutputStream o) =>
    o -> m Bool
    getFilterOutputStreamCloseBaseStream o
    obj = IO Bool -> m Bool
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
    forall a b. (a -> b) -> a -> b
    $ o -> String -> IO Bool
    forall a. GObject a => a -> String -> IO Bool
    B.Properties.getObjectPropertyBool o
    obj String
    "close-base-stream"

    -- | Construct a `GValueConstruct` with valid value for the “@close-base-stream@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
    constructFilterOutputStreamCloseBaseStream :: (IsFilterOutputStream o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
    constructFilterOutputStreamCloseBaseStream :: forall o (m :: * -> *).
    (IsFilterOutputStream o, MonadIO m) =>
    Bool -> m (GValueConstruct o)
    constructFilterOutputStreamCloseBaseStream Bool
    val = IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
    -> IO (GValueConstruct o) -> m (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ do
        IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a. IO a -> IO a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
    -> IO (GValueConstruct o) -> IO (GValueConstruct o)
    forall a b. (a -> b) -> a -> b
    $ String -> Bool -> IO (GValueConstruct o)
    forall o. String -> Bool -> IO (GValueConstruct o)
    B.Properties.constructObjectPropertyBool String
    "close-base-stream" Bool
    val

    #if defined(ENABLE_OVERLOADING)
    data FilterOutputStreamCloseBaseStreamPropertyInfo
    instance AttrInfo FilterOutputStreamCloseBaseStreamPropertyInfo where
        type AttrAllowedOps FilterOutputStreamCloseBaseStreamPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
        type AttrBaseTypeConstraint FilterOutputStreamCloseBaseStreamPropertyInfo = IsFilterOutputStream
        type AttrSetTypeConstraint FilterOutputStreamCloseBaseStreamPropertyInfo = (~) Bool
        type AttrTransferTypeConstraint FilterOutputStreamCloseBaseStreamPropertyInfo = (~) Bool
        type AttrTransferType FilterOutputStreamCloseBaseStreamPropertyInfo = Bool
        type AttrGetType FilterOutputStreamCloseBaseStreamPropertyInfo = Bool
        type AttrLabel FilterOutputStreamCloseBaseStreamPropertyInfo = "close-base-stream"
        type AttrOrigin FilterOutputStreamCloseBaseStreamPropertyInfo = FilterOutputStream
        attrGet = getFilterOutputStreamCloseBaseStream
        attrSet = undefined
        attrTransfer _ v = do
            return v
        attrConstruct = constructFilterOutputStreamCloseBaseStream
        attrClear = undefined
        dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.FilterOutputStream.closeBaseStream"
            , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FilterOutputStream.html#g:attr:closeBaseStream"
            })
    #endif

    #if defined(ENABLE_OVERLOADING)
    instance O.HasAttributeList FilterOutputStream
    type instance O.AttributeList FilterOutputStream = FilterOutputStreamAttributeList
    type FilterOutputStreamAttributeList = ('[ '("baseStream", FilterOutputStreamBaseStreamPropertyInfo), '("closeBaseStream", FilterOutputStreamCloseBaseStreamPropertyInfo)] :: [(Symbol, DK.Type)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    filterOutputStreamBaseStream :: AttrLabelProxy "baseStream"
    filterOutputStreamBaseStream = AttrLabelProxy

    filterOutputStreamCloseBaseStream :: AttrLabelProxy "closeBaseStream"
    filterOutputStreamCloseBaseStream = AttrLabelProxy

    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList FilterOutputStream = FilterOutputStreamSignalList
    type FilterOutputStreamSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

    #endif

    -- method FilterOutputStream::get_base_stream
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "stream"
    --           , argType =
    --               TInterface Name { namespace = "Gio" , name = "FilterOutputStream" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a [class@Gio.FilterOutputStream]."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just
    --               (TInterface Name { namespace = "Gio" , name = "OutputStream" })
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_filter_output_stream_get_base_stream" g_filter_output_stream_get_base_stream ::
        Ptr FilterOutputStream ->               -- stream : TInterface (Name {namespace = "Gio", name = "FilterOutputStream"})
        IO (Ptr Gio.OutputStream.OutputStream)

    -- | Gets the base stream for the filter stream.
    filterOutputStreamGetBaseStream ::
        (B.CallStack.HasCallStack, MonadIO m, IsFilterOutputStream a) =>
        a
        -- ^ /@stream@/: a t'GI.Gio.Objects.FilterOutputStream.FilterOutputStream'.
        -> m Gio.OutputStream.OutputStream
        -- ^ __Returns:__ a t'GI.Gio.Objects.OutputStream.OutputStream'.
    filterOutputStreamGetBaseStream :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsFilterOutputStream a) =>
    a -> m OutputStream
    filterOutputStreamGetBaseStream a
    stream = IO OutputStream -> m OutputStream
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO OutputStream -> m OutputStream)
    -> IO OutputStream -> m OutputStream
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr FilterOutputStream
    stream' <- a -> IO (Ptr FilterOutputStream)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    stream
        Ptr OutputStream
    result <- Ptr FilterOutputStream -> IO (Ptr OutputStream)
    g_filter_output_stream_get_base_stream Ptr FilterOutputStream
    stream'
        Text -> Ptr OutputStream -> IO ()
    forall a. HasCallStack => Text -> Ptr a -> IO ()
    checkUnexpectedReturnNULL Text
    "filterOutputStreamGetBaseStream" Ptr OutputStream
    result
        OutputStream
    result' <- ((ManagedPtr OutputStream -> OutputStream)
    -> Ptr OutputStream -> IO OutputStream
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    newObject ManagedPtr OutputStream -> OutputStream
    Gio.OutputStream.OutputStream) Ptr OutputStream
    result
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    stream
        OutputStream -> IO OutputStream
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return OutputStream
    result'

    #if defined(ENABLE_OVERLOADING)
    data FilterOutputStreamGetBaseStreamMethodInfo
    instance (signature ~ (m Gio.OutputStream.OutputStream), MonadIO m, IsFilterOutputStream a) => O.OverloadedMethod FilterOutputStreamGetBaseStreamMethodInfo a signature where
        overloadedMethod = filterOutputStreamGetBaseStream

    instance O.OverloadedMethodInfo FilterOutputStreamGetBaseStreamMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.FilterOutputStream.filterOutputStreamGetBaseStream",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FilterOutputStream.html#v:filterOutputStreamGetBaseStream"
            })

    #endif

    -- method FilterOutputStream::get_close_base_stream
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "stream"
    --           , argType =
    --               TInterface Name { namespace = "Gio" , name = "FilterOutputStream" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a [class@Gio.FilterOutputStream]."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TBoolean)
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_filter_output_stream_get_close_base_stream" g_filter_output_stream_get_close_base_stream ::
        Ptr FilterOutputStream ->               -- stream : TInterface (Name {namespace = "Gio", name = "FilterOutputStream"})
        IO CInt

    -- | Returns whether the base stream will be closed when /@stream@/ is
    -- closed.
    filterOutputStreamGetCloseBaseStream ::
        (B.CallStack.HasCallStack, MonadIO m, IsFilterOutputStream a) =>
        a
        -- ^ /@stream@/: a t'GI.Gio.Objects.FilterOutputStream.FilterOutputStream'.
        -> m Bool
        -- ^ __Returns:__ @TRUE@ if the base stream will be closed.
    filterOutputStreamGetCloseBaseStream :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsFilterOutputStream a) =>
    a -> m Bool
    filterOutputStreamGetCloseBaseStream a
    stream = IO Bool -> m Bool
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr FilterOutputStream
    stream' <- a -> IO (Ptr FilterOutputStream)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    stream
        CInt
    result <- Ptr FilterOutputStream -> IO CInt
    g_filter_output_stream_get_close_base_stream Ptr FilterOutputStream
    stream'
        let result' :: Bool
    result' = (CInt -> CInt -> Bool
    forall a. Eq a => a -> a -> Bool
    /= CInt
    0) CInt
    result
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    stream
        Bool -> IO Bool
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Bool
    result'

    #if defined(ENABLE_OVERLOADING)
    data FilterOutputStreamGetCloseBaseStreamMethodInfo
    instance (signature ~ (m Bool), MonadIO m, IsFilterOutputStream a) => O.OverloadedMethod FilterOutputStreamGetCloseBaseStreamMethodInfo a signature where
        overloadedMethod = filterOutputStreamGetCloseBaseStream

    instance O.OverloadedMethodInfo FilterOutputStreamGetCloseBaseStreamMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.FilterOutputStream.filterOutputStreamGetCloseBaseStream",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FilterOutputStream.html#v:filterOutputStreamGetCloseBaseStream"
            })

    #endif

    -- method FilterOutputStream::set_close_base_stream
    -- method type : OrdinaryMethod
    -- Args: [ Arg
    --           { argCName = "stream"
    --           , argType =
    --               TInterface Name { namespace = "Gio" , name = "FilterOutputStream" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "a [class@Gio.FilterOutputStream]."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       , Arg
    --           { argCName = "close_base"
    --           , argType = TBasicType TBoolean
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation
    --                 { rawDocText = Just "`TRUE` to close the base stream."
    --                 , sinceVersion = Nothing
    --                 }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , argCallbackUserData = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Nothing
    -- throws : False
    -- Skip return : False

    foreign import ccall "g_filter_output_stream_set_close_base_stream" g_filter_output_stream_set_close_base_stream ::
        Ptr FilterOutputStream ->               -- stream : TInterface (Name {namespace = "Gio", name = "FilterOutputStream"})
        CInt ->                                 -- close_base : TBasicType TBoolean
        IO ()

    -- | Sets whether the base stream will be closed when /@stream@/ is closed.
    filterOutputStreamSetCloseBaseStream ::
        (B.CallStack.HasCallStack, MonadIO m, IsFilterOutputStream a) =>
        a
        -- ^ /@stream@/: a t'GI.Gio.Objects.FilterOutputStream.FilterOutputStream'.
        -> Bool
        -- ^ /@closeBase@/: @TRUE@ to close the base stream.
        -> m ()
    filterOutputStreamSetCloseBaseStream :: forall (m :: * -> *) a.
    (HasCallStack, MonadIO m, IsFilterOutputStream a) =>
    a -> Bool -> m ()
    filterOutputStreamSetCloseBaseStream a
    stream Bool
    closeBase = IO () -> m ()
    forall a. IO a -> m a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO () -> m ()) -> IO () -> m ()
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr FilterOutputStream
    stream' <- a -> IO (Ptr FilterOutputStream)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    stream
        let closeBase' :: CInt
    closeBase' = (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Bool -> Int
    forall a. Enum a => a -> Int
    P.fromEnum) Bool
    closeBase
        Ptr FilterOutputStream -> CInt -> IO ()
    g_filter_output_stream_set_close_base_stream Ptr FilterOutputStream
    stream' CInt
    closeBase'
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    stream
        () -> IO ()
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return ()

    #if defined(ENABLE_OVERLOADING)
    data FilterOutputStreamSetCloseBaseStreamMethodInfo
    instance (signature ~ (Bool -> m ()), MonadIO m, IsFilterOutputStream a) => O.OverloadedMethod FilterOutputStreamSetCloseBaseStreamMethodInfo a signature where
        overloadedMethod = filterOutputStreamSetCloseBaseStream

    instance O.OverloadedMethodInfo FilterOutputStreamSetCloseBaseStreamMethodInfo a where
        overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
            O.resolvedSymbolName = "GI.Gio.Objects.FilterOutputStream.filterOutputStreamSetCloseBaseStream",
            O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FilterOutputStream.html#v:filterOutputStreamSetCloseBaseStream"
            })

    #endif