-- | 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.Secret.Flags
    ( 

 -- * Flags
-- ** CollectionCreateFlags #flag:CollectionCreateFlags#

    CollectionCreateFlags(..)               ,


-- ** CollectionFlags #flag:CollectionFlags#

    CollectionFlags(..)                     ,


-- ** ItemCreateFlags #flag:ItemCreateFlags#

    ItemCreateFlags(..)                     ,


-- ** ItemFlags #flag:ItemFlags#

    ItemFlags(..)                           ,


-- ** SchemaFlags #flag:SchemaFlags#

    SchemaFlags(..)                         ,


-- ** SearchFlags #flag:SearchFlags#

    SearchFlags(..)                         ,


-- ** ServiceFlags #flag:ServiceFlags#

    ServiceFlags(..)                        ,




    ) 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


-- Flags ServiceFlags
-- | Flags which determine which parts of the t'GI.Secret.Objects.Service.Service' proxy are initialized
-- during a 'GI.Secret.Objects.Service.serviceGet' or 'GI.Secret.Objects.Service.serviceOpen' operation.
data ServiceFlags = 
      ServiceFlagsNone
    -- ^ no flags for initializing the t'GI.Secret.Objects.Service.Service'
    | ServiceFlagsOpenSession
    -- ^ establish a session for transfer of secrets
    --                               while initializing the t'GI.Secret.Objects.Service.Service'
    | ServiceFlagsLoadCollections
    -- ^ load collections while initializing the
    --                                   t'GI.Secret.Objects.Service.Service'
    | AnotherServiceFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ServiceFlags -> ShowS
[ServiceFlags] -> ShowS
ServiceFlags -> String
(Int -> ServiceFlags -> ShowS)
-> (ServiceFlags -> String)
-> ([ServiceFlags] -> ShowS)
-> Show ServiceFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceFlags] -> ShowS
$cshowList :: [ServiceFlags] -> ShowS
show :: ServiceFlags -> String
$cshow :: ServiceFlags -> String
showsPrec :: Int -> ServiceFlags -> ShowS
$cshowsPrec :: Int -> ServiceFlags -> ShowS
Show, ServiceFlags -> ServiceFlags -> Bool
(ServiceFlags -> ServiceFlags -> Bool)
-> (ServiceFlags -> ServiceFlags -> Bool) -> Eq ServiceFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceFlags -> ServiceFlags -> Bool
$c/= :: ServiceFlags -> ServiceFlags -> Bool
== :: ServiceFlags -> ServiceFlags -> Bool
$c== :: ServiceFlags -> ServiceFlags -> Bool
Eq)

instance P.Enum ServiceFlags where
    fromEnum :: ServiceFlags -> Int
fromEnum ServiceFlagsNone = 0
    fromEnum ServiceFlagsOpenSession = 2
    fromEnum ServiceFlagsLoadCollections = 4
    fromEnum (AnotherServiceFlags k :: Int
k) = Int
k

    toEnum :: Int -> ServiceFlags
toEnum 0 = ServiceFlags
ServiceFlagsNone
    toEnum 2 = ServiceFlags
ServiceFlagsOpenSession
    toEnum 4 = ServiceFlags
ServiceFlagsLoadCollections
    toEnum k :: Int
k = Int -> ServiceFlags
AnotherServiceFlags Int
k

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

instance IsGFlag ServiceFlags

-- Flags SearchFlags
-- | Various flags to be used with 'GI.Secret.Objects.Service.serviceSearch' and 'GI.Secret.Objects.Service.serviceSearchSync'.
data SearchFlags = 
      SearchFlagsNone
    -- ^ no flags
    | SearchFlagsAll
    -- ^ all the items matching the search will be returned, instead of just the first one
    | SearchFlagsUnlock
    -- ^ unlock locked items while searching
    | SearchFlagsLoadSecrets
    -- ^ while searching load secrets for items that are not locked
    | AnotherSearchFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> SearchFlags -> ShowS
[SearchFlags] -> ShowS
SearchFlags -> String
(Int -> SearchFlags -> ShowS)
-> (SearchFlags -> String)
-> ([SearchFlags] -> ShowS)
-> Show SearchFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SearchFlags] -> ShowS
$cshowList :: [SearchFlags] -> ShowS
show :: SearchFlags -> String
$cshow :: SearchFlags -> String
showsPrec :: Int -> SearchFlags -> ShowS
$cshowsPrec :: Int -> SearchFlags -> ShowS
Show, SearchFlags -> SearchFlags -> Bool
(SearchFlags -> SearchFlags -> Bool)
-> (SearchFlags -> SearchFlags -> Bool) -> Eq SearchFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SearchFlags -> SearchFlags -> Bool
$c/= :: SearchFlags -> SearchFlags -> Bool
== :: SearchFlags -> SearchFlags -> Bool
$c== :: SearchFlags -> SearchFlags -> Bool
Eq)

instance P.Enum SearchFlags where
    fromEnum :: SearchFlags -> Int
fromEnum SearchFlagsNone = 0
    fromEnum SearchFlagsAll = 2
    fromEnum SearchFlagsUnlock = 4
    fromEnum SearchFlagsLoadSecrets = 8
    fromEnum (AnotherSearchFlags k :: Int
k) = Int
k

    toEnum :: Int -> SearchFlags
toEnum 0 = SearchFlags
SearchFlagsNone
    toEnum 2 = SearchFlags
SearchFlagsAll
    toEnum 4 = SearchFlags
SearchFlagsUnlock
    toEnum 8 = SearchFlags
SearchFlagsLoadSecrets
    toEnum k :: Int
k = Int -> SearchFlags
AnotherSearchFlags Int
k

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

instance IsGFlag SearchFlags

-- Flags SchemaFlags
-- | Flags for a t'GI.Secret.Structs.Schema.Schema' definition.
data SchemaFlags = 
      SchemaFlagsNone
    -- ^ no flags for the schema
    | SchemaFlagsDontMatchName
    -- ^ don\'t match the schema name when looking up or
    --                                 removing passwords
    | AnotherSchemaFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> SchemaFlags -> ShowS
[SchemaFlags] -> ShowS
SchemaFlags -> String
(Int -> SchemaFlags -> ShowS)
-> (SchemaFlags -> String)
-> ([SchemaFlags] -> ShowS)
-> Show SchemaFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SchemaFlags] -> ShowS
$cshowList :: [SchemaFlags] -> ShowS
show :: SchemaFlags -> String
$cshow :: SchemaFlags -> String
showsPrec :: Int -> SchemaFlags -> ShowS
$cshowsPrec :: Int -> SchemaFlags -> ShowS
Show, SchemaFlags -> SchemaFlags -> Bool
(SchemaFlags -> SchemaFlags -> Bool)
-> (SchemaFlags -> SchemaFlags -> Bool) -> Eq SchemaFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SchemaFlags -> SchemaFlags -> Bool
$c/= :: SchemaFlags -> SchemaFlags -> Bool
== :: SchemaFlags -> SchemaFlags -> Bool
$c== :: SchemaFlags -> SchemaFlags -> Bool
Eq)

instance P.Enum SchemaFlags where
    fromEnum :: SchemaFlags -> Int
fromEnum SchemaFlagsNone = 0
    fromEnum SchemaFlagsDontMatchName = 2
    fromEnum (AnotherSchemaFlags k :: Int
k) = Int
k

    toEnum :: Int -> SchemaFlags
toEnum 0 = SchemaFlags
SchemaFlagsNone
    toEnum 2 = SchemaFlags
SchemaFlagsDontMatchName
    toEnum k :: Int
k = Int -> SchemaFlags
AnotherSchemaFlags Int
k

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

instance IsGFlag SchemaFlags

-- Flags ItemFlags
-- | Flags which determine which parts of the t'GI.Secret.Objects.Item.Item' proxy are initialized.
data ItemFlags = 
      ItemFlagsNone
    -- ^ no flags
    | ItemFlagsLoadSecret
    -- ^ a secret has been (or should be) loaded for t'GI.Secret.Objects.Item.Item'
    | AnotherItemFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ItemFlags -> ShowS
[ItemFlags] -> ShowS
ItemFlags -> String
(Int -> ItemFlags -> ShowS)
-> (ItemFlags -> String)
-> ([ItemFlags] -> ShowS)
-> Show ItemFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemFlags] -> ShowS
$cshowList :: [ItemFlags] -> ShowS
show :: ItemFlags -> String
$cshow :: ItemFlags -> String
showsPrec :: Int -> ItemFlags -> ShowS
$cshowsPrec :: Int -> ItemFlags -> ShowS
Show, ItemFlags -> ItemFlags -> Bool
(ItemFlags -> ItemFlags -> Bool)
-> (ItemFlags -> ItemFlags -> Bool) -> Eq ItemFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemFlags -> ItemFlags -> Bool
$c/= :: ItemFlags -> ItemFlags -> Bool
== :: ItemFlags -> ItemFlags -> Bool
$c== :: ItemFlags -> ItemFlags -> Bool
Eq)

instance P.Enum ItemFlags where
    fromEnum :: ItemFlags -> Int
fromEnum ItemFlagsNone = 0
    fromEnum ItemFlagsLoadSecret = 2
    fromEnum (AnotherItemFlags k :: Int
k) = Int
k

    toEnum :: Int -> ItemFlags
toEnum 0 = ItemFlags
ItemFlagsNone
    toEnum 2 = ItemFlags
ItemFlagsLoadSecret
    toEnum k :: Int
k = Int -> ItemFlags
AnotherItemFlags Int
k

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

instance IsGFlag ItemFlags

-- Flags ItemCreateFlags
-- | Flags for 'GI.Secret.Objects.Item.itemCreate'.
data ItemCreateFlags = 
      ItemCreateFlagsNone
    -- ^ no flags
    | ItemCreateFlagsReplace
    -- ^ replace an item with the same attributes.
    | AnotherItemCreateFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ItemCreateFlags -> ShowS
[ItemCreateFlags] -> ShowS
ItemCreateFlags -> String
(Int -> ItemCreateFlags -> ShowS)
-> (ItemCreateFlags -> String)
-> ([ItemCreateFlags] -> ShowS)
-> Show ItemCreateFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemCreateFlags] -> ShowS
$cshowList :: [ItemCreateFlags] -> ShowS
show :: ItemCreateFlags -> String
$cshow :: ItemCreateFlags -> String
showsPrec :: Int -> ItemCreateFlags -> ShowS
$cshowsPrec :: Int -> ItemCreateFlags -> ShowS
Show, ItemCreateFlags -> ItemCreateFlags -> Bool
(ItemCreateFlags -> ItemCreateFlags -> Bool)
-> (ItemCreateFlags -> ItemCreateFlags -> Bool)
-> Eq ItemCreateFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemCreateFlags -> ItemCreateFlags -> Bool
$c/= :: ItemCreateFlags -> ItemCreateFlags -> Bool
== :: ItemCreateFlags -> ItemCreateFlags -> Bool
$c== :: ItemCreateFlags -> ItemCreateFlags -> Bool
Eq)

instance P.Enum ItemCreateFlags where
    fromEnum :: ItemCreateFlags -> Int
fromEnum ItemCreateFlagsNone = 0
    fromEnum ItemCreateFlagsReplace = 2
    fromEnum (AnotherItemCreateFlags k :: Int
k) = Int
k

    toEnum :: Int -> ItemCreateFlags
toEnum 0 = ItemCreateFlags
ItemCreateFlagsNone
    toEnum 2 = ItemCreateFlags
ItemCreateFlagsReplace
    toEnum k :: Int
k = Int -> ItemCreateFlags
AnotherItemCreateFlags Int
k

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

instance IsGFlag ItemCreateFlags

-- Flags CollectionFlags
-- | Flags which determine which parts of the t'GI.Secret.Objects.Collection.Collection' proxy are initialized.
data CollectionFlags = 
      CollectionFlagsNone
    -- ^ no flags
    | CollectionFlagsLoadItems
    -- ^ items have or should be loaded
    | AnotherCollectionFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CollectionFlags -> ShowS
[CollectionFlags] -> ShowS
CollectionFlags -> String
(Int -> CollectionFlags -> ShowS)
-> (CollectionFlags -> String)
-> ([CollectionFlags] -> ShowS)
-> Show CollectionFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CollectionFlags] -> ShowS
$cshowList :: [CollectionFlags] -> ShowS
show :: CollectionFlags -> String
$cshow :: CollectionFlags -> String
showsPrec :: Int -> CollectionFlags -> ShowS
$cshowsPrec :: Int -> CollectionFlags -> ShowS
Show, CollectionFlags -> CollectionFlags -> Bool
(CollectionFlags -> CollectionFlags -> Bool)
-> (CollectionFlags -> CollectionFlags -> Bool)
-> Eq CollectionFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CollectionFlags -> CollectionFlags -> Bool
$c/= :: CollectionFlags -> CollectionFlags -> Bool
== :: CollectionFlags -> CollectionFlags -> Bool
$c== :: CollectionFlags -> CollectionFlags -> Bool
Eq)

instance P.Enum CollectionFlags where
    fromEnum :: CollectionFlags -> Int
fromEnum CollectionFlagsNone = 0
    fromEnum CollectionFlagsLoadItems = 2
    fromEnum (AnotherCollectionFlags k :: Int
k) = Int
k

    toEnum :: Int -> CollectionFlags
toEnum 0 = CollectionFlags
CollectionFlagsNone
    toEnum 2 = CollectionFlags
CollectionFlagsLoadItems
    toEnum k :: Int
k = Int -> CollectionFlags
AnotherCollectionFlags Int
k

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

instance IsGFlag CollectionFlags

-- Flags CollectionCreateFlags
-- | Flags for 'GI.Secret.Objects.Collection.collectionCreate'.
data CollectionCreateFlags = 
      CollectionCreateFlagsCollectionCreateNone
    -- ^ no flags
    | AnotherCollectionCreateFlags Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CollectionCreateFlags -> ShowS
[CollectionCreateFlags] -> ShowS
CollectionCreateFlags -> String
(Int -> CollectionCreateFlags -> ShowS)
-> (CollectionCreateFlags -> String)
-> ([CollectionCreateFlags] -> ShowS)
-> Show CollectionCreateFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CollectionCreateFlags] -> ShowS
$cshowList :: [CollectionCreateFlags] -> ShowS
show :: CollectionCreateFlags -> String
$cshow :: CollectionCreateFlags -> String
showsPrec :: Int -> CollectionCreateFlags -> ShowS
$cshowsPrec :: Int -> CollectionCreateFlags -> ShowS
Show, CollectionCreateFlags -> CollectionCreateFlags -> Bool
(CollectionCreateFlags -> CollectionCreateFlags -> Bool)
-> (CollectionCreateFlags -> CollectionCreateFlags -> Bool)
-> Eq CollectionCreateFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CollectionCreateFlags -> CollectionCreateFlags -> Bool
$c/= :: CollectionCreateFlags -> CollectionCreateFlags -> Bool
== :: CollectionCreateFlags -> CollectionCreateFlags -> Bool
$c== :: CollectionCreateFlags -> CollectionCreateFlags -> Bool
Eq)

instance P.Enum CollectionCreateFlags where
    fromEnum :: CollectionCreateFlags -> Int
fromEnum CollectionCreateFlagsCollectionCreateNone = 0
    fromEnum (AnotherCollectionCreateFlags k :: Int
k) = Int
k

    toEnum :: Int -> CollectionCreateFlags
toEnum 0 = CollectionCreateFlags
CollectionCreateFlagsCollectionCreateNone
    toEnum k :: Int
k = Int -> CollectionCreateFlags
AnotherCollectionCreateFlags Int
k

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

instance IsGFlag CollectionCreateFlags