# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.3.1
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if getattr(globals().get("__spec__"), "parent", None) or globals().get("__package__") or "." in __name__:
    from . import _rpm
else:
    import _rpm

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


import weakref

class SwigPyIterator(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _rpm.delete_SwigPyIterator

    def value(self):
        return _rpm.SwigPyIterator_value(self)

    def incr(self, n=1):
        return _rpm.SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        return _rpm.SwigPyIterator_decr(self, n)

    def distance(self, x):
        return _rpm.SwigPyIterator_distance(self, x)

    def equal(self, x):
        return _rpm.SwigPyIterator_equal(self, x)

    def copy(self):
        return _rpm.SwigPyIterator_copy(self)

    def next(self):
        return _rpm.SwigPyIterator_next(self)

    def __next__(self):
        return _rpm.SwigPyIterator___next__(self)

    def previous(self):
        return _rpm.SwigPyIterator_previous(self)

    def advance(self, n):
        return _rpm.SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        return _rpm.SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        return _rpm.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        return _rpm.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        return _rpm.SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        return _rpm.SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        return _rpm.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self

# Register SwigPyIterator in _rpm:
_rpm.SwigPyIterator_swigregister(SwigPyIterator)
from . import common
from . import exception
from . import conf
from . import logger
from . import repo
from . import transaction

def get_supported_arches():
    r"""Returns a list of architectures supported by libdnf5."""
    return _rpm.get_supported_arches()

def get_base_arch(arch):
    r"""
    Returns base architecture of the given `arch`. In case the base arch is not
    found the function returns empty string.
    :type arch: string
    :param arch: Architecture.
    """
    return _rpm.get_base_arch(arch)
class Checksum(object):
    r"""Class contains checksum and checksum type"""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    __swig_destroy__ = _rpm.delete_Checksum

    def __init__(self, *args):
        _rpm.Checksum_swiginit(self, _rpm.new_Checksum(*args))
    Type_UNKNOWN = _rpm.Checksum_Type_UNKNOWN
    Type_MD5 = _rpm.Checksum_Type_MD5
    Type_SHA1 = _rpm.Checksum_Type_SHA1
    Type_SHA224 = _rpm.Checksum_Type_SHA224
    Type_SHA256 = _rpm.Checksum_Type_SHA256
    Type_SHA384 = _rpm.Checksum_Type_SHA384
    Type_SHA512 = _rpm.Checksum_Type_SHA512

    def get_type(self):
        return _rpm.Checksum_get_type(self)

    def get_type_str(self):
        return _rpm.Checksum_get_type_str(self)

    def get_checksum(self):
        r"""Return checksum in hex format"""
        return _rpm.Checksum_get_checksum(self)

# Register Checksum in _rpm:
_rpm.Checksum_swigregister(Checksum)
class Nevra(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    Form_NEVRA = _rpm.Nevra_Form_NEVRA
    Form_NEVR = _rpm.Nevra_Form_NEVR
    Form_NEV = _rpm.Nevra_Form_NEV
    Form_NA = _rpm.Nevra_Form_NA
    Form_NAME = _rpm.Nevra_Form_NAME

    @staticmethod
    def get_default_pkg_spec_forms():
        r"""The default forms and their order determine pkg_spec matching"""
        return _rpm.Nevra_get_default_pkg_spec_forms()

    @staticmethod
    def parse(*args):
        r"""
        *Overload 1:*
        Parse string into Nevra struct
        :type nevra_str: string
        :param nevra_str: String to parse
        :rtype: std::vector< libdnf5::rpm::Nevra,std::allocator< libdnf5::rpm::Nevra > >
        :return: Vector with parsed Nevra
        :raises: IncorrectNevraString
        Since: - 1.0.0

        |

        *Overload 2:*
        Parse string into Nevra struct using given forms
        :type nevra_str: string
        :param nevra_str: String to parse
        :type forms: std::vector< libdnf5::rpm::Nevra::Form,std::allocator< libdnf5::rpm::Nevra::Form > >
        :param forms: Allowed forms used for parsing
        :rtype: std::vector< libdnf5::rpm::Nevra,std::allocator< libdnf5::rpm::Nevra > >
        :return: Vector with parsed Nevra
        :raises: IncorrectNevraString
        """
        return _rpm.Nevra_parse(*args)
    __swig_destroy__ = _rpm.delete_Nevra

    def __init__(self, *args):
        _rpm.Nevra_swiginit(self, _rpm.new_Nevra(*args))

    def __eq__(self, other):
        r"""
        :rtype: boolean
        :return: `true` if all Nevra attributes (`name`, `epoch`, `version`, `release` and `arch`) match.
        """
        return _rpm.Nevra___eq__(self, other)

    def clear(self):
        r"""Returns false when parsing failed and stored data are in inconsistency state."""
        return _rpm.Nevra_clear(self)

    def get_name(self):
        return _rpm.Nevra_get_name(self)

    def get_epoch(self):
        return _rpm.Nevra_get_epoch(self)

    def get_version(self):
        return _rpm.Nevra_get_version(self)

    def get_release(self):
        return _rpm.Nevra_get_release(self)

    def get_arch(self):
        return _rpm.Nevra_get_arch(self)

    def set_name(self, *args):
        return _rpm.Nevra_set_name(self, *args)

    def set_epoch(self, *args):
        return _rpm.Nevra_set_epoch(self, *args)

    def set_version(self, *args):
        return _rpm.Nevra_set_version(self, *args)

    def set_release(self, *args):
        return _rpm.Nevra_set_release(self, *args)

    def set_arch(self, *args):
        return _rpm.Nevra_set_arch(self, *args)

    def has_just_name(self):
        return _rpm.Nevra_has_just_name(self)

# Register Nevra in _rpm:
_rpm.Nevra_swigregister(Nevra)

def __lshift__(out, nevra):
    return _rpm.__lshift__(out, nevra)

def rpmvercmp(lhs, rhs):
    r"""
    Compare alpha and numeric segments of two versions.
    :rtype: int
    :return: 1 if `lhs` > `rhs`, -1 if `lhs` < `rhs`, 0 if they are equal
    """
    return _rpm.rpmvercmp(lhs, rhs)
class VectorNevra(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _rpm.VectorNevra_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rpm.VectorNevra___nonzero__(self)

    def __bool__(self):
        return _rpm.VectorNevra___bool__(self)

    def __len__(self):
        return _rpm.VectorNevra___len__(self)

    def __getslice__(self, i, j):
        return _rpm.VectorNevra___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rpm.VectorNevra___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rpm.VectorNevra___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rpm.VectorNevra___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rpm.VectorNevra___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rpm.VectorNevra___setitem__(self, *args)

    def pop(self):
        return _rpm.VectorNevra_pop(self)

    def append(self, x):
        return _rpm.VectorNevra_append(self, x)

    def empty(self):
        return _rpm.VectorNevra_empty(self)

    def size(self):
        return _rpm.VectorNevra_size(self)

    def swap(self, v):
        return _rpm.VectorNevra_swap(self, v)

    def begin(self):
        return _rpm.VectorNevra_begin(self)

    def end(self):
        return _rpm.VectorNevra_end(self)

    def rbegin(self):
        return _rpm.VectorNevra_rbegin(self)

    def rend(self):
        return _rpm.VectorNevra_rend(self)

    def clear(self):
        return _rpm.VectorNevra_clear(self)

    def get_allocator(self):
        return _rpm.VectorNevra_get_allocator(self)

    def pop_back(self):
        return _rpm.VectorNevra_pop_back(self)

    def erase(self, *args):
        return _rpm.VectorNevra_erase(self, *args)

    def __init__(self, *args):
        _rpm.VectorNevra_swiginit(self, _rpm.new_VectorNevra(*args))

    def push_back(self, x):
        return _rpm.VectorNevra_push_back(self, x)

    def front(self):
        return _rpm.VectorNevra_front(self)

    def back(self):
        return _rpm.VectorNevra_back(self)

    def assign(self, n, x):
        return _rpm.VectorNevra_assign(self, n, x)

    def insert(self, *args):
        return _rpm.VectorNevra_insert(self, *args)

    def reserve(self, n):
        return _rpm.VectorNevra_reserve(self, n)

    def capacity(self):
        return _rpm.VectorNevra_capacity(self)
    __swig_destroy__ = _rpm.delete_VectorNevra

# Register VectorNevra in _rpm:
_rpm.VectorNevra_swigregister(VectorNevra)
class VectorNevraForm(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _rpm.VectorNevraForm_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rpm.VectorNevraForm___nonzero__(self)

    def __bool__(self):
        return _rpm.VectorNevraForm___bool__(self)

    def __len__(self):
        return _rpm.VectorNevraForm___len__(self)

    def __getslice__(self, i, j):
        return _rpm.VectorNevraForm___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rpm.VectorNevraForm___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rpm.VectorNevraForm___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rpm.VectorNevraForm___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rpm.VectorNevraForm___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rpm.VectorNevraForm___setitem__(self, *args)

    def pop(self):
        return _rpm.VectorNevraForm_pop(self)

    def append(self, x):
        return _rpm.VectorNevraForm_append(self, x)

    def empty(self):
        return _rpm.VectorNevraForm_empty(self)

    def size(self):
        return _rpm.VectorNevraForm_size(self)

    def swap(self, v):
        return _rpm.VectorNevraForm_swap(self, v)

    def begin(self):
        return _rpm.VectorNevraForm_begin(self)

    def end(self):
        return _rpm.VectorNevraForm_end(self)

    def rbegin(self):
        return _rpm.VectorNevraForm_rbegin(self)

    def rend(self):
        return _rpm.VectorNevraForm_rend(self)

    def clear(self):
        return _rpm.VectorNevraForm_clear(self)

    def get_allocator(self):
        return _rpm.VectorNevraForm_get_allocator(self)

    def pop_back(self):
        return _rpm.VectorNevraForm_pop_back(self)

    def erase(self, *args):
        return _rpm.VectorNevraForm_erase(self, *args)

    def __init__(self, *args):
        _rpm.VectorNevraForm_swiginit(self, _rpm.new_VectorNevraForm(*args))

    def push_back(self, x):
        return _rpm.VectorNevraForm_push_back(self, x)

    def front(self):
        return _rpm.VectorNevraForm_front(self)

    def back(self):
        return _rpm.VectorNevraForm_back(self)

    def assign(self, n, x):
        return _rpm.VectorNevraForm_assign(self, n, x)

    def insert(self, *args):
        return _rpm.VectorNevraForm_insert(self, *args)

    def reserve(self, n):
        return _rpm.VectorNevraForm_reserve(self, n)

    def capacity(self):
        return _rpm.VectorNevraForm_capacity(self)
    __swig_destroy__ = _rpm.delete_VectorNevraForm

# Register VectorNevraForm in _rpm:
_rpm.VectorNevraForm_swigregister(VectorNevraForm)
class PairBoolNevra(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _rpm.PairBoolNevra_swiginit(self, _rpm.new_PairBoolNevra(*args))
    first = property(_rpm.PairBoolNevra_first_get, _rpm.PairBoolNevra_first_set)
    second = property(_rpm.PairBoolNevra_second_get, _rpm.PairBoolNevra_second_set)
    def __len__(self):
        return 2
    def __repr__(self):
        return str((self.first, self.second))
    def __getitem__(self, index): 
        if not (index % 2):
            return self.first
        else:
            return self.second
    def __setitem__(self, index, val):
        if not (index % 2):
            self.first = val
        else:
            self.second = val
    __swig_destroy__ = _rpm.delete_PairBoolNevra

# Register PairBoolNevra in _rpm:
_rpm.PairBoolNevra_swigregister(PairBoolNevra)

def cmp_nevra(lhs, rhs):
    return _rpm.cmp_nevra(lhs, rhs)

def to_full_nevra_string(obj):
    r"""Create a full nevra string (always contains epoch) from an object"""
    return _rpm.to_full_nevra_string(obj)

def to_nevra_string(obj):
    r"""Create a nevra string (0 epoch excluded) from an object"""
    return _rpm.to_nevra_string(obj)
class VersionlockCondition(object):
    r"""
    A condition for the versionlock package.
    Each condition consist of three parts: key, comparison operator, and value.
    Key can be one of "epoch", "evr", "arch".
    Supported comparison operators are "<", "<=", "=", ">=", ">", "!=".
    Since: 5.1.13
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    Keys_EPOCH = _rpm.VersionlockCondition_Keys_EPOCH
    Keys_EVR = _rpm.VersionlockCondition_Keys_EVR
    Keys_ARCH = _rpm.VersionlockCondition_Keys_ARCH

    def __init__(self, key_str, comparator_str, value):
        _rpm.VersionlockCondition_swiginit(self, _rpm.new_VersionlockCondition(key_str, comparator_str, value))

    def is_valid(self):
        r"""
        Returns true if this configuration entry is valid - contains supported values
        in all three parts (key, operator, and value).
        """
        return _rpm.VersionlockCondition_is_valid(self)

    def get_key(self):
        r"""Get the key (which part of a package is compared)."""
        return _rpm.VersionlockCondition_get_key(self)

    def get_comparator(self):
        r"""Get the comparison operator."""
        return _rpm.VersionlockCondition_get_comparator(self)

    def get_value(self):
        r"""Get the value."""
        return _rpm.VersionlockCondition_get_value(self)

    def get_key_str(self):
        r"""Get the key as a string."""
        return _rpm.VersionlockCondition_get_key_str(self)

    def get_comparator_str(self):
        r"""Get the comparison operator as a string."""
        return _rpm.VersionlockCondition_get_comparator_str(self)

    def get_errors(self):
        r"""Get list of errors found during parsing the entry from configuration file."""
        return _rpm.VersionlockCondition_get_errors(self)

    def to_string(self, with_errors):
        r"""
        Converts the condition to "key operator value" string usable for printing.
        :type with_errors: boolean
        :param with_errors: Include also error messages for invalid entries
        """
        return _rpm.VersionlockCondition_to_string(self, with_errors)
    __swig_destroy__ = _rpm.delete_VersionlockCondition

# Register VersionlockCondition in _rpm:
_rpm.VersionlockCondition_swigregister(VersionlockCondition)
class VersionlockPackage(object):
    r"""
    One versionlock configuration file entry. It consists of the
    package name and a set of conditions. All conditions must be true
    for package version to get locked.
    Since: 5.1.13
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, name, conditions):
        r"""
        Creates an instance of `VersionlockPackage` class specifying the
        name of package.
        :type name: std::string_view
        :param name: Name of the package to be configured
        """
        _rpm.VersionlockPackage_swiginit(self, _rpm.new_VersionlockPackage(name, conditions))

    def is_valid(self):
        r"""Returns true if this configuration entry is valid."""
        return _rpm.VersionlockPackage_is_valid(self)

    def get_name(self):
        r"""Get the package name."""
        return _rpm.VersionlockPackage_get_name(self)

    def get_comment(self):
        r"""Get the comment for this entry."""
        return _rpm.VersionlockPackage_get_comment(self)

    def set_comment(self, comment):
        r"""Set comment for this entry."""
        return _rpm.VersionlockPackage_set_comment(self, comment)

    def get_conditions(self):
        r"""Get the list of conditions configured for the package."""
        return _rpm.VersionlockPackage_get_conditions(self)

    def add_condition(self, condition):
        r"""Add a new condition for the package"""
        return _rpm.VersionlockPackage_add_condition(self, condition)

    def get_errors(self):
        r"""Get list of errors found during parsing the entry from configuration file."""
        return _rpm.VersionlockPackage_get_errors(self)

    def to_string(self, with_errors, with_comment):
        r"""
        Converts the package configuration to string usable for printing.
        :type with_errors: boolean
        :param with_errors: Include also error messages for invalid entries
        """
        return _rpm.VersionlockPackage_to_string(self, with_errors, with_comment)
    __swig_destroy__ = _rpm.delete_VersionlockPackage

# Register VersionlockPackage in _rpm:
_rpm.VersionlockPackage_swigregister(VersionlockPackage)
class VersionlockConfig(object):
    r"""
    Class contains parsed versionlock configuration file.
    Since: 5.1.13
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")
    __repr__ = _swig_repr

    def get_packages(self):
        r"""Get list of configured versionlock entries."""
        return _rpm.VersionlockConfig_get_packages(self)

    def save(self):
        r"""Save configuration to the file specified in the constructor."""
        return _rpm.VersionlockConfig_save(self)
    __swig_destroy__ = _rpm.delete_VersionlockConfig

# Register VersionlockConfig in _rpm:
_rpm.VersionlockConfig_swigregister(VersionlockConfig)
class VectorVersionlockCondition(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _rpm.VectorVersionlockCondition_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rpm.VectorVersionlockCondition___nonzero__(self)

    def __bool__(self):
        return _rpm.VectorVersionlockCondition___bool__(self)

    def __len__(self):
        return _rpm.VectorVersionlockCondition___len__(self)

    def __getslice__(self, i, j):
        return _rpm.VectorVersionlockCondition___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rpm.VectorVersionlockCondition___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rpm.VectorVersionlockCondition___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rpm.VectorVersionlockCondition___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rpm.VectorVersionlockCondition___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rpm.VectorVersionlockCondition___setitem__(self, *args)

    def pop(self):
        return _rpm.VectorVersionlockCondition_pop(self)

    def append(self, x):
        return _rpm.VectorVersionlockCondition_append(self, x)

    def empty(self):
        return _rpm.VectorVersionlockCondition_empty(self)

    def size(self):
        return _rpm.VectorVersionlockCondition_size(self)

    def swap(self, v):
        return _rpm.VectorVersionlockCondition_swap(self, v)

    def begin(self):
        return _rpm.VectorVersionlockCondition_begin(self)

    def end(self):
        return _rpm.VectorVersionlockCondition_end(self)

    def rbegin(self):
        return _rpm.VectorVersionlockCondition_rbegin(self)

    def rend(self):
        return _rpm.VectorVersionlockCondition_rend(self)

    def clear(self):
        return _rpm.VectorVersionlockCondition_clear(self)

    def get_allocator(self):
        return _rpm.VectorVersionlockCondition_get_allocator(self)

    def pop_back(self):
        return _rpm.VectorVersionlockCondition_pop_back(self)

    def erase(self, *args):
        return _rpm.VectorVersionlockCondition_erase(self, *args)

    def __init__(self, *args):
        _rpm.VectorVersionlockCondition_swiginit(self, _rpm.new_VectorVersionlockCondition(*args))

    def push_back(self, x):
        return _rpm.VectorVersionlockCondition_push_back(self, x)

    def front(self):
        return _rpm.VectorVersionlockCondition_front(self)

    def back(self):
        return _rpm.VectorVersionlockCondition_back(self)

    def assign(self, n, x):
        return _rpm.VectorVersionlockCondition_assign(self, n, x)

    def insert(self, *args):
        return _rpm.VectorVersionlockCondition_insert(self, *args)

    def reserve(self, n):
        return _rpm.VectorVersionlockCondition_reserve(self, n)

    def capacity(self):
        return _rpm.VectorVersionlockCondition_capacity(self)
    __swig_destroy__ = _rpm.delete_VectorVersionlockCondition

# Register VectorVersionlockCondition in _rpm:
_rpm.VectorVersionlockCondition_swigregister(VectorVersionlockCondition)
class VectorVersionlockPackage(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _rpm.VectorVersionlockPackage_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rpm.VectorVersionlockPackage___nonzero__(self)

    def __bool__(self):
        return _rpm.VectorVersionlockPackage___bool__(self)

    def __len__(self):
        return _rpm.VectorVersionlockPackage___len__(self)

    def __getslice__(self, i, j):
        return _rpm.VectorVersionlockPackage___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rpm.VectorVersionlockPackage___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rpm.VectorVersionlockPackage___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rpm.VectorVersionlockPackage___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rpm.VectorVersionlockPackage___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rpm.VectorVersionlockPackage___setitem__(self, *args)

    def pop(self):
        return _rpm.VectorVersionlockPackage_pop(self)

    def append(self, x):
        return _rpm.VectorVersionlockPackage_append(self, x)

    def empty(self):
        return _rpm.VectorVersionlockPackage_empty(self)

    def size(self):
        return _rpm.VectorVersionlockPackage_size(self)

    def swap(self, v):
        return _rpm.VectorVersionlockPackage_swap(self, v)

    def begin(self):
        return _rpm.VectorVersionlockPackage_begin(self)

    def end(self):
        return _rpm.VectorVersionlockPackage_end(self)

    def rbegin(self):
        return _rpm.VectorVersionlockPackage_rbegin(self)

    def rend(self):
        return _rpm.VectorVersionlockPackage_rend(self)

    def clear(self):
        return _rpm.VectorVersionlockPackage_clear(self)

    def get_allocator(self):
        return _rpm.VectorVersionlockPackage_get_allocator(self)

    def pop_back(self):
        return _rpm.VectorVersionlockPackage_pop_back(self)

    def erase(self, *args):
        return _rpm.VectorVersionlockPackage_erase(self, *args)

    def __init__(self, *args):
        _rpm.VectorVersionlockPackage_swiginit(self, _rpm.new_VectorVersionlockPackage(*args))

    def push_back(self, x):
        return _rpm.VectorVersionlockPackage_push_back(self, x)

    def front(self):
        return _rpm.VectorVersionlockPackage_front(self)

    def back(self):
        return _rpm.VectorVersionlockPackage_back(self)

    def assign(self, n, x):
        return _rpm.VectorVersionlockPackage_assign(self, n, x)

    def insert(self, *args):
        return _rpm.VectorVersionlockPackage_insert(self, *args)

    def reserve(self, n):
        return _rpm.VectorVersionlockPackage_reserve(self, n)

    def capacity(self):
        return _rpm.VectorVersionlockPackage_capacity(self)
    __swig_destroy__ = _rpm.delete_VectorVersionlockPackage

# Register VectorVersionlockPackage in _rpm:
_rpm.VectorVersionlockPackage_swigregister(VectorVersionlockPackage)
class PackageSack(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _rpm.PackageSack_swiginit(self, _rpm.new_PackageSack(*args))
    __swig_destroy__ = _rpm.delete_PackageSack

    def get_weak_ptr(self):
        r"""Create WeakPtr to PackageSack"""
        return _rpm.PackageSack_get_weak_ptr(self)

    def get_base(self):
        r"""
        :rtype: libdnf5::BaseWeakPtr
        :return: The `Base` object to which this object belongs.
        Since: 5.0
        """
        return _rpm.PackageSack_get_base(self)

    def get_nsolvables(self):
        r"""Returns number of solvables in pool."""
        return _rpm.PackageSack_get_nsolvables(self)

    def load_config_excludes_includes(self, only_main=False):
        r"""
        Loads excluded and included package sets from the configuration.
        Uses the `disable_excludes`, `excludepkgs`, and `includepkgs` configuration options for calculation.
        :type only_main: boolean, optional
        :param only_main: If `true`, the repository specific configurations are not used.
        Since: 5.0
        """
        return _rpm.PackageSack_load_config_excludes_includes(self, only_main)

    def get_user_excludes(self):
        r"""Returns user excluded package set"""
        return _rpm.PackageSack_get_user_excludes(self)

    def add_user_excludes(self, excludes):
        r"""
        Add package set to user excluded packages
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to add to excludes
        Since: 5.0
        """
        return _rpm.PackageSack_add_user_excludes(self, excludes)

    def remove_user_excludes(self, excludes):
        r"""
        Remove package set from user excluded packages
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to remove from excludes
        Since: 5.0
        """
        return _rpm.PackageSack_remove_user_excludes(self, excludes)

    def set_user_excludes(self, excludes):
        r"""
        Resets user excluded packages to a new value
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to exclude
        Since: 5.0
        """
        return _rpm.PackageSack_set_user_excludes(self, excludes)

    def clear_user_excludes(self):
        r"""
        Clear user excluded packages
        Since: 5.0
        """
        return _rpm.PackageSack_clear_user_excludes(self)

    def get_user_includes(self):
        r"""Returns user included package set"""
        return _rpm.PackageSack_get_user_includes(self)

    def add_user_includes(self, includes):
        r"""
        Add package set to user included packages
        :type includes: :py:class:`PackageSet`
        :param includes:: packages to add to includes
        Since: 5.0
        """
        return _rpm.PackageSack_add_user_includes(self, includes)

    def remove_user_includes(self, includes):
        r"""
        Remove package set from user included packages
        :type includes: :py:class:`PackageSet`
        :param includes:: packages to remove from includes
        Since: 5.0
        """
        return _rpm.PackageSack_remove_user_includes(self, includes)

    def set_user_includes(self, includes):
        r"""
        Resets user included packages to a new value
        :type includes: :py:class:`PackageSet`
        :param includes:: packages to include
        Since: 5.0
        """
        return _rpm.PackageSack_set_user_includes(self, includes)

    def clear_user_includes(self):
        r"""
        Clear user included packages
        Since: 5.0
        """
        return _rpm.PackageSack_clear_user_includes(self)

    def get_versionlock_config(self):
        r"""
        Returns versionlock configuration
        Since: 5.1.13
        """
        return _rpm.PackageSack_get_versionlock_config(self)

    def get_versionlock_excludes(self):
        r"""
        Returns versionlock excluded package set
        Since: 5.1.13
        """
        return _rpm.PackageSack_get_versionlock_excludes(self)

    def add_versionlock_excludes(self, excludes):
        r"""
        Add package set to versionlock excluded packages
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to add to excludes
        Since: 5.1.13
        """
        return _rpm.PackageSack_add_versionlock_excludes(self, excludes)

    def remove_versionlock_excludes(self, excludes):
        r"""
        Remove package set from versionlock excluded packages
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to remove from excludes
        Since: 5.1.13
        """
        return _rpm.PackageSack_remove_versionlock_excludes(self, excludes)

    def set_versionlock_excludes(self, excludes):
        r"""
        Resets versionlock excluded packages to a new value
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to exclude
        Since: 5.1.13
        """
        return _rpm.PackageSack_set_versionlock_excludes(self, excludes)

    def clear_versionlock_excludes(self):
        r"""
        Clear versionlock excluded packages
        Since: 5.1.13
        """
        return _rpm.PackageSack_clear_versionlock_excludes(self)

    def get_running_kernel(self):
        return _rpm.PackageSack_get_running_kernel(self)

# Register PackageSack in _rpm:
_rpm.PackageSack_swigregister(PackageSack)
class PackageSackWeakPtr(object):
    r"""
    WeakPtr is a "smart" pointer. It contains a pointer to resource and to guard of resource.
    WeakPtr pointer can be owner of the resource. However, the resource itself may depend on another resource.
    WeakPtr registers/unregisters itself at the guard of resource. And the resource guard invalidates
    the registered WeakPtrs when the resource is unusable (eg. its dependecny was released).
    Note on thread safety:
    It is safe to create, access and destroy WeakPtrs in multiple threads simultaneously.
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _rpm.PackageSackWeakPtr_swiginit(self, _rpm.new_PackageSackWeakPtr(*args))
    __swig_destroy__ = _rpm.delete_PackageSackWeakPtr

    def __deref__(self):
        r"""Provides access to the managed object. Generates exception if object is not valid."""
        return _rpm.PackageSackWeakPtr___deref__(self)

    def get(self):
        r"""Returns a pointer to the managed object. Generates exception if object is not valid."""
        return _rpm.PackageSackWeakPtr_get(self)

    def is_valid(self):
        r"""Checks if managed object is valid."""
        return _rpm.PackageSackWeakPtr_is_valid(self)

    def has_same_guard(self, other):
        r"""Checks if the other WeakPtr instance has the same WeakPtrGuard."""
        return _rpm.PackageSackWeakPtr_has_same_guard(self, other)

    def __ref__(self):
        return _rpm.PackageSackWeakPtr___ref__(self)

    def __eq__(self, other):
        return _rpm.PackageSackWeakPtr___eq__(self, other)

    def __ne__(self, other):
        return _rpm.PackageSackWeakPtr___ne__(self, other)

    def __lt__(self, other):
        return _rpm.PackageSackWeakPtr___lt__(self, other)

    def __gt__(self, other):
        return _rpm.PackageSackWeakPtr___gt__(self, other)

    def __le__(self, other):
        return _rpm.PackageSackWeakPtr___le__(self, other)

    def __ge__(self, other):
        return _rpm.PackageSackWeakPtr___ge__(self, other)

    def __hash__(self):
        return _rpm.PackageSackWeakPtr___hash__(self)

    def get_weak_ptr(self):
        r"""Create WeakPtr to PackageSack"""
        return _rpm.PackageSackWeakPtr_get_weak_ptr(self)

    def get_base(self):
        r"""
        :rtype: libdnf5::BaseWeakPtr
        :return: The `Base` object to which this object belongs.
        Since: 5.0
        """
        return _rpm.PackageSackWeakPtr_get_base(self)

    def get_nsolvables(self):
        r"""Returns number of solvables in pool."""
        return _rpm.PackageSackWeakPtr_get_nsolvables(self)

    def load_config_excludes_includes(self, only_main=False):
        r"""
        Loads excluded and included package sets from the configuration.
        Uses the `disable_excludes`, `excludepkgs`, and `includepkgs` configuration options for calculation.
        :type only_main: boolean, optional
        :param only_main: If `true`, the repository specific configurations are not used.
        Since: 5.0
        """
        return _rpm.PackageSackWeakPtr_load_config_excludes_includes(self, only_main)

    def get_user_excludes(self):
        r"""Returns user excluded package set"""
        return _rpm.PackageSackWeakPtr_get_user_excludes(self)

    def add_user_excludes(self, excludes):
        r"""
        Add package set to user excluded packages
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to add to excludes
        Since: 5.0
        """
        return _rpm.PackageSackWeakPtr_add_user_excludes(self, excludes)

    def remove_user_excludes(self, excludes):
        r"""
        Remove package set from user excluded packages
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to remove from excludes
        Since: 5.0
        """
        return _rpm.PackageSackWeakPtr_remove_user_excludes(self, excludes)

    def set_user_excludes(self, excludes):
        r"""
        Resets user excluded packages to a new value
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to exclude
        Since: 5.0
        """
        return _rpm.PackageSackWeakPtr_set_user_excludes(self, excludes)

    def clear_user_excludes(self):
        r"""
        Clear user excluded packages
        Since: 5.0
        """
        return _rpm.PackageSackWeakPtr_clear_user_excludes(self)

    def get_user_includes(self):
        r"""Returns user included package set"""
        return _rpm.PackageSackWeakPtr_get_user_includes(self)

    def add_user_includes(self, includes):
        r"""
        Add package set to user included packages
        :type includes: :py:class:`PackageSet`
        :param includes:: packages to add to includes
        Since: 5.0
        """
        return _rpm.PackageSackWeakPtr_add_user_includes(self, includes)

    def remove_user_includes(self, includes):
        r"""
        Remove package set from user included packages
        :type includes: :py:class:`PackageSet`
        :param includes:: packages to remove from includes
        Since: 5.0
        """
        return _rpm.PackageSackWeakPtr_remove_user_includes(self, includes)

    def set_user_includes(self, includes):
        r"""
        Resets user included packages to a new value
        :type includes: :py:class:`PackageSet`
        :param includes:: packages to include
        Since: 5.0
        """
        return _rpm.PackageSackWeakPtr_set_user_includes(self, includes)

    def clear_user_includes(self):
        r"""
        Clear user included packages
        Since: 5.0
        """
        return _rpm.PackageSackWeakPtr_clear_user_includes(self)

    def get_versionlock_config(self):
        r"""
        Returns versionlock configuration
        Since: 5.1.13
        """
        return _rpm.PackageSackWeakPtr_get_versionlock_config(self)

    def get_versionlock_excludes(self):
        r"""
        Returns versionlock excluded package set
        Since: 5.1.13
        """
        return _rpm.PackageSackWeakPtr_get_versionlock_excludes(self)

    def add_versionlock_excludes(self, excludes):
        r"""
        Add package set to versionlock excluded packages
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to add to excludes
        Since: 5.1.13
        """
        return _rpm.PackageSackWeakPtr_add_versionlock_excludes(self, excludes)

    def remove_versionlock_excludes(self, excludes):
        r"""
        Remove package set from versionlock excluded packages
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to remove from excludes
        Since: 5.1.13
        """
        return _rpm.PackageSackWeakPtr_remove_versionlock_excludes(self, excludes)

    def set_versionlock_excludes(self, excludes):
        r"""
        Resets versionlock excluded packages to a new value
        :type excludes: :py:class:`PackageSet`
        :param excludes:: packages to exclude
        Since: 5.1.13
        """
        return _rpm.PackageSackWeakPtr_set_versionlock_excludes(self, excludes)

    def clear_versionlock_excludes(self):
        r"""
        Clear versionlock excluded packages
        Since: 5.1.13
        """
        return _rpm.PackageSackWeakPtr_clear_versionlock_excludes(self)

    def get_running_kernel(self):
        return _rpm.PackageSackWeakPtr_get_running_kernel(self)

# Register PackageSackWeakPtr in _rpm:
_rpm.PackageSackWeakPtr_swigregister(PackageSackWeakPtr)
class ReldepId(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _rpm.ReldepId_swiginit(self, _rpm.new_ReldepId(*args))

    def __eq__(self, other):
        return _rpm.ReldepId___eq__(self, other)

    def __ne__(self, other):
        return _rpm.ReldepId___ne__(self, other)
    id = property(_rpm.ReldepId_id_get, _rpm.ReldepId_id_set)
    __swig_destroy__ = _rpm.delete_ReldepId

# Register ReldepId in _rpm:
_rpm.ReldepId_swigregister(ReldepId)
class Reldep(object):
    r"""Represent a relational dependency from libsolv"""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    CmpType_NONE = _rpm.Reldep_CmpType_NONE
    CmpType_GT = _rpm.Reldep_CmpType_GT
    CmpType_EQ = _rpm.Reldep_CmpType_EQ
    CmpType_GTE = _rpm.Reldep_CmpType_GTE
    CmpType_LT = _rpm.Reldep_CmpType_LT
    CmpType_LTE = _rpm.Reldep_CmpType_LTE

    def __init__(self, *args):
        r"""
        Creates a reldep from Char*. If parsing fails it raises std::runtime_error.

        :type base: libdnf5::BaseWeakPtr
        :param base: Instance of Base class
        :type reldep_string: string
        :param reldep_string: String with the dependency
        """
        _rpm.Reldep_swiginit(self, _rpm.new_Reldep(*args))
    __swig_destroy__ = _rpm.delete_Reldep

    def __eq__(self, other):
        return _rpm.Reldep___eq__(self, other)

    def __ne__(self, other):
        return _rpm.Reldep___ne__(self, other)

    def get_name(self):
        return _rpm.Reldep_get_name(self)

    def get_relation(self):
        return _rpm.Reldep_get_relation(self)

    def get_version(self):
        return _rpm.Reldep_get_version(self)

    def to_string(self):
        return _rpm.Reldep_to_string(self)

    def to_string_description(self):
        r"""Provide descriptive information about instance including string value and ID"""
        return _rpm.Reldep_to_string_description(self)

    def get_id(self):
        return _rpm.Reldep_get_id(self)

    def get_base(self):
        r"""Return weak pointer to base"""
        return _rpm.Reldep_get_base(self)

    @staticmethod
    def is_rich_dependency(pattern):
        r"""
        Test if pattern is rich dependency
        Return true if pattern start with "("
        """
        return _rpm.Reldep_is_rich_dependency(pattern)

    def get_hash(self):
        r"""Return unique ID representing Reldep"""
        return _rpm.Reldep_get_hash(self)

    def __str__(self):
        return _rpm.Reldep___str__(self)

    def __repr__(self):
        return _rpm.Reldep___repr__(self)

    def __hash__(self):
        return _rpm.Reldep___hash__(self)

# Register Reldep in _rpm:
_rpm.Reldep_swigregister(Reldep)
class ReldepListIterator(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _rpm.ReldepListIterator_swiginit(self, _rpm.new_ReldepListIterator(*args))
    __swig_destroy__ = _rpm.delete_ReldepListIterator

    def value(self):
        return _rpm.ReldepListIterator_value(self)

    def next(self):
        return _rpm.ReldepListIterator_next(self)

    def __eq__(self, other):
        return _rpm.ReldepListIterator___eq__(self, other)

    def __ne__(self, other):
        return _rpm.ReldepListIterator___ne__(self, other)

    def begin(self):
        return _rpm.ReldepListIterator_begin(self)

    def end(self):
        return _rpm.ReldepListIterator_end(self)

# Register ReldepListIterator in _rpm:
_rpm.ReldepListIterator_swigregister(ReldepListIterator)
class ReldepList(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _rpm.ReldepList_swiginit(self, _rpm.new_ReldepList(*args))
    __swig_destroy__ = _rpm.delete_ReldepList

    def begin(self):
        return _rpm.ReldepList_begin(self)

    def end(self):
        return _rpm.ReldepList_end(self)

    def __eq__(self, other):
        return _rpm.ReldepList___eq__(self, other)

    def __ne__(self, other):
        return _rpm.ReldepList___ne__(self, other)

    def add(self, *args):
        return _rpm.ReldepList_add(self, *args)

    def add_reldep_with_glob(self, reldep_str):
        r"""
        Adds a reldep from Char*. Only globs in name are processed. The process is slow
        therefore if reldepStr is not a glob please use addReldep() instead.

        :type reldep_str: string
        :param reldep_str: p_reldepStr: Char*
        :rtype: boolean
        :return: bool - false if parsing or reldep creation fails
        """
        return _rpm.ReldepList_add_reldep_with_glob(self, reldep_str)

    def add_reldep(self, reldep_str):
        r"""
        Adds a reldep from Char*. It does not support globs.

        :type reldep_str: string
        :param reldep_str: p_reldepStr: Char*
        :rtype: boolean
        :return: bool false if parsing or reldep creation fails
        """
        return _rpm.ReldepList_add_reldep(self, reldep_str)

    def append(self, source):
        return _rpm.ReldepList_append(self, source)

    def get(self, index):
        return _rpm.ReldepList_get(self, index)

    def get_id(self, index):
        return _rpm.ReldepList_get_id(self, index)

    def size(self):
        return _rpm.ReldepList_size(self)

    def empty(self):
        r"""Return true if container is empty"""
        return _rpm.ReldepList_empty(self)

    def clear(self):
        r"""Remove all RelDeps"""
        return _rpm.ReldepList_clear(self)

    def get_base(self):
        return _rpm.ReldepList_get_base(self)

# Register ReldepList in _rpm:
_rpm.ReldepList_swigregister(ReldepList)
class PackageId(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _rpm.PackageId_swiginit(self, _rpm.new_PackageId(*args))

    def __eq__(self, other):
        return _rpm.PackageId___eq__(self, other)

    def __ne__(self, other):
        return _rpm.PackageId___ne__(self, other)

    def __lt__(self, other):
        return _rpm.PackageId___lt__(self, other)
    id = property(_rpm.PackageId_id_get, _rpm.PackageId_id_set)
    __swig_destroy__ = _rpm.delete_PackageId

# Register PackageId in _rpm:
_rpm.PackageId_swigregister(PackageId)
class Changelog(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    __swig_destroy__ = _rpm.delete_Changelog

    def __init__(self, *args):
        _rpm.Changelog_swiginit(self, _rpm.new_Changelog(*args))

    def get_timestamp(self):
        return _rpm.Changelog_get_timestamp(self)

    def get_author(self):
        return _rpm.Changelog_get_author(self)

    def get_text(self):
        return _rpm.Changelog_get_text(self)

# Register Changelog in _rpm:
_rpm.Changelog_swigregister(Changelog)
class Package(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __swig_destroy__ = _rpm.delete_Package

    def __init__(self, *args):
        _rpm.Package_swiginit(self, _rpm.new_Package(*args))

    def __eq__(self, other):
        return _rpm.Package___eq__(self, other)

    def __ne__(self, other):
        return _rpm.Package___ne__(self, other)

    def __lt__(self, other):
        return _rpm.Package___lt__(self, other)

    def get_id(self):
        return _rpm.Package_get_id(self)

    def get_name(self):
        r"""
        :rtype: string
        :return: RPM package Name (`RPMTAG_NAME`).
        Since: 5.0
        """
        return _rpm.Package_get_name(self)

    def get_epoch(self):
        r"""
        :rtype: string
        :return: RPM package Epoch (`RPMTAG_EPOCH`).
        Since: 5.0
        """
        return _rpm.Package_get_epoch(self)

    def get_version(self):
        r"""
        :rtype: string
        :return: RPM package Version (`RPMTAG_VERSION`).
        Since: 5.0
        """
        return _rpm.Package_get_version(self)

    def get_release(self):
        r"""
        :rtype: string
        :return: RPM package Release (`RPMTAG_RELEASE`).
        Since: 5.0
        """
        return _rpm.Package_get_release(self)

    def get_arch(self):
        r"""
        :rtype: string
        :return: RPM package Arch (`RPMTAG_ARCH`).
        Since: 5.0
        """
        return _rpm.Package_get_arch(self)

    def get_evr(self):
        r"""
        :rtype: string
        :return: RPM package EVR (Epoch:Version-Release). If the Epoch is 0, it is omitted from the output.
        Since: 5.0
        """
        return _rpm.Package_get_evr(self)

    def get_nevra(self):
        r"""
        :rtype: string
        :return: RPM package NEVRA (Name-Epoch:Version-Release.Arch). If the Epoch is 0, it is omitted from the output.
        Since: 5.0
        """
        return _rpm.Package_get_nevra(self)

    def get_full_nevra(self):
        r"""
        :rtype: string
        :return: RPM package NEVRA (Name-Epoch:Version-Release.Arch). The Epoch is always present even if it is 0.
        Since: 5.0
        """
        return _rpm.Package_get_full_nevra(self)

    def get_na(self):
        r"""
        :rtype: string
        :return: RPM package NA (Name.Arch).
        Since: 5.0
        """
        return _rpm.Package_get_na(self)

    def get_group(self):
        r"""
        :rtype: string
        :return: RPM package Group (`RPMTAG_GROUP`).
        Since: 5.0
        """
        return _rpm.Package_get_group(self)

    def get_download_size(self):
        r"""
        :rtype: int
        :return: File size of the RPM package.
        Since: 5.0
        """
        return _rpm.Package_get_download_size(self)

    def get_install_size(self):
        r"""
        :rtype: int
        :return: Size the RPM package should occupy after installing on disk (`RPMTAG_LONGSIZE`).
                    The information is always present - it is retrieved from rpmdb if the package is installed or from repodata if the package is available.
        Since: 5.0
        Notes: The actual size on disk may vary based on block size and filesystem overhead.
              Libdnf doesn't provide any method to compute the actual size on disk.
        """
        return _rpm.Package_get_install_size(self)

    def get_license(self):
        r"""
        :rtype: string
        :return: RPM package License (`RPMTAG_LICENSE`).
        Since: 5.0
        """
        return _rpm.Package_get_license(self)

    def get_source_name(self):
        r"""
        :rtype: string
        :return: RPM package source name.
        Since: 5.0
        """
        return _rpm.Package_get_source_name(self)

    def get_debugsource_name(self):
        r"""
        :rtype: string
        :return: name of the debugsource package for this package
            E.g. krb5-libs -> krb5-debugsource
        Since: 5.0.10
        """
        return _rpm.Package_get_debugsource_name(self)

    def get_debuginfo_name_of_source(self):
        r"""
        :rtype: string
        :return: name of the debuginfo package for source package of this package.
            E.g. krb5-libs -> krb5-debuginfo
        Since: 5.0.10
        """
        return _rpm.Package_get_debuginfo_name_of_source(self)

    def get_debuginfo_name(self):
        r"""
        :rtype: string
        :return: name of the debuginfo package for this package.
            If this package is a debuginfo package, return its name.
            If this package is a debugsource package, returns the debuginfo package for the base package.
            E.g. kernel-PAE -> kernel-PAE-debuginfo
        Since: 5.0.10
        """
        return _rpm.Package_get_debuginfo_name(self)

    def get_sourcerpm(self):
        r"""
        :rtype: string
        :return: RPM package source package filename (`RPMTAG_SOURCERPM`).
        Since: 5.0
        """
        return _rpm.Package_get_sourcerpm(self)

    def get_build_time(self):
        r"""
        :rtype: int
        :return: RPM package build timestamp (`RPMTAG_BUILDTIME`).
        Since: 5.0
        """
        return _rpm.Package_get_build_time(self)

    def get_packager(self):
        r"""
        :rtype: string
        :return: RPM package Packager (`RPMTAG_PACKAGER`).
        Since: 5.0
        """
        return _rpm.Package_get_packager(self)

    def get_vendor(self):
        r"""
        :rtype: string
        :return: RPM package Vendor (`RPMTAG_VENDOR`).
        Since: 5.0
        """
        return _rpm.Package_get_vendor(self)

    def get_url(self):
        r"""
        :rtype: string
        :return: RPM package URL (project home address) (`RPMTAG_URL`).
        Since: 5.0
        """
        return _rpm.Package_get_url(self)

    def get_summary(self):
        r"""
        :rtype: string
        :return: RPM package Summary (`RPMTAG_SUMMARY`).
        Since: 5.0
        """
        return _rpm.Package_get_summary(self)

    def get_description(self):
        r"""
        :rtype: string
        :return: RPM package Description (`RPMTAG_DESCRIPTION`).
        Since: 5.0
        """
        return _rpm.Package_get_description(self)

    def get_provides(self):
        r"""
        :rtype: :py:class:`ReldepList`
        :return: List of RPM package Provides (`RPMTAG_PROVIDENAME`, `RPMTAG_PROVIDEFLAGS`, `RPMTAG_PROVIDEVERSION`).
        Since: 5.0
        """
        return _rpm.Package_get_provides(self)

    def get_requires(self):
        r"""
        :rtype: :py:class:`ReldepList`
        :return: List of RPM package Requires (`RPMTAG_REQUIRENAME`, `RPMTAG_REQUIREFLAGS`, `RPMTAG_REQUIREVERSION`).
        Since: 5.0
        """
        return _rpm.Package_get_requires(self)

    def get_requires_pre(self):
        r"""
        :rtype: :py:class:`ReldepList`
        :return: List of RPM package Requires(pre).
        Since: 5.0
        """
        return _rpm.Package_get_requires_pre(self)

    def get_conflicts(self):
        r"""
        :rtype: :py:class:`ReldepList`
        :return: List of RPM package Conflicts (`RPMTAG_CONFLICTNAME`, `RPMTAG_CONFLICTFLAGS`, `RPMTAG_CONFLICTVERSION`).
        Since: 5.0
        """
        return _rpm.Package_get_conflicts(self)

    def get_obsoletes(self):
        r"""
        :rtype: :py:class:`ReldepList`
        :return: List of RPM package Obsoletes (`RPMTAG_OBSOLETENAME`, `RPMTAG_OBSOLETEFLAGS`, `RPMTAG_OBSOLETEVERSION`).
        Since: 5.0
        """
        return _rpm.Package_get_obsoletes(self)

    def get_prereq_ignoreinst(self):
        return _rpm.Package_get_prereq_ignoreinst(self)

    def get_regular_requires(self):
        return _rpm.Package_get_regular_requires(self)

    def get_recommends(self):
        r"""
        :rtype: :py:class:`ReldepList`
        :return: List of RPM package Recommends (`RPMTAG_RECOMMENDNAME`, `RPMTAG_RECOMMENDFLAGS`, `RPMTAG_RECOMMENDVERSION`).
        Since: 5.0
        """
        return _rpm.Package_get_recommends(self)

    def get_suggests(self):
        r"""
        :rtype: :py:class:`ReldepList`
        :return: List of RPM package Suggests (`RPMTAG_SUGGESTNAME`, `RPMTAG_SUGGESTFLAGS`, `RPMTAG_SUGGESTVERSION`).
        Since: 5.0
        """
        return _rpm.Package_get_suggests(self)

    def get_enhances(self):
        r"""
        :rtype: :py:class:`ReldepList`
        :return: List of RPM package Enhances (`RPMTAG_ENHANCENAME`, `RPMTAG_ENHANCEFLAGS`, `RPMTAG_ENHANCEVERSION`).
        Since: 5.0
        """
        return _rpm.Package_get_enhances(self)

    def get_supplements(self):
        r"""
        :rtype: :py:class:`ReldepList`
        :return: List of RPM package Supplements (`RPMTAG_SUPPLEMENTNAME`, `RPMTAG_SUPPLEMENTFLAGS`, `RPMTAG_SUPPLEMENTVERSION`).
        Since: 5.0
        """
        return _rpm.Package_get_supplements(self)

    def get_depends(self):
        r"""
        :rtype: :py:class:`ReldepList`
        :return: List of RPM package dependencies (requires + enhances + suggests + supplements + recommends).
        Since: 5.0.10
        """
        return _rpm.Package_get_depends(self)

    def get_files(self):
        r"""
        :rtype: std::vector< std::string,std::allocator< std::string > >
        :return: List of files and directories the RPM package contains (`RPMTAG_FILENAMES`).
                    If file lists are not loaded, empty list is returned.
        Since: 5.0
        Notes: Information whether the returned files are actual files, directories or ghosted files is not available.
        """
        return _rpm.Package_get_files(self)

    def get_changelogs(self):
        r"""
        :rtype: std::vector< libdnf5::rpm::Changelog,std::allocator< libdnf5::rpm::Changelog > >
        :return: List of package changelog entries. If `other` repository metadata are
        Since: 5.0
        """
        return _rpm.Package_get_changelogs(self)

    def get_baseurl(self):
        r"""
        :rtype: string
        :return: RPM package baseurl from repodata (`<location xml:base="...">`).
        Since: 5.0
        """
        return _rpm.Package_get_baseurl(self)

    def get_location(self):
        r"""
        :rtype: string
        :return: RPM package relative path/location from repodata (`<location href="...">`).
        Since: 5.0
        """
        return _rpm.Package_get_location(self)

    def get_remote_locations(self, *args):
        r"""
        :rtype: std::vector< std::string,std::allocator< std::string > >
        :return: RPM package remote location where the package can be download from.
            Returns empty vector for installed and commandline packages.
        Since: 5.1
        """
        return _rpm.Package_get_remote_locations(self, *args)

    def get_checksum(self):
        r"""
        :rtype: :py:class:`Checksum`
        :return: Checksum object representing RPM package checksum and its type (`<checksum type="type">checksum<checksum>`).
        Since: 5.0
        """
        return _rpm.Package_get_checksum(self)

    def get_hdr_checksum(self):
        r"""
        :rtype: :py:class:`Checksum`
        :return: Checksum object representing RPM package header checksum and its type.
        Since: 5.0
        """
        return _rpm.Package_get_hdr_checksum(self)

    def get_hdr_end(self):
        r"""
        :rtype: int
        :return: RPM package header end (the header is located between file position 0 and the returned offset).
        Since: 5.0
        """
        return _rpm.Package_get_hdr_end(self)

    def get_media_number(self):
        r"""
        :rtype: int
        :return: Number of media (usually a CD/DVD disc) on which the package is located.
        Since: 5.0
        """
        return _rpm.Package_get_media_number(self)

    def get_package_path(self):
        r"""
        :rtype: string
        :return: Path to the RPM package on the local file system:
           If the package is a local package, return its path
           If the package is a remote package downloaded to cache, return path to the cache
           If the package is a remote package that hasn't been downloaded yet, return path to the cache
        Since: 5.0
        """
        return _rpm.Package_get_package_path(self)

    def is_available_locally(self):
        r"""
        :rtype: boolean
        :return: `true` if the package is available locally, `false` otherwise.
        Since: 5.0.8
        """
        return _rpm.Package_is_available_locally(self)

    def is_installed(self):
        r"""
        :rtype: boolean
        :return: `true` if the package is installed on the system, `false` otherwise.
        Since: 5.0
        """
        return _rpm.Package_is_installed(self)

    def is_excluded(self):
        r"""
        :rtype: boolean
        :return: `true` if the package is excluded, `false` otherwise.
        Since: 5.0
        """
        return _rpm.Package_is_excluded(self)

    def get_from_repo_id(self):
        r"""
        TODO is_local
        For an installed package, return id of repo from the package was installed.
        For an available package, return an empty string.
        """
        return _rpm.Package_get_from_repo_id(self)

    def get_install_time(self):
        r"""
        :rtype: int
        :return: The unix timestamp (seconds since epoch) of when the package was installed.
                    Return 0 if the package is not installed.
        """
        return _rpm.Package_get_install_time(self)

    def get_rpmdbid(self):
        r"""
        :rtype: int
        :return: The rpmdb database id (primary key) of the installed RPM package.
        Since: 5.0
        """
        return _rpm.Package_get_rpmdbid(self)

    def get_repo(self):
        r"""
        :rtype: :py:class:`RepoWeakPtr`
        :return: A `Repo` object that represents the repository the package belongs to.
        Since: 5.0
        Notes: This isn't the repository the package was installed from.
        """
        return _rpm.Package_get_repo(self)

    def get_repo_id(self):
        r"""
        :rtype: string
        :return: Id of the repository the package belongs to.
        Since: 5.0
        Notes: This isn't the repository the package was installed from.
        """
        return _rpm.Package_get_repo_id(self)

    def get_repo_name(self):
        r"""
        :rtype: string
        :return: Name of the repository the package belongs to.
        Since: 5.0.10
        Notes: This isn't the repository the package was installed from.
        """
        return _rpm.Package_get_repo_name(self)

    def get_reason(self):
        r"""
        :rtype: int
        :return: Resolved reason why a package was installed.
                    A package can be installed due to multiple reasons, only the most significant is returned.
        Since: 5.0
        """
        return _rpm.Package_get_reason(self)

    def get_base(self):
        r"""
        :rtype: libdnf5::BaseWeakPtr
        :return: The `Base` object to which this object belongs.
        Since: 5.0.5
        """
        return _rpm.Package_get_base(self)

    def to_string(self):
        r"""Return NEVRA -> 0 epoch is not shown in string"""
        return _rpm.Package_to_string(self)

    def to_string_description(self):
        r"""Provide descriptive information about instance including NEVRA and ID"""
        return _rpm.Package_to_string_description(self)

    def get_hash(self):
        r"""Return unique ID representing Package"""
        return _rpm.Package_get_hash(self)

    def __str__(self):
        return _rpm.Package___str__(self)

    def __repr__(self):
        return _rpm.Package___repr__(self)

    def __hash__(self):
        return _rpm.Package___hash__(self)

# Register Package in _rpm:
_rpm.Package_swigregister(Package)
class VectorPackage(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _rpm.VectorPackage_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rpm.VectorPackage___nonzero__(self)

    def __bool__(self):
        return _rpm.VectorPackage___bool__(self)

    def __len__(self):
        return _rpm.VectorPackage___len__(self)

    def __getslice__(self, i, j):
        return _rpm.VectorPackage___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rpm.VectorPackage___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rpm.VectorPackage___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rpm.VectorPackage___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rpm.VectorPackage___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rpm.VectorPackage___setitem__(self, *args)

    def pop(self):
        return _rpm.VectorPackage_pop(self)

    def append(self, x):
        return _rpm.VectorPackage_append(self, x)

    def empty(self):
        return _rpm.VectorPackage_empty(self)

    def size(self):
        return _rpm.VectorPackage_size(self)

    def swap(self, v):
        return _rpm.VectorPackage_swap(self, v)

    def begin(self):
        return _rpm.VectorPackage_begin(self)

    def end(self):
        return _rpm.VectorPackage_end(self)

    def rbegin(self):
        return _rpm.VectorPackage_rbegin(self)

    def rend(self):
        return _rpm.VectorPackage_rend(self)

    def clear(self):
        return _rpm.VectorPackage_clear(self)

    def get_allocator(self):
        return _rpm.VectorPackage_get_allocator(self)

    def pop_back(self):
        return _rpm.VectorPackage_pop_back(self)

    def erase(self, *args):
        return _rpm.VectorPackage_erase(self, *args)

    def __init__(self, *args):
        _rpm.VectorPackage_swiginit(self, _rpm.new_VectorPackage(*args))

    def push_back(self, x):
        return _rpm.VectorPackage_push_back(self, x)

    def front(self):
        return _rpm.VectorPackage_front(self)

    def back(self):
        return _rpm.VectorPackage_back(self)

    def assign(self, n, x):
        return _rpm.VectorPackage_assign(self, n, x)

    def insert(self, *args):
        return _rpm.VectorPackage_insert(self, *args)

    def reserve(self, n):
        return _rpm.VectorPackage_reserve(self, n)

    def capacity(self):
        return _rpm.VectorPackage_capacity(self)
    __swig_destroy__ = _rpm.delete_VectorPackage

# Register VectorPackage in _rpm:
_rpm.VectorPackage_swigregister(VectorPackage)
class VectorVectorPackage(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _rpm.VectorVectorPackage_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rpm.VectorVectorPackage___nonzero__(self)

    def __bool__(self):
        return _rpm.VectorVectorPackage___bool__(self)

    def __len__(self):
        return _rpm.VectorVectorPackage___len__(self)

    def __getslice__(self, i, j):
        return _rpm.VectorVectorPackage___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rpm.VectorVectorPackage___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rpm.VectorVectorPackage___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rpm.VectorVectorPackage___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rpm.VectorVectorPackage___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rpm.VectorVectorPackage___setitem__(self, *args)

    def pop(self):
        return _rpm.VectorVectorPackage_pop(self)

    def append(self, x):
        return _rpm.VectorVectorPackage_append(self, x)

    def empty(self):
        return _rpm.VectorVectorPackage_empty(self)

    def size(self):
        return _rpm.VectorVectorPackage_size(self)

    def swap(self, v):
        return _rpm.VectorVectorPackage_swap(self, v)

    def begin(self):
        return _rpm.VectorVectorPackage_begin(self)

    def end(self):
        return _rpm.VectorVectorPackage_end(self)

    def rbegin(self):
        return _rpm.VectorVectorPackage_rbegin(self)

    def rend(self):
        return _rpm.VectorVectorPackage_rend(self)

    def clear(self):
        return _rpm.VectorVectorPackage_clear(self)

    def get_allocator(self):
        return _rpm.VectorVectorPackage_get_allocator(self)

    def pop_back(self):
        return _rpm.VectorVectorPackage_pop_back(self)

    def erase(self, *args):
        return _rpm.VectorVectorPackage_erase(self, *args)

    def __init__(self, *args):
        _rpm.VectorVectorPackage_swiginit(self, _rpm.new_VectorVectorPackage(*args))

    def push_back(self, x):
        return _rpm.VectorVectorPackage_push_back(self, x)

    def front(self):
        return _rpm.VectorVectorPackage_front(self)

    def back(self):
        return _rpm.VectorVectorPackage_back(self)

    def assign(self, n, x):
        return _rpm.VectorVectorPackage_assign(self, n, x)

    def insert(self, *args):
        return _rpm.VectorVectorPackage_insert(self, *args)

    def reserve(self, n):
        return _rpm.VectorVectorPackage_reserve(self, n)

    def capacity(self):
        return _rpm.VectorVectorPackage_capacity(self)
    __swig_destroy__ = _rpm.delete_VectorVectorPackage

# Register VectorVectorPackage in _rpm:
_rpm.VectorVectorPackage_swigregister(VectorVectorPackage)
class VectorChangelog(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _rpm.VectorChangelog_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rpm.VectorChangelog___nonzero__(self)

    def __bool__(self):
        return _rpm.VectorChangelog___bool__(self)

    def __len__(self):
        return _rpm.VectorChangelog___len__(self)

    def __getslice__(self, i, j):
        return _rpm.VectorChangelog___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rpm.VectorChangelog___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rpm.VectorChangelog___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rpm.VectorChangelog___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rpm.VectorChangelog___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rpm.VectorChangelog___setitem__(self, *args)

    def pop(self):
        return _rpm.VectorChangelog_pop(self)

    def append(self, x):
        return _rpm.VectorChangelog_append(self, x)

    def empty(self):
        return _rpm.VectorChangelog_empty(self)

    def size(self):
        return _rpm.VectorChangelog_size(self)

    def swap(self, v):
        return _rpm.VectorChangelog_swap(self, v)

    def begin(self):
        return _rpm.VectorChangelog_begin(self)

    def end(self):
        return _rpm.VectorChangelog_end(self)

    def rbegin(self):
        return _rpm.VectorChangelog_rbegin(self)

    def rend(self):
        return _rpm.VectorChangelog_rend(self)

    def clear(self):
        return _rpm.VectorChangelog_clear(self)

    def get_allocator(self):
        return _rpm.VectorChangelog_get_allocator(self)

    def pop_back(self):
        return _rpm.VectorChangelog_pop_back(self)

    def erase(self, *args):
        return _rpm.VectorChangelog_erase(self, *args)

    def __init__(self, *args):
        _rpm.VectorChangelog_swiginit(self, _rpm.new_VectorChangelog(*args))

    def push_back(self, x):
        return _rpm.VectorChangelog_push_back(self, x)

    def front(self):
        return _rpm.VectorChangelog_front(self)

    def back(self):
        return _rpm.VectorChangelog_back(self)

    def assign(self, n, x):
        return _rpm.VectorChangelog_assign(self, n, x)

    def insert(self, *args):
        return _rpm.VectorChangelog_insert(self, *args)

    def reserve(self, n):
        return _rpm.VectorChangelog_reserve(self, n)

    def capacity(self):
        return _rpm.VectorChangelog_capacity(self)
    __swig_destroy__ = _rpm.delete_VectorChangelog

# Register VectorChangelog in _rpm:
_rpm.VectorChangelog_swigregister(VectorChangelog)
class PackageSetIterator(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, other):
        _rpm.PackageSetIterator_swiginit(self, _rpm.new_PackageSetIterator(other))
    __swig_destroy__ = _rpm.delete_PackageSetIterator

    def value(self):
        return _rpm.PackageSetIterator_value(self)

    def next(self):
        return _rpm.PackageSetIterator_next(self)

    def __eq__(self, other):
        return _rpm.PackageSetIterator___eq__(self, other)

    def __ne__(self, other):
        return _rpm.PackageSetIterator___ne__(self, other)

    def begin(self, *args):
        return _rpm.PackageSetIterator_begin(self, *args)

    def end(self, *args):
        return _rpm.PackageSetIterator_end(self, *args)

# Register PackageSetIterator in _rpm:
_rpm.PackageSetIterator_swigregister(PackageSetIterator)
class PackageSet(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _rpm.PackageSet_swiginit(self, _rpm.new_PackageSet(*args))
    __swig_destroy__ = _rpm.delete_PackageSet

    def begin(self):
        return _rpm.PackageSet_begin(self)

    def end(self):
        return _rpm.PackageSet_end(self)

    def __ior__(self, other):
        return _rpm.PackageSet___ior__(self, other)

    def __isub__(self, other):
        return _rpm.PackageSet___isub__(self, other)

    def __iand__(self, other):
        return _rpm.PackageSet___iand__(self, other)

    def update(self, other):
        r"""
        Set union: elements that are in the current set or in the `other` set.

        :type other: :py:class:`PackageSet`
        :param other: The set to unify with.
        :raises: UsedDifferentSack When the sets entering the operation do not share the same PackageSack.
        Since: 5.0
        """
        return _rpm.PackageSet_update(self, other)

    def intersection(self, other):
        r"""
        Set intersection: elements in the current set that are also in the `other` set.

        :type other: :py:class:`PackageSet`
        :param other: The set to intersect with.
        :raises: UsedDifferentSack When the sets entering the operation do not share the same PackageSack.
        Since: 5.0
        """
        return _rpm.PackageSet_intersection(self, other)

    def difference(self, other):
        r"""
        Set difference: elements in the current set that are not in the `other` set.

        :type other: :py:class:`PackageSet`
        :param other: The set to check for differences in.
        :raises: UsedDifferentSack When the sets entering the operation do not share the same PackageSack.
        Since: 5.0
        """
        return _rpm.PackageSet_difference(self, other)

    def clear(self):
        r"""
        Remove all packages from the set.

        Since: 5.0
        """
        return _rpm.PackageSet_clear(self)

    def empty(self):
        r"""
        :rtype: boolean
        :return: `true` if the set is empty, `false` otherwise.
        Since: 5.0
        """
        return _rpm.PackageSet_empty(self)

    def add(self, pkg):
        r"""
        Add `pkg` to the set.

        :type pkg: :py:class:`Package`
        :param pkg: Package to be added to the set.
        Since: 5.0
        """
        return _rpm.PackageSet_add(self, pkg)

    def contains(self, pkg):
        r"""
        :rtype: boolean
        :return: `true` if a package is in the set, `false` otherwise.
        :type pkg: :py:class:`Package`
        :param pkg: Package that is tested for presence.
        Since: 5.0
        """
        return _rpm.PackageSet_contains(self, pkg)

    def remove(self, pkg):
        r"""
        Remove `pkg` from the set.

        :type pkg: :py:class:`Package`
        :param pkg: Package to be removed from the set.
        Since: 5.0
        """
        return _rpm.PackageSet_remove(self, pkg)

    def get_base(self):
        return _rpm.PackageSet_get_base(self)

    def size(self):
        r"""
        :rtype: int
        :return: Number of elements in the set.
        """
        return _rpm.PackageSet_size(self)

    def swap(self, other):
        return _rpm.PackageSet_swap(self, other)

# Register PackageSet in _rpm:
_rpm.PackageSet_swigregister(PackageSet)
class PackageQuery(PackageSet):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""
        *Overload 1:*
        Construct a new PackageQuery based on given PackageSet. This is a shortcut to creating
        an empty PackageQuery and then updating it with the content of pkgset.
        :type pkgset: :py:class:`PackageSet`
        :param pkgset:  A packageset that the new query will contain
        :type flags: libdnf5::rpm::PackageQuery::ExcludeFlags, optional
        :param flags:   Which excludes the query respects

        |

        *Overload 2:*
        Construct a new PackageQuery based on given PackageSet. This is a shortcut to creating
        an empty PackageQuery and then updating it with the content of pkgset.
        :type pkgset: :py:class:`PackageSet`
        :param pkgset:  A packageset that the new query will contain
        :param flags:   Which excludes the query respects
        """
        _rpm.PackageQuery_swiginit(self, _rpm.new_PackageQuery(*args))
    __swig_destroy__ = _rpm.delete_PackageQuery

    def filter_name(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `name`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0

        |

        *Overload 2:*
        Filter packages by their `name`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `name`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0

        |

        *Overload 4:*
        Filter packages by their `name` based on names of the packages in the `package_set`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 5:*
        Filter packages by their `name` based on names of the packages in the `package_set`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_name(self, *args)

    def filter_epoch(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `epoch`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by their `epoch`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `epoch`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 4:*
        Filter packages by their `epoch`.

        :type pattern: int
        :param pattern:          A number the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`.
        Since: 5.2

        |

        *Overload 5:*
        Filter packages by their `epoch`.

        :type pattern: int
        :param pattern:          A number the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`.
        Since: 5.2

        |

        *Overload 6:*
        Filter packages by their `epoch`.

        :type patterns: std::vector< unsigned long,std::allocator< unsigned long > >
        :param patterns:         A vector of numbers the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`.
        Since: 5.0

        |

        *Overload 7:*
        Filter packages by their `epoch`.

        :type patterns: std::vector< unsigned long,std::allocator< unsigned long > >
        :param patterns:         A vector of numbers the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_epoch(self, *args)

    def filter_version(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `version`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by their `version`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `version`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`, `GLOB`, `NOT_GLOB`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_version(self, *args)

    def filter_release(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `release`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by their `release`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `release`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`, `GLOB`, `NOT_GLOB`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_release(self, *args)

    def filter_arch(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `arch`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by their `arch`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `arch`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_arch(self, *args)

    def filter_name_arch(self, *args):
        r"""
        Filter packages by their `name` and `arch` based on names and arches of the packages in the `package_set`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_name_arch(self, *args)

    def filter_evr(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `epoch:version-release`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `GT`, `LT`, `GTE`, `LTE`, `EQ`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by their `epoch:version-release`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `GT`, `LT`, `GTE`, `LTE`, `NEQ`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `epoch:version-release`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `GT`, `LT`, `GTE`, `LTE`, `NEQ`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_evr(self, *args)

    def filter_nevra(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `name-[epoch:]version-release.arch`. The following matches are tolerant to omitted 0 epoch: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`, `GLOB`, `NOT_GLOB`, `IGLOB`, `NOT_IGLOB`, `IEXACT`, `NOT_IEXACT`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by their `name-[epoch:]version-release.arch`. The following matches are tolerant to omitted 0 epoch: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`, `GLOB`, `NOT_GLOB`, `IGLOB`, `NOT_IGLOB`, `IEXACT`, `NOT_IEXACT`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `name-[epoch:]version-release.arch`. The following matches are tolerant to omitted 0 epoch: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`, `GLOB`, `NOT_GLOB`, `IGLOB`, `NOT_IGLOB`, `IEXACT`, `NOT_IEXACT`.
        Since: 5.0

        |

        *Overload 4:*
        Filter packages by the `name`, `epoch`, `version`, `release` and `arch` attributes from the `nevra` object.
        Only the attributes that are not blank are used in the filter.

        :type nevra: :py:class:`Nevra`
        :param nevra:            A Nevra object the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `IGLOB`, `NOT_IGLOB`.
        Since: 5.0

        |

        *Overload 5:*
        Filter packages by the `name`, `epoch`, `version`, `release` and `arch` attributes from the `nevra` object.
        Only the attributes that are not blank are used in the filter.

        :type nevra: :py:class:`Nevra`
        :param nevra:            A Nevra object the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `IGLOB`, `NOT_IGLOB`.
        Since: 5.0

        |

        *Overload 6:*
        Filter packages by their `name-[epoch:]version-release.arch` attributes of
        the packages in the `package_set`.
        Only packages whose name.arch is present in the `package_set` are taken into
        account. Their epoch:version-release are then compared according to the
        value of `cmp_type` with those in `package_set`.
        Only the matching packages are kept in the query. In case `NOT` is used in
        `cmp_type`, the matching packages are removed from the query.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`,
                                    and their combinations with `NOT`.
        Since: 5.0

        |

        *Overload 7:*
        Filter packages by their `name-[epoch:]version-release.arch` attributes of
        the packages in the `package_set`.
        Only packages whose name.arch is present in the `package_set` are taken into
        account. Their epoch:version-release are then compared according to the
        value of `cmp_type` with those in `package_set`.
        Only the matching packages are kept in the query. In case `NOT` is used in
        `cmp_type`, the matching packages are removed from the query.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`,
                                    and their combinations with `NOT`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_nevra(self, *args)

    def filter_sourcerpm(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `sourcerpm`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.

        |

        *Overload 2:*
        Filter packages by their `sourcerpm`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.

        |

        *Overload 3:*
        Filter packages by their `sourcerpm`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        """
        return _rpm.PackageQuery_filter_sourcerpm(self, *args)

    def filter_url(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `url`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by their `url`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `url`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_url(self, *args)

    def filter_summary(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `summary`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by their `summary`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `summary`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_summary(self, *args)

    def filter_description(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `description`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by their `description`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `description`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_description(self, *args)

    def filter_provides(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `provides`.

        :type reldep_list: :py:class:`ReldepList`
        :param reldep_list:      ReldepList with RelDep objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 2:*
        Filter packages by their `provides`.

        :type reldep: :py:class:`Reldep`
        :param reldep:           RelDep object the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `provides`.

        :type reldep: :py:class:`Reldep`
        :param reldep:           RelDep object the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 4:*
        Filter packages by their `provides`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 5:*
        Filter packages by their `provides`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 6:*
        Filter packages by their `provides`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 7:*
        Filter packages by their `provides`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_provides(self, *args)

    def filter_requires(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `requires`.

        :type reldep_list: :py:class:`ReldepList`
        :param reldep_list:      ReldepList with RelDep objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 2:*
        Filter packages by their `requires`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 3:*
        Filter packages by their `requires`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 4:*
        Filter packages by their `requires`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 5:*
        Filter packages by their `requires`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 6:*
        Filter packages by their `requires`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 7:*
        Filter packages by their `requires`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_requires(self, *args)

    def filter_conflicts(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `conflicts`.

        :type reldep_list: :py:class:`ReldepList`
        :param reldep_list:      ReldepList with RelDep objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 2:*
        Filter packages by their `conflicts`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 3:*
        Filter packages by their `conflicts`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 4:*
        Filter packages by their `conflicts`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 5:*
        Filter packages by their `conflicts`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 6:*
        Filter packages by their `conflicts`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 7:*
        Filter packages by their `conflicts`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_conflicts(self, *args)

    def filter_obsoletes(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `obsoletes`.

        :type reldep_list: :py:class:`ReldepList`
        :param reldep_list:      ReldepList with RelDep objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 2:*
        Filter packages by their `obsoletes`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 3:*
        Filter packages by their `obsoletes`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 4:*
        Filter packages by their `obsoletes`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 5:*
        Filter packages by their `obsoletes`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 6:*
        Filter packages by their `obsoletes`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 7:*
        Filter packages by their `obsoletes`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_obsoletes(self, *args)

    def filter_recommends(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `recommends`.

        :type reldep_list: :py:class:`ReldepList`
        :param reldep_list:      ReldepList with RelDep objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 2:*
        Filter packages by their `recommends`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 3:*
        Filter packages by their `recommends`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 4:*
        Filter packages by their `recommends`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 5:*
        Filter packages by their `recommends`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 6:*
        Filter packages by their `recommends`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 7:*
        Filter packages by their `recommends`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_recommends(self, *args)

    def filter_suggests(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `suggests`.

        :type reldep_list: :py:class:`ReldepList`
        :param reldep_list:      ReldepList with RelDep objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 2:*
        Filter packages by their `suggests`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 3:*
        Filter packages by their `suggests`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 4:*
        Filter packages by their `suggests`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 5:*
        Filter packages by their `suggests`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 6:*
        Filter packages by their `suggests`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 7:*
        Filter packages by their `suggests`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_suggests(self, *args)

    def filter_enhances(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `enhances`.

        :type reldep_list: :py:class:`ReldepList`
        :param reldep_list:      ReldepList with RelDep objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 2:*
        Filter packages by their `enhances`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 3:*
        Filter packages by their `enhances`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 4:*
        Filter packages by their `enhances`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 5:*
        Filter packages by their `enhances`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 6:*
        Filter packages by their `enhances`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 7:*
        Filter packages by their `enhances`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_enhances(self, *args)

    def filter_supplements(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `supplements`.

        :type reldep_list: :py:class:`ReldepList`
        :param reldep_list:      ReldepList with RelDep objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 2:*
        Filter packages by their `supplements`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 3:*
        Filter packages by their `supplements`.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 4:*
        Filter packages by their `supplements`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 5:*
        Filter packages by their `supplements`.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 6:*
        Filter packages by their `supplements`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 7:*
        Filter packages by their `supplements`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      PackageSet with Package objects the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_supplements(self, *args)

    def filter_file(self, *args):
        r"""
        *Overload 1:*
        Filter packages by `files` they contain.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by `files` they contain.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by `files` they contain.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`, `IEXACT`, `NOT_IEXACT`, `ICONTAINS`, `NOT_ICONTAINS`, `IGLOB`, `NOT_IGLOB`, `CONTAINS`, `NOT_CONTAINS`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_file(self, *args)

    def filter_location(self, *args):
        r"""
        *Overload 1:*
        Filter packages by their `location`.
        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by their `location`.
        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by their `location`.
        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_location(self, *args)

    def filter_repo_id(self, *args):
        r"""
        *Overload 1:*
        Filter packages by `id` of the Repo they belong to.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2

        |

        *Overload 2:*
        Filter packages by `id` of the Repo they belong to.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0

        |

        *Overload 3:*
        Filter packages by `id` of the Repo they belong to.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_repo_id(self, *args)

    def filter_from_repo_id(self, *args):
        r"""
        *Overload 1:*
        Filters packages by the `id` of the repository they were installed from.
        This also removes any packages from the query that are not currently installed.

        :type pattern: string
        :param pattern:          A string the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2.14

        |

        *Overload 2:*
        Filters packages by the `id` of the repository they were installed from.
        This also removes any packages from the query that are not currently installed.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2.14

        |

        *Overload 3:*
        Filters packages by the `id` of the repository they were installed from.
        This also removes any packages from the query that are not currently installed.

        :type patterns: std::vector< std::string,std::allocator< std::string > >
        :param patterns:         A vector of strings the filter is matched against.
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GLOB`, `NOT_GLOB`.
        Since: 5.2.14
        """
        return _rpm.PackageQuery_filter_from_repo_id(self, *args)

    def filter_advisories(self, *args):
        r"""
        Filter packages by advisories they are included in.

        :type advisory_query: libdnf5::advisory::AdvisoryQuery
        :param advisory_query:   AdvisoryQuery with Advisories that contain package lists the filter is matched against.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_advisories(self, *args)

    def filter_latest_unresolved_advisories(self, *args):
        r"""
        Filter packages by the advisories they are included in, considering
        only the latest advisories that are not resolved in the currently
        installed package set.

        :type advisory_query: libdnf5::advisory::AdvisoryQuery
        :param advisory_query:   AdvisoryQuery with Advisories that contain package lists the filter is matched against.
        :type installed: :py:class:`PackageQuery`
        :param installed:        PackageQuery with currently installed packages.
        :type cmp_type: int, optional
        :param cmp_type:         A comparison (match) operator, defaults to `QueryCmp::EQ`.
                                    Supported values: `EQ`, `NEQ`, `GT`, `GTE`, `LT`, `LTE`.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_latest_unresolved_advisories(self, *args)

    def filter_installed(self):
        r"""
        Filter installed packages.

        Removes from the query all packages that are not installed.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_installed(self)

    def filter_available(self):
        r"""
        Filter available packages.

        Removes from the query all packages that are installed.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_available(self)

    def filter_upgrades(self):
        r"""
        Filter available packages that are upgrades to installed packages.

        Removes from the query all packages that are not upgrades to installed packages.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_upgrades(self)

    def filter_downgrades(self):
        r"""
        Filter available packages that are downgrades to installed packages.

        Removes from the query all packages that are not downgrades to installed packages.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_downgrades(self)

    def filter_upgradable(self):
        r"""
        Filter installed packages for which there are available upgrades.

        Only installed packages remain in the query, and only those for which upgrades are available.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_upgradable(self)

    def filter_downgradable(self):
        r"""
        Filter installed packages for which there are available downgrades.

        Only installed packages remain in the query, and only those for which downgrades are available.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_downgradable(self)

    def filter_latest_evr(self, limit=1):
        r"""
        Group packages by `name` and `arch`. Then within each group, keep packages that correspond with up to `limit` of (all but) latest `evr`s in the group.

        :type limit: int, optional
        :param limit:            If `limit` > 0, keep `limit` number `evr`s in each group.
                                    If `limit` < 0, keep all **but** `limit` last `evr`s in each group.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_latest_evr(self, limit)

    def filter_latest_evr_any_arch(self, limit=1):
        r"""
        Group packages by `name`. Then within each group, keep packages that correspond with up to `limit` of (all but) latest `evr`s in the group.

        :type limit: int, optional
        :param limit:            If `limit` > 0, keep `limit` number `evr`s in each group.
                                    If `limit` < 0, keep all **but** `limit` last `evr`s in each group.
        Since: 5.2
        """
        return _rpm.PackageQuery_filter_latest_evr_any_arch(self, limit)

    def filter_earliest_evr(self, limit=1):
        r"""
        Group packages by `name` and `arch`. Then within each group, keep packages that correspond with up to `limit` of (all but) earliest `evr`s in the group.

        :type limit: int, optional
        :param limit:            If `limit` > 0, keep `limit` number `evr`s in each group.
                                    If `limit` < 0, keep all **but** `limit` last `evr`s in each group.
        Since: 5.0
        """
        return _rpm.PackageQuery_filter_earliest_evr(self, limit)

    def filter_earliest_evr_any_arch(self, limit=1):
        r"""
        Group packages by `name`. Then within each group, keep packages that correspond with up to `limit` of (all but) earliest `evr`s in the group.

        :type limit: int, optional
        :param limit:            If `limit` > 0, keep `limit` number `evr`s in each group.
                                    If `limit` < 0, keep all **but** `limit` last `evr`s in each group.
        Since: 5.2
        """
        return _rpm.PackageQuery_filter_earliest_evr_any_arch(self, limit)

    def filter_priority(self):
        r"""
        Group packages by `name` and `arch`. Then within each group, keep packages that belong to a repo with the highest priority (the lowest number).
        The filter works only on available packages, installed packages are not affected.

        Since: 5.0
        """
        return _rpm.PackageQuery_filter_priority(self)

    def filter_extras(self, exact_evr=False):
        r"""
        Keep in the query only packages that are installed but not available in any
        enabled repository. Even excluded packages (e.g. using excludepkgs config
        option) are considered as available in repositories for the purpose of extras
        calculation.
        Those installed packages that are only part of non-active modules are also
        considered as extras.
        :type exact_evr: boolean, optional
        :param exact_evr: If false (default) extras calculation is based only on
                             `name.arch`. That means package is not in extras if any version
                             of the package exists in any of the enabled repositories.
                             If true, filter_extras is more strict and returns each package
                             which exact NEVRA is not present in any enabled repository.
        """
        return _rpm.PackageQuery_filter_extras(self, exact_evr)

    def filter_recent(self, timestamp):
        r"""
        Keep in the query only recent packages - those with build time after given timestamp
        :type timestamp: int
        :param timestamp: Only packages built after this will pass
        """
        return _rpm.PackageQuery_filter_recent(self, timestamp)

    def filter_userinstalled(self):
        r"""Keep in the query only installed packages that are user-installed."""
        return _rpm.PackageQuery_filter_userinstalled(self)

    def filter_unneeded(self):
        r"""
        Filter unneeded packages. Unneeded packages are those which are installed as
        dependencies and are not required by any user-installed package any more.
        """
        return _rpm.PackageQuery_filter_unneeded(self)

    def resolve_pkg_spec(self, pkg_spec, settings, with_src):
        r"""
        Resolve spec according to provided settings. It tests whether spec is NEVRA type, provide, file or binary.
        It returns only the first match type. If spec has a match as NEVRA and provide type it only keeps matches with
        the first tested type (NEVRA).
        """
        return _rpm.PackageQuery_resolve_pkg_spec(self, pkg_spec, settings, with_src)

    def swap(self, other):
        return _rpm.PackageQuery_swap(self, other)

    def filter_duplicates(self):
        r"""Filter packages to keep only duplicates of installed packages. Packages are duplicate if they have the same `name` and `arch` but different `evr`."""
        return _rpm.PackageQuery_filter_duplicates(self)

    def filter_leaves(self):
        r"""
        Filter the leaf packages.

        Leaf packages are installed packages that are not required as a dependency of another installed package.
        However, two or more installed packages might depend on each other in a dependency cycle. Packages
        in such cycles that are not required by any other installed package are also leaf.
        """
        return _rpm.PackageQuery_filter_leaves(self)

    def filter_reboot_suggested(self):
        r"""
        Filter packages whose installation or upgrade should cause a system
        reboot to be recommended. These are packages that either (1) belong to
        a hardcoded set of "core packages", including the kernel and systemd,
        or (2) have an associated `reboot_suggested` advisory.
        """
        return _rpm.PackageQuery_filter_reboot_suggested(self)

    def filter_leaves_groups(self):
        r"""
        Filter the leaf packages and return them grouped by their dependencies.

        Leaf packages are installed packages that are not required as a dependency of another installed package.
        However, two or more installed packages might depend on each other in a dependency cycle. Packages
        in such cycles that are not required by any other installed package are also leaf.
        Packages in such cycles form a group of leaf packages.

        :rtype: std::vector< std::vector< libdnf5::rpm::Package,std::allocator< libdnf5::rpm::Package > >,std::allocator< std::vector< libdnf5::rpm::Package,std::allocator< libdnf5::rpm::Package > > > >
        :return: Groups of one or more interdependent leaf packages.
        """
        return _rpm.PackageQuery_filter_leaves_groups(self)

    def filter_installonly(self):
        r"""
        Filter installonly packages.

        Filter packages that provide a capability that matches with any value in installonlypkgs configuration option.
        """
        return _rpm.PackageQuery_filter_installonly(self)

    def filter_versionlock(self):
        r"""
        Filter out versionlock excluded packages.

        The packages versions excluded by versionlock are removed from the query.
        Since: 5.1.13
        """
        return _rpm.PackageQuery_filter_versionlock(self)

# Register PackageQuery in _rpm:
_rpm.PackageQuery_swigregister(PackageQuery)

def PackageSet__iter__(self):
    return common.Iterator(self, self.begin(), self.end())
PackageSet.__iter__ = PackageSet__iter__
del PackageSet__iter__


def ReldepList__iter__(self):
    return common.Iterator(self, self.begin(), self.end())
ReldepList.__iter__ = ReldepList__iter__
del ReldepList__iter__

class TransactionCallbacks(object):
    r"""
    The base class for Transaction callbacks.
    User implements Transaction callbacks by inheriting this class and overriding its methods.

    Typical order in which the transaction callbacks are called is:

    - before_begin
    - verification phase: verify_start, verify_progress, verify_stop
    - script_start, script_stop, script_error for pre transaction scriplets
    - preparation phase: transaction_start, transaction_progress, transaction_stop
    - install packages: elem_progress, install_start, install_progress, install_stop, with their scriptlets
    - remove packages: elem_progress, uninstall_start, uninstall_progress, uninstall_stop, with their scriptlets
    - script_start, script_stop, script_error for post transaction scriplets
    - after_complete
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    ScriptType_UNKNOWN = _rpm.TransactionCallbacks_ScriptType_UNKNOWN
    ScriptType_PRE_INSTALL = _rpm.TransactionCallbacks_ScriptType_PRE_INSTALL
    ScriptType_POST_INSTALL = _rpm.TransactionCallbacks_ScriptType_POST_INSTALL
    ScriptType_PRE_UNINSTALL = _rpm.TransactionCallbacks_ScriptType_PRE_UNINSTALL
    ScriptType_POST_UNINSTALL = _rpm.TransactionCallbacks_ScriptType_POST_UNINSTALL
    ScriptType_PRE_TRANSACTION = _rpm.TransactionCallbacks_ScriptType_PRE_TRANSACTION
    ScriptType_POST_TRANSACTION = _rpm.TransactionCallbacks_ScriptType_POST_TRANSACTION
    ScriptType_TRIGGER_PRE_INSTALL = _rpm.TransactionCallbacks_ScriptType_TRIGGER_PRE_INSTALL
    ScriptType_TRIGGER_INSTALL = _rpm.TransactionCallbacks_ScriptType_TRIGGER_INSTALL
    ScriptType_TRIGGER_UNINSTALL = _rpm.TransactionCallbacks_ScriptType_TRIGGER_UNINSTALL
    ScriptType_TRIGGER_POST_UNINSTALL = _rpm.TransactionCallbacks_ScriptType_TRIGGER_POST_UNINSTALL
    ScriptType_SYSUSERS = _rpm.TransactionCallbacks_ScriptType_SYSUSERS
    ScriptType_PREUN_TRANSACTION = _rpm.TransactionCallbacks_ScriptType_PREUN_TRANSACTION
    ScriptType_POSTUN_TRANSACTION = _rpm.TransactionCallbacks_ScriptType_POSTUN_TRANSACTION

    @staticmethod
    def script_type_to_string(type):
        r"""
        :type type: int
        :param type:  scriptlet type
        :rtype: string
        :return: string representation of the scriptlet type
        """
        return _rpm.TransactionCallbacks_script_type_to_string(type)

    def __init__(self):
        if self.__class__ == TransactionCallbacks:
            _self = None
        else:
            _self = self
        _rpm.TransactionCallbacks_swiginit(self, _rpm.new_TransactionCallbacks(_self, ))
    __swig_destroy__ = _rpm.delete_TransactionCallbacks

    def before_begin(self, total):
        r"""
        Called right before the rpm transaction is run
        :type total: int
        :param total: Number of elements in the rpm transaction
        """
        return _rpm.TransactionCallbacks_before_begin(self, total)

    def after_complete(self, success):
        r"""
        Called after the transaction run finished
        :type success: boolean
        :param success: Whether the rpm transaction was completed successfully
        """
        return _rpm.TransactionCallbacks_after_complete(self, success)

    def install_progress(self, item, amount, total):
        r"""
        Report the package installation progress periodically.

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being installed
        :type amount: int
        :param amount: The portion of the package already installed
        :type total: int
        :param total: The disk space used by the package after installation
        """
        return _rpm.TransactionCallbacks_install_progress(self, item, amount, total)

    def install_start(self, item, total):
        r"""
        Installation of a package has started

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being installed
        :type total: int
        :param total: The disk space used by the package after installation
        """
        return _rpm.TransactionCallbacks_install_start(self, item, total)

    def install_stop(self, item, amount, total):
        r"""
        Installation of a package finished

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being installed
        :type amount: int
        :param amount: The portion of the package that has been installed
        :type total: int
        :param total: The disk space used by the package after installation
        """
        return _rpm.TransactionCallbacks_install_stop(self, item, amount, total)

    def transaction_progress(self, amount, total):
        r"""
        Preparation of a package has started.

        :type amount: int
        :param amount: Index of the package currently being prepared. Items are indexed starting from 0.
        :type total: int
        :param total: The total number of packages in the transaction
        """
        return _rpm.TransactionCallbacks_transaction_progress(self, amount, total)

    def transaction_start(self, total):
        r"""
        Preparation phase has started.

        :type total: int
        :param total: The total number of packages in the transaction
        """
        return _rpm.TransactionCallbacks_transaction_start(self, total)

    def transaction_stop(self, total):
        r"""
        Preparation phase finished.

        :type total: int
        :param total: The total number of packages in the transaction
        """
        return _rpm.TransactionCallbacks_transaction_stop(self, total)

    def uninstall_progress(self, item, amount, total):
        r"""
        Report the package removal progress periodically.

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being removed
        :type amount: int
        :param amount: The portion of the package already uninstalled
        :type total: int
        :param total: The disk space freed by the package after removal
        """
        return _rpm.TransactionCallbacks_uninstall_progress(self, item, amount, total)

    def uninstall_start(self, item, total):
        r"""
        Removal of a package has started

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being removed
        :type total: int
        :param total: The disk space freed by the package after removal
        """
        return _rpm.TransactionCallbacks_uninstall_start(self, item, total)

    def uninstall_stop(self, item, amount, total):
        r"""
        Removal of a package finished

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being removed
        :type amount: int
        :param amount: The portion of the package already uninstalled
        :type total: int
        :param total: The disk space freed by the package after removal
        """
        return _rpm.TransactionCallbacks_uninstall_stop(self, item, amount, total)

    def unpack_error(self, item):
        r"""
        Unpacking of the package failed.

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance representing the package that failed to unpack
        """
        return _rpm.TransactionCallbacks_unpack_error(self, item)

    def cpio_error(self, item):
        r"""
        cpio error during the package installation. Currently not used by librpm.

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance representing the package that caused the error
        """
        return _rpm.TransactionCallbacks_cpio_error(self, item)

    def script_error(self, item, nevra, type, return_code):
        r"""
        Execution of the rpm scriptlet finished with error

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package that owns the executed or triggered scriptlet. It can be `nullptr` if the scriptlet owner is not part of the transaction.
        :type nevra: :py:class:`Nevra`
        :param nevra: Nevra of the package that owns the executed or triggered scriptlet.
        :type type: int
        :param type: Type of the scriptlet
        :type return_code: int
        :param return_code: The return code of the scriptlet execution
        """
        return _rpm.TransactionCallbacks_script_error(self, item, nevra, type, return_code)

    def script_start(self, item, nevra, type):
        r"""
        Execution of the rpm scriptlet has started

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package that owns the executed or triggered scriptlet. It can be `nullptr` if the scriptlet owner is not part of the transaction (e.g., a package installation triggered an update of the man database, owned by man-db package).
        :type nevra: :py:class:`Nevra`
        :param nevra: Nevra of the package that owns the executed or triggered scriptlet.
        :type type: int
        :param type: Type of the scriptlet
        """
        return _rpm.TransactionCallbacks_script_start(self, item, nevra, type)

    def script_stop(self, item, nevra, type, return_code):
        r"""
        Execution of the rpm scriptlet finished without critical error

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package that owns the executed or triggered scriptlet. It can be `nullptr` if the scriptlet owner is not part of the transaction.
        :type nevra: :py:class:`Nevra`
        :param nevra: Nevra of the package that owns the executed or triggered scriptlet.
        :type type: int
        :param type: Type of the scriptlet
        :type return_code: int
        :param return_code: The return code of the scriptlet execution
        """
        return _rpm.TransactionCallbacks_script_stop(self, item, nevra, type, return_code)

    def elem_progress(self, item, amount, total):
        r"""
        The installation/removal process for the item has started

        :type amount: int
        :param amount: Index of the package currently being processed. Items are indexed starting from 0.
        :type total: int
        :param total: The total number of packages in the transaction
        """
        return _rpm.TransactionCallbacks_elem_progress(self, item, amount, total)

    def verify_progress(self, amount, total):
        r"""
        Verification of a package files has started.

        :type amount: int
        :param amount: Index of the package currently being verified. Items are indexed starting from 0.
        :type total: int
        :param total: The total number of packages to verify
        """
        return _rpm.TransactionCallbacks_verify_progress(self, amount, total)

    def verify_start(self, total):
        r"""
        Packages files verification phase has started. In this phase the signature of packages are verified.

        :type total: int
        :param total: The total number of packages to verify
        """
        return _rpm.TransactionCallbacks_verify_start(self, total)

    def verify_stop(self, total):
        r"""
        Packages files verification phase finished.

        :type total: int
        :param total: The total number of packages to verify
        """
        return _rpm.TransactionCallbacks_verify_stop(self, total)
    def __disown__(self):
        self.this.disown()
        _rpm.disown_TransactionCallbacks(self)
        return weakref.proxy(self)

# Register TransactionCallbacks in _rpm:
_rpm.TransactionCallbacks_swigregister(TransactionCallbacks)
class TransactionCallbacksUniquePtr(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _rpm.TransactionCallbacksUniquePtr_swiginit(self, _rpm.new_TransactionCallbacksUniquePtr(*args))

    def __deref__(self):
        return _rpm.TransactionCallbacksUniquePtr___deref__(self)

    def release(self):
        return _rpm.TransactionCallbacksUniquePtr_release(self)

    def reset(self, __p=None):
        return _rpm.TransactionCallbacksUniquePtr_reset(self, __p)

    def swap(self, __u):
        return _rpm.TransactionCallbacksUniquePtr_swap(self, __u)

    def get(self):
        return _rpm.TransactionCallbacksUniquePtr_get(self)

    def __nonzero__(self):
        return _rpm.TransactionCallbacksUniquePtr___nonzero__(self)
    __bool__ = __nonzero__


    __swig_destroy__ = _rpm.delete_TransactionCallbacksUniquePtr

    def script_type_to_string(self, type):
        r"""
        :type type: int
        :param type:  scriptlet type
        :rtype: string
        :return: string representation of the scriptlet type
        """
        return _rpm.TransactionCallbacksUniquePtr_script_type_to_string(self, type)

    def before_begin(self, total):
        r"""
        Called right before the rpm transaction is run
        :type total: int
        :param total: Number of elements in the rpm transaction
        """
        return _rpm.TransactionCallbacksUniquePtr_before_begin(self, total)

    def after_complete(self, success):
        r"""
        Called after the transaction run finished
        :type success: boolean
        :param success: Whether the rpm transaction was completed successfully
        """
        return _rpm.TransactionCallbacksUniquePtr_after_complete(self, success)

    def install_progress(self, item, amount, total):
        r"""
        Report the package installation progress periodically.

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being installed
        :type amount: int
        :param amount: The portion of the package already installed
        :type total: int
        :param total: The disk space used by the package after installation
        """
        return _rpm.TransactionCallbacksUniquePtr_install_progress(self, item, amount, total)

    def install_start(self, item, total):
        r"""
        Installation of a package has started

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being installed
        :type total: int
        :param total: The disk space used by the package after installation
        """
        return _rpm.TransactionCallbacksUniquePtr_install_start(self, item, total)

    def install_stop(self, item, amount, total):
        r"""
        Installation of a package finished

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being installed
        :type amount: int
        :param amount: The portion of the package that has been installed
        :type total: int
        :param total: The disk space used by the package after installation
        """
        return _rpm.TransactionCallbacksUniquePtr_install_stop(self, item, amount, total)

    def transaction_progress(self, amount, total):
        r"""
        Preparation of a package has started.

        :type amount: int
        :param amount: Index of the package currently being prepared. Items are indexed starting from 0.
        :type total: int
        :param total: The total number of packages in the transaction
        """
        return _rpm.TransactionCallbacksUniquePtr_transaction_progress(self, amount, total)

    def transaction_start(self, total):
        r"""
        Preparation phase has started.

        :type total: int
        :param total: The total number of packages in the transaction
        """
        return _rpm.TransactionCallbacksUniquePtr_transaction_start(self, total)

    def transaction_stop(self, total):
        r"""
        Preparation phase finished.

        :type total: int
        :param total: The total number of packages in the transaction
        """
        return _rpm.TransactionCallbacksUniquePtr_transaction_stop(self, total)

    def uninstall_progress(self, item, amount, total):
        r"""
        Report the package removal progress periodically.

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being removed
        :type amount: int
        :param amount: The portion of the package already uninstalled
        :type total: int
        :param total: The disk space freed by the package after removal
        """
        return _rpm.TransactionCallbacksUniquePtr_uninstall_progress(self, item, amount, total)

    def uninstall_start(self, item, total):
        r"""
        Removal of a package has started

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being removed
        :type total: int
        :param total: The disk space freed by the package after removal
        """
        return _rpm.TransactionCallbacksUniquePtr_uninstall_start(self, item, total)

    def uninstall_stop(self, item, amount, total):
        r"""
        Removal of a package finished

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package currently being removed
        :type amount: int
        :param amount: The portion of the package already uninstalled
        :type total: int
        :param total: The disk space freed by the package after removal
        """
        return _rpm.TransactionCallbacksUniquePtr_uninstall_stop(self, item, amount, total)

    def unpack_error(self, item):
        r"""
        Unpacking of the package failed.

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance representing the package that failed to unpack
        """
        return _rpm.TransactionCallbacksUniquePtr_unpack_error(self, item)

    def cpio_error(self, item):
        r"""
        cpio error during the package installation. Currently not used by librpm.

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance representing the package that caused the error
        """
        return _rpm.TransactionCallbacksUniquePtr_cpio_error(self, item)

    def script_error(self, item, nevra, type, return_code):
        r"""
        Execution of the rpm scriptlet finished with error

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package that owns the executed or triggered scriptlet. It can be `nullptr` if the scriptlet owner is not part of the transaction.
        :type nevra: :py:class:`Nevra`
        :param nevra: Nevra of the package that owns the executed or triggered scriptlet.
        :type type: int
        :param type: Type of the scriptlet
        :type return_code: int
        :param return_code: The return code of the scriptlet execution
        """
        return _rpm.TransactionCallbacksUniquePtr_script_error(self, item, nevra, type, return_code)

    def script_start(self, item, nevra, type):
        r"""
        Execution of the rpm scriptlet has started

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package that owns the executed or triggered scriptlet. It can be `nullptr` if the scriptlet owner is not part of the transaction (e.g., a package installation triggered an update of the man database, owned by man-db package).
        :type nevra: :py:class:`Nevra`
        :param nevra: Nevra of the package that owns the executed or triggered scriptlet.
        :type type: int
        :param type: Type of the scriptlet
        """
        return _rpm.TransactionCallbacksUniquePtr_script_start(self, item, nevra, type)

    def script_stop(self, item, nevra, type, return_code):
        r"""
        Execution of the rpm scriptlet finished without critical error

        :type item: libdnf5::base::TransactionPackage
        :param item: The TransactionPackage class instance for the package that owns the executed or triggered scriptlet. It can be `nullptr` if the scriptlet owner is not part of the transaction.
        :type nevra: :py:class:`Nevra`
        :param nevra: Nevra of the package that owns the executed or triggered scriptlet.
        :type type: int
        :param type: Type of the scriptlet
        :type return_code: int
        :param return_code: The return code of the scriptlet execution
        """
        return _rpm.TransactionCallbacksUniquePtr_script_stop(self, item, nevra, type, return_code)

    def elem_progress(self, item, amount, total):
        r"""
        The installation/removal process for the item has started

        :type amount: int
        :param amount: Index of the package currently being processed. Items are indexed starting from 0.
        :type total: int
        :param total: The total number of packages in the transaction
        """
        return _rpm.TransactionCallbacksUniquePtr_elem_progress(self, item, amount, total)

    def verify_progress(self, amount, total):
        r"""
        Verification of a package files has started.

        :type amount: int
        :param amount: Index of the package currently being verified. Items are indexed starting from 0.
        :type total: int
        :param total: The total number of packages to verify
        """
        return _rpm.TransactionCallbacksUniquePtr_verify_progress(self, amount, total)

    def verify_start(self, total):
        r"""
        Packages files verification phase has started. In this phase the signature of packages are verified.

        :type total: int
        :param total: The total number of packages to verify
        """
        return _rpm.TransactionCallbacksUniquePtr_verify_start(self, total)

    def verify_stop(self, total):
        r"""
        Packages files verification phase finished.

        :type total: int
        :param total: The total number of packages to verify
        """
        return _rpm.TransactionCallbacksUniquePtr_verify_stop(self, total)

# Register TransactionCallbacksUniquePtr in _rpm:
_rpm.TransactionCallbacksUniquePtr_swigregister(TransactionCallbacksUniquePtr)
class KeyInfo(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def get_key_id(self):
        return _rpm.KeyInfo_get_key_id(self)

    def get_short_key_id(self):
        return _rpm.KeyInfo_get_short_key_id(self)

    def get_user_ids(self):
        return _rpm.KeyInfo_get_user_ids(self)

    def get_fingerprint(self):
        return _rpm.KeyInfo_get_fingerprint(self)

    def get_url(self):
        return _rpm.KeyInfo_get_url(self)

    def get_path(self):
        return _rpm.KeyInfo_get_path(self)

    def get_raw_key(self):
        return _rpm.KeyInfo_get_raw_key(self)

    def get_timestamp(self):
        return _rpm.KeyInfo_get_timestamp(self)
    __swig_destroy__ = _rpm.delete_KeyInfo

    def __init__(self, *args):
        _rpm.KeyInfo_swiginit(self, _rpm.new_KeyInfo(*args))

# Register KeyInfo in _rpm:
_rpm.KeyInfo_swigregister(KeyInfo)
class RpmSignature(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    CheckResult_OK = _rpm.RpmSignature_CheckResult_OK
    CheckResult_SKIPPED = _rpm.RpmSignature_CheckResult_SKIPPED
    CheckResult_FAILED_KEY_MISSING = _rpm.RpmSignature_CheckResult_FAILED_KEY_MISSING
    CheckResult_FAILED_NOT_TRUSTED = _rpm.RpmSignature_CheckResult_FAILED_NOT_TRUSTED
    CheckResult_FAILED_NOT_SIGNED = _rpm.RpmSignature_CheckResult_FAILED_NOT_SIGNED
    CheckResult_FAILED = _rpm.RpmSignature_CheckResult_FAILED
    __swig_destroy__ = _rpm.delete_RpmSignature

    def __init__(self, *args):
        _rpm.RpmSignature_swiginit(self, _rpm.new_RpmSignature(*args))

    def check_package_signature(self, *args):
        r"""
        *Overload 1:*
        Check signature of the `package` using public keys stored in rpm database.
        The method respects the repository's pkg_gpgcheck option (or
        localpkg_gpgcheck for packages originating from the command line) and
        skips the check if these options are set to `false`.
        :param package:: package to check.
        :rtype: int
        :return: CheckResult::OK - the check passed
                    CheckResult::SKIPPED - the check was skipped
                    CheckResult::FAILED_KEY_MISSING - no corresponding key found in rpmdb
                    CheckResult::FAILED_NOT_TRUSTED - signature is valid but the key is not trusted
                    CheckResult::FAILED_NOT_SIGNED - package is not signed but signature is required
                    CheckResult::FAILED - check failed for another reason

        |

        *Overload 2:*
        Check signature of rpm file in `path` location using public keys stored in
        rpm database.
        :param package:: package to check.
        :rtype: int
        :return: CheckResult::OK - the check passed
                    CheckResult::FAILED_KEY_MISSING - no corresponding key found in rpmdb
                    CheckResult::FAILED_NOT_TRUSTED - signature is valid but the key is not trusted
                    CheckResult::FAILED_NOT_SIGNED - package is not signed but signature is required
                    CheckResult::FAILED - check failed for another reason
        """
        return _rpm.RpmSignature_check_package_signature(self, *args)

    def import_key(self, key):
        r"""
        Import public key into rpm database.
        :type key: :py:class:`KeyInfo`
        :param key:: OpenPGP key to be imported into rpm database.
        """
        return _rpm.RpmSignature_import_key(self, key)

    def key_present(self, key):
        r"""Check public key presence in rpm database"""
        return _rpm.RpmSignature_key_present(self, key)

    def parse_key_file(self, key_url):
        r"""
        Download the key file if needed and return a vector of keys contained in it
        :type key_url: string
        :param key_url:: URL of the public key to be imported.
        """
        return _rpm.RpmSignature_parse_key_file(self, key_url)

    @staticmethod
    def check_result_to_string(result):
        r"""Return string representation of the CheckResult enum"""
        return _rpm.RpmSignature_check_result_to_string(result)

# Register RpmSignature in _rpm:
_rpm.RpmSignature_swigregister(RpmSignature)
class VectorKeyInfo(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _rpm.VectorKeyInfo_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _rpm.VectorKeyInfo___nonzero__(self)

    def __bool__(self):
        return _rpm.VectorKeyInfo___bool__(self)

    def __len__(self):
        return _rpm.VectorKeyInfo___len__(self)

    def __getslice__(self, i, j):
        return _rpm.VectorKeyInfo___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _rpm.VectorKeyInfo___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _rpm.VectorKeyInfo___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _rpm.VectorKeyInfo___delitem__(self, *args)

    def __getitem__(self, *args):
        return _rpm.VectorKeyInfo___getitem__(self, *args)

    def __setitem__(self, *args):
        return _rpm.VectorKeyInfo___setitem__(self, *args)

    def pop(self):
        return _rpm.VectorKeyInfo_pop(self)

    def append(self, x):
        return _rpm.VectorKeyInfo_append(self, x)

    def empty(self):
        return _rpm.VectorKeyInfo_empty(self)

    def size(self):
        return _rpm.VectorKeyInfo_size(self)

    def swap(self, v):
        return _rpm.VectorKeyInfo_swap(self, v)

    def begin(self):
        return _rpm.VectorKeyInfo_begin(self)

    def end(self):
        return _rpm.VectorKeyInfo_end(self)

    def rbegin(self):
        return _rpm.VectorKeyInfo_rbegin(self)

    def rend(self):
        return _rpm.VectorKeyInfo_rend(self)

    def clear(self):
        return _rpm.VectorKeyInfo_clear(self)

    def get_allocator(self):
        return _rpm.VectorKeyInfo_get_allocator(self)

    def pop_back(self):
        return _rpm.VectorKeyInfo_pop_back(self)

    def erase(self, *args):
        return _rpm.VectorKeyInfo_erase(self, *args)

    def __init__(self, *args):
        _rpm.VectorKeyInfo_swiginit(self, _rpm.new_VectorKeyInfo(*args))

    def push_back(self, x):
        return _rpm.VectorKeyInfo_push_back(self, x)

    def front(self):
        return _rpm.VectorKeyInfo_front(self)

    def back(self):
        return _rpm.VectorKeyInfo_back(self)

    def assign(self, n, x):
        return _rpm.VectorKeyInfo_assign(self, n, x)

    def insert(self, *args):
        return _rpm.VectorKeyInfo_insert(self, *args)

    def reserve(self, n):
        return _rpm.VectorKeyInfo_reserve(self, n)

    def capacity(self):
        return _rpm.VectorKeyInfo_capacity(self)
    __swig_destroy__ = _rpm.delete_VectorKeyInfo

# Register VectorKeyInfo in _rpm:
_rpm.VectorKeyInfo_swigregister(VectorKeyInfo)

common.create_attributes_from_getters_and_setters(Changelog)


