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

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

import builtins as __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


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__ = _base.delete_SwigPyIterator

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

# Register SwigPyIterator in _base:
_base.SwigPyIterator_swigregister(SwigPyIterator)
from . import advisory
from . import common
from . import exception
from . import comps
from . import repo
from . import conf
from . import logger
from . import transaction
from . import plugin
from . import rpm
class BaseWeakPtr(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):
        _base.BaseWeakPtr_swiginit(self, _base.new_BaseWeakPtr(*args))
    __swig_destroy__ = _base.delete_BaseWeakPtr

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

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

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

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

    def __ref__(self):
        return _base.BaseWeakPtr___ref__(self)

    def __eq__(self, other):
        return _base.BaseWeakPtr___eq__(self, other)

    def __ne__(self, other):
        return _base.BaseWeakPtr___ne__(self, other)

    def __lt__(self, other):
        return _base.BaseWeakPtr___lt__(self, other)

    def __gt__(self, other):
        return _base.BaseWeakPtr___gt__(self, other)

    def __le__(self, other):
        return _base.BaseWeakPtr___le__(self, other)

    def __ge__(self, other):
        return _base.BaseWeakPtr___ge__(self, other)

    def __hash__(self):
        return _base.BaseWeakPtr___hash__(self)

    def set_download_callbacks(self, download_callbacks):
        return _base.BaseWeakPtr_set_download_callbacks(self, download_callbacks)

    def get_download_callbacks(self):
        return _base.BaseWeakPtr_get_download_callbacks(self)

    def set_interaction_callbacks(self, interaction_callbacks):
        r"""
        Sets the interaction callbacks instance used for user interaction by plugins.
        Replaces any previously set instance. Ownership is transferred to the Base instance.
        :type interaction_callbacks: std::unique_ptr< libdnf5::base::InteractionCallbacks >
        :param interaction_callbacks: The interaction callbacks instance to set. Passing nullptr clears the callbacks.
        """
        return _base.BaseWeakPtr_set_interaction_callbacks(self, interaction_callbacks)

    def lock(self):
        r"""
        Sets the pointer to the locked instance "Base" to "this" instance. Blocks if the pointer is already set.
        Pointer to a locked "Base" instance can be obtained using "get_locked_base()".
        """
        return _base.BaseWeakPtr_lock(self)

    def unlock(self):
        r"""
        Resets the pointer to a locked "Base" instance to "nullptr".
        Throws an exception if another or no instance is locked.
        """
        return _base.BaseWeakPtr_unlock(self)

    def get_locked_base(self):
        r"""Returns a pointer to a locked "Base" instance or "nullptr" if no instance is locked."""
        return _base.BaseWeakPtr_get_locked_base(self)

    def load_config(self):
        r"""
        Loads main configuration.
        The file defined in the current configuration and files in the drop-in directories are used.
        """
        return _base.BaseWeakPtr_load_config(self)

    def get_config(self, *args):
        r"""
        :rtype: :py:class:`ConfigMain`
        :return: a reference to configuration
        """
        return _base.BaseWeakPtr_get_config(self, *args)

    def get_logger(self):
        return _base.BaseWeakPtr_get_logger(self)

    def get_comps_sack(self):
        return _base.BaseWeakPtr_get_comps_sack(self)

    def get_repo_sack(self):
        return _base.BaseWeakPtr_get_repo_sack(self)

    def get_rpm_package_sack(self):
        return _base.BaseWeakPtr_get_rpm_package_sack(self)

    def get_module_sack(self):
        r"""Throws libdnf5::AssertionError when used with libdnf5 compiled without modules enabled."""
        return _base.BaseWeakPtr_get_module_sack(self)

    def enable_disable_plugins(self, plugin_names, enable):
        r"""
        Adds a request to enable/disable plugins that match the names (glob patterns) in the list.
        Can be called multiple times. Requests (`plugin_names` and `enable` state) are queued.
        The enable state of a plugin is set according to the last matching request.
        Must be called before the Base::setup.
        :type plugin_names: std::vector< std::string,std::allocator< std::string > >
        :param plugin_names: Plugin names (glob patterns) to enable/disable
        :type enable: boolean
        :param enable: Request: true - enable plugins, false - disable plugins
        :raises: libdnf5::UserAssertionError When called after Base::setup
        """
        return _base.BaseWeakPtr_enable_disable_plugins(self, plugin_names, enable)

    def get_plugins_info(self):
        r"""
        :rtype: std::vector< libdnf5::plugin::PluginInfo,std::allocator< libdnf5::plugin::PluginInfo > >
        :return: a list of information about plugins found during Base::setup
        :raises: libdnf5::UserAssertionError When called before Base::setup
        """
        return _base.BaseWeakPtr_get_plugins_info(self)

    def setup(self):
        r"""
        Loads libdnf plugins, vars from environment, varsdirs and installroot (releasever, arch) and resolves
        configuration of protected_packages (glob:).
        To prevent differences between configuration and internal Base settings, following configurations
        will be locked: installroot, varsdir.
        The method is supposed to be called after configuration and vars are updated, application plugins applied
        their pre configuration modification in configuration, but before repositories are loaded or any Package
        or Advisory query created. The method is recommended to be called before loading  repositories, because
        not all variables for substitutions might be available. Caution - modification of vars after this call
        might be problematic, because architecture is already fixed for our solver.
        Calling the method for the second time result in throwing an exception
        """
        return _base.BaseWeakPtr_setup(self)

    def get_vendor_change_manager(self):
        r"""
        Returns the VendorChangeManager instance.
        Must be called after setup().
        """
        return _base.BaseWeakPtr_get_vendor_change_manager(self)

    def lock_system_repo(self, *args):
        r"""
        Acquire an advisory lock on the installroot's system repository.
        The lock will be automatically released when Base goes out of scope, or manually when unlock_system_repo is called.
        A WRITE lock can be downgraded to a READ lock but a READ lock cannot be upgraded to a WRITE lock.
        Should be called before the system repo is loaded, and the lock should be held until all transactions are
        complete and other processes can safely re-read the RPMDB and resolve transactions.
        :raises: libdnf5::SystemError if an unexpected error occurs when locking
        :rtype: boolean
        :return: true if acquiring the lock succeeded, false otherwise
        """
        return _base.BaseWeakPtr_lock_system_repo(self, *args)

    def unlock_system_repo(self):
        r"""
        Release the lock obtained by lock_system_repo.
        Idempotent. No-op if there is currently no lock.
        :raises: libdnf5::SystemError if an unexpected error occurs when unlocking
        """
        return _base.BaseWeakPtr_unlock_system_repo(self)

    def get_system_repo_lock(self):
        r"""Get a pointer to the lock on the system repo, or nullptr if no lock exists."""
        return _base.BaseWeakPtr_get_system_repo_lock(self)

    def is_initialized(self):
        r"""Returns true when setup() (mandatory method in many workflows) was already called"""
        return _base.BaseWeakPtr_is_initialized(self)

    def notify_repos_configured(self):
        r"""
        Notifies the libdnf5 library that the repositories are configured.  It can be called before `load_repos`.
        The libdnf5 library can then call plugins that can make final adjustments to the repositories configuration.
        In the case that it has not been called, it is called automatically at the beginning of the load_repos method.
        Calling the method for the second time result in throwing an exception.
        """
        return _base.BaseWeakPtr_notify_repos_configured(self)

    def are_repos_configured(self):
        r"""Returns true when notify_repos_configured() was already called (by user or automatically)"""
        return _base.BaseWeakPtr_are_repos_configured(self)

    def get_transaction_history(self):
        r"""Warning: This method is experimental/unstable and should not be relied on. It may be removed without warning"""
        return _base.BaseWeakPtr_get_transaction_history(self)

    def get_vars(self):
        r"""Gets base variables. They can be used in configuration files. Syntax in the config - ${var_name} or $var_name."""
        return _base.BaseWeakPtr_get_vars(self)

    def get_weak_ptr(self):
        return _base.BaseWeakPtr_get_weak_ptr(self)

    def load_plugin_config(self, config_file_path):
        r"""
        Load libdnf5 plugin config, extract name of the plugin and check if it is enabled
        :type config_file_path: string
        :param config_file_path: Path to a plugin config
        :rtype: std::tuple< std::string,libdnf5::ConfigParser,bool >
        :return: a tuple with plugin name, parsed config and a bool whether the plugin is enabled
        """
        return _base.BaseWeakPtr_load_plugin_config(self, config_file_path)

    def add_plugin(self, plugin_name, plugin_config, iplugin_instance):
        r"""
        Add libdnf5 plugin instance that introduces additional logic into the library using hooks.
        :type plugin_name: string
        :param plugin_name: Name of the new plugin
        :type plugin_config: :py:class:`ConfigParser`
        :param plugin_config: Parsed config of the new plugin
        :type iplugin_instance: :py:class:`IPlugin`
        :param iplugin_instance: New libdnf5 plugin instance
        """
        return _base.BaseWeakPtr_add_plugin(self, plugin_name, plugin_config, iplugin_instance)

    def message(self, level, message):
        r"""
        Sends a message to the user via the registered interaction callbacks.
        If no interaction callbacks are registered, a default instance is created.
        :type level: int
        :param level: The message level (ERROR, WARNING, NOTICE, INFO)
        :type message: :py:class:`Message`
        :param message: The message to display
        """
        return _base.BaseWeakPtr_message(self, level, message)

    def confirm(self, message, default_answer):
        r"""
        Asks the user to confirm an action via the registered interaction callbacks.
        If no interaction callbacks are registered, a default instance is created.
        :type message: :py:class:`Message`
        :param message: The confirmation message describing the action
        :type default_answer: boolean
        :param default_answer: The answer preferred by the caller, used when neither `assumeyes`
                   nor `assumeno` configuration option is active
        :rtype: int
        :return: `ANSWER_YES` (-1) to confirm, `ANSWER_NO` (-2) to deny, `ANSWER_DEFAULT` (-3) to use caller default,
                    `ANSWER_ABORT` (-4) to abort the operation
        """
        return _base.BaseWeakPtr_confirm(self, message, default_answer)

    def choice(self, message, options, default_option):
        r"""
        Asks the user to select an option via the registered interaction callbacks.
        If no interaction callbacks are registered, a default instance is created.
        :type message: :py:class:`Message`
        :param message: The message describing the choice
        :type options: std::vector< libdnf5::Message *,std::allocator< libdnf5::Message * > >
        :param options: Vector of pointers to available option messages (for translation support)
        :type default_option: int
        :param default_option: Index of the option preferred by the caller (0-based)
        :rtype: int
        :return: Index of the selected choice (0-based), `ANSWER_DEFAULT` (-3) to use caller default,
                    or `ANSWER_ABORT` (-4) to abort the operation
        """
        return _base.BaseWeakPtr_choice(self, message, options, default_option)

    def input_text(self, out_text, message, default_text, validator):
        r"""
        Asks the user for text input via the registered interaction callbacks.
        If no interaction callbacks are registered, a default instance is created.
        :type out_text: string
        :param out_text: Output parameter - filled with user input when returning `ANSWER_YES` or `ANSWER_NO`
        :type message: :py:class:`Message`
        :param message: The message describing what input is needed
        :type default_text: string
        :param default_text: Optional pre-filled text offered to the user, or nullptr (default is undefined text).
        :type validator: :py:class:`TextValidatorCallback`
        :param validator: Optional validator to check if input is valid. If nullptr, any input is accepted.
        :rtype: int
        :return: `ANSWER_YES` (-1) if a string was entered (out_text filled; may be empty/zero-length),
                    `ANSWER_NO` (-2) if no string was returned (out_text unchanged; analogous to NULL char*),
                    `ANSWER_DEFAULT` (-3) if the caller should use default_text (out_text unchanged),
                    `ANSWER_ABORT` (-4) to abort the operation (out_text unchanged)
        """
        return _base.BaseWeakPtr_input_text(self, out_text, message, default_text, validator)

    def progress(self, handle, state, msg, count, total):
        r"""
        Reports progress via the registered interaction callbacks.
        If no interaction callbacks are registered, a default instance is created.
        :type handle: int
        :param handle:  Ignored for NEW; identifies the progress for other states
        :type state: int
        :param state:   The progress state
        :type msg: :py:class:`Message`
        :param msg:     Optional description of current activity, or nullptr
        :type count: int
        :param count:   Number of completed items
        :type total: int
        :param total:   Total number of items
        :rtype: int
        :return: For NEW: handle of the new progress entry (>= 0).
                    For other states: >= 0 to continue, < 0 to request cancellation.
        """
        return _base.BaseWeakPtr_progress(self, handle, state, msg, count, total)

# Register BaseWeakPtr in _base:
_base.BaseWeakPtr_swigregister(BaseWeakPtr)
class VarsWeakPtr(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):
        _base.VarsWeakPtr_swiginit(self, _base.new_VarsWeakPtr(*args))
    __swig_destroy__ = _base.delete_VarsWeakPtr

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

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

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

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

    def __ref__(self):
        return _base.VarsWeakPtr___ref__(self)

    def __eq__(self, other):
        return _base.VarsWeakPtr___eq__(self, other)

    def __ne__(self, other):
        return _base.VarsWeakPtr___ne__(self, other)

    def __lt__(self, other):
        return _base.VarsWeakPtr___lt__(self, other)

    def __gt__(self, other):
        return _base.VarsWeakPtr___gt__(self, other)

    def __le__(self, other):
        return _base.VarsWeakPtr___le__(self, other)

    def __ge__(self, other):
        return _base.VarsWeakPtr___ge__(self, other)

    def __hash__(self):
        return _base.VarsWeakPtr___hash__(self)

    def substitute(self, text):
        r"""
        Substitute DNF vars in the input text.

        :type text: string
        :param text: The text for substitution
        :rtype: string
        :return: The substituted text
        """
        return _base.VarsWeakPtr_substitute(self, text)

    def get_variables(self):
        return _base.VarsWeakPtr_get_variables(self)

    def set(self, *args):
        r"""
        Set particular variable to a value

        :type name: string
        :param name: Name of the variable
        :type value: string
        :param value: Value to be stored in variable
        :type prio: int, optional
        :param prio: Source/Priority of the value
        :raises: ReadOnlyVariableError if the variable is read-only
        """
        return _base.VarsWeakPtr_set(self, *args)

    def unset(self, *args):
        r"""
        Unset particular variable

        :type name: string
        :param name: Name of the variable
        :type prio: int, optional
        :param prio: Source/Priority of the request
        :raises: ReadOnlyVariableError if the variable is read-only
        :rtype: boolean
        :return: false if the variable exists after the function returns (insufficient request priority)
        """
        return _base.VarsWeakPtr_unset(self, *args)

    def is_read_only(self, name):
        r"""
        Checks whether a variable is read-only

        :type name: string
        :param name: Name of the variable
        :rtype: boolean
        :return: true if the variable is read-only, false if it is writable
        """
        return _base.VarsWeakPtr_is_read_only(self, name)

    def contains(self, name):
        r"""
        Checks if there is an variable with name equivalent to name in the container.

        :type name: string
        :param name: Name of the variable
        :rtype: boolean
        :return: true if there is such an element, otherwise false
        """
        return _base.VarsWeakPtr_contains(self, name)

    def get_value(self, name):
        r"""
        Get value of particular variable.

        :type name: string
        :param name: Name of the variable
        """
        return _base.VarsWeakPtr_get_value(self, name)

    def detect_release(self, base, install_root_path):
        r"""
        Detects the releasever of the system

        Returns the release name of the distribution of the tree rooted at `installroot`.
        This function uses information from RPMDB found under the tree.
        It's preferred to use ``detect_releasevers`` over ``detect_release``; if you use the latter, you will not be aware of distribution overrides for the major and minor release versions.

        :rtype: std::unique_ptr< std::string >
        :return: the detected releasever, or nullptr if the releasever could not be determined (perhaps because the tree has no RPMDB).
        """
        return _base.VarsWeakPtr_detect_release(self, base, install_root_path)

    def detect_releasevers(self, base, install_root_path):
        r"""
        Detect the releasever, overridden major release, and overridden minor release for the system

        Returns a tuple of the release name, overridden major release, and overridden minor release of the distribution of the tree rooted at `installroot`.
        This function uses information from RPMDB found under the tree.
        The major and minor release versions are usually derived from the release version by splitting it on the first ``.``, but distributions can override the derived major and minor versions.

        :rtype: std::tuple< std::unique_ptr< std::string >,std::unique_ptr< std::string >,std::unique_ptr< std::string > >
        :return: a tuple of the releasever, overridden releasever_major, and overridden releasever_minor. Each member of the tuple can be nullptr if not provided by the system.
        """
        return _base.VarsWeakPtr_detect_releasevers(self, base, install_root_path)

# Register VarsWeakPtr in _base:
_base.VarsWeakPtr_swigregister(VarsWeakPtr)
class VendorChangeManagerWeakPtr(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):
        _base.VendorChangeManagerWeakPtr_swiginit(self, _base.new_VendorChangeManagerWeakPtr(*args))
    __swig_destroy__ = _base.delete_VendorChangeManagerWeakPtr

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

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

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

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

    def __ref__(self):
        return _base.VendorChangeManagerWeakPtr___ref__(self)

    def __eq__(self, other):
        return _base.VendorChangeManagerWeakPtr___eq__(self, other)

    def __ne__(self, other):
        return _base.VendorChangeManagerWeakPtr___ne__(self, other)

    def __lt__(self, other):
        return _base.VendorChangeManagerWeakPtr___lt__(self, other)

    def __gt__(self, other):
        return _base.VendorChangeManagerWeakPtr___gt__(self, other)

    def __le__(self, other):
        return _base.VendorChangeManagerWeakPtr___le__(self, other)

    def __ge__(self, other):
        return _base.VendorChangeManagerWeakPtr___ge__(self, other)

    def __hash__(self):
        return _base.VendorChangeManagerWeakPtr___hash__(self)

    def get_weak_ptr(self):
        r"""
        :rtype: :py:class:`VendorChangeManagerWeakPtr`
        :return: A weak pointer to this VendorChangeManager instance.
        """
        return _base.VendorChangeManagerWeakPtr_get_weak_ptr(self)

    def load_policy_from_toml(self, *args):
        r"""
        *Overload 1:*
        Load a vendor change policy from TOML content.
        The content must conform to the vendor change policy format.
        :type toml_content: std::string_view
        :param toml_content: The TOML content to parse.
        :type source: std::string_view
        :param source: Origin of the policy (file URI or custom label with ``text:`` prefix,
                          e.g., ``"text:COMMAND LINE"``). Stored for diagnostics and logging.
        :raises: VendorChangeManagerError if the content cannot be parsed or contains invalid values.

        |

        *Overload 2:*
        Load one vendor change policy from a TOML configuration file.
        The file must conform to the vendor change policy format.
        :type path: std::filesystem::path
        :param path: Path to the TOML configuration file.
        :raises: VendorChangeManagerError if the file cannot be parsed or contains invalid values.
        """
        return _base.VendorChangeManagerWeakPtr_load_policy_from_toml(self, *args)

    def load_policy_from_compact(self, policy_str, source):
        r"""
        Load a vendor change policy from a compact string representation.

        The compact format is: ``direction:eop"value",...:e[filters],...``

        Both sections (before and after ````) are optional, but at least one must be present.
        Vendor entries use direction prefixes ``in:``, ``out:``, or ``eq:`` followed by
        an optional ``e`` (exclude) flag and an operator with a quoted value.
        Package filter entries are enclosed in literal ``[...]`` after the ```` separator.

        Example: ``eq:i^"Fedora",in:"Third Vendor":[version>="2.0"]``

        :type policy_str: std::string_view
        :param policy_str: The compact policy string to parse.
        :type source: std::string_view
        :param source: Origin of the policy (file URI or custom label with ``text:`` prefix,
                          e.g., ``"text:COMMAND LINE"``). Stored for diagnostics and logging.
        :raises: VendorChangeManagerError if the string cannot be parsed.
        """
        return _base.VendorChangeManagerWeakPtr_load_policy_from_compact(self, policy_str, source)

    def unload_policies(self):
        r"""
        Unload all vendor change policies from memory.
        :rtype: std::size_t
        :return: The number of policies that were unloaded.
        """
        return _base.VendorChangeManagerWeakPtr_unload_policies(self)

    def unload_policy(self, index):
        r"""
        Unload a vendor change policy at the specified index.
        :type index: std::size_t
        :param index: The index of the policy to unload (0-based).
        :raises: VendorChangeManagerError if index is out of bounds.
        """
        return _base.VendorChangeManagerWeakPtr_unload_policy(self, index)

    def unload_policies_matching_source(self, source_pattern):
        r"""
        Unload vendor change policies whose source matches the specified pattern.
        The pattern may contain glob wildcards.
        :type source_pattern: string
        :param source_pattern: A glob pattern to match against policy sources.
        :rtype: std::size_t
        :return: The number of policies that were unloaded.
        :raises: VendorChangeManagerError if the pattern is invalid.
        """
        return _base.VendorChangeManagerWeakPtr_unload_policies_matching_source(self, source_pattern)

    def get_loaded_policies_count(self):
        r"""
        Get the number of loaded vendor change policies.
        :rtype: std::size_t
        :return: The number of currently loaded policies.
        """
        return _base.VendorChangeManagerWeakPtr_get_loaded_policies_count(self)

    def get_loaded_policy_source(self, index):
        r"""
        Get the source (origin) of a loaded vendor change policy.
        :type index: std::size_t
        :param index: The index of the loaded policy (0-based).
        :rtype: string
        :return: The source string (file URI or custom label with ``text:`` prefix).
        :raises: VendorChangeManagerError if index is out of bounds.
        """
        return _base.VendorChangeManagerWeakPtr_get_loaded_policy_source(self, index)

    def get_loaded_policy_as_toml(self, index):
        r"""
        Get a loaded vendor change policy as a TOML string.
        :type index: std::size_t
        :param index: The index of the loaded policy (0-based).
        :rtype: string
        :return: The policy formatted as a TOML string.
        :raises: VendorChangeManagerError if index is out of bounds.
        """
        return _base.VendorChangeManagerWeakPtr_get_loaded_policy_as_toml(self, index)

    def get_loaded_policy_as_compact(self, index):
        r"""
        Get a loaded vendor change policy as a compact format string.
        :type index: std::size_t
        :param index: The index of the loaded policy (0-based).
        :rtype: string
        :return: The policy formatted as a compact string.
        :raises: VendorChangeManagerError if index is out of bounds.
        """
        return _base.VendorChangeManagerWeakPtr_get_loaded_policy_as_compact(self, index)

    def convert_policy_toml_to_compact(self, *args):
        r"""
        *Overload 1:*
        Convert a vendor change policy from TOML content to compact format.
        :type toml_content: std::string_view
        :param toml_content: The TOML content to parse.
        :type source: std::string_view
        :param source: Origin of the policy (for error messages).
        :rtype: string
        :return: The policy formatted as a compact string.
        :raises: VendorChangeManagerError if parsing fails.

        |

        *Overload 2:*
        Convert a vendor change policy from TOML file to compact format.
        :type path: std::filesystem::path
        :param path: Path to the TOML configuration file.
        :rtype: string
        :return: The policy formatted as a compact string.
        :raises: VendorChangeManagerError if parsing fails.
        """
        return _base.VendorChangeManagerWeakPtr_convert_policy_toml_to_compact(self, *args)

    def convert_policy_compact_to_toml(self, compact_str, source):
        r"""
        Convert a vendor change policy from compact format to TOML format.
        :type compact_str: std::string_view
        :param compact_str: The policy in compact format.
        :type source: std::string_view
        :param source: Origin of the policy (for error messages).
        :rtype: string
        :return: The policy formatted as a TOML string.
        :raises: VendorChangeManagerError if parsing fails.
        """
        return _base.VendorChangeManagerWeakPtr_convert_policy_compact_to_toml(self, compact_str, source)

    def save_policy_from_toml(self, *args):
        r"""
        *Overload 1:*
        Save a vendor change policy from TOML format to a configuration file
        in the vendor directory (``/etc/dnf/vendors.d/`` or installroot equivalent).
        The TOML content is validated by parsing before saving.
        :type toml_content: std::string_view
        :param toml_content: The policy in TOML format.
        :type source: std::string_view
        :param source: Origin of the policy (for error messages and validation).
        :type base_filename: std::filesystem::path
        :param base_filename: Base filename without extension or path (e.g., ``"my-policy"``).
                                 Must not contain path components. The ``.conf`` extension is added automatically.
        :type allow_replace: boolean
        :param allow_replace: If ``true``, allows overwriting an existing policy file.
                                   If ``false``, throws if the file already exists.
        :rtype: std::filesystem::path
        :return: Path to the created policy file.
        :raises: VendorChangeManagerError if validation or file write fails,
                                             if base_filename contains path components,
                                             or if file exists and allow_replace is false.

        |

        *Overload 2:*
        Save a vendor change policy from a TOML file to a configuration file
        in the vendor directory (``/etc/dnf/vendors.d/`` or installroot equivalent).
        The TOML file content is validated by parsing before saving.
        :type path: std::filesystem::path
        :param path: Path to the TOML file containing the policy.
        :type base_filename: std::filesystem::path
        :param base_filename: Base filename without extension or path (e.g., ``"my-policy"``).
                                 Must not contain path components. The ``.conf`` extension is added automatically.
        :type allow_replace: boolean
        :param allow_replace: If ``true``, allows overwriting an existing policy file.
                                   If ``false``, throws if the file already exists.
        :rtype: std::filesystem::path
        :return: Path to the created policy file.
        :raises: VendorChangeManagerError if file read, validation, or write fails,
                                             if base_filename contains path components,
                                             or if file exists and allow_replace is false.
        """
        return _base.VendorChangeManagerWeakPtr_save_policy_from_toml(self, *args)

    def save_policy_from_compact(self, policy_str, source, base_filename, allow_replace):
        r"""
        Save a vendor change policy from compact format to a configuration file
        in the vendor directory (``/etc/dnf/vendors.d/`` or installroot equivalent).
        The policy is converted from compact format to TOML before saving.
        :type policy_str: std::string_view
        :param policy_str: The policy in compact format.
        :type source: std::string_view
        :param source: Origin of the policy (for error messages).
        :type base_filename: std::filesystem::path
        :param base_filename: Base filename without extension or path (e.g., ``"my-policy"``).
                                 Must not contain path components. The ``.conf`` extension is added automatically.
        :type allow_replace: boolean
        :param allow_replace: If ``true``, allows overwriting an existing policy file.
                                   If ``false``, throws if the file already exists.
        :rtype: std::filesystem::path
        :return: Path to the created policy file.
        :raises: VendorChangeManagerError if conversion or file write fails,
                                             if base_filename contains path components,
                                             or if file exists and allow_replace is false.
        """
        return _base.VendorChangeManagerWeakPtr_save_policy_from_compact(self, policy_str, source, base_filename, allow_replace)

    def remove_policy_file(self, base_filename):
        r"""
        Remove a vendor change policy configuration file.
        Removes the file from the vendor configuration directory (``/etc/dnf/vendors.d/`` or installroot equivalent).
        :type base_filename: std::filesystem::path
        :param base_filename: Base filename without extension or path (e.g., ``"my-policy"``).
                                 Must not contain path components. The ``.conf`` extension is added automatically.
        :rtype: std::filesystem::path
        :return: Path to the removed policy file.
        :raises: VendorChangeManagerError if base_filename contains path components or file removal fails.
        """
        return _base.VendorChangeManagerWeakPtr_remove_policy_file(self, base_filename)

    def get_policy_files(self):
        r"""
        Get a list of all vendor change policy configuration files.
        Returns paths to all ``.conf`` files from both vendor configuration directories
        (``/etc/dnf/vendors.d/`` and ``/usr/share/dnf5/vendors.d/`` or their installroot equivalents).
        The list is sorted in the same order as policies are loaded.
        :rtype: std::vector< std::filesystem::path,std::allocator< std::filesystem::path > >
        :return: Vector of paths to policy configuration files.
        """
        return _base.VendorChangeManagerWeakPtr_get_policy_files(self)

    def extract_policy_base_filename(self, path):
        r"""
        Extract base filename from a policy file path.
        Returns the filename without directory path and without the ``.conf`` extension.
        This is useful for converting paths returned by :func:`get_policy_files()` to the format
        expected by :func:`remove_policy_file()` and :func:`save_policy_from_compact()`.
        :type path: std::filesystem::path
        :param path: Path to a policy file (e.g., ``"/etc/dnf/vendors.d/my-policy.conf"``).
                        Must have ``.conf`` extension.
        :rtype: std::filesystem::path
        :return: Base filename without extension (e.g., ``"my-policy"``).
        :raises: VendorChangeManagerError if path does not have ``.conf`` extension.
        """
        return _base.VendorChangeManagerWeakPtr_extract_policy_base_filename(self, path)

    def is_policy_file_manageable(self, path):
        r"""
        Check if a policy file is manageable (can be removed or modified).
        Returns ``true`` if the file is in the writable vendor configuration directory
        (``/etc/dnf/vendors.d/`` or installroot equivalent). Files in the distribution
        directory (``/usr/share/dnf5/vendors.d/``) are system-provided and not manageable.
        :type path: std::filesystem::path
        :param path: Path to a policy file.
        :rtype: boolean
        :return: ``true`` if the file can be managed (removed/modified), ``false`` otherwise.
        """
        return _base.VendorChangeManagerWeakPtr_is_policy_file_manageable(self, path)

    def get_masked_policy_file(self, path):
        r"""
        Get the path to the policy file that is masked by the given file.
        A file in the vendor configuration directory (``/etc/dnf/vendors.d/``) masks
        a file with the same name in the distribution directory (``/usr/share/dnf5/vendors.d/``).
        :type path: std::filesystem::path
        :param path: Path to a policy file in the vendor configuration directory.
        :rtype: std::filesystem::path
        :return: Path to the masked file if the masked file exists,
                    empty path otherwise (if the masked file does not exist or path is invalid).
        """
        return _base.VendorChangeManagerWeakPtr_get_masked_policy_file(self, path)

    def find_policy_file(self, base_filename):
        r"""
        Find an existing policy file by base filename.
        Searches for a policy file with the given base filename, preferring the vendor
        configuration directory (``/etc/dnf/vendors.d/``) over the distribution directory
        (``/usr/share/dnf5/vendors.d/``).
        :type base_filename: std::filesystem::path
        :param base_filename: Base filename without extension or path (e.g., ``"my-policy"``).
        :rtype: std::filesystem::path
        :return: Path to the existing policy file (vendor or distribution),
                    empty path if no such file exists.
        """
        return _base.VendorChangeManagerWeakPtr_find_policy_file(self, base_filename)

# Register VendorChangeManagerWeakPtr in _base:
_base.VendorChangeManagerWeakPtr_swigregister(VendorChangeManagerWeakPtr)
class VectorPluginInfo(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 _base.VectorPluginInfo_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __bool__(self):
        return _base.VectorPluginInfo___bool__(self)

    def __len__(self):
        return _base.VectorPluginInfo___len__(self)

    def __delitem__(self, *args):
        return _base.VectorPluginInfo___delitem__(self, *args)

    def __getitem__(self, *args):
        return _base.VectorPluginInfo___getitem__(self, *args)

    def __setitem__(self, *args):
        return _base.VectorPluginInfo___setitem__(self, *args)

    def append(self, x):
        return _base.VectorPluginInfo_append(self, x)

    def empty(self):
        return _base.VectorPluginInfo_empty(self)

    def size(self):
        return _base.VectorPluginInfo_size(self)

    def swap(self, v):
        return _base.VectorPluginInfo_swap(self, v)

    def begin(self):
        return _base.VectorPluginInfo_begin(self)

    def end(self):
        return _base.VectorPluginInfo_end(self)

    def rbegin(self):
        return _base.VectorPluginInfo_rbegin(self)

    def rend(self):
        return _base.VectorPluginInfo_rend(self)

    def clear(self):
        return _base.VectorPluginInfo_clear(self)

    def get_allocator(self):
        return _base.VectorPluginInfo_get_allocator(self)

    def erase(self, *args):
        return _base.VectorPluginInfo_erase(self, *args)

    def __init__(self, *args):
        _base.VectorPluginInfo_swiginit(self, _base.new_VectorPluginInfo(*args))

    def front(self):
        return _base.VectorPluginInfo_front(self)

    def back(self):
        return _base.VectorPluginInfo_back(self)

    def assign(self, n, x):
        return _base.VectorPluginInfo_assign(self, n, x)

    def capacity(self):
        return _base.VectorPluginInfo_capacity(self)
    __swig_destroy__ = _base.delete_VectorPluginInfo

# Register VectorPluginInfo in _base:
_base.VectorPluginInfo_swigregister(VectorPluginInfo)
class TextValidatorCallback(object):
    r"""
    Input validator callback interface for text input validation.
    Plugins can implement custom validators by inheriting from this class.
    """

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

    def __init__(self):
        if self.__class__ == TextValidatorCallback:
            _self = None
        else:
            _self = self
        _base.TextValidatorCallback_swiginit(self, _base.new_TextValidatorCallback(_self, ))
    __swig_destroy__ = _base.delete_TextValidatorCallback

    def validate(self, input):
        r"""
        Validate text input.
        :type input: string
        :param input: The text input to validate
        :rtype: :py:class:`Message`
        :return: nullptr if the input is valid, or a pointer to a Message object with an error description if invalid.
                    The caller does NOT take ownership. The returned Message object must remain valid
                    until validate() is called again or the validator is destroyed.
                    Store the error Message as a member of the validator, not as a local variable:

            .. code-block:: c++

                class MyValidator : public TextValidatorCallback {
                    MyErrorMessage error_msg;   // a Message subclass stored as a member
                protected:
                    libdnf5::Message * validate(const std::string & input) override {
                        if (input.empty()) return &error_msg;
                        return nullptr;
                    }
                };
        """
        return _base.TextValidatorCallback_validate(self, input)
    def __disown__(self):
        self.this.disown()
        _base.disown_TextValidatorCallback(self)
        return weakref.proxy(self)

# Register TextValidatorCallback in _base:
_base.TextValidatorCallback_swigregister(TextValidatorCallback)
class TextValidator(object):
    r"""
    Created by Base, wrapping the caller's TextValidatorCallback.
    Overrides must not construct this class directly.
    """

    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 validate(self, input):
        r"""
        Validate text input by delegating to the underlying TextValidatorCallback.
        :rtype: :py:class:`Message`
        :return: nullptr if the input is valid, or a Message with an error description if invalid.
        """
        return _base.TextValidator_validate(self, input)

# Register TextValidator in _base:
_base.TextValidator_swigregister(TextValidator)
ANSWER_YES = _base.ANSWER_YES
r"""Return value constants for InteractionCallbacks confirm(), choice(), and input_text() methods. User confirmed / a string entered"""
ANSWER_NO = _base.ANSWER_NO
r"""User denied / undefined string"""
ANSWER_DEFAULT = _base.ANSWER_DEFAULT
r"""Use the caller-supplied default"""
ANSWER_ABORT = _base.ANSWER_ABORT
r"""Abort the operation (user request or I/O error)"""
class InteractionCallbacks(object):
    r"""
    Base class for interaction callbacks.
    To implement callbacks, inherit from this class and override virtual methods.

    These callbacks allow libdnf5 plugins to interact with the user through the application.
    The application implements these methods to provide user interface
    for messages, confirmations, choices, text input, and progress.
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    MessageLevel_ERROR = _base.InteractionCallbacks_MessageLevel_ERROR
    MessageLevel_WARNING = _base.InteractionCallbacks_MessageLevel_WARNING
    MessageLevel_NOTICE = _base.InteractionCallbacks_MessageLevel_NOTICE
    MessageLevel_INFO = _base.InteractionCallbacks_MessageLevel_INFO
    ProgressState_NEW = _base.InteractionCallbacks_ProgressState_NEW
    ProgressState_UPDATE = _base.InteractionCallbacks_ProgressState_UPDATE
    ProgressState_END_OK = _base.InteractionCallbacks_ProgressState_END_OK
    ProgressState_END_ERROR = _base.InteractionCallbacks_ProgressState_END_ERROR
    ProgressState_INFO = _base.InteractionCallbacks_ProgressState_INFO
    ProgressState_WARNING = _base.InteractionCallbacks_ProgressState_WARNING
    ProgressState_ERROR = _base.InteractionCallbacks_ProgressState_ERROR

    def __init__(self):
        if self.__class__ == InteractionCallbacks:
            _self = None
        else:
            _self = self
        _base.InteractionCallbacks_swiginit(self, _base.new_InteractionCallbacks(_self, ))
    __swig_destroy__ = _base.delete_InteractionCallbacks

    def message(self, level, msg):
        r"""
        Override to display a message to the user. Called via Base::message().
        :type level: int
        :param level: The message level (ERROR, WARNING, NOTICE, INFO)
        :param message: The message to display
        """
        return _base.InteractionCallbacks_message(self, level, msg)

    def confirm(self, msg, default_answer):
        r"""
        Override to ask the user to confirm an action. Called via Base::confirm().
        The default implementation returns `ANSWER_NO` if `assumeno` is set, `ANSWER_YES` if `assumeyes`
        is set, and `ANSWER_DEFAULT` otherwise.
        :param message: The confirmation message describing the action
        :type default_answer: boolean
        :param default_answer: The answer preferred by the caller, used when neither `assumeyes`
                   nor `assumeno` configuration option is active
        :rtype: int
        :return: `ANSWER_YES` (-1) to confirm, `ANSWER_NO` (-2) to deny, `ANSWER_DEFAULT` (-3) to use caller default,
                    `ANSWER_ABORT` (-4) to abort the operation
        """
        return _base.InteractionCallbacks_confirm(self, msg, default_answer)

    def choice(self, msg, options, default_option):
        r"""
        Override to ask the user to select an option. Called via Base::choice().
        :type msg: :py:class:`Message`
        :param msg: The message describing the choice
        :type options: std::vector< libdnf5::Message *,std::allocator< libdnf5::Message * > >
        :param options: Vector of pointers to available option messages (for translation support)
        :type default_option: int
        :param default_option: Index of the option preferred by the caller (0-based)
        :rtype: int
        :return: Index of the selected choice (0-based), `ANSWER_DEFAULT` (-3) to use caller default,
                    or `ANSWER_ABORT` (-4) to abort the operation
        """
        return _base.InteractionCallbacks_choice(self, msg, options, default_option)

    def input_text(self, msg, default_text, validator):
        r"""
        Override to ask the user for text input. Called via Base::input_text().
        The implementation should repeatedly prompt the user until valid input is provided
        or the user cancels. If a validator is provided, call validator->validate() on each
        input and display any error message before prompting again.
        :type out_text: string
        :param out_text: Output parameter - filled with user input when returning `ANSWER_YES` or `ANSWER_NO`
        :type msg: :py:class:`Message`
        :param msg: The message describing what input is needed
        :type default_text: string
        :param default_text: Optional pre-filled text offered to the user, or nullptr (default is undefined text).
        :type validator: :py:class:`TextValidator`
        :param validator: Optional validator for checking input validity, or nullptr to accept any input.
        :rtype: int
        :return: `ANSWER_YES` (-1) if a string was entered (out_text filled; may be empty/zero-length),
                    `ANSWER_NO` (-2) if no string was returned (out_text unchanged; analogous to NULL char*),
                    `ANSWER_DEFAULT` (-3) if the caller should use default_text (out_text unchanged),
                    `ANSWER_ABORT` (-4) to abort the operation (out_text unchanged)
        """
        return _base.InteractionCallbacks_input_text(self, msg, default_text, validator)

    def progress(self, handle, state, msg, count, total):
        r"""
        Override to report progress. Called via Base::progress().
        On NEW the implementation allocates a handle and returns it; the caller
        passes the same handle back in all subsequent calls for that entry.
        The handle is an opaque integer token whose meaning is defined solely
        by the implementation; the caller treats it as an integer number.
        :type handle: int
        :param handle:  For NEW: ignored. For other states: the handle returned
                           by the corresponding NEW call.
        :type state: int
        :param state:   The progress state
        :type msg: :py:class:`Message`
        :param msg:     Optional description of current activity, or nullptr
        :type count: int
        :param count:   Number of completed items
        :type total: int
        :param total:   Total number of items
        :rtype: int
        :return: For NEW: the handle of the new progress entry.
                    For other states: >= 0 to continue, < 0 to request cancellation.
            The default implementation returns 0 for NEW and returns the handle
            unchanged for all other states without performing any action.
        """
        return _base.InteractionCallbacks_progress(self, handle, state, msg, count, total)
    def __disown__(self):
        self.this.disown()
        _base.disown_InteractionCallbacks(self)
        return weakref.proxy(self)

# Register InteractionCallbacks in _base:
_base.InteractionCallbacks_swigregister(InteractionCallbacks)
class InteractionCallbacksUniquePtr(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):
        _base.InteractionCallbacksUniquePtr_swiginit(self, _base.new_InteractionCallbacksUniquePtr(*args))

    def __deref__(self):
        return _base.InteractionCallbacksUniquePtr___deref__(self)

    def release(self):
        return _base.InteractionCallbacksUniquePtr_release(self)

    def reset(self, __p=None):
        return _base.InteractionCallbacksUniquePtr_reset(self, __p)

    def swap(self, __u):
        return _base.InteractionCallbacksUniquePtr_swap(self, __u)

    def get(self):
        return _base.InteractionCallbacksUniquePtr_get(self)

    def __bool__(self):
        return _base.InteractionCallbacksUniquePtr___bool__(self)


    __swig_destroy__ = _base.delete_InteractionCallbacksUniquePtr

# Register InteractionCallbacksUniquePtr in _base:
_base.InteractionCallbacksUniquePtr_swigregister(InteractionCallbacksUniquePtr)
class Base(object):
    r"""
    Instances of :class:`libdnf5::Base` are the central point of functionality supplied by libdnf5.
    An application will typically create a single instance of this class which it will keep for the run-time needed to accomplish its packaging tasks.
    :class:`.Base` instances are stateful objects owning various data.
    """

    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"""Constructs a new Base instance and sets the destination loggers."""
        _base.Base_swiginit(self, _base.new_Base(*args))
    __swig_destroy__ = _base.delete_Base

    def set_download_callbacks(self, download_callbacks):
        return _base.Base_set_download_callbacks(self, download_callbacks)

    def get_download_callbacks(self):
        return _base.Base_get_download_callbacks(self)

    def set_interaction_callbacks(self, interaction_callbacks):
        r"""
        Sets the interaction callbacks instance used for user interaction by plugins.
        Replaces any previously set instance. Ownership is transferred to the Base instance.
        :type interaction_callbacks: std::unique_ptr< libdnf5::base::InteractionCallbacks >
        :param interaction_callbacks: The interaction callbacks instance to set. Passing nullptr clears the callbacks.
        """
        return _base.Base_set_interaction_callbacks(self, interaction_callbacks)

    def lock(self):
        r"""
        Sets the pointer to the locked instance "Base" to "this" instance. Blocks if the pointer is already set.
        Pointer to a locked "Base" instance can be obtained using "get_locked_base()".
        """
        return _base.Base_lock(self)

    def unlock(self):
        r"""
        Resets the pointer to a locked "Base" instance to "nullptr".
        Throws an exception if another or no instance is locked.
        """
        return _base.Base_unlock(self)

    @staticmethod
    def get_locked_base():
        r"""Returns a pointer to a locked "Base" instance or "nullptr" if no instance is locked."""
        return _base.Base_get_locked_base()

    def load_config(self):
        r"""
        Loads main configuration.
        The file defined in the current configuration and files in the drop-in directories are used.
        """
        return _base.Base_load_config(self)

    def get_config(self, *args):
        r"""
        :rtype: :py:class:`ConfigMain`
        :return: a reference to configuration
        """
        return _base.Base_get_config(self, *args)

    def get_logger(self):
        return _base.Base_get_logger(self)

    def get_comps_sack(self):
        return _base.Base_get_comps_sack(self)

    def get_repo_sack(self):
        return _base.Base_get_repo_sack(self)

    def get_rpm_package_sack(self):
        return _base.Base_get_rpm_package_sack(self)

    def get_module_sack(self):
        r"""Throws libdnf5::AssertionError when used with libdnf5 compiled without modules enabled."""
        return _base.Base_get_module_sack(self)

    def enable_disable_plugins(self, plugin_names, enable):
        r"""
        Adds a request to enable/disable plugins that match the names (glob patterns) in the list.
        Can be called multiple times. Requests (`plugin_names` and `enable` state) are queued.
        The enable state of a plugin is set according to the last matching request.
        Must be called before the Base::setup.
        :type plugin_names: std::vector< std::string,std::allocator< std::string > >
        :param plugin_names: Plugin names (glob patterns) to enable/disable
        :type enable: boolean
        :param enable: Request: true - enable plugins, false - disable plugins
        :raises: libdnf5::UserAssertionError When called after Base::setup
        """
        return _base.Base_enable_disable_plugins(self, plugin_names, enable)

    def get_plugins_info(self):
        r"""
        :rtype: std::vector< libdnf5::plugin::PluginInfo,std::allocator< libdnf5::plugin::PluginInfo > >
        :return: a list of information about plugins found during Base::setup
        :raises: libdnf5::UserAssertionError When called before Base::setup
        """
        return _base.Base_get_plugins_info(self)

    def setup(self):
        r"""
        Loads libdnf plugins, vars from environment, varsdirs and installroot (releasever, arch) and resolves
        configuration of protected_packages (glob:).
        To prevent differences between configuration and internal Base settings, following configurations
        will be locked: installroot, varsdir.
        The method is supposed to be called after configuration and vars are updated, application plugins applied
        their pre configuration modification in configuration, but before repositories are loaded or any Package
        or Advisory query created. The method is recommended to be called before loading  repositories, because
        not all variables for substitutions might be available. Caution - modification of vars after this call
        might be problematic, because architecture is already fixed for our solver.
        Calling the method for the second time result in throwing an exception
        """
        return _base.Base_setup(self)

    def get_vendor_change_manager(self):
        r"""
        Returns the VendorChangeManager instance.
        Must be called after setup().
        """
        return _base.Base_get_vendor_change_manager(self)

    def lock_system_repo(self, *args):
        r"""
        Acquire an advisory lock on the installroot's system repository.
        The lock will be automatically released when Base goes out of scope, or manually when unlock_system_repo is called.
        A WRITE lock can be downgraded to a READ lock but a READ lock cannot be upgraded to a WRITE lock.
        Should be called before the system repo is loaded, and the lock should be held until all transactions are
        complete and other processes can safely re-read the RPMDB and resolve transactions.
        :raises: libdnf5::SystemError if an unexpected error occurs when locking
        :rtype: boolean
        :return: true if acquiring the lock succeeded, false otherwise
        """
        return _base.Base_lock_system_repo(self, *args)

    def unlock_system_repo(self):
        r"""
        Release the lock obtained by lock_system_repo.
        Idempotent. No-op if there is currently no lock.
        :raises: libdnf5::SystemError if an unexpected error occurs when unlocking
        """
        return _base.Base_unlock_system_repo(self)

    def get_system_repo_lock(self):
        r"""Get a pointer to the lock on the system repo, or nullptr if no lock exists."""
        return _base.Base_get_system_repo_lock(self)

    def is_initialized(self):
        r"""Returns true when setup() (mandatory method in many workflows) was already called"""
        return _base.Base_is_initialized(self)

    def notify_repos_configured(self):
        r"""
        Notifies the libdnf5 library that the repositories are configured.  It can be called before `load_repos`.
        The libdnf5 library can then call plugins that can make final adjustments to the repositories configuration.
        In the case that it has not been called, it is called automatically at the beginning of the load_repos method.
        Calling the method for the second time result in throwing an exception.
        """
        return _base.Base_notify_repos_configured(self)

    def are_repos_configured(self):
        r"""Returns true when notify_repos_configured() was already called (by user or automatically)"""
        return _base.Base_are_repos_configured(self)

    def get_transaction_history(self):
        r"""Warning: This method is experimental/unstable and should not be relied on. It may be removed without warning"""
        return _base.Base_get_transaction_history(self)

    def get_vars(self):
        r"""Gets base variables. They can be used in configuration files. Syntax in the config - ${var_name} or $var_name."""
        return _base.Base_get_vars(self)

    def get_weak_ptr(self):
        return _base.Base_get_weak_ptr(self)

    def load_plugin_config(self, config_file_path):
        r"""
        Load libdnf5 plugin config, extract name of the plugin and check if it is enabled
        :type config_file_path: string
        :param config_file_path: Path to a plugin config
        :rtype: std::tuple< std::string,libdnf5::ConfigParser,bool >
        :return: a tuple with plugin name, parsed config and a bool whether the plugin is enabled
        """
        return _base.Base_load_plugin_config(self, config_file_path)

    def add_plugin(self, plugin_name, plugin_config, iplugin_instance):
        r"""
        Add libdnf5 plugin instance that introduces additional logic into the library using hooks.
        :type plugin_name: string
        :param plugin_name: Name of the new plugin
        :type plugin_config: :py:class:`ConfigParser`
        :param plugin_config: Parsed config of the new plugin
        :type iplugin_instance: :py:class:`IPlugin`
        :param iplugin_instance: New libdnf5 plugin instance
        """
        return _base.Base_add_plugin(self, plugin_name, plugin_config, iplugin_instance)

    def message(self, level, message):
        r"""
        Sends a message to the user via the registered interaction callbacks.
        If no interaction callbacks are registered, a default instance is created.
        :type level: int
        :param level: The message level (ERROR, WARNING, NOTICE, INFO)
        :type message: :py:class:`Message`
        :param message: The message to display
        """
        return _base.Base_message(self, level, message)

    def confirm(self, message, default_answer):
        r"""
        Asks the user to confirm an action via the registered interaction callbacks.
        If no interaction callbacks are registered, a default instance is created.
        :type message: :py:class:`Message`
        :param message: The confirmation message describing the action
        :type default_answer: boolean
        :param default_answer: The answer preferred by the caller, used when neither `assumeyes`
                   nor `assumeno` configuration option is active
        :rtype: int
        :return: `ANSWER_YES` (-1) to confirm, `ANSWER_NO` (-2) to deny, `ANSWER_DEFAULT` (-3) to use caller default,
                    `ANSWER_ABORT` (-4) to abort the operation
        """
        return _base.Base_confirm(self, message, default_answer)

    def choice(self, message, options, default_option):
        r"""
        Asks the user to select an option via the registered interaction callbacks.
        If no interaction callbacks are registered, a default instance is created.
        :type message: :py:class:`Message`
        :param message: The message describing the choice
        :type options: std::vector< libdnf5::Message *,std::allocator< libdnf5::Message * > >
        :param options: Vector of pointers to available option messages (for translation support)
        :type default_option: int
        :param default_option: Index of the option preferred by the caller (0-based)
        :rtype: int
        :return: Index of the selected choice (0-based), `ANSWER_DEFAULT` (-3) to use caller default,
                    or `ANSWER_ABORT` (-4) to abort the operation
        """
        return _base.Base_choice(self, message, options, default_option)

    def input_text(self, message, default_text, validator):
        r"""
        Asks the user for text input via the registered interaction callbacks.
        If no interaction callbacks are registered, a default instance is created.
        :type out_text: string
        :param out_text: Output parameter - filled with user input when returning `ANSWER_YES` or `ANSWER_NO`
        :type message: :py:class:`Message`
        :param message: The message describing what input is needed
        :type default_text: string
        :param default_text: Optional pre-filled text offered to the user, or nullptr (default is undefined text).
        :type validator: :py:class:`TextValidatorCallback`
        :param validator: Optional validator to check if input is valid. If nullptr, any input is accepted.
        :rtype: int
        :return: `ANSWER_YES` (-1) if a string was entered (out_text filled; may be empty/zero-length),
                    `ANSWER_NO` (-2) if no string was returned (out_text unchanged; analogous to NULL char*),
                    `ANSWER_DEFAULT` (-3) if the caller should use default_text (out_text unchanged),
                    `ANSWER_ABORT` (-4) to abort the operation (out_text unchanged)
        """
        return _base.Base_input_text(self, message, default_text, validator)

    def progress(self, handle, state, msg, count, total):
        r"""
        Reports progress via the registered interaction callbacks.
        If no interaction callbacks are registered, a default instance is created.
        :type handle: int
        :param handle:  Ignored for NEW; identifies the progress for other states
        :type state: int
        :param state:   The progress state
        :type msg: :py:class:`Message`
        :param msg:     Optional description of current activity, or nullptr
        :type count: int
        :param count:   Number of completed items
        :type total: int
        :param total:   Total number of items
        :rtype: int
        :return: For NEW: handle of the new progress entry (>= 0).
                    For other states: >= 0 to continue, < 0 to request cancellation.
        """
        return _base.Base_progress(self, handle, state, msg, count, total)

# Register Base in _base:
_base.Base_swigregister(Base)
class VendorChangeManager(object):
    r"""
    Manages vendor change policies that control which package vendor transitions are allowed.

    Policies can be loaded from TOML configuration files (typically found in
    ``/etc/dnf/vendors.d/`` and ``/usr/share/dnf5/vendors.d/``) or from a compact
    string representation suitable for command-line use.

    Policies loaded from configuration files during :func:`Base::setup()` are applied
    automatically. Additional policies can be added at runtime via this class.

    An instance is obtained from :func:`Base::get_vendor_change_manager()` after
    :func:`Base::setup()` has been called.
    """

    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
    __swig_destroy__ = _base.delete_VendorChangeManager

    def get_weak_ptr(self):
        r"""
        :rtype: :py:class:`VendorChangeManagerWeakPtr`
        :return: A weak pointer to this VendorChangeManager instance.
        """
        return _base.VendorChangeManager_get_weak_ptr(self)

    def load_policy_from_toml(self, *args):
        r"""
        *Overload 1:*
        Load a vendor change policy from TOML content.
        The content must conform to the vendor change policy format.
        :type toml_content: std::string_view
        :param toml_content: The TOML content to parse.
        :type source: std::string_view
        :param source: Origin of the policy (file URI or custom label with ``text:`` prefix,
                          e.g., ``"text:COMMAND LINE"``). Stored for diagnostics and logging.
        :raises: VendorChangeManagerError if the content cannot be parsed or contains invalid values.

        |

        *Overload 2:*
        Load one vendor change policy from a TOML configuration file.
        The file must conform to the vendor change policy format.
        :type path: std::filesystem::path
        :param path: Path to the TOML configuration file.
        :raises: VendorChangeManagerError if the file cannot be parsed or contains invalid values.
        """
        return _base.VendorChangeManager_load_policy_from_toml(self, *args)

    def load_policy_from_compact(self, policy_str, source):
        r"""
        Load a vendor change policy from a compact string representation.

        The compact format is: ``direction:eop"value",...:e[filters],...``

        Both sections (before and after ````) are optional, but at least one must be present.
        Vendor entries use direction prefixes ``in:``, ``out:``, or ``eq:`` followed by
        an optional ``e`` (exclude) flag and an operator with a quoted value.
        Package filter entries are enclosed in literal ``[...]`` after the ```` separator.

        Example: ``eq:i^"Fedora",in:"Third Vendor":[version>="2.0"]``

        :type policy_str: std::string_view
        :param policy_str: The compact policy string to parse.
        :type source: std::string_view
        :param source: Origin of the policy (file URI or custom label with ``text:`` prefix,
                          e.g., ``"text:COMMAND LINE"``). Stored for diagnostics and logging.
        :raises: VendorChangeManagerError if the string cannot be parsed.
        """
        return _base.VendorChangeManager_load_policy_from_compact(self, policy_str, source)

    def unload_policies(self):
        r"""
        Unload all vendor change policies from memory.
        :rtype: std::size_t
        :return: The number of policies that were unloaded.
        """
        return _base.VendorChangeManager_unload_policies(self)

    def unload_policy(self, index):
        r"""
        Unload a vendor change policy at the specified index.
        :type index: std::size_t
        :param index: The index of the policy to unload (0-based).
        :raises: VendorChangeManagerError if index is out of bounds.
        """
        return _base.VendorChangeManager_unload_policy(self, index)

    def unload_policies_matching_source(self, source_pattern):
        r"""
        Unload vendor change policies whose source matches the specified pattern.
        The pattern may contain glob wildcards.
        :type source_pattern: string
        :param source_pattern: A glob pattern to match against policy sources.
        :rtype: std::size_t
        :return: The number of policies that were unloaded.
        :raises: VendorChangeManagerError if the pattern is invalid.
        """
        return _base.VendorChangeManager_unload_policies_matching_source(self, source_pattern)

    def get_loaded_policies_count(self):
        r"""
        Get the number of loaded vendor change policies.
        :rtype: std::size_t
        :return: The number of currently loaded policies.
        """
        return _base.VendorChangeManager_get_loaded_policies_count(self)

    def get_loaded_policy_source(self, index):
        r"""
        Get the source (origin) of a loaded vendor change policy.
        :type index: std::size_t
        :param index: The index of the loaded policy (0-based).
        :rtype: string
        :return: The source string (file URI or custom label with ``text:`` prefix).
        :raises: VendorChangeManagerError if index is out of bounds.
        """
        return _base.VendorChangeManager_get_loaded_policy_source(self, index)

    def get_loaded_policy_as_toml(self, index):
        r"""
        Get a loaded vendor change policy as a TOML string.
        :type index: std::size_t
        :param index: The index of the loaded policy (0-based).
        :rtype: string
        :return: The policy formatted as a TOML string.
        :raises: VendorChangeManagerError if index is out of bounds.
        """
        return _base.VendorChangeManager_get_loaded_policy_as_toml(self, index)

    def get_loaded_policy_as_compact(self, index):
        r"""
        Get a loaded vendor change policy as a compact format string.
        :type index: std::size_t
        :param index: The index of the loaded policy (0-based).
        :rtype: string
        :return: The policy formatted as a compact string.
        :raises: VendorChangeManagerError if index is out of bounds.
        """
        return _base.VendorChangeManager_get_loaded_policy_as_compact(self, index)

    @staticmethod
    def convert_policy_toml_to_compact(*args):
        r"""
        *Overload 1:*
        Convert a vendor change policy from TOML content to compact format.
        :type toml_content: std::string_view
        :param toml_content: The TOML content to parse.
        :type source: std::string_view
        :param source: Origin of the policy (for error messages).
        :rtype: string
        :return: The policy formatted as a compact string.
        :raises: VendorChangeManagerError if parsing fails.

        |

        *Overload 2:*
        Convert a vendor change policy from TOML file to compact format.
        :type path: std::filesystem::path
        :param path: Path to the TOML configuration file.
        :rtype: string
        :return: The policy formatted as a compact string.
        :raises: VendorChangeManagerError if parsing fails.
        """
        return _base.VendorChangeManager_convert_policy_toml_to_compact(*args)

    @staticmethod
    def convert_policy_compact_to_toml(compact_str, source):
        r"""
        Convert a vendor change policy from compact format to TOML format.
        :type compact_str: std::string_view
        :param compact_str: The policy in compact format.
        :type source: std::string_view
        :param source: Origin of the policy (for error messages).
        :rtype: string
        :return: The policy formatted as a TOML string.
        :raises: VendorChangeManagerError if parsing fails.
        """
        return _base.VendorChangeManager_convert_policy_compact_to_toml(compact_str, source)

    def save_policy_from_toml(self, *args):
        r"""
        *Overload 1:*
        Save a vendor change policy from TOML format to a configuration file
        in the vendor directory (``/etc/dnf/vendors.d/`` or installroot equivalent).
        The TOML content is validated by parsing before saving.
        :type toml_content: std::string_view
        :param toml_content: The policy in TOML format.
        :type source: std::string_view
        :param source: Origin of the policy (for error messages and validation).
        :type base_filename: std::filesystem::path
        :param base_filename: Base filename without extension or path (e.g., ``"my-policy"``).
                                 Must not contain path components. The ``.conf`` extension is added automatically.
        :type allow_replace: boolean
        :param allow_replace: If ``true``, allows overwriting an existing policy file.
                                   If ``false``, throws if the file already exists.
        :rtype: std::filesystem::path
        :return: Path to the created policy file.
        :raises: VendorChangeManagerError if validation or file write fails,
                                             if base_filename contains path components,
                                             or if file exists and allow_replace is false.

        |

        *Overload 2:*
        Save a vendor change policy from a TOML file to a configuration file
        in the vendor directory (``/etc/dnf/vendors.d/`` or installroot equivalent).
        The TOML file content is validated by parsing before saving.
        :type path: std::filesystem::path
        :param path: Path to the TOML file containing the policy.
        :type base_filename: std::filesystem::path
        :param base_filename: Base filename without extension or path (e.g., ``"my-policy"``).
                                 Must not contain path components. The ``.conf`` extension is added automatically.
        :type allow_replace: boolean
        :param allow_replace: If ``true``, allows overwriting an existing policy file.
                                   If ``false``, throws if the file already exists.
        :rtype: std::filesystem::path
        :return: Path to the created policy file.
        :raises: VendorChangeManagerError if file read, validation, or write fails,
                                             if base_filename contains path components,
                                             or if file exists and allow_replace is false.
        """
        return _base.VendorChangeManager_save_policy_from_toml(self, *args)

    def save_policy_from_compact(self, policy_str, source, base_filename, allow_replace):
        r"""
        Save a vendor change policy from compact format to a configuration file
        in the vendor directory (``/etc/dnf/vendors.d/`` or installroot equivalent).
        The policy is converted from compact format to TOML before saving.
        :type policy_str: std::string_view
        :param policy_str: The policy in compact format.
        :type source: std::string_view
        :param source: Origin of the policy (for error messages).
        :type base_filename: std::filesystem::path
        :param base_filename: Base filename without extension or path (e.g., ``"my-policy"``).
                                 Must not contain path components. The ``.conf`` extension is added automatically.
        :type allow_replace: boolean
        :param allow_replace: If ``true``, allows overwriting an existing policy file.
                                   If ``false``, throws if the file already exists.
        :rtype: std::filesystem::path
        :return: Path to the created policy file.
        :raises: VendorChangeManagerError if conversion or file write fails,
                                             if base_filename contains path components,
                                             or if file exists and allow_replace is false.
        """
        return _base.VendorChangeManager_save_policy_from_compact(self, policy_str, source, base_filename, allow_replace)

    def remove_policy_file(self, base_filename):
        r"""
        Remove a vendor change policy configuration file.
        Removes the file from the vendor configuration directory (``/etc/dnf/vendors.d/`` or installroot equivalent).
        :type base_filename: std::filesystem::path
        :param base_filename: Base filename without extension or path (e.g., ``"my-policy"``).
                                 Must not contain path components. The ``.conf`` extension is added automatically.
        :rtype: std::filesystem::path
        :return: Path to the removed policy file.
        :raises: VendorChangeManagerError if base_filename contains path components or file removal fails.
        """
        return _base.VendorChangeManager_remove_policy_file(self, base_filename)

    def get_policy_files(self):
        r"""
        Get a list of all vendor change policy configuration files.
        Returns paths to all ``.conf`` files from both vendor configuration directories
        (``/etc/dnf/vendors.d/`` and ``/usr/share/dnf5/vendors.d/`` or their installroot equivalents).
        The list is sorted in the same order as policies are loaded.
        :rtype: std::vector< std::filesystem::path,std::allocator< std::filesystem::path > >
        :return: Vector of paths to policy configuration files.
        """
        return _base.VendorChangeManager_get_policy_files(self)

    @staticmethod
    def extract_policy_base_filename(path):
        r"""
        Extract base filename from a policy file path.
        Returns the filename without directory path and without the ``.conf`` extension.
        This is useful for converting paths returned by :func:`get_policy_files()` to the format
        expected by :func:`remove_policy_file()` and :func:`save_policy_from_compact()`.
        :type path: std::filesystem::path
        :param path: Path to a policy file (e.g., ``"/etc/dnf/vendors.d/my-policy.conf"``).
                        Must have ``.conf`` extension.
        :rtype: std::filesystem::path
        :return: Base filename without extension (e.g., ``"my-policy"``).
        :raises: VendorChangeManagerError if path does not have ``.conf`` extension.
        """
        return _base.VendorChangeManager_extract_policy_base_filename(path)

    def is_policy_file_manageable(self, path):
        r"""
        Check if a policy file is manageable (can be removed or modified).
        Returns ``true`` if the file is in the writable vendor configuration directory
        (``/etc/dnf/vendors.d/`` or installroot equivalent). Files in the distribution
        directory (``/usr/share/dnf5/vendors.d/``) are system-provided and not manageable.
        :type path: std::filesystem::path
        :param path: Path to a policy file.
        :rtype: boolean
        :return: ``true`` if the file can be managed (removed/modified), ``false`` otherwise.
        """
        return _base.VendorChangeManager_is_policy_file_manageable(self, path)

    def get_masked_policy_file(self, path):
        r"""
        Get the path to the policy file that is masked by the given file.
        A file in the vendor configuration directory (``/etc/dnf/vendors.d/``) masks
        a file with the same name in the distribution directory (``/usr/share/dnf5/vendors.d/``).
        :type path: std::filesystem::path
        :param path: Path to a policy file in the vendor configuration directory.
        :rtype: std::filesystem::path
        :return: Path to the masked file if the masked file exists,
                    empty path otherwise (if the masked file does not exist or path is invalid).
        """
        return _base.VendorChangeManager_get_masked_policy_file(self, path)

    def find_policy_file(self, base_filename):
        r"""
        Find an existing policy file by base filename.
        Searches for a policy file with the given base filename, preferring the vendor
        configuration directory (``/etc/dnf/vendors.d/``) over the distribution directory
        (``/usr/share/dnf5/vendors.d/``).
        :type base_filename: std::filesystem::path
        :param base_filename: Base filename without extension or path (e.g., ``"my-policy"``).
        :rtype: std::filesystem::path
        :return: Path to the existing policy file (vendor or distribution),
                    empty path if no such file exists.
        """
        return _base.VendorChangeManager_find_policy_file(self, base_filename)

# Register VendorChangeManager in _base:
_base.VendorChangeManager_swigregister(VendorChangeManager)
class SolverProblems(object):
    r"""Represent problems detected by a RPM solver (libsolv)"""

    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"""Public constructor"""
        _base.SolverProblems_swiginit(self, _base.new_SolverProblems(*args))
    __swig_destroy__ = _base.delete_SolverProblems

    def get_problems(self):
        r"""
        Provide information about package solver problems in a vector. Each problem can be transformed to string by
        package_solver_problem_to_string or all problems to a string by all_package_solver_problems_to_string().

        :rtype: std::vector< std::vector< std::pair< libdnf5::ProblemRules,std::vector< std::string,std::allocator< std::string > > >,std::allocator< std::pair< libdnf5::ProblemRules,std::vector< std::string,std::allocator< std::string > > > > >,std::allocator< std::vector< std::pair< libdnf5::ProblemRules,std::vector< std::string,std::allocator< std::string > > >,std::allocator< std::pair< libdnf5::ProblemRules,std::vector< std::string,std::allocator< std::string > > > > > > >
        :return: Vector of problems encountered by the solver. Each problem is described by a vector of "rule breakages"
            (TODO(lukash) try to find a better name for this) stored
            in a `std::pair<libdnf5::ProblemRules, std::vector<std::string>>`, where the first of the pair is a rule breakage
            identifier and the second is a list of string identifiers which are the subjects of the rule breakage. These can
            be rendered into a string by the `problem_to_string()` method.
        """
        return _base.SolverProblems_get_problems(self)

    def to_string(self):
        r"""Convert SolverProblems class to string representative;"""
        return _base.SolverProblems_to_string(self)

    @staticmethod
    def problem_to_string(raw):
        r"""Convert particular package solver problem to a string;"""
        return _base.SolverProblems_problem_to_string(raw)

# Register SolverProblems in _base:
_base.SolverProblems_swigregister(SolverProblems)
class LogEvent(object):
    r"""Contain information, hint, or a problem created during libdnf5::Goal::resolve()"""

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

    def __init__(self, *args):
        r"""Public constructor"""
        _base.LogEvent_swiginit(self, _base.new_LogEvent(*args))

    def get_action(self):
        r"""
        :rtype: int
        :return: GoalAction for which goal event was created
        """
        return _base.LogEvent_get_action(self)

    def get_problem(self):
        r"""
        :rtype: int
        :return: GoalProblem that specify the type of report
        """
        return _base.LogEvent_get_problem(self)

    def get_additional_data(self):
        r"""
        :rtype: std::set< std::string,std::less< std::string >,std::allocator< std::string > >
        :return: Additional information (internal), that are required for formatted string
        """
        return _base.LogEvent_get_additional_data(self)

    def get_job_settings(self):
        r"""
        :rtype: :py:class:`GoalJobSettings`
        :return: GoalJobSetting if it is relevant for the particular GoalProblem
        """
        return _base.LogEvent_get_job_settings(self)

    def get_spec(self):
        r"""
        :rtype: string
        :return: SPEC if it is relevant for the particular GoalProblem
        """
        return _base.LogEvent_get_spec(self)

    def get_solver_problems(self):
        r"""
        :rtype: :py:class:`SolverProblems`
        :return: SolverProblems if they are relevant for the particular GoalProblem
        """
        return _base.LogEvent_get_solver_problems(self)

    def to_string(self):
        r"""Convert an element from resolve log to string;"""
        return _base.LogEvent_to_string(self)

# Register LogEvent in _base:
_base.LogEvent_swigregister(LogEvent)
class ActiveTransactionInfo(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):
        _base.ActiveTransactionInfo_swiginit(self, _base.new_ActiveTransactionInfo(*args))
    __swig_destroy__ = _base.delete_ActiveTransactionInfo

    def get_description(self):
        r"""
        Get the transaction description
        :rtype: string
        :return: Description string
        """
        return _base.ActiveTransactionInfo_get_description(self)

    def get_comment(self):
        r"""
        Get the transaction comment
        :rtype: string
        :return: Comment string
        """
        return _base.ActiveTransactionInfo_get_comment(self)

    def get_pid(self):
        r"""
        Get the process ID of the transaction
        :rtype: int
        :return: Process ID, or -1 if not available
        """
        return _base.ActiveTransactionInfo_get_pid(self)

    def get_start_time(self):
        r"""
        Get the transaction start time as Unix timestamp
        :rtype: int
        :return: Unix timestamp (seconds since epoch), or 0 if not available
        """
        return _base.ActiveTransactionInfo_get_start_time(self)

    def set_description(self, description):
        return _base.ActiveTransactionInfo_set_description(self, description)

    def set_comment(self, comment):
        return _base.ActiveTransactionInfo_set_comment(self, comment)

    def set_pid(self, pid):
        return _base.ActiveTransactionInfo_set_pid(self, pid)

    def set_start_time(self, start_time):
        return _base.ActiveTransactionInfo_set_start_time(self, start_time)

    def to_toml(self):
        r"""
        Convert ActiveTransactionInfo to TOML string format
        :rtype: string
        :return: TOML formatted string representation
        :raises: std::runtime_error if TOML formatting fails
        """
        return _base.ActiveTransactionInfo_to_toml(self)

    @staticmethod
    def from_toml(toml_string):
        r"""
        Create ActiveTransactionInfo from TOML string
        :type toml_string: string
        :param toml_string: The TOML string to parse
        :rtype: :py:class:`ActiveTransactionInfo`
        :return: ActiveTransactionInfo object parsed from TOML
        :raises: ActiveTransactionInfoParseError if TOML parsing fails
        """
        return _base.ActiveTransactionInfo_from_toml(toml_string)

# Register ActiveTransactionInfo in _base:
_base.ActiveTransactionInfo_swigregister(ActiveTransactionInfo)
class Transaction(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    TransactionRunResult_SUCCESS = _base.Transaction_TransactionRunResult_SUCCESS
    TransactionRunResult_ERROR_RERUN = _base.Transaction_TransactionRunResult_ERROR_RERUN
    TransactionRunResult_ERROR_RESOLVE = _base.Transaction_TransactionRunResult_ERROR_RESOLVE
    TransactionRunResult_ERROR_LOCK = _base.Transaction_TransactionRunResult_ERROR_LOCK
    TransactionRunResult_ERROR_CHECK = _base.Transaction_TransactionRunResult_ERROR_CHECK
    TransactionRunResult_ERROR_RPM_RUN = _base.Transaction_TransactionRunResult_ERROR_RPM_RUN
    TransactionRunResult_ERROR_GPG_CHECK = _base.Transaction_TransactionRunResult_ERROR_GPG_CHECK

    def __init__(self, *args):
        _base.Transaction_swiginit(self, _base.new_Transaction(*args))
    __swig_destroy__ = _base.delete_Transaction

    def get_problems(self):
        r"""
        Return basic overview about result of resolving transaction.
        To get complete information, use get_resolve_logs().
        """
        return _base.Transaction_get_problems(self)

    def get_resolve_logs(self):
        r"""
        Returns information about resolvement of Goal.
        :rtype: std::vector< libdnf5::base::LogEvent,std::allocator< libdnf5::base::LogEvent > >
        :return: A vector of LogEvent instances.
        """
        return _base.Transaction_get_resolve_logs(self)

    def get_resolve_logs_as_strings(self):
        r"""
        Returns information about resolvement of Goal as a list of printable messages
        :rtype: std::vector< std::string,std::allocator< std::string > >
        :return: A vector of string representations of problems.
        """
        return _base.Transaction_get_resolve_logs_as_strings(self)

    def get_transaction_packages(self):
        r"""
        :rtype: std::vector< libdnf5::base::TransactionPackage,std::allocator< libdnf5::base::TransactionPackage > >
        :return: the transaction packages.
        """
        return _base.Transaction_get_transaction_packages(self)

    def get_transaction_packages_count(self):
        r"""
        :rtype: std::size_t
        :return: the number of transaction packages.
        """
        return _base.Transaction_get_transaction_packages_count(self)

    def get_transaction_groups(self):
        r"""
        :rtype: std::vector< libdnf5::base::TransactionGroup,std::allocator< libdnf5::base::TransactionGroup > >
        :return: the transaction groups.
        """
        return _base.Transaction_get_transaction_groups(self)

    def get_transaction_modules(self):
        r"""
        :rtype: std::vector< libdnf5::base::TransactionModule,std::allocator< libdnf5::base::TransactionModule > >
        :return: the transaction modules.
        """
        return _base.Transaction_get_transaction_modules(self)

    def get_transaction_environments(self):
        r"""
        :rtype: std::vector< libdnf5::base::TransactionEnvironment,std::allocator< libdnf5::base::TransactionEnvironment > >
        :return: environmental groups that are part of the transaction.
        """
        return _base.Transaction_get_transaction_environments(self)

    def get_broken_dependency_packages(self):
        r"""
        :rtype: std::vector< libdnf5::rpm::Package,std::allocator< libdnf5::rpm::Package > >
        :return: list of packages skipped due to broken dependencies
        """
        return _base.Transaction_get_broken_dependency_packages(self)

    def get_conflicting_packages(self):
        r"""
        :rtype: std::vector< libdnf5::rpm::Package,std::allocator< libdnf5::rpm::Package > >
        :return: list of packages skipped due to conflicts
        """
        return _base.Transaction_get_conflicting_packages(self)

    def get_vendor_change_skipped_packages(self):
        r"""
        :rtype: std::vector< std::pair< libdnf5::rpm::Package,std::string >,std::allocator< std::pair< libdnf5::rpm::Package,std::string > > >
        :return: list of packages skipped due to vendor change restriction, paired with installed vendor string
        """
        return _base.Transaction_get_vendor_change_skipped_packages(self)

    def empty(self):
        r"""
        :rtype: boolean
        :return: `true` if the transaction is empty.
        """
        return _base.Transaction_empty(self)

    def download(self):
        r"""
        Download all inbound packages (packages that are being installed on the
        system). Fails immediately on the first package download failure. Will
        try to resume downloads of any partially-downloaded RPMs.

        The destination directory for downloaded RPMs is taken from the `destdir`
        configuration option. If it's not specified, the standard location of
        repo cachedir/packages is used.
        """
        return _base.Transaction_download(self)

    def test(self):
        r"""
        Check the transaction by running it with RPMTRANS_FLAG_TEST. The import
        of any necessary public keys will be requested, and transaction checks
        will be performed, but no changes to the installed package set will be
        made. These checks are performed automatically by run(); it is
        redundant to call test() before calling run().
        :rtype: int
        :return: An enum describing the result of the transaction
        """
        return _base.Transaction_test(self)

    def run(self):
        r"""
        Prepare, check and run the transaction.

        All the transaction metadata that was set (`description`, `user_id` or `comment`)
        is stored in the history database.

        To watch progress or trigger actions during specific transactions events,
        setup the `callbacks` object.

        After a successful transaction, any temporarily downloaded packages are removed
        if the 'keepcache' option is set to 'false' and the transaction involved an inbound action.
        Otherwise, the packages are preserved on the disk.

        :rtype: int
        :return: An enum describing the result of running the transaction.
        """
        return _base.Transaction_run(self)

    def set_callbacks(self, callbacks):
        r"""
        Setup callbacks to be called during rpm transaction.
        :type callbacks: std::unique_ptr< libdnf5::rpm::TransactionCallbacks >
        :param callbacks: Implemented callbacks object.
        """
        return _base.Transaction_set_callbacks(self, callbacks)

    def set_description(self, description):
        r"""
        Setup a description of the transaction.
        :type description: string
        :param description: Value could be the console command for CLI or verbose description for API usage.
        """
        return _base.Transaction_set_description(self, description)

    def set_user_id(self, user_id):
        r"""
        Setup the id of the user that started the transaction. If not set, current login user UID is used.
        :type user_id: int
        :param user_id: UID value.
        """
        return _base.Transaction_set_user_id(self, user_id)

    def set_comment(self, comment):
        r"""
        Setup a comment to store in the history database along with the transaction.
        :type comment: string
        :param comment: Any string value.
        """
        return _base.Transaction_set_comment(self, comment)

    def set_persistence(self, persistence):
        r"""
        Setup the persistence of the transaction (persist or transient).
        :type persistence: libdnf5::base::TransactionPersistence
        :param persistence: TransactionPersistence value.
        """
        return _base.Transaction_set_persistence(self, persistence)

    @staticmethod
    def transaction_result_to_string(result):
        r"""Return string representation of the TransactionRunResult enum"""
        return _base.Transaction_transaction_result_to_string(result)

    def get_transaction_problems(self):
        r"""Retrieve list of problems that occurred during transaction run attempt"""
        return _base.Transaction_get_transaction_problems(self)

    def check_gpg_signatures(self):
        r"""
        Check signatures of packages in the resolved transaction.

        :rtype: boolean
        :return: True if all packages have correct signatures or checking is turned off with `pkg_gpgcheck` option,
            otherwise false. More info about occurred problems can be retrieved using the `get_gpg_signature_problems`
            method.
        """
        return _base.Transaction_check_gpg_signatures(self)

    def get_gpg_signature_problems(self):
        r"""Retrieve a list of the problems that occurred during `check_gpg_signatures` procedure."""
        return _base.Transaction_get_gpg_signature_problems(self)

    def serialize(self, *args):
        r"""
        Warning: This method is experimental/unstable and should not be relied on. It may be removed without warning
        Serialize the transaction into a json data format which can be later loaded
        into a `libdnf5::Goal` and replayed.
        :type packages_path: std::filesystem::path, optional
        :param packages_path: If provided it is assumed all packages in this transaction are present there and
                                 the resulting serialized transaction will contain paths to those packages.
        :type comps_path: std::filesystem::path, optional
        :param comps_path: If provided it is assumed all comps in this transaction are present there and
                              the resulting serialized transaction will contain paths to those xml comps files
                              (they can be stored using the `store_comps` method).
        :type repo_prefix: string, optional
        :param repo_prefix: If provided each repository id (except for repo) used in this transaction
                               will be wrapped in brackets and prefix by repo_prefix.
        """
        return _base.Transaction_serialize(self, *args)

    def store_comps(self, comps_path):
        r"""
        Warning: This method is experimental/unstable and should not be relied on. It may be removed without warning
        Store each group and environment in this transaction as a separate xml file in the
        specified path.
        """
        return _base.Transaction_store_comps(self, comps_path)

    def set_download_local_pkgs(self, value):
        r"""
        Set whether local packages should be copied to the destination directory during the download().

        Default: false
        """
        return _base.Transaction_set_download_local_pkgs(self, value)

    def get_download_local_pkgs(self):
        return _base.Transaction_get_download_local_pkgs(self)

    def get_last_script_output(self):
        r"""Retrieve output of the last executed rpm scriptlet."""
        return _base.Transaction_get_last_script_output(self)

    def get_rpm_messages(self):
        r"""Retrieve captured RPM log messages"""
        return _base.Transaction_get_rpm_messages(self)

    def get_concurrent_transaction(self):
        r"""Retrieve metadata of concurrently running transaction"""
        return _base.Transaction_get_concurrent_transaction(self)

# Register Transaction in _base:
_base.Transaction_swigregister(Transaction)
class VectorLogEvent(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 _base.VectorLogEvent_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __bool__(self):
        return _base.VectorLogEvent___bool__(self)

    def __len__(self):
        return _base.VectorLogEvent___len__(self)

    def __delitem__(self, *args):
        return _base.VectorLogEvent___delitem__(self, *args)

    def __getitem__(self, *args):
        return _base.VectorLogEvent___getitem__(self, *args)

    def __setitem__(self, *args):
        return _base.VectorLogEvent___setitem__(self, *args)

    def pop(self):
        return _base.VectorLogEvent_pop(self)

    def append(self, x):
        return _base.VectorLogEvent_append(self, x)

    def empty(self):
        return _base.VectorLogEvent_empty(self)

    def size(self):
        return _base.VectorLogEvent_size(self)

    def swap(self, v):
        return _base.VectorLogEvent_swap(self, v)

    def begin(self):
        return _base.VectorLogEvent_begin(self)

    def end(self):
        return _base.VectorLogEvent_end(self)

    def rbegin(self):
        return _base.VectorLogEvent_rbegin(self)

    def rend(self):
        return _base.VectorLogEvent_rend(self)

    def clear(self):
        return _base.VectorLogEvent_clear(self)

    def get_allocator(self):
        return _base.VectorLogEvent_get_allocator(self)

    def pop_back(self):
        return _base.VectorLogEvent_pop_back(self)

    def erase(self, *args):
        return _base.VectorLogEvent_erase(self, *args)

    def __init__(self, *args):
        _base.VectorLogEvent_swiginit(self, _base.new_VectorLogEvent(*args))

    def push_back(self, x):
        return _base.VectorLogEvent_push_back(self, x)

    def front(self):
        return _base.VectorLogEvent_front(self)

    def back(self):
        return _base.VectorLogEvent_back(self)

    def assign(self, n, x):
        return _base.VectorLogEvent_assign(self, n, x)

    def insert(self, *args):
        return _base.VectorLogEvent_insert(self, *args)

    def reserve(self, n):
        return _base.VectorLogEvent_reserve(self, n)

    def capacity(self):
        return _base.VectorLogEvent_capacity(self)
    __swig_destroy__ = _base.delete_VectorLogEvent

# Register VectorLogEvent in _base:
_base.VectorLogEvent_swigregister(VectorLogEvent)
class TransactionEnvironment(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def get_environment(self):
        r"""
        :rtype: :py:class:`Environment`
        :return: the underlying environment.
        """
        return _base.TransactionEnvironment_get_environment(self)

    def get_action(self):
        r"""
        :rtype: int
        :return: the action being performed on the transaction environment.
        """
        return _base.TransactionEnvironment_get_action(self)

    def get_state(self):
        r"""
        :rtype: int
        :return: the state of the environment in the transaction.
        """
        return _base.TransactionEnvironment_get_state(self)

    def get_reason(self):
        r"""
        :rtype: int
        :return: the reason of the action being performed on the transaction environment.
        """
        return _base.TransactionEnvironment_get_reason(self)

    def get_with_optional(self):
        r"""
        :rtype: boolean
        :return: package types requested to be installed with the group.
        """
        return _base.TransactionEnvironment_get_with_optional(self)
    __swig_destroy__ = _base.delete_TransactionEnvironment

    def __init__(self, *args):
        _base.TransactionEnvironment_swiginit(self, _base.new_TransactionEnvironment(*args))

# Register TransactionEnvironment in _base:
_base.TransactionEnvironment_swigregister(TransactionEnvironment)
class TransactionGroup(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def get_group(self):
        r"""
        :rtype: :py:class:`Group`
        :return: the underlying group.
        """
        return _base.TransactionGroup_get_group(self)

    def get_action(self):
        r"""
        :rtype: int
        :return: the action being performed on the transaction group.
        """
        return _base.TransactionGroup_get_action(self)

    def get_state(self):
        r"""
        :rtype: int
        :return: the state of the group in the transaction.
        """
        return _base.TransactionGroup_get_state(self)

    def get_reason(self):
        r"""
        :rtype: int
        :return: the reason of the action being performed on the transaction group.
        """
        return _base.TransactionGroup_get_reason(self)

    def get_package_types(self):
        r"""
        :rtype: int
        :return: package types requested to be installed with the group.
        """
        return _base.TransactionGroup_get_package_types(self)
    __swig_destroy__ = _base.delete_TransactionGroup

    def __init__(self, *args):
        _base.TransactionGroup_swiginit(self, _base.new_TransactionGroup(*args))

# Register TransactionGroup in _base:
_base.TransactionGroup_swigregister(TransactionGroup)
class TransactionPackage(object):
    r"""Describe transaction operation related to rpm Package"""

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

    def get_package(self):
        r"""
        :rtype: :py:class:`Package`
        :return: the underlying package.
        """
        return _base.TransactionPackage_get_package(self)

    def get_action(self):
        r"""
        :rtype: int
        :return: the action being performed on the transaction package.
        """
        return _base.TransactionPackage_get_action(self)

    def get_state(self):
        r"""
        :rtype: int
        :return: the state of the package in the transaction.
        """
        return _base.TransactionPackage_get_state(self)

    def get_reason(self):
        r"""
        :rtype: int
        :return: the reason of the action being performed on the transaction package.
        """
        return _base.TransactionPackage_get_reason(self)

    def get_replaces(self):
        r"""
        :rtype: std::vector< libdnf5::rpm::Package,std::allocator< libdnf5::rpm::Package > >
        :return: packages replaced by this transaction package.
        """
        return _base.TransactionPackage_get_replaces(self)

    def get_replaced_by(self):
        r"""
        :rtype: std::vector< libdnf5::rpm::Package,std::allocator< libdnf5::rpm::Package > >
        :return: packages that replace this transaction package (for transaction
            packages that are leaving the system).
        """
        return _base.TransactionPackage_get_replaced_by(self)

    def get_reason_change_group_id(self):
        r"""
        The REASON_CHANGE action requires group id in case the reason is changed to GROUP
        :rtype: string
        :return: id of group the package belongs to
        """
        return _base.TransactionPackage_get_reason_change_group_id(self)
    __swig_destroy__ = _base.delete_TransactionPackage

    def __init__(self, *args):
        _base.TransactionPackage_swiginit(self, _base.new_TransactionPackage(*args))

# Register TransactionPackage in _base:
_base.TransactionPackage_swigregister(TransactionPackage)
class VectorBaseTransactionEnvironment(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 _base.VectorBaseTransactionEnvironment_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __bool__(self):
        return _base.VectorBaseTransactionEnvironment___bool__(self)

    def __len__(self):
        return _base.VectorBaseTransactionEnvironment___len__(self)

    def __delitem__(self, *args):
        return _base.VectorBaseTransactionEnvironment___delitem__(self, *args)

    def __getitem__(self, *args):
        return _base.VectorBaseTransactionEnvironment___getitem__(self, *args)

    def __setitem__(self, *args):
        return _base.VectorBaseTransactionEnvironment___setitem__(self, *args)

    def pop(self):
        return _base.VectorBaseTransactionEnvironment_pop(self)

    def append(self, x):
        return _base.VectorBaseTransactionEnvironment_append(self, x)

    def empty(self):
        return _base.VectorBaseTransactionEnvironment_empty(self)

    def size(self):
        return _base.VectorBaseTransactionEnvironment_size(self)

    def swap(self, v):
        return _base.VectorBaseTransactionEnvironment_swap(self, v)

    def begin(self):
        return _base.VectorBaseTransactionEnvironment_begin(self)

    def end(self):
        return _base.VectorBaseTransactionEnvironment_end(self)

    def rbegin(self):
        return _base.VectorBaseTransactionEnvironment_rbegin(self)

    def rend(self):
        return _base.VectorBaseTransactionEnvironment_rend(self)

    def clear(self):
        return _base.VectorBaseTransactionEnvironment_clear(self)

    def get_allocator(self):
        return _base.VectorBaseTransactionEnvironment_get_allocator(self)

    def pop_back(self):
        return _base.VectorBaseTransactionEnvironment_pop_back(self)

    def erase(self, *args):
        return _base.VectorBaseTransactionEnvironment_erase(self, *args)

    def __init__(self, *args):
        _base.VectorBaseTransactionEnvironment_swiginit(self, _base.new_VectorBaseTransactionEnvironment(*args))

    def push_back(self, x):
        return _base.VectorBaseTransactionEnvironment_push_back(self, x)

    def front(self):
        return _base.VectorBaseTransactionEnvironment_front(self)

    def back(self):
        return _base.VectorBaseTransactionEnvironment_back(self)

    def assign(self, n, x):
        return _base.VectorBaseTransactionEnvironment_assign(self, n, x)

    def insert(self, *args):
        return _base.VectorBaseTransactionEnvironment_insert(self, *args)

    def reserve(self, n):
        return _base.VectorBaseTransactionEnvironment_reserve(self, n)

    def capacity(self):
        return _base.VectorBaseTransactionEnvironment_capacity(self)
    __swig_destroy__ = _base.delete_VectorBaseTransactionEnvironment

# Register VectorBaseTransactionEnvironment in _base:
_base.VectorBaseTransactionEnvironment_swigregister(VectorBaseTransactionEnvironment)
class VectorBaseTransactionGroup(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 _base.VectorBaseTransactionGroup_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __bool__(self):
        return _base.VectorBaseTransactionGroup___bool__(self)

    def __len__(self):
        return _base.VectorBaseTransactionGroup___len__(self)

    def __delitem__(self, *args):
        return _base.VectorBaseTransactionGroup___delitem__(self, *args)

    def __getitem__(self, *args):
        return _base.VectorBaseTransactionGroup___getitem__(self, *args)

    def __setitem__(self, *args):
        return _base.VectorBaseTransactionGroup___setitem__(self, *args)

    def pop(self):
        return _base.VectorBaseTransactionGroup_pop(self)

    def append(self, x):
        return _base.VectorBaseTransactionGroup_append(self, x)

    def empty(self):
        return _base.VectorBaseTransactionGroup_empty(self)

    def size(self):
        return _base.VectorBaseTransactionGroup_size(self)

    def swap(self, v):
        return _base.VectorBaseTransactionGroup_swap(self, v)

    def begin(self):
        return _base.VectorBaseTransactionGroup_begin(self)

    def end(self):
        return _base.VectorBaseTransactionGroup_end(self)

    def rbegin(self):
        return _base.VectorBaseTransactionGroup_rbegin(self)

    def rend(self):
        return _base.VectorBaseTransactionGroup_rend(self)

    def clear(self):
        return _base.VectorBaseTransactionGroup_clear(self)

    def get_allocator(self):
        return _base.VectorBaseTransactionGroup_get_allocator(self)

    def pop_back(self):
        return _base.VectorBaseTransactionGroup_pop_back(self)

    def erase(self, *args):
        return _base.VectorBaseTransactionGroup_erase(self, *args)

    def __init__(self, *args):
        _base.VectorBaseTransactionGroup_swiginit(self, _base.new_VectorBaseTransactionGroup(*args))

    def push_back(self, x):
        return _base.VectorBaseTransactionGroup_push_back(self, x)

    def front(self):
        return _base.VectorBaseTransactionGroup_front(self)

    def back(self):
        return _base.VectorBaseTransactionGroup_back(self)

    def assign(self, n, x):
        return _base.VectorBaseTransactionGroup_assign(self, n, x)

    def insert(self, *args):
        return _base.VectorBaseTransactionGroup_insert(self, *args)

    def reserve(self, n):
        return _base.VectorBaseTransactionGroup_reserve(self, n)

    def capacity(self):
        return _base.VectorBaseTransactionGroup_capacity(self)
    __swig_destroy__ = _base.delete_VectorBaseTransactionGroup

# Register VectorBaseTransactionGroup in _base:
_base.VectorBaseTransactionGroup_swigregister(VectorBaseTransactionGroup)
class VectorBaseTransactionPackage(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 _base.VectorBaseTransactionPackage_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __bool__(self):
        return _base.VectorBaseTransactionPackage___bool__(self)

    def __len__(self):
        return _base.VectorBaseTransactionPackage___len__(self)

    def __delitem__(self, *args):
        return _base.VectorBaseTransactionPackage___delitem__(self, *args)

    def __getitem__(self, *args):
        return _base.VectorBaseTransactionPackage___getitem__(self, *args)

    def __setitem__(self, *args):
        return _base.VectorBaseTransactionPackage___setitem__(self, *args)

    def pop(self):
        return _base.VectorBaseTransactionPackage_pop(self)

    def append(self, x):
        return _base.VectorBaseTransactionPackage_append(self, x)

    def empty(self):
        return _base.VectorBaseTransactionPackage_empty(self)

    def size(self):
        return _base.VectorBaseTransactionPackage_size(self)

    def swap(self, v):
        return _base.VectorBaseTransactionPackage_swap(self, v)

    def begin(self):
        return _base.VectorBaseTransactionPackage_begin(self)

    def end(self):
        return _base.VectorBaseTransactionPackage_end(self)

    def rbegin(self):
        return _base.VectorBaseTransactionPackage_rbegin(self)

    def rend(self):
        return _base.VectorBaseTransactionPackage_rend(self)

    def clear(self):
        return _base.VectorBaseTransactionPackage_clear(self)

    def get_allocator(self):
        return _base.VectorBaseTransactionPackage_get_allocator(self)

    def pop_back(self):
        return _base.VectorBaseTransactionPackage_pop_back(self)

    def erase(self, *args):
        return _base.VectorBaseTransactionPackage_erase(self, *args)

    def __init__(self, *args):
        _base.VectorBaseTransactionPackage_swiginit(self, _base.new_VectorBaseTransactionPackage(*args))

    def push_back(self, x):
        return _base.VectorBaseTransactionPackage_push_back(self, x)

    def front(self):
        return _base.VectorBaseTransactionPackage_front(self)

    def back(self):
        return _base.VectorBaseTransactionPackage_back(self)

    def assign(self, n, x):
        return _base.VectorBaseTransactionPackage_assign(self, n, x)

    def insert(self, *args):
        return _base.VectorBaseTransactionPackage_insert(self, *args)

    def reserve(self, n):
        return _base.VectorBaseTransactionPackage_reserve(self, n)

    def capacity(self):
        return _base.VectorBaseTransactionPackage_capacity(self)
    __swig_destroy__ = _base.delete_VectorBaseTransactionPackage

# Register VectorBaseTransactionPackage in _base:
_base.VectorBaseTransactionPackage_swigregister(VectorBaseTransactionPackage)
class Goal(object):
    r"""Centralized point to perform operations with RPMs, Comps groups, and Modules"""

    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):
        _base.Goal_swiginit(self, _base.new_Goal(*args))
    __swig_destroy__ = _base.delete_Goal

    def add_module_enable(self, spec, settings):
        r"""
        Add module enable request to the goal.
        Throws libdnf5::AssertionError when used with libdnf5 compiled without modules enabled.
        :type spec: string
        :param spec:             A string with module spec to enable.
        :type settings: :py:class:`GoalJobSettings`
        :param settings:  A structure to override default goal settings.
        """
        return _base.Goal_add_module_enable(self, spec, settings)

    def add_module_disable(self, spec, settings):
        r"""
        Add module disable request to the goal.
        Throws libdnf5::AssertionError when used with libdnf5 compiled without modules enabled.
        :type spec: string
        :param spec:             A string with module spec to disable.
        :type settings: :py:class:`GoalJobSettings`
        :param settings:  A structure to override default goal settings.
        """
        return _base.Goal_add_module_disable(self, spec, settings)

    def add_module_reset(self, spec, settings):
        r"""
        Add module reset request to the goal.
        Throws libdnf5::AssertionError when used with libdnf5 compiled without modules enabled.
        :type spec: string
        :param spec:             A string with module spec to reset.
        :type settings: :py:class:`GoalJobSettings`
        :param settings:  A structure to override default goal settings.
        """
        return _base.Goal_add_module_reset(self, spec, settings)

    def add_install(self, *args):
        r"""
        High level API for an artifact installation. A spec can be either a package
        specification matched against NEVRA, provides, and file provides, or it can
        be a path to local rpm file, or URL of rpm to be installed.
        By using `` prefix you can also specify a group, environmental group,
        or a module to be installed.
        :type spec: string
        :param spec:  A string with installation spec
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings.
        """
        return _base.Goal_add_install(self, *args)

    def add_debug_install(self, *args):
        r"""
        Process spec to install related debug info and debug source packages
        :type spec: string
        :param spec:  A string with installation spec
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings.
        """
        return _base.Goal_add_debug_install(self, *args)

    def add_upgrade(self, *args):
        r"""
        High level API for an artifact upgrade. See `add_install()` for details.
        :type spec: string
        :param spec:      A string with upgrade spec
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings.
        :type minimal: boolean, optional
        :param minimal:   Whether to do smallest possible upgrade
        """
        return _base.Goal_add_upgrade(self, *args)

    def add_downgrade(self, *args):
        r"""
        High level API for an artifact downgrade. See `add_install()` for details.
        :type spec: string
        :param spec:      A string with upgrade spec
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings.
        """
        return _base.Goal_add_downgrade(self, *args)

    def add_reinstall(self, *args):
        r"""
        High level API for an artifact reinstall. See `add_install()` for details.
        :type spec: string
        :param spec:      A string with reinstall spec
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings.
        """
        return _base.Goal_add_reinstall(self, *args)

    def add_remove(self, *args):
        r"""
        High level API for an artifact removal. See `add_install()` for details.
        :type spec: string
        :param spec:      A string with reinstall spec
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings.
        """
        return _base.Goal_add_remove(self, *args)

    def add_rpm_install(self, *args):
        r"""
        *Overload 1:*
        Add install request to the goal. The `spec` will be resolved to packages in the resolve() call. The operation will not
        result in a reinstall if the requested package is already installed. By default uses
        `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`.

        :type spec: string
        :param spec:      A string describing the Goal install request.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. The value `from_repo_ids` is not used.

        |

        *Overload 2:*
        Add install request to the goal. The operation will not result in a reinstall when requested package
        with the same NEVRA is already installed. By default uses `clean_requirements_on_remove` set to `false`.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package to be installed.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.

        |

        *Overload 3:*
        Add install request to the goal. The operation will not result in a reinstall when requested package
        with the same NEVRA is already installed. By default uses `clean_requirements_on_remove` set to `false`.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package to be installed.
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.

        |

        *Overload 4:*
        Add install request to the goal. The operation will not result in a reinstall when requested package
        with the same NEVRA is already installed. By default uses `clean_requirements_on_remove` set to `false`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing candidates for the install action.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.

        |

        *Overload 5:*
        Add install request to the goal. The operation will not result in a reinstall when requested package
        with the same NEVRA is already installed. By default uses `clean_requirements_on_remove` set to `false`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing candidates for the install action.
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.
        """
        return _base.Goal_add_rpm_install(self, *args)

    def add_rpm_install_or_reinstall(self, *args):
        r"""
        *Overload 1:*
        Add install or reinstall request to the goal. By default uses `clean_requirements_on_remove` set to `false`.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package to be installed or reinstalled.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.

        |

        *Overload 2:*
        Add install or reinstall request to the goal. By default uses `clean_requirements_on_remove` set to `false`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing candidates for the install or reinstall action.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.

        |

        *Overload 3:*
        Add install or reinstall request to the goal. By default uses `clean_requirements_on_remove` set to `false`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing candidates for the install or reinstall action.
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.
        """
        return _base.Goal_add_rpm_install_or_reinstall(self, *args)

    def add_rpm_reinstall(self, *args):
        r"""
        *Overload 1:*
        Add reinstall request to the goal. The `spec` will be resolved to packages in the resolve() call. By default uses
        `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`.

        :type spec: string
        :param spec:      A string describing the Goal reinstall request.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. The value `from_repo_ids` is not used (not implemented yet).

        |

        *Overload 2:*
        Add reinstall request to the goal. By default uses `clean_requirements_on_remove` set to `false`.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package to be reinstalled.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.

        |

        *Overload 3:*
        Add reinstall request to the goal. By default uses `clean_requirements_on_remove` set to `false`.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package to be reinstalled.
        :param settings:  A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.
        """
        return _base.Goal_add_rpm_reinstall(self, *args)

    def add_rpm_remove(self, *args):
        r"""
        *Overload 1:*
        Add remove request to the goal. The `spec` will be resolved to packages in the resolve() call. By default uses
        `clean_requirements_on_remove` according to ConfigMain, which can be overridden in `settings`.

        :type spec: string
        :param spec:      A string describing the Goal remove request.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. Values `strict` and `best` are not used.

        |

        *Overload 2:*
        Add remove request to the goal. By default uses `clean_requirements_on_remove` value from ConfigMain,
        which can be overridden in `settings`.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package to be removed.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only clean_requirements_on_remove is used.

        |

        *Overload 3:*
        Add remove request to the goal. By default uses `clean_requirements_on_remove` value from ConfigMain,
        which can be overridden in `settings`.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package to be removed.
        :param settings:         A structure to override default goal settings. Only clean_requirements_on_remove is used.

        |

        *Overload 4:*
        Add remove request to the goal. By default uses `clean_requirements_on_remove` value from ConfigMain,
        which can be overridden in `settings`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing packages that will be removed
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `clean_requirements_on_remove` is used.

        |

        *Overload 5:*
        Add remove request to the goal. By default uses `clean_requirements_on_remove` value from ConfigMain,
        which can be overridden in `settings`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing packages that will be removed
        :param settings:         A structure to override default goal settings. Only `clean_requirements_on_remove` is used.
        """
        return _base.Goal_add_rpm_remove(self, *args)

    def add_rpm_upgrade(self, *args):
        r"""
        *Overload 1:*
        Add upgrade request to the goal. The `spec` will be resolved to packages in the resolve() call. By default uses
        `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`.

        :type spec: string
        :param spec:      A string describing the Goal upgrade request.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. Values  `from_repo_ids` and `strict` are not used.
        :type minimal: boolean, optional
        :param minimal:   Whether to do smallest possible upgrade

        |

        *Overload 2:*
        Add upgrade job of all installed packages to the goal if not limited in `settings`. By default uses
        `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`.

        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. Values `from_repo_ids` and `strict` are not used.
        :type minimal: boolean, optional
        :param minimal:   Whether to do smallest possible upgrade

        |

        *Overload 3:*
        Add upgrade job of all installed packages to the goal if not limited in `settings`. By default uses
        `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`.

        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. Values `from_repo_ids` and `strict` are not used.
        :param minimal:   Whether to do smallest possible upgrade

        |

        *Overload 4:*
        Add upgrade job of all installed packages to the goal if not limited in `settings`. By default uses
        `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`.

        :param settings:  A structure to override default goal settings. Values `from_repo_ids` and `strict` are not used.
        :param minimal:   Whether to do smallest possible upgrade

        |

        *Overload 5:*
        Add upgrade request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.
        Supports obsoletes and architecture change to/from "noarch".

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package that will be used as candidate for the upgrade action.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `clean_requirements_on_remove` and `best` values are used.
        :type minimal: boolean, optional
        :param minimal:          Whether to do smallest possible upgrade

        |

        *Overload 6:*
        Add upgrade request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.
        Supports obsoletes and architecture change to/from "noarch".

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package that will be used as candidate for the upgrade action.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `clean_requirements_on_remove` and `best` values are used.
        :param minimal:          Whether to do smallest possible upgrade

        |

        *Overload 7:*
        Add upgrade request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.
        Supports obsoletes and architecture change to/from "noarch".

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package that will be used as candidate for the upgrade action.
        :param settings:         A structure to override default goal settings. Only `clean_requirements_on_remove` and `best` values are used.
        :param minimal:          Whether to do smallest possible upgrade

        |

        *Overload 8:*
        Add upgrade request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing candidates for the upgrade action.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `clean_requirements_on_remove` and `best` values are used.
        :type minimal: boolean, optional
        :param minimal:          Whether to do smallest possible upgrade

        |

        *Overload 9:*
        Add upgrade request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing candidates for the upgrade action.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `clean_requirements_on_remove` and `best` values are used.
        :param minimal:          Whether to do smallest possible upgrade

        |

        *Overload 10:*
        Add upgrade request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing candidates for the upgrade action.
        :param settings:         A structure to override default goal settings. Only `clean_requirements_on_remove` and `best` values are used.
        :param minimal:          Whether to do smallest possible upgrade
        """
        return _base.Goal_add_rpm_upgrade(self, *args)

    def add_rpm_downgrade(self, *args):
        r"""
        *Overload 1:*
        Add downgrade request to the goal. The `spec` will be resolved to packages in the resolve() call. By default uses
        `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`.

        :type spec: string
        :param spec:      A string describing the Goal downgrade request.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. The value `from_repo_ids` is not used.

        |

        *Overload 2:*
        Add downgrade request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.
        Ignores obsoletes. Only installed packages with the same name, architecture and higher version can be downgraded.
        Skips package if the same or lower version is installed.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package that will be used as candidate for the downgrade action.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.

        |

        *Overload 3:*
        Add downgrade request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.
        Ignores obsoletes. Only installed packages with the same name, architecture and higher version can be downgraded.
        Skips package if the same or lower version is installed.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package that will be used as candidate for the downgrade action.
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` are used.
        """
        return _base.Goal_add_rpm_downgrade(self, *args)

    def add_rpm_distro_sync(self, *args):
        r"""
        *Overload 1:*
        Add distrosync request to the goal. The `spec` will be resolved to packages in the resolve() call. By default uses
        `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`.

        :type spec: string
        :param spec:      A string describing the Goal distrosync request.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. The value `from_repo_ids` is not used.

        |

        *Overload 2:*
        Add distrosync job of all installed packages to the goal if not limited in `settings`. By default uses
        `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`.

        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. Values `from_repo_ids` is not used.

        |

        *Overload 3:*
        Add distrosync job of all installed packages to the goal if not limited in `settings`. By default uses
        `clean_requirements_on_remove` set to `false`, which can be overridden in `settings`.

        :param settings:  A structure to override default goal settings. Values `from_repo_ids` is not used.

        |

        *Overload 4:*
        Add distrosync request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package hat will be used as candidate for the distrosync action.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` values are used.

        |

        *Overload 5:*
        Add distrosync request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.

        :type rpm_package: :py:class:`Package`
        :param rpm_package:      A package hat will be used as candidate for the distrosync action.
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` values are used.

        |

        *Overload 6:*
        Add distrosync request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing candidates for the distrosync action.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` values are used.

        |

        *Overload 7:*
        Add distrosync request to the goal. By default uses `clean_requirements_on_remove` set to `false`,
        which can be overridden in `settings`.

        :type package_set: :py:class:`PackageSet`
        :param package_set:      A package_set containing candidates for the distrosync action.
        :param settings:         A structure to override default goal settings. Only `strict`, `best`, and `clean_requirements_on_remove` values are used.
        """
        return _base.Goal_add_rpm_distro_sync(self, *args)

    def add_rpm_reason_change(self, *args):
        r"""
        Add reason change request to the goal.

        :type spec: string
        :param spec:      A string describing the requested package
        :type reason: int
        :param reason:    New reason for the package
        :type group_id: string, optional
        :param group_id:  Id of group the package belongs to (only relevant in case the reason is GROUP)
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. Only ResolveSpecSettings values are used
        """
        return _base.Goal_add_rpm_reason_change(self, *args)

    def add_group_install(self, *args):
        r"""
        Add group install request to the goal. The `spec` will be resolved to groups in the resolve() call.
        Also packages of the types specified in setting.group_package_types be installed.

        :type spec: string
        :param spec:      A string describing the Goal group install request.
        :type reason: int
        :param reason:    Reason why the group is installed (USER/DEPENDENCY)
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings.
        """
        return _base.Goal_add_group_install(self, *args)

    def add_group_remove(self, *args):
        r"""
        Add group remove request to the goal. The `spec` will be resolved to groups in the resolve() call.
        Also packages not belonging to another group and not explicitly user-installed will get removed.

        :type spec: string
        :param spec:      A string describing the Goal group remove request.
        :type reason: int
        :param reason:    Reason why the group is removed.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings.
        """
        return _base.Goal_add_group_remove(self, *args)

    def add_group_upgrade(self, *args):
        r"""
        Add group upgrade request to the goal.
        Upgrades the packages from the group and upgrades the group itself. The
        latter  comprises of installing packages that were added to the group by
        the distribution and removing packages that got removed from  the  group
        as far as they were not installed explicitly by the user and are not required
        by any other installed package.

        :type spec: string
        :param spec:         A string with group specification
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:     A structure to override default goal settings.
        """
        return _base.Goal_add_group_upgrade(self, *args)

    def add_provide_install(self, *args):
        r"""
        Request to install providers of the `spec`. Useful to install package
        using rich dependencies.  The `spec` (e.g. "(depA and depB)") is not
        parsed but directly passed to the solver to install package(s) which
        provide the `spec`. Solver then creates a job like:
        "job install provides depA and depB".

        :type spec: string
        :param spec:      A string with libsolv relational dependency.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:  A structure to override default goal settings. The value `from_repo_ids` is not used.
        """
        return _base.Goal_add_provide_install(self, *args)

    def add_serialized_transaction(self, *args):
        r"""
        Warning: This method is experimental/unstable and should not be relied on. It may be removed without warning
        Add serialized transaction request to the goal. Only one serialized transaction can be added per goal.

        :type transaction_path: std::filesystem::path
        :param transaction_path:                 A path to JSON serialized transaction.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:                         A structure to override default goal settings.
                                                    the packages and comps have relative paths in trans file.
        """
        return _base.Goal_add_serialized_transaction(self, *args)

    def add_revert_transactions(self, *args):
        r"""
        Warning: This method is experimental/unstable and should not be relied on. It may be removed without warning
        Add revert request of history transactions to the goal.
        Can be called only once per Goal.

        :type transactions: std::vector< libdnf5::transaction::Transaction,std::allocator< libdnf5::transaction::Transaction > >
        :param transactions:                     A vector of history transactions to be reverted.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:                         A structure to override default goal settings.
        """
        return _base.Goal_add_revert_transactions(self, *args)

    def add_redo_transaction(self, *args):
        r"""
        Warning: This method is experimental/unstable and should not be relied on. It may be removed without warning
        Add redo request of history transaction to the goal.
        Can be called only once per Goal.

        :type transaction: :py:class:`Transaction`
        :param transaction:                      A history transaction to be repeated.
        :type settings: :py:class:`GoalJobSettings`, optional
        :param settings:                         A structure to override default goal settings.
        """
        return _base.Goal_add_redo_transaction(self, *args)

    def set_allow_erasing(self, value):
        r"""When true it allows to remove installed packages to resolve dependency problems"""
        return _base.Goal_set_allow_erasing(self, value)

    def get_allow_erasing(self):
        r"""Return the currets setting of allow_erasing"""
        return _base.Goal_get_allow_erasing(self)

    def resolve(self):
        r"""
        Resolve all jobs and return a transaction object. Every time it resolves specs (strings) to packages

        :rtype: :py:class:`Transaction`
        :return: transaction object
        """
        return _base.Goal_resolve(self)

    def reset(self):
        r"""Clean all request from the Goal instance"""
        return _base.Goal_reset(self)

    def get_base(self):
        r"""
        :rtype: :py:class:`BaseWeakPtr`
        :return: The `Base` object to which this object belongs.
        Since: 5.0
        """
        return _base.Goal_get_base(self)

# Register Goal in _base:
_base.Goal_swigregister(Goal)
ProblemRules_RULE_DISTUPGRADE = _base.ProblemRules_RULE_DISTUPGRADE
ProblemRules_RULE_INFARCH = _base.ProblemRules_RULE_INFARCH
ProblemRules_RULE_UPDATE = _base.ProblemRules_RULE_UPDATE
ProblemRules_RULE_JOB = _base.ProblemRules_RULE_JOB
ProblemRules_RULE_JOB_UNSUPPORTED = _base.ProblemRules_RULE_JOB_UNSUPPORTED
ProblemRules_RULE_JOB_NOTHING_PROVIDES_DEP = _base.ProblemRules_RULE_JOB_NOTHING_PROVIDES_DEP
ProblemRules_RULE_JOB_UNKNOWN_PACKAGE = _base.ProblemRules_RULE_JOB_UNKNOWN_PACKAGE
ProblemRules_RULE_JOB_PROVIDED_BY_SYSTEM = _base.ProblemRules_RULE_JOB_PROVIDED_BY_SYSTEM
ProblemRules_RULE_PKG = _base.ProblemRules_RULE_PKG
ProblemRules_RULE_BEST_1 = _base.ProblemRules_RULE_BEST_1
ProblemRules_RULE_BEST_2 = _base.ProblemRules_RULE_BEST_2
ProblemRules_RULE_PKG_NOT_INSTALLABLE_1 = _base.ProblemRules_RULE_PKG_NOT_INSTALLABLE_1
ProblemRules_RULE_PKG_NOT_INSTALLABLE_2 = _base.ProblemRules_RULE_PKG_NOT_INSTALLABLE_2
ProblemRules_RULE_PKG_NOT_INSTALLABLE_3 = _base.ProblemRules_RULE_PKG_NOT_INSTALLABLE_3
ProblemRules_RULE_PKG_NOT_INSTALLABLE_4 = _base.ProblemRules_RULE_PKG_NOT_INSTALLABLE_4
ProblemRules_RULE_PKG_NOTHING_PROVIDES_DEP = _base.ProblemRules_RULE_PKG_NOTHING_PROVIDES_DEP
ProblemRules_RULE_PKG_SAME_NAME = _base.ProblemRules_RULE_PKG_SAME_NAME
ProblemRules_RULE_PKG_CONFLICTS = _base.ProblemRules_RULE_PKG_CONFLICTS
ProblemRules_RULE_PKG_OBSOLETES = _base.ProblemRules_RULE_PKG_OBSOLETES
ProblemRules_RULE_PKG_INSTALLED_OBSOLETES = _base.ProblemRules_RULE_PKG_INSTALLED_OBSOLETES
ProblemRules_RULE_PKG_IMPLICIT_OBSOLETES = _base.ProblemRules_RULE_PKG_IMPLICIT_OBSOLETES
ProblemRules_RULE_PKG_REQUIRES = _base.ProblemRules_RULE_PKG_REQUIRES
ProblemRules_RULE_PKG_SELF_CONFLICT = _base.ProblemRules_RULE_PKG_SELF_CONFLICT
ProblemRules_RULE_YUMOBS = _base.ProblemRules_RULE_YUMOBS
ProblemRules_RULE_UNKNOWN = _base.ProblemRules_RULE_UNKNOWN
ProblemRules_RULE_PKG_REMOVAL_OF_PROTECTED = _base.ProblemRules_RULE_PKG_REMOVAL_OF_PROTECTED
ProblemRules_RULE_PKG_REMOVAL_OF_RUNNING_KERNEL = _base.ProblemRules_RULE_PKG_REMOVAL_OF_RUNNING_KERNEL
ProblemRules_RULE_MODULE_DISTUPGRADE = _base.ProblemRules_RULE_MODULE_DISTUPGRADE
ProblemRules_RULE_MODULE_INFARCH = _base.ProblemRules_RULE_MODULE_INFARCH
ProblemRules_RULE_MODULE_UPDATE = _base.ProblemRules_RULE_MODULE_UPDATE
ProblemRules_RULE_MODULE_JOB = _base.ProblemRules_RULE_MODULE_JOB
ProblemRules_RULE_MODULE_JOB_UNSUPPORTED = _base.ProblemRules_RULE_MODULE_JOB_UNSUPPORTED
ProblemRules_RULE_MODULE_JOB_NOTHING_PROVIDES_DEP = _base.ProblemRules_RULE_MODULE_JOB_NOTHING_PROVIDES_DEP
ProblemRules_RULE_MODULE_JOB_UNKNOWN_PACKAGE = _base.ProblemRules_RULE_MODULE_JOB_UNKNOWN_PACKAGE
ProblemRules_RULE_MODULE_JOB_PROVIDED_BY_SYSTEM = _base.ProblemRules_RULE_MODULE_JOB_PROVIDED_BY_SYSTEM
ProblemRules_RULE_MODULE_PKG = _base.ProblemRules_RULE_MODULE_PKG
ProblemRules_RULE_MODULE_BEST_1 = _base.ProblemRules_RULE_MODULE_BEST_1
ProblemRules_RULE_MODULE_BEST_2 = _base.ProblemRules_RULE_MODULE_BEST_2
ProblemRules_RULE_MODULE_PKG_NOT_INSTALLABLE_1 = _base.ProblemRules_RULE_MODULE_PKG_NOT_INSTALLABLE_1
ProblemRules_RULE_MODULE_PKG_NOT_INSTALLABLE_2 = _base.ProblemRules_RULE_MODULE_PKG_NOT_INSTALLABLE_2
ProblemRules_RULE_MODULE_PKG_NOT_INSTALLABLE_3 = _base.ProblemRules_RULE_MODULE_PKG_NOT_INSTALLABLE_3
ProblemRules_RULE_MODULE_PKG_NOT_INSTALLABLE_4 = _base.ProblemRules_RULE_MODULE_PKG_NOT_INSTALLABLE_4
ProblemRules_RULE_MODULE_PKG_NOTHING_PROVIDES_DEP = _base.ProblemRules_RULE_MODULE_PKG_NOTHING_PROVIDES_DEP
ProblemRules_RULE_MODULE_PKG_SAME_NAME = _base.ProblemRules_RULE_MODULE_PKG_SAME_NAME
ProblemRules_RULE_MODULE_PKG_CONFLICTS = _base.ProblemRules_RULE_MODULE_PKG_CONFLICTS
ProblemRules_RULE_MODULE_PKG_OBSOLETES = _base.ProblemRules_RULE_MODULE_PKG_OBSOLETES
ProblemRules_RULE_MODULE_PKG_INSTALLED_OBSOLETES = _base.ProblemRules_RULE_MODULE_PKG_INSTALLED_OBSOLETES
ProblemRules_RULE_MODULE_PKG_IMPLICIT_OBSOLETES = _base.ProblemRules_RULE_MODULE_PKG_IMPLICIT_OBSOLETES
ProblemRules_RULE_MODULE_PKG_REQUIRES = _base.ProblemRules_RULE_MODULE_PKG_REQUIRES
ProblemRules_RULE_MODULE_PKG_SELF_CONFLICT = _base.ProblemRules_RULE_MODULE_PKG_SELF_CONFLICT
ProblemRules_RULE_MODULE_YUMOBS = _base.ProblemRules_RULE_MODULE_YUMOBS
ProblemRules_RULE_MODULE_UNKNOWN = _base.ProblemRules_RULE_MODULE_UNKNOWN
ProblemRules_RULE_PKG_INSTALLED_CONFLICTS = _base.ProblemRules_RULE_PKG_INSTALLED_CONFLICTS
ProblemRules_RULE_PKG_INSTALLED_REQUIRES = _base.ProblemRules_RULE_PKG_INSTALLED_REQUIRES
ProblemRules_RULE_PKG_BROKEN_DEPS_OF_PROTECTED = _base.ProblemRules_RULE_PKG_BROKEN_DEPS_OF_PROTECTED
GoalProblem_NO_PROBLEM = _base.GoalProblem_NO_PROBLEM
GoalProblem_SOLVER_ERROR = _base.GoalProblem_SOLVER_ERROR
GoalProblem_NOT_FOUND = _base.GoalProblem_NOT_FOUND
GoalProblem_EXCLUDED = _base.GoalProblem_EXCLUDED
GoalProblem_ONLY_SRC = _base.GoalProblem_ONLY_SRC
GoalProblem_NOT_FOUND_IN_REPOSITORIES = _base.GoalProblem_NOT_FOUND_IN_REPOSITORIES
GoalProblem_NOT_INSTALLED = _base.GoalProblem_NOT_INSTALLED
GoalProblem_NOT_INSTALLED_FOR_ARCHITECTURE = _base.GoalProblem_NOT_INSTALLED_FOR_ARCHITECTURE
GoalProblem_HINT_ICASE = _base.GoalProblem_HINT_ICASE
GoalProblem_HINT_ALTERNATIVES = _base.GoalProblem_HINT_ALTERNATIVES
GoalProblem_INSTALLED_LOWEST_VERSION = _base.GoalProblem_INSTALLED_LOWEST_VERSION
GoalProblem_INSTALLED_IN_DIFFERENT_VERSION = _base.GoalProblem_INSTALLED_IN_DIFFERENT_VERSION
GoalProblem_NOT_AVAILABLE = _base.GoalProblem_NOT_AVAILABLE
GoalProblem_ALREADY_INSTALLED = _base.GoalProblem_ALREADY_INSTALLED
GoalProblem_SOLVER_PROBLEM_STRICT_RESOLVEMENT = _base.GoalProblem_SOLVER_PROBLEM_STRICT_RESOLVEMENT
GoalProblem_WRITE_DEBUG = _base.GoalProblem_WRITE_DEBUG
GoalProblem_UNSUPPORTED_ACTION = _base.GoalProblem_UNSUPPORTED_ACTION
GoalProblem_MULTIPLE_STREAMS = _base.GoalProblem_MULTIPLE_STREAMS
GoalProblem_EXCLUDED_VERSIONLOCK = _base.GoalProblem_EXCLUDED_VERSIONLOCK
GoalProblem_MODULE_SOLVER_ERROR_DEFAULTS = _base.GoalProblem_MODULE_SOLVER_ERROR_DEFAULTS
r"""Error in module defaults detected during resolvement of module dependencies"""
GoalProblem_MODULE_SOLVER_ERROR_LATEST = _base.GoalProblem_MODULE_SOLVER_ERROR_LATEST
r"""Problem with latest modules during resolvement of module dependencies"""
GoalProblem_MODULE_SOLVER_ERROR = _base.GoalProblem_MODULE_SOLVER_ERROR
r"""Error detected during resolvement of module dependencies"""
GoalProblem_MODULE_CANNOT_SWITH_STREAMS = _base.GoalProblem_MODULE_CANNOT_SWITH_STREAMS
GoalProblem_EXTRA = _base.GoalProblem_EXTRA
r"""
    Error when transaction contains additional unexpected elements.
    Used when replaying transactions.
    """
GoalProblem_MALFORMED = _base.GoalProblem_MALFORMED
GoalProblem_NOT_FOUND_DEBUGINFO = _base.GoalProblem_NOT_FOUND_DEBUGINFO
GoalProblem_NOT_FOUND_DEBUGSOURCE = _base.GoalProblem_NOT_FOUND_DEBUGSOURCE
GoalProblem_MERGE_ERROR = _base.GoalProblem_MERGE_ERROR
GoalProblem_NOT_FOUND_IN_ADVISORIES = _base.GoalProblem_NOT_FOUND_IN_ADVISORIES
GoalAction_INSTALL = _base.GoalAction_INSTALL
GoalAction_INSTALL_OR_REINSTALL = _base.GoalAction_INSTALL_OR_REINSTALL
GoalAction_INSTALL_VIA_PROVIDE = _base.GoalAction_INSTALL_VIA_PROVIDE
GoalAction_INSTALL_BY_COMPS = _base.GoalAction_INSTALL_BY_COMPS
GoalAction_REINSTALL = _base.GoalAction_REINSTALL
GoalAction_UPGRADE = _base.GoalAction_UPGRADE
GoalAction_UPGRADE_MINIMAL = _base.GoalAction_UPGRADE_MINIMAL
GoalAction_UPGRADE_ALL = _base.GoalAction_UPGRADE_ALL
GoalAction_UPGRADE_ALL_MINIMAL = _base.GoalAction_UPGRADE_ALL_MINIMAL
GoalAction_DISTRO_SYNC = _base.GoalAction_DISTRO_SYNC
GoalAction_DISTRO_SYNC_ALL = _base.GoalAction_DISTRO_SYNC_ALL
GoalAction_DOWNGRADE = _base.GoalAction_DOWNGRADE
GoalAction_REMOVE = _base.GoalAction_REMOVE
GoalAction_RESOLVE = _base.GoalAction_RESOLVE
GoalAction_REASON_CHANGE = _base.GoalAction_REASON_CHANGE
GoalAction_ENABLE = _base.GoalAction_ENABLE
GoalAction_DISABLE = _base.GoalAction_DISABLE
GoalAction_RESET = _base.GoalAction_RESET
GoalAction_REPLAY_PARSE = _base.GoalAction_REPLAY_PARSE
GoalAction_REPLAY_INSTALL = _base.GoalAction_REPLAY_INSTALL
GoalAction_REPLAY_REMOVE = _base.GoalAction_REPLAY_REMOVE
GoalAction_REPLAY_UPGRADE = _base.GoalAction_REPLAY_UPGRADE
GoalAction_REPLAY_REINSTALL = _base.GoalAction_REPLAY_REINSTALL
GoalAction_REPLAY_REASON_CHANGE = _base.GoalAction_REPLAY_REASON_CHANGE
GoalAction_REPLAY_REASON_OVERRIDE = _base.GoalAction_REPLAY_REASON_OVERRIDE
GoalAction_REVERT_COMPS_UPGRADE = _base.GoalAction_REVERT_COMPS_UPGRADE
GoalAction_INSTALL_DEBUG = _base.GoalAction_INSTALL_DEBUG
GoalAction_MERGE = _base.GoalAction_MERGE

def goal_action_to_string(action):
    r"""Convert GoalAction enum to user-readable string"""
    return _base.goal_action_to_string(action)

def goal_action_is_replay(action):
    r"""Check whether the action is a replay action"""
    return _base.goal_action_is_replay(action)
GoalSetting_AUTO = _base.GoalSetting_AUTO
GoalSetting_SET_TRUE = _base.GoalSetting_SET_TRUE
GoalSetting_SET_FALSE = _base.GoalSetting_SET_FALSE
GoalUsedSetting_UNUSED = _base.GoalUsedSetting_UNUSED
GoalUsedSetting_USED_TRUE = _base.GoalUsedSetting_USED_TRUE
GoalUsedSetting_USED_FALSE = _base.GoalUsedSetting_USED_FALSE
CompsTypePreferred_BOTH = _base.CompsTypePreferred_BOTH
CompsTypePreferred_GROUP = _base.CompsTypePreferred_GROUP
CompsTypePreferred_ENVIRONMENT = _base.CompsTypePreferred_ENVIRONMENT
class ResolveSpecSettings(object):
    r"""
    Configure SPEC resolving.
    Important for queries that resolve SPEC.
    """

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

    def __init__(self, *args):
        _base.ResolveSpecSettings_swiginit(self, _base.new_ResolveSpecSettings(*args))

    def set_ignore_case(self, ignore_case):
        r"""
        Set whether to match case-insensitively

        Default: false
        """
        return _base.ResolveSpecSettings_set_ignore_case(self, ignore_case)

    def get_ignore_case(self):
        return _base.ResolveSpecSettings_get_ignore_case(self)

    def set_with_nevra(self, with_nevra):
        r"""
        Set whether packages' nevras should be considered during SPEC matching

        Default: true
        """
        return _base.ResolveSpecSettings_set_with_nevra(self, with_nevra)

    def get_with_nevra(self):
        return _base.ResolveSpecSettings_get_with_nevra(self)

    def set_with_provides(self, with_provides):
        r"""
        Set whether packages' provides should be considered during SPEC matching

        Default: true
        """
        return _base.ResolveSpecSettings_set_with_provides(self, with_provides)

    def get_with_provides(self):
        return _base.ResolveSpecSettings_get_with_provides(self)

    def set_with_filenames(self, with_filenames):
        r"""
        Set whether package's files should be considered during SPEC matching
        It will check if SPEC starts with "/" or "*/" and if it matches any file in a package

        Default: true
        """
        return _base.ResolveSpecSettings_set_with_filenames(self, with_filenames)

    def get_with_filenames(self):
        return _base.ResolveSpecSettings_get_with_filenames(self)

    def set_with_binaries(self, with_binaries):
        r"""
        Set whether package's binaries should be considered during SPEC matching
        It will check whether SPEC is a binary -> `/usr/(s)bin/<SPEC>`

        Default: true
        """
        return _base.ResolveSpecSettings_set_with_binaries(self, with_binaries)

    def get_with_binaries(self):
        return _base.ResolveSpecSettings_get_with_binaries(self)

    def set_expand_globs(self, expand_globs):
        r"""
        Set whether to expand globs in package specs using fnmatch

        Default: true
        """
        return _base.ResolveSpecSettings_set_expand_globs(self, expand_globs)

    def get_expand_globs(self):
        return _base.ResolveSpecSettings_get_expand_globs(self)

    def set_nevra_forms(self, nevra_forms):
        r"""
        When matching packages' nevras is enabled specify allowed nevra forms.

        The default can be obtained from libdnf5::rpm::Nevra::get_default_pkg_spec_forms().
        """
        return _base.ResolveSpecSettings_set_nevra_forms(self, nevra_forms)

    def get_nevra_forms(self):
        return _base.ResolveSpecSettings_get_nevra_forms(self)

    def set_group_with_id(self, group_with_id):
        r"""
        Set whether groups' ids should be considered during group SPEC matching

        Default: true
        """
        return _base.ResolveSpecSettings_set_group_with_id(self, group_with_id)

    def get_group_with_id(self):
        return _base.ResolveSpecSettings_get_group_with_id(self)

    def set_group_with_name(self, group_with_name):
        r"""
        Set whether groups' names should be considered during group SPEC matching

        Default: false
        """
        return _base.ResolveSpecSettings_set_group_with_name(self, group_with_name)

    def get_group_with_name(self):
        return _base.ResolveSpecSettings_get_group_with_name(self)

    def set_group_search_groups(self, search_groups):
        r"""
        Configure whether to search in groups when matching SPEC in group ids or names.
        Historically group SPEC could also mean an environment. These flags
        configure in which entities the spec is searched for.

        Default: true
        """
        return _base.ResolveSpecSettings_set_group_search_groups(self, search_groups)

    def get_group_search_groups(self):
        return _base.ResolveSpecSettings_get_group_search_groups(self)

    def set_group_search_environments(self, search_environments):
        r"""
        Configure whether to search in environments when matching SPEC in group ids or names.

        Default: true
        """
        return _base.ResolveSpecSettings_set_group_search_environments(self, search_environments)

    def get_group_search_environments(self):
        return _base.ResolveSpecSettings_get_group_search_environments(self)

# Register ResolveSpecSettings in _base:
_base.ResolveSpecSettings_swigregister(ResolveSpecSettings)
class GoalJobSettings(ResolveSpecSettings):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    __swig_destroy__ = _base.delete_GoalJobSettings

    def __init__(self, *args):
        _base.GoalJobSettings_swiginit(self, _base.new_GoalJobSettings(*args))

    def get_used_skip_broken(self):
        r"""Return used value for skip_broken"""
        return _base.GoalJobSettings_get_used_skip_broken(self)

    def get_used_skip_unavailable(self):
        r"""Return used value for skip_unavailable"""
        return _base.GoalJobSettings_get_used_skip_unavailable(self)

    def get_used_best(self):
        r"""Return used value for best"""
        return _base.GoalJobSettings_get_used_best(self)

    def get_used_clean_requirements_on_remove(self):
        r"""Return used value for clean_requirements_on_remove"""
        return _base.GoalJobSettings_get_used_clean_requirements_on_remove(self)

    def set_advisory_filter(self, filter):
        r"""
        Optionally set AdvisoryQuery that is used to filter packages (used for upgrade).
        Upgrades considers only packages that resolve some advisory in specified AdvisoryQuery.

        By default is is empty and no packages are filtered.
        """
        return _base.GoalJobSettings_set_advisory_filter(self, filter)

    def get_advisory_filter(self):
        return _base.GoalJobSettings_get_advisory_filter(self)

    def set_group_package_types(self, type):
        r"""
        Which types of group packages are going to be installed with the group.

        Default is taken from ConfigMain.group_package_types
        """
        return _base.GoalJobSettings_set_group_package_types(self, type)

    def get_group_package_types(self):
        return _base.GoalJobSettings_get_group_package_types(self)

    def set_group_no_packages(self, group_no_packages):
        r"""
        If set to true, group operations (install / remove / upgrade) will only work
        with the group itself, but will not add to the transaction any packages.

        Default: false
        """
        return _base.GoalJobSettings_set_group_no_packages(self, group_no_packages)

    def get_group_no_packages(self):
        return _base.GoalJobSettings_get_group_no_packages(self)

    def set_environment_no_groups(self, environment_no_groups):
        r"""
        If set to true, environments operations (install / remove / upgrade) will only work
        with the environment itself, but will not add to any groups to the transaction.

        Default: false
        """
        return _base.GoalJobSettings_set_environment_no_groups(self, environment_no_groups)

    def get_environment_no_groups(self):
        return _base.GoalJobSettings_get_environment_no_groups(self)

    def set_comps_type_preferred(self, comps_type_preferred):
        r"""
        Set which comps type (GROUP or ENVIRONMENT) is preferred in case both match.
        If only one type matches, it is selected regardless.

        By default, both groups and environments will be selected if both match.
        """
        return _base.GoalJobSettings_set_comps_type_preferred(self, comps_type_preferred)

    def get_comps_type_preferred(self):
        return _base.GoalJobSettings_get_comps_type_preferred(self)

    def set_report_hint(self, report_hint):
        r"""
        Set whether to report packages providing alternatives (``alternative-for(..)`` provide) and packages
        with different letter capitalization when no matches are found.

        Default: true
        """
        return _base.GoalJobSettings_set_report_hint(self, report_hint)

    def get_report_hint(self):
        return _base.GoalJobSettings_get_report_hint(self)

    def set_skip_broken(self, skip_broken):
        r"""
        Resolve any dependency problems by removing packages that are causing problems from the transaction.

        By default the value is taken from ``skip_broken`` configuration option.
        """
        return _base.GoalJobSettings_set_skip_broken(self, skip_broken)

    def get_skip_broken(self):
        return _base.GoalJobSettings_get_skip_broken(self)

    def set_skip_unavailable(self, skip_unavailable):
        r"""
        Allow skipping packages that are unavailable.

        By default the value is taken from a configuration option ``skip_unavailable`` except for remove action
        which defaults to true.
        """
        return _base.GoalJobSettings_set_skip_unavailable(self, skip_unavailable)

    def get_skip_unavailable(self):
        return _base.GoalJobSettings_get_skip_unavailable(self)

    def set_best(self, best):
        r"""
        Try the best available package versions in transactions.

        By default the value is taken from ``best`` configuration option.
        """
        return _base.GoalJobSettings_set_best(self, best)

    def get_best(self):
        return _base.GoalJobSettings_get_best(self)

    def set_clean_requirements_on_remove(self, clean_requirements_on_remove):
        r"""
        Remove dependencies that are no longer used during ``dnf remove``.

        By default the value is false except for remove action which defaults to value from
        clean_requirements_on_remove configuration option.
        """
        return _base.GoalJobSettings_set_clean_requirements_on_remove(self, clean_requirements_on_remove)

    def get_clean_requirements_on_remove(self):
        return _base.GoalJobSettings_get_clean_requirements_on_remove(self)

    def set_from_repo_ids(self, from_repo_ids):
        r"""
        Limit installed packages to those that were installed from the specified repositories.
        Repository IDs can contain globs. An empty list means no limit.

        Empty by default.
        """
        return _base.GoalJobSettings_set_from_repo_ids(self, from_repo_ids)

    def get_from_repo_ids(self):
        return _base.GoalJobSettings_get_from_repo_ids(self)

    def set_to_repo_ids(self, to_repo_ids):
        r"""
        Limit available packages to specified repositories.
        Repository IDs can contain globs. An empty list means no limit.

        Empty by default.
        """
        return _base.GoalJobSettings_set_to_repo_ids(self, to_repo_ids)

    def get_to_repo_ids(self):
        return _base.GoalJobSettings_get_to_repo_ids(self)

    def set_to_vendors(self, vendors):
        r"""
        Limit available packages to those with specified vendors.
        These packages will also bypass vendor change check.

        Empty by default.
        """
        return _base.GoalJobSettings_set_to_vendors(self, vendors)

    def get_to_vendors(self):
        return _base.GoalJobSettings_get_to_vendors(self)

    def set_ignore_extras(self, ignore_extras):
        r"""
        If set to true, after resolving serialized, reverted or redo transactions don't check for
        extra packages pulled into the transaction.

        Default: false
        """
        return _base.GoalJobSettings_set_ignore_extras(self, ignore_extras)

    def get_ignore_extras(self):
        return _base.GoalJobSettings_get_ignore_extras(self)

    def set_ignore_installed(self, ignore_installed):
        r"""
        If set to true, after resolving serialized, reverted or redo transactions don't check for
        installed packages matching those in the transactions.

        Default: false
        """
        return _base.GoalJobSettings_set_ignore_installed(self, ignore_installed)

    def get_ignore_installed(self):
        return _base.GoalJobSettings_get_ignore_installed(self)

    def set_override_reasons(self, override_reasons):
        r"""
        If set to true, after resolving serialized, reverted or redo transactions override reasons
        of already installed packages.
        This option only has an effect if ignore_installed is set otherwise the transaction fails
        when it contains already installed packages.

        Default: false
        """
        return _base.GoalJobSettings_set_override_reasons(self, override_reasons)

    def get_override_reasons(self):
        return _base.GoalJobSettings_get_override_reasons(self)

# Register GoalJobSettings in _base:
_base.GoalJobSettings_swigregister(GoalJobSettings)

def __or__(lhs, rhs):
    return _base.__or__(lhs, rhs)

def __ior__(lhs, rhs):
    return _base.__ior__(lhs, rhs)

def __and__(lhs, rhs):
    return _base.__and__(lhs, rhs)

common.create_attributes_from_getters_and_setters(ResolveSpecSettings)
common.create_attributes_from_getters_and_setters(GoalJobSettings)


