// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files
// DO NOT EDIT

use crate::{ffi};
use glib::{bitflags::bitflags,prelude::*,translate::*};

#[cfg(feature = "v2017_13")]
bitflags! {
    #[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeChecksumFlags")]
    pub struct ChecksumFlags: u32 {
        #[doc(alias = "OSTREE_CHECKSUM_FLAGS_NONE")]
        const NONE = ffi::OSTREE_CHECKSUM_FLAGS_NONE as _;
        #[doc(alias = "OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS")]
        const IGNORE_XATTRS = ffi::OSTREE_CHECKSUM_FLAGS_IGNORE_XATTRS as _;
        #[doc(alias = "OSTREE_CHECKSUM_FLAGS_CANONICAL_PERMISSIONS")]
        const CANONICAL_PERMISSIONS = ffi::OSTREE_CHECKSUM_FLAGS_CANONICAL_PERMISSIONS as _;
    }
}

#[cfg(feature = "v2017_13")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
#[doc(hidden)]
impl IntoGlib for ChecksumFlags {
    type GlibType = ffi::OstreeChecksumFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeChecksumFlags {
        self.bits()
    }
}

#[cfg(feature = "v2017_13")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2017_13")))]
#[doc(hidden)]
impl FromGlib<ffi::OstreeChecksumFlags> for ChecksumFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeChecksumFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeDiffFlags")]
    pub struct DiffFlags: u32 {
        #[doc(alias = "OSTREE_DIFF_FLAGS_NONE")]
        const NONE = ffi::OSTREE_DIFF_FLAGS_NONE as _;
        #[doc(alias = "OSTREE_DIFF_FLAGS_IGNORE_XATTRS")]
        const IGNORE_XATTRS = ffi::OSTREE_DIFF_FLAGS_IGNORE_XATTRS as _;
    }
}

#[doc(hidden)]
impl IntoGlib for DiffFlags {
    type GlibType = ffi::OstreeDiffFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeDiffFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeDiffFlags> for DiffFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeDiffFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeGpgSignatureFormatFlags")]
    pub struct GpgSignatureFormatFlags: u32 {
        #[doc(alias = "OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT")]
        const GPG_SIGNATURE_FORMAT_DEFAULT = ffi::OSTREE_GPG_SIGNATURE_FORMAT_DEFAULT as _;
    }
}

#[doc(hidden)]
impl IntoGlib for GpgSignatureFormatFlags {
    type GlibType = ffi::OstreeGpgSignatureFormatFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeGpgSignatureFormatFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeGpgSignatureFormatFlags> for GpgSignatureFormatFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeGpgSignatureFormatFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeRepoCommitModifierFlags")]
    pub struct RepoCommitModifierFlags: u32 {
        #[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE")]
        const NONE = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_NONE as _;
        #[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS")]
        const SKIP_XATTRS = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS as _;
        #[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES")]
        const GENERATE_SIZES = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES as _;
        #[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS")]
        const CANONICAL_PERMISSIONS = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS as _;
        #[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED")]
        const ERROR_ON_UNLABELED = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_ERROR_ON_UNLABELED as _;
        #[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME")]
        const CONSUME = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME as _;
        #[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL")]
        const DEVINO_CANONICAL = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL as _;
        #[doc(alias = "OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1")]
        const SELINUX_LABEL_V1 = ffi::OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SELINUX_LABEL_V1 as _;
    }
}

#[doc(hidden)]
impl IntoGlib for RepoCommitModifierFlags {
    type GlibType = ffi::OstreeRepoCommitModifierFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeRepoCommitModifierFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitModifierFlags> for RepoCommitModifierFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeRepoCommitModifierFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

#[cfg(feature = "v2015_7")]
bitflags! {
    #[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeRepoCommitState")]
    pub struct RepoCommitState: u32 {
        #[doc(alias = "OSTREE_REPO_COMMIT_STATE_NORMAL")]
        const NORMAL = ffi::OSTREE_REPO_COMMIT_STATE_NORMAL as _;
        #[doc(alias = "OSTREE_REPO_COMMIT_STATE_PARTIAL")]
        const PARTIAL = ffi::OSTREE_REPO_COMMIT_STATE_PARTIAL as _;
        #[doc(alias = "OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL")]
        const FSCK_PARTIAL = ffi::OSTREE_REPO_COMMIT_STATE_FSCK_PARTIAL as _;
    }
}

#[cfg(feature = "v2015_7")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
#[doc(hidden)]
impl IntoGlib for RepoCommitState {
    type GlibType = ffi::OstreeRepoCommitState;

    #[inline]
    fn into_glib(self) -> ffi::OstreeRepoCommitState {
        self.bits()
    }
}

#[cfg(feature = "v2015_7")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2015_7")))]
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitState> for RepoCommitState {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeRepoCommitState) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeRepoCommitTraverseFlags")]
    pub struct RepoCommitTraverseFlags: u32 {
        #[doc(alias = "OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE")]
        const NONE = ffi::OSTREE_REPO_COMMIT_TRAVERSE_FLAG_NONE as _;
        #[doc(alias = "OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY")]
        const COMMIT_ONLY = ffi::OSTREE_REPO_COMMIT_TRAVERSE_FLAG_COMMIT_ONLY as _;
    }
}

#[doc(hidden)]
impl IntoGlib for RepoCommitTraverseFlags {
    type GlibType = ffi::OstreeRepoCommitTraverseFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeRepoCommitTraverseFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoCommitTraverseFlags> for RepoCommitTraverseFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeRepoCommitTraverseFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeRepoListObjectsFlags")]
    pub struct RepoListObjectsFlags: u32 {
        #[doc(alias = "OSTREE_REPO_LIST_OBJECTS_LOOSE")]
        const LOOSE = ffi::OSTREE_REPO_LIST_OBJECTS_LOOSE as _;
        #[doc(alias = "OSTREE_REPO_LIST_OBJECTS_PACKED")]
        const PACKED = ffi::OSTREE_REPO_LIST_OBJECTS_PACKED as _;
        #[doc(alias = "OSTREE_REPO_LIST_OBJECTS_ALL")]
        const ALL = ffi::OSTREE_REPO_LIST_OBJECTS_ALL as _;
        #[doc(alias = "OSTREE_REPO_LIST_OBJECTS_NO_PARENTS")]
        const NO_PARENTS = ffi::OSTREE_REPO_LIST_OBJECTS_NO_PARENTS as _;
    }
}

#[doc(hidden)]
impl IntoGlib for RepoListObjectsFlags {
    type GlibType = ffi::OstreeRepoListObjectsFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeRepoListObjectsFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoListObjectsFlags> for RepoListObjectsFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeRepoListObjectsFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeRepoListRefsExtFlags")]
    pub struct RepoListRefsExtFlags: u32 {
        #[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_NONE")]
        const NONE = ffi::OSTREE_REPO_LIST_REFS_EXT_NONE as _;
        #[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_ALIASES")]
        const ALIASES = ffi::OSTREE_REPO_LIST_REFS_EXT_ALIASES as _;
        #[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES")]
        const EXCLUDE_REMOTES = ffi::OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_REMOTES as _;
        #[doc(alias = "OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS")]
        const EXCLUDE_MIRRORS = ffi::OSTREE_REPO_LIST_REFS_EXT_EXCLUDE_MIRRORS as _;
    }
}

#[doc(hidden)]
impl IntoGlib for RepoListRefsExtFlags {
    type GlibType = ffi::OstreeRepoListRefsExtFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeRepoListRefsExtFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoListRefsExtFlags> for RepoListRefsExtFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeRepoListRefsExtFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeRepoPruneFlags")]
    pub struct RepoPruneFlags: u32 {
        #[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_NONE")]
        const NONE = ffi::OSTREE_REPO_PRUNE_FLAGS_NONE as _;
        #[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE")]
        const NO_PRUNE = ffi::OSTREE_REPO_PRUNE_FLAGS_NO_PRUNE as _;
        #[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY")]
        const REFS_ONLY = ffi::OSTREE_REPO_PRUNE_FLAGS_REFS_ONLY as _;
        #[doc(alias = "OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY")]
        const COMMIT_ONLY = ffi::OSTREE_REPO_PRUNE_FLAGS_COMMIT_ONLY as _;
    }
}

#[doc(hidden)]
impl IntoGlib for RepoPruneFlags {
    type GlibType = ffi::OstreeRepoPruneFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeRepoPruneFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoPruneFlags> for RepoPruneFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeRepoPruneFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeRepoPullFlags")]
    pub struct RepoPullFlags: u32 {
        #[doc(alias = "OSTREE_REPO_PULL_FLAGS_NONE")]
        const NONE = ffi::OSTREE_REPO_PULL_FLAGS_NONE as _;
        #[doc(alias = "OSTREE_REPO_PULL_FLAGS_MIRROR")]
        const MIRROR = ffi::OSTREE_REPO_PULL_FLAGS_MIRROR as _;
        #[doc(alias = "OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY")]
        const COMMIT_ONLY = ffi::OSTREE_REPO_PULL_FLAGS_COMMIT_ONLY as _;
        #[doc(alias = "OSTREE_REPO_PULL_FLAGS_UNTRUSTED")]
        const UNTRUSTED = ffi::OSTREE_REPO_PULL_FLAGS_UNTRUSTED as _;
        #[doc(alias = "OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES")]
        const BAREUSERONLY_FILES = ffi::OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES as _;
        #[doc(alias = "OSTREE_REPO_PULL_FLAGS_TRUSTED_HTTP")]
        const TRUSTED_HTTP = ffi::OSTREE_REPO_PULL_FLAGS_TRUSTED_HTTP as _;
    }
}

#[doc(hidden)]
impl IntoGlib for RepoPullFlags {
    type GlibType = ffi::OstreeRepoPullFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeRepoPullFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoPullFlags> for RepoPullFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeRepoPullFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeRepoResolveRevExtFlags")]
    pub struct RepoResolveRevExtFlags: u32 {
        #[doc(alias = "OSTREE_REPO_RESOLVE_REV_EXT_NONE")]
        const NONE = ffi::OSTREE_REPO_RESOLVE_REV_EXT_NONE as _;
        #[doc(alias = "OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY")]
        const LOCAL_ONLY = ffi::OSTREE_REPO_RESOLVE_REV_EXT_LOCAL_ONLY as _;
    }
}

#[doc(hidden)]
impl IntoGlib for RepoResolveRevExtFlags {
    type GlibType = ffi::OstreeRepoResolveRevExtFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeRepoResolveRevExtFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoResolveRevExtFlags> for RepoResolveRevExtFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeRepoResolveRevExtFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

#[cfg(feature = "v2021_4")]
bitflags! {
    #[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeRepoVerifyFlags")]
    pub struct RepoVerifyFlags: u32 {
        #[doc(alias = "OSTREE_REPO_VERIFY_FLAGS_NONE")]
        const NONE = ffi::OSTREE_REPO_VERIFY_FLAGS_NONE as _;
        #[doc(alias = "OSTREE_REPO_VERIFY_FLAGS_NO_GPG")]
        const NO_GPG = ffi::OSTREE_REPO_VERIFY_FLAGS_NO_GPG as _;
        #[doc(alias = "OSTREE_REPO_VERIFY_FLAGS_NO_SIGNAPI")]
        const NO_SIGNAPI = ffi::OSTREE_REPO_VERIFY_FLAGS_NO_SIGNAPI as _;
    }
}

#[cfg(feature = "v2021_4")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
#[doc(hidden)]
impl IntoGlib for RepoVerifyFlags {
    type GlibType = ffi::OstreeRepoVerifyFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeRepoVerifyFlags {
        self.bits()
    }
}

#[cfg(feature = "v2021_4")]
#[cfg_attr(docsrs, doc(cfg(feature = "v2021_4")))]
#[doc(hidden)]
impl FromGlib<ffi::OstreeRepoVerifyFlags> for RepoVerifyFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeRepoVerifyFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeSePolicyRestoreconFlags")]
    pub struct SePolicyRestoreconFlags: u32 {
        #[doc(alias = "OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE")]
        const NONE = ffi::OSTREE_SEPOLICY_RESTORECON_FLAGS_NONE as _;
        #[doc(alias = "OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL")]
        const ALLOW_NOLABEL = ffi::OSTREE_SEPOLICY_RESTORECON_FLAGS_ALLOW_NOLABEL as _;
        #[doc(alias = "OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING")]
        const KEEP_EXISTING = ffi::OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING as _;
    }
}

#[doc(hidden)]
impl IntoGlib for SePolicyRestoreconFlags {
    type GlibType = ffi::OstreeSePolicyRestoreconFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeSePolicyRestoreconFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeSePolicyRestoreconFlags> for SePolicyRestoreconFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeSePolicyRestoreconFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeSysrootSimpleWriteDeploymentFlags")]
    pub struct SysrootSimpleWriteDeploymentFlags: u32 {
        #[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE")]
        const NONE = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NONE as _;
        #[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN")]
        const RETAIN = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN as _;
        #[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT")]
        const NOT_DEFAULT = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NOT_DEFAULT as _;
        #[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN")]
        const NO_CLEAN = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_NO_CLEAN as _;
        #[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING")]
        const RETAIN_PENDING = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_PENDING as _;
        #[doc(alias = "OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK")]
        const RETAIN_ROLLBACK = ffi::OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN_ROLLBACK as _;
    }
}

#[doc(hidden)]
impl IntoGlib for SysrootSimpleWriteDeploymentFlags {
    type GlibType = ffi::OstreeSysrootSimpleWriteDeploymentFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeSysrootSimpleWriteDeploymentFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeSysrootSimpleWriteDeploymentFlags> for SysrootSimpleWriteDeploymentFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeSysrootSimpleWriteDeploymentFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeSysrootUpgraderFlags")]
    pub struct SysrootUpgraderFlags: u32 {
        #[doc(alias = "OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED")]
        const IGNORE_UNCONFIGURED = ffi::OSTREE_SYSROOT_UPGRADER_FLAGS_IGNORE_UNCONFIGURED as _;
        #[doc(alias = "OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE")]
        const STAGE = ffi::OSTREE_SYSROOT_UPGRADER_FLAGS_STAGE as _;
        #[doc(alias = "OSTREE_SYSROOT_UPGRADER_FLAGS_KEXEC")]
        const KEXEC = ffi::OSTREE_SYSROOT_UPGRADER_FLAGS_KEXEC as _;
    }
}

#[doc(hidden)]
impl IntoGlib for SysrootUpgraderFlags {
    type GlibType = ffi::OstreeSysrootUpgraderFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeSysrootUpgraderFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeSysrootUpgraderFlags> for SysrootUpgraderFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeSysrootUpgraderFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

impl StaticType for SysrootUpgraderFlags {
                #[inline]
    #[doc(alias = "ostree_sysroot_upgrader_flags_get_type")]
   fn static_type() -> glib::Type {
                    unsafe { from_glib(ffi::ostree_sysroot_upgrader_flags_get_type()) }
                }
            }

impl glib::HasParamSpec for SysrootUpgraderFlags {
                type ParamSpec = glib::ParamSpecFlags;
                type SetValue = Self;
                type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
    
                fn param_spec_builder() -> Self::BuilderFn {
                    Self::ParamSpec::builder
                }
}

impl glib::value::ValueType for SysrootUpgraderFlags {
    type Type = Self;
}

unsafe impl<'a> glib::value::FromValue<'a> for SysrootUpgraderFlags {
    type Checker = glib::value::GenericValueTypeChecker<Self>;

    #[inline]
    unsafe fn from_value(value: &'a glib::Value) -> Self {
        from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0))
    }
}

impl ToValue for SysrootUpgraderFlags {
    #[inline]
    fn to_value(&self) -> glib::Value {
        let mut value = glib::Value::for_value_type::<Self>();
        unsafe {
            glib::gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, self.into_glib());
        }
        value
    }

    #[inline]
    fn value_type(&self) -> glib::Type {
        Self::static_type()
    }
}

impl From<SysrootUpgraderFlags> for glib::Value {
    #[inline]
    fn from(v: SysrootUpgraderFlags) -> Self {
        ToValue::to_value(&v)
    }
}

bitflags! {
    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
    #[doc(alias = "OstreeSysrootUpgraderPullFlags")]
    pub struct SysrootUpgraderPullFlags: u32 {
        #[doc(alias = "OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE")]
        const NONE = ffi::OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE as _;
        #[doc(alias = "OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER")]
        const ALLOW_OLDER = ffi::OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER as _;
        #[doc(alias = "OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC")]
        const SYNTHETIC = ffi::OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC as _;
    }
}

#[doc(hidden)]
impl IntoGlib for SysrootUpgraderPullFlags {
    type GlibType = ffi::OstreeSysrootUpgraderPullFlags;

    #[inline]
    fn into_glib(self) -> ffi::OstreeSysrootUpgraderPullFlags {
        self.bits()
    }
}

#[doc(hidden)]
impl FromGlib<ffi::OstreeSysrootUpgraderPullFlags> for SysrootUpgraderPullFlags {
    #[inline]
    unsafe fn from_glib(value: ffi::OstreeSysrootUpgraderPullFlags) -> Self {
        Self::from_bits_truncate(value)
    }
}

