{-# LANGUAGE PatternSynonyms, ScopedTypeVariables, ViewPatterns #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- 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.OSTree.Constants
    ( 
    pattern YEAR_VERSION                    ,
    pattern VERSION_S                       ,
    pattern VERSION                         ,
    pattern TREE_GVARIANT_STRING            ,
    pattern TIMESTAMP                       ,
    pattern SUMMARY_SIG_GVARIANT_STRING     ,
    pattern SUMMARY_GVARIANT_STRING         ,
    pattern SIGN_NAME_ED25519               ,
    pattern SHA256_STRING_LEN               ,
    pattern SHA256_DIGEST_LEN               ,
    pattern REPO_METADATA_REF               ,
    pattern RELEASE_VERSION                 ,
    pattern ORIGIN_TRANSIENT_GROUP          ,
    pattern META_KEY_DEPLOY_COLLECTION_ID   ,
    pattern METADATA_KEY_LINUX              ,
    pattern METADATA_KEY_BOOTABLE           ,
    pattern MAX_METADATA_WARN_SIZE          ,
    pattern MAX_METADATA_SIZE               ,
    pattern GPG_KEY_GVARIANT_STRING         ,
    pattern FILEMETA_GVARIANT_STRING        ,
    pattern DIRMETA_GVARIANT_STRING         ,
    pattern COMMIT_META_KEY_VERSION         ,
    pattern COMMIT_META_KEY_SOURCE_TITLE    ,
    pattern COMMIT_META_KEY_REF_BINDING     ,
    pattern COMMIT_META_KEY_ENDOFLIFE_REBASE,
    pattern COMMIT_META_KEY_ENDOFLIFE       ,
    pattern COMMIT_META_KEY_COLLECTION_BINDING,
    pattern COMMIT_META_KEY_ARCHITECTURE    ,
    pattern COMMIT_GVARIANT_STRING          ,
    pattern BUILT_FEATURES                  ,

    ) 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.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.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


-- | ostree year version component (e.g. 2017 if 'GI.OSTree.Constants.VERSION' is 2017.2)
-- 
-- /Since: 2017.4/
pattern $bYEAR_VERSION :: Int32
$mYEAR_VERSION :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
YEAR_VERSION = 2021 :: Int32

-- | ostree version, encoded as a string, useful for printing and
-- concatenation.
-- 
-- /Since: 2017.4/
pattern $bVERSION_S :: Text
$mVERSION_S :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
VERSION_S = "2021.5" :: T.Text

-- | ostree version.
-- 
-- /Since: 2017.4/
pattern $bVERSION :: Double
$mVERSION :: forall {r}. Double -> ((# #) -> r) -> ((# #) -> r) -> r
VERSION = 2021.500000 :: Double

-- | /No description available in the introspection data./
pattern $bTREE_GVARIANT_STRING :: Text
$mTREE_GVARIANT_STRING :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
TREE_GVARIANT_STRING = "(a(say)a(sayay))" :: T.Text

-- | The mtime used for stored files.  This was originally 0, changed to 1 for
-- a few releases, then was reverted due to regressions it introduced from
-- users who had been using zero before.
pattern $bTIMESTAMP :: Int32
$mTIMESTAMP :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
TIMESTAMP = 0 :: Int32

-- | /No description available in the introspection data./
pattern $bSUMMARY_SIG_GVARIANT_STRING :: Text
$mSUMMARY_SIG_GVARIANT_STRING :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
SUMMARY_SIG_GVARIANT_STRING = "a{sv}" :: T.Text

-- | /No description available in the introspection data./
pattern $bSUMMARY_GVARIANT_STRING :: Text
$mSUMMARY_GVARIANT_STRING :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
SUMMARY_GVARIANT_STRING = "(a(s(taya{sv}))a{sv})" :: T.Text

-- | The name of the default ed25519 signing type.
-- 
-- /Since: 2020.4/
pattern $bSIGN_NAME_ED25519 :: Text
$mSIGN_NAME_ED25519 :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
SIGN_NAME_ED25519 = "ed25519" :: T.Text

-- | Length of a sha256 digest when expressed as a hexadecimal string
pattern $bSHA256_STRING_LEN :: Int32
$mSHA256_STRING_LEN :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
SHA256_STRING_LEN = 64 :: Int32

-- | Length of a sha256 digest when expressed as raw bytes
pattern $bSHA256_DIGEST_LEN :: Int32
$mSHA256_DIGEST_LEN :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
SHA256_DIGEST_LEN = 32 :: Int32

-- | The name of a ref which is used to store metadata for the entire repository,
-- such as its expected update time (@ostree.summary.expires@), name, or new
-- GPG keys. Metadata is stored on contentless commits in the ref, and hence is
-- signed with the commits.
-- 
-- This supersedes the additional metadata dictionary in the @summary@ file
-- (see 'GI.OSTree.Objects.Repo.repoRegenerateSummary'), as the use of a ref means that the
-- metadata for multiple upstream repositories can be included in a single mirror
-- repository, disambiguating the refs using collection IDs. In order to support
-- peer to peer redistribution of repository metadata, repositories must set a
-- collection ID ('GI.OSTree.Objects.Repo.repoSetCollectionId').
-- 
-- Users of OSTree may place arbitrary metadata in commits on this ref, but the
-- keys must be namespaced by product or developer. For example,
-- @exampleos.end-of-life@. The @ostree.@ prefix is reserved.
-- 
-- /Since: 2018.6/
pattern $bREPO_METADATA_REF :: Text
$mREPO_METADATA_REF :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
REPO_METADATA_REF = "ostree-metadata" :: T.Text

-- | ostree release version component (e.g. 2 if 'GI.OSTree.Constants.VERSION' is 2017.2)
-- 
-- /Since: 2017.4/
pattern $bRELEASE_VERSION :: Int32
$mRELEASE_VERSION :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
RELEASE_VERSION = 5 :: Int32

-- | The name of a @GKeyFile@ group for data that should not
-- be carried across upgrades.  For more information,
-- see 'GI.OSTree.Objects.Deployment.deploymentOriginRemoveTransientState'.
-- 
-- /Since: 2018.3/
pattern $bORIGIN_TRANSIENT_GROUP :: Text
$mORIGIN_TRANSIENT_GROUP :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
ORIGIN_TRANSIENT_GROUP = "libostree-transient" :: T.Text

-- | GVariant type @s@. This key can be used in the repo metadata which is stored
-- in OSTREE_REPO_METADATA_REF as well as in the summary. The semantics of this
-- are that the remote repository wants clients to update their remote config
-- to add this collection ID (clients can\'t do P2P operations involving a
-- remote without a collection ID configured on it, even if one is configured
-- on the server side). Clients must never change or remove a collection ID
-- already set in their remote config.
-- 
-- Currently, OSTree does not implement changing a remote config based on this
-- key, but it may do so in a later release, and until then clients such as
-- Flatpak may implement it.
-- 
-- This is a replacement for the similar metadata key implemented by flatpak,
-- @xa.collection-id@, which is now deprecated as clients which supported it had
-- bugs with their P2P implementations.
-- 
-- /Since: 2018.9/
pattern $bMETA_KEY_DEPLOY_COLLECTION_ID :: Text
$mMETA_KEY_DEPLOY_COLLECTION_ID :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
META_KEY_DEPLOY_COLLECTION_ID = "ostree.deploy-collection-id" :: T.Text

-- | GVariant type @s@: Contains the Linux kernel release (i.e. @uname -r@)
-- 
-- /Since: 2021.1/
pattern $bMETADATA_KEY_LINUX :: Text
$mMETADATA_KEY_LINUX :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
METADATA_KEY_LINUX = "ostree.linux" :: T.Text

-- | GVariant type @b@: Set if this commit is intended to be bootable
-- 
-- /Since: 2021.1/
pattern $bMETADATA_KEY_BOOTABLE :: Text
$mMETADATA_KEY_BOOTABLE :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
METADATA_KEY_BOOTABLE = "ostree.bootable" :: T.Text

-- | This variable is no longer meaningful, it is kept only for compatibility.
pattern $bMAX_METADATA_WARN_SIZE :: Int32
$mMAX_METADATA_WARN_SIZE :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
MAX_METADATA_WARN_SIZE = 7340032 :: Int32

-- | Default limit for maximum permitted size in bytes of metadata objects fetched
-- over HTTP (including repo\/config files, refs, and commit\/dirtree\/dirmeta
-- objects). This is an arbitrary number intended to mitigate disk space
-- exhaustion attacks.
pattern $bMAX_METADATA_SIZE :: Int32
$mMAX_METADATA_SIZE :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
MAX_METADATA_SIZE = 10485760 :: Int32

-- | /No description available in the introspection data./
pattern $bGPG_KEY_GVARIANT_STRING :: Text
$mGPG_KEY_GVARIANT_STRING :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
GPG_KEY_GVARIANT_STRING = "(aa{sv}aa{sv}a{sv})" :: T.Text

-- | /No description available in the introspection data./
pattern $bFILEMETA_GVARIANT_STRING :: Text
$mFILEMETA_GVARIANT_STRING :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
FILEMETA_GVARIANT_STRING = "(uuua(ayay))" :: T.Text

-- | /No description available in the introspection data./
pattern $bDIRMETA_GVARIANT_STRING :: Text
$mDIRMETA_GVARIANT_STRING :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
DIRMETA_GVARIANT_STRING = "(uuua(ayay))" :: T.Text

-- | GVariant type @s@. This metadata key is used for version numbers. A freeform
-- string; the intention is that systems using ostree do not interpret this
-- semantically as traditional package managers do.
-- 
-- This is the only ostree-defined metadata key that does not start with @ostree.@.
-- 
-- /Since: 2014.9/
pattern $bCOMMIT_META_KEY_VERSION :: Text
$mCOMMIT_META_KEY_VERSION :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
COMMIT_META_KEY_VERSION = "version" :: T.Text

-- | GVariant type @s@. This should hold a relatively short single line value
-- containing a human-readable \"source\" for a commit, intended to be displayed
-- near the origin ref.  This is particularly useful for systems that inject
-- content into an OSTree commit from elsewhere - for example, generating from
-- an OCI or qcow2 image. Or if generating from packages, the enabled repository
-- names and their versions.
-- 
-- Try to keep this key short (e.g. \< 80 characters) and human-readable; if you
-- desire machine readable data, consider injecting separate metadata keys.
-- 
-- /Since: 2017.13/
pattern $bCOMMIT_META_KEY_SOURCE_TITLE :: Text
$mCOMMIT_META_KEY_SOURCE_TITLE :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
COMMIT_META_KEY_SOURCE_TITLE = "ostree.source-title" :: T.Text

-- | GVariant type @as@; each element is a branch name. If this is added to a
-- commit, @ostree_repo_pull()@ will enforce that the commit was retrieved from
-- one of the branch names in this array.  This prevents \"sidegrade\" attacks.
-- The rationale for having this support multiple branch names is that it helps
-- support a \"promotion\" model of taking a commit and moving it between development
-- and production branches.
-- 
-- /Since: 2017.9/
pattern $bCOMMIT_META_KEY_REF_BINDING :: Text
$mCOMMIT_META_KEY_REF_BINDING :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
COMMIT_META_KEY_REF_BINDING = "ostree.ref-binding" :: T.Text

-- | GVariant type @s@.  Should contain a refspec defining a new target branch;
-- @ostree admin upgrade@ and @OstreeSysrootUpgrader@ will automatically initiate
-- a rebase upon encountering this metadata key.
-- 
-- /Since: 2017.7/
pattern $bCOMMIT_META_KEY_ENDOFLIFE_REBASE :: Text
$mCOMMIT_META_KEY_ENDOFLIFE_REBASE :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
COMMIT_META_KEY_ENDOFLIFE_REBASE = "ostree.endoflife-rebase" :: T.Text

-- | GVariant type @s@. This metadata key is used to display vendor\'s message
-- when an update stream for a particular branch ends. It usually provides
-- update instructions for the users.
-- 
-- /Since: 2017.7/
pattern $bCOMMIT_META_KEY_ENDOFLIFE :: Text
$mCOMMIT_META_KEY_ENDOFLIFE :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
COMMIT_META_KEY_ENDOFLIFE = "ostree.endoflife" :: T.Text

-- | GVariant type @s@.  If this is added to a commit, @ostree_repo_pull()@
-- will enforce that the commit was retrieved from a repository which has
-- the same collection ID.  See @ostree_repo_set_collection_id()@.
-- This is most useful in concert with @OSTREE_COMMIT_META_KEY_REF_BINDING@,
-- as it more strongly binds the commit to the repository and branch.
-- 
-- /Since: 2018.6/
pattern $bCOMMIT_META_KEY_COLLECTION_BINDING :: Text
$mCOMMIT_META_KEY_COLLECTION_BINDING :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
COMMIT_META_KEY_COLLECTION_BINDING = "ostree.collection-binding" :: T.Text

-- | GVariant type @s@.  Intended to describe the CPU architecture.  This is a freeform string, and some distributions
-- which have existing package managers might want to match that schema.  If you
-- don\'t have a prior schema, it\'s recommended to use @uname -m@ by default (i.e. the Linux kernel schema).  In the future
-- ostree might include a builtin function to compare architectures.
-- 
-- /Since: 2020.4/
pattern $bCOMMIT_META_KEY_ARCHITECTURE :: Text
$mCOMMIT_META_KEY_ARCHITECTURE :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
COMMIT_META_KEY_ARCHITECTURE = "ostree.architecture" :: T.Text

-- | /No description available in the introspection data./
pattern $bCOMMIT_GVARIANT_STRING :: Text
$mCOMMIT_GVARIANT_STRING :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
COMMIT_GVARIANT_STRING = "(a{sv}aya(say)sstayay)" :: T.Text

-- | Whitespace separated set of features this libostree was configured with at build time.
-- Consult the source code in configure.ac (or the CLI @ostree --version@) for examples.
-- 
-- /Since: 2019.3/
pattern $bBUILT_FEATURES :: Text
$mBUILT_FEATURES :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
BUILT_FEATURES = "libcurl libsoup gpgme ex-fsverity libarchive selinux openssl libmount systemd release p2p" :: T.Text