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

package libdnf5::transaction;
use base qw(Exporter);
use base qw(DynaLoader);
require libdnf5::common;
require libdnf5::exception;
package libdnf5::transactionc;
bootstrap libdnf5::transaction;
package libdnf5::transaction;
@EXPORT = qw();

# ---------- BASE METHODS -------------

package libdnf5::transaction;

sub TIEHASH {
    my ($classname,$obj) = @_;
    return bless $obj, $classname;
}

sub CLEAR { }

sub FIRSTKEY { }

sub NEXTKEY { }

sub FETCH {
    my ($self,$field) = @_;
    my $member_func = "swig_${field}_get";
    $self->$member_func();
}

sub STORE {
    my ($self,$field,$newval) = @_;
    my $member_func = "swig_${field}_set";
    $self->$member_func($newval);
}

sub this {
    my $ptr = shift;
    return tied(%$ptr);
}


# ------- FUNCTION WRAPPERS --------

package libdnf5::transaction;

*transaction_item_action_to_string = *libdnf5::transactionc::transaction_item_action_to_string;
*transaction_item_action_to_translated_string = *libdnf5::transactionc::transaction_item_action_to_translated_string;
*transaction_item_action_from_string = *libdnf5::transactionc::transaction_item_action_from_string;
*transaction_item_action_to_letter = *libdnf5::transactionc::transaction_item_action_to_letter;
*transaction_item_action_is_inbound = *libdnf5::transactionc::transaction_item_action_is_inbound;
*transaction_item_action_is_outbound = *libdnf5::transactionc::transaction_item_action_is_outbound;
*transaction_item_reason_to_string = *libdnf5::transactionc::transaction_item_reason_to_string;
*transaction_item_reason_to_translated_string = *libdnf5::transactionc::transaction_item_reason_to_translated_string;
*transaction_item_reason_from_string = *libdnf5::transactionc::transaction_item_reason_from_string;
*transaction_item_reason_compare = *libdnf5::transactionc::transaction_item_reason_compare;
*__lt__ = *libdnf5::transactionc::__lt__;
*__le__ = *libdnf5::transactionc::__le__;
*__gt__ = *libdnf5::transactionc::__gt__;
*__ge__ = *libdnf5::transactionc::__ge__;
*transaction_item_state_to_string = *libdnf5::transactionc::transaction_item_state_to_string;
*transaction_item_state_from_string = *libdnf5::transactionc::transaction_item_state_from_string;
*transaction_state_to_string = *libdnf5::transactionc::transaction_state_to_string;
*transaction_state_to_translated_string = *libdnf5::transactionc::transaction_state_to_translated_string;
*transaction_state_from_string = *libdnf5::transactionc::transaction_state_from_string;

############# Class : libdnf5::transaction::TransactionItem ##############

package libdnf5::transaction::TransactionItem;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
*get_action = *libdnf5::transactionc::TransactionItem_get_action;
*get_reason = *libdnf5::transactionc::TransactionItem_get_reason;
*get_repoid = *libdnf5::transactionc::TransactionItem_get_repoid;
*get_state = *libdnf5::transactionc::TransactionItem_get_state;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_TransactionItem($self);
        delete $OWNER{$self};
    }
}

sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_TransactionItem(@_);
    bless $self, $pkg if defined($self);
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : libdnf5::transaction::CompsGroup ##############

package libdnf5::transaction::CompsGroup;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction::TransactionItem libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
*to_string = *libdnf5::transactionc::CompsGroup_to_string;
*get_package_types = *libdnf5::transactionc::CompsGroup_get_package_types;
sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_CompsGroup(@_);
    bless $self, $pkg if defined($self);
}

sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_CompsGroup($self);
        delete $OWNER{$self};
    }
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : libdnf5::transaction::CompsGroupPackage ##############

package libdnf5::transaction::CompsGroupPackage;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_CompsGroupPackage($self);
        delete $OWNER{$self};
    }
}

sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_CompsGroupPackage(@_);
    bless $self, $pkg if defined($self);
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : libdnf5::transaction::CompsEnvironment ##############

package libdnf5::transaction::CompsEnvironment;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction::TransactionItem libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
*to_string = *libdnf5::transactionc::CompsEnvironment_to_string;
sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_CompsEnvironment(@_);
    bless $self, $pkg if defined($self);
}

sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_CompsEnvironment($self);
        delete $OWNER{$self};
    }
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : libdnf5::transaction::CompsEnvironmentGroup ##############

package libdnf5::transaction::CompsEnvironmentGroup;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_CompsEnvironmentGroup($self);
        delete $OWNER{$self};
    }
}

sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_CompsEnvironmentGroup(@_);
    bless $self, $pkg if defined($self);
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : libdnf5::transaction::Package ##############

package libdnf5::transaction::Package;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction::TransactionItem libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
*get_name = *libdnf5::transactionc::Package_get_name;
*get_epoch = *libdnf5::transactionc::Package_get_epoch;
*get_release = *libdnf5::transactionc::Package_get_release;
*get_arch = *libdnf5::transactionc::Package_get_arch;
*get_version = *libdnf5::transactionc::Package_get_version;
*to_string = *libdnf5::transactionc::Package_to_string;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_Package($self);
        delete $OWNER{$self};
    }
}

sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_Package(@_);
    bless $self, $pkg if defined($self);
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : libdnf5::transaction::TransactionHistory ##############

package libdnf5::transaction::TransactionHistory;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_TransactionHistory(@_);
    bless $self, $pkg if defined($self);
}

sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_TransactionHistory($self);
        delete $OWNER{$self};
    }
}

*get_weak_ptr = *libdnf5::transactionc::TransactionHistory_get_weak_ptr;
*list_transaction_ids = *libdnf5::transactionc::TransactionHistory_list_transaction_ids;
*list_transactions = *libdnf5::transactionc::TransactionHistory_list_transactions;
*list_transactions_since = *libdnf5::transactionc::TransactionHistory_list_transactions_since;
*list_all_transactions = *libdnf5::transactionc::TransactionHistory_list_all_transactions;
*get_latest_transaction = *libdnf5::transactionc::TransactionHistory_get_latest_transaction;
*get_base = *libdnf5::transactionc::TransactionHistory_get_base;
*transaction_item_reason_at = *libdnf5::transactionc::TransactionHistory_transaction_item_reason_at;
*get_transaction_item_counts = *libdnf5::transactionc::TransactionHistory_get_transaction_item_counts;
*filter_transactions_by_pkg_names = *libdnf5::transactionc::TransactionHistory_filter_transactions_by_pkg_names;
sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : libdnf5::transaction::TransactionHistoryWeakPtr ##############

package libdnf5::transaction::TransactionHistoryWeakPtr;
use overload
    "!=" => sub { $_[0]->__ne__($_[1])},
    ">=" => sub { $_[0]->__ge__($_[1])},
    "==" => sub { $_[0]->__eq__($_[1])},
    "<=" => sub { $_[0]->__le__($_[1])},
    ">" => sub { $_[0]->__gt__($_[1])},
    "<" => sub { $_[0]->__lt__($_[1])},
    "=" => sub { my $class = ref($_[0]); $class->new($_[0]) },
    "fallback" => 1;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_TransactionHistoryWeakPtr(@_);
    bless $self, $pkg if defined($self);
}

sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_TransactionHistoryWeakPtr($self);
        delete $OWNER{$self};
    }
}

*__deref__ = *libdnf5::transactionc::TransactionHistoryWeakPtr___deref__;
*get = *libdnf5::transactionc::TransactionHistoryWeakPtr_get;
*is_valid = *libdnf5::transactionc::TransactionHistoryWeakPtr_is_valid;
*has_same_guard = *libdnf5::transactionc::TransactionHistoryWeakPtr_has_same_guard;
*__ref__ = *libdnf5::transactionc::TransactionHistoryWeakPtr___ref__;
*__eq__ = *libdnf5::transactionc::TransactionHistoryWeakPtr___eq__;
*__ne__ = *libdnf5::transactionc::TransactionHistoryWeakPtr___ne__;
*__lt__ = *libdnf5::transactionc::TransactionHistoryWeakPtr___lt__;
*__gt__ = *libdnf5::transactionc::TransactionHistoryWeakPtr___gt__;
*__le__ = *libdnf5::transactionc::TransactionHistoryWeakPtr___le__;
*__ge__ = *libdnf5::transactionc::TransactionHistoryWeakPtr___ge__;
*get_weak_ptr = *libdnf5::transactionc::TransactionHistoryWeakPtr_get_weak_ptr;
*list_transaction_ids = *libdnf5::transactionc::TransactionHistoryWeakPtr_list_transaction_ids;
*list_transactions = *libdnf5::transactionc::TransactionHistoryWeakPtr_list_transactions;
*list_transactions_since = *libdnf5::transactionc::TransactionHistoryWeakPtr_list_transactions_since;
*list_all_transactions = *libdnf5::transactionc::TransactionHistoryWeakPtr_list_all_transactions;
*get_latest_transaction = *libdnf5::transactionc::TransactionHistoryWeakPtr_get_latest_transaction;
*get_base = *libdnf5::transactionc::TransactionHistoryWeakPtr_get_base;
*transaction_item_reason_at = *libdnf5::transactionc::TransactionHistoryWeakPtr_transaction_item_reason_at;
*get_transaction_item_counts = *libdnf5::transactionc::TransactionHistoryWeakPtr_get_transaction_item_counts;
*filter_transactions_by_pkg_names = *libdnf5::transactionc::TransactionHistoryWeakPtr_filter_transactions_by_pkg_names;
sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : libdnf5::transaction::Transaction ##############

package libdnf5::transaction::Transaction;
use overload
    "==" => sub { $_[0]->__eq__($_[1])},
    ">" => sub { $_[0]->__gt__($_[1])},
    "<" => sub { $_[0]->__lt__($_[1])},
    "=" => sub { my $class = ref($_[0]); $class->new($_[0]) },
    "fallback" => 1;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_Transaction($self);
        delete $OWNER{$self};
    }
}

sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_Transaction(@_);
    bless $self, $pkg if defined($self);
}

*__eq__ = *libdnf5::transactionc::Transaction___eq__;
*__lt__ = *libdnf5::transactionc::Transaction___lt__;
*__gt__ = *libdnf5::transactionc::Transaction___gt__;
*get_id = *libdnf5::transactionc::Transaction_get_id;
*get_dt_start = *libdnf5::transactionc::Transaction_get_dt_start;
*get_dt_end = *libdnf5::transactionc::Transaction_get_dt_end;
*get_rpmdb_version_begin = *libdnf5::transactionc::Transaction_get_rpmdb_version_begin;
*get_rpmdb_version_end = *libdnf5::transactionc::Transaction_get_rpmdb_version_end;
*get_releasever = *libdnf5::transactionc::Transaction_get_releasever;
*get_user_id = *libdnf5::transactionc::Transaction_get_user_id;
*get_description = *libdnf5::transactionc::Transaction_get_description;
*get_comment = *libdnf5::transactionc::Transaction_get_comment;
*get_state = *libdnf5::transactionc::Transaction_get_state;
*get_comps_environments = *libdnf5::transactionc::Transaction_get_comps_environments;
*get_comps_groups = *libdnf5::transactionc::Transaction_get_comps_groups;
*get_packages = *libdnf5::transactionc::Transaction_get_packages;
*serialize = *libdnf5::transactionc::Transaction_serialize;
*get_base = *libdnf5::transactionc::Transaction_get_base;
sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : libdnf5::transaction::VectorTransaction ##############

package libdnf5::transaction::VectorTransaction;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_VectorTransaction(@_);
    bless $self, $pkg if defined($self);
}

*size = *libdnf5::transactionc::VectorTransaction_size;
*empty = *libdnf5::transactionc::VectorTransaction_empty;
*clear = *libdnf5::transactionc::VectorTransaction_clear;
*push = *libdnf5::transactionc::VectorTransaction_push;
*pop = *libdnf5::transactionc::VectorTransaction_pop;
*get = *libdnf5::transactionc::VectorTransaction_get;
*set = *libdnf5::transactionc::VectorTransaction_set;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_VectorTransaction($self);
        delete $OWNER{$self};
    }
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : libdnf5::transaction::VectorTransactionPackage ##############

package libdnf5::transaction::VectorTransactionPackage;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::transaction );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::transactionc::new_VectorTransactionPackage(@_);
    bless $self, $pkg if defined($self);
}

*size = *libdnf5::transactionc::VectorTransactionPackage_size;
*empty = *libdnf5::transactionc::VectorTransactionPackage_empty;
*clear = *libdnf5::transactionc::VectorTransactionPackage_clear;
*push = *libdnf5::transactionc::VectorTransactionPackage_push;
*pop = *libdnf5::transactionc::VectorTransactionPackage_pop;
*get = *libdnf5::transactionc::VectorTransactionPackage_get;
*set = *libdnf5::transactionc::VectorTransactionPackage_set;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::transactionc::delete_VectorTransactionPackage($self);
        delete $OWNER{$self};
    }
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


# ------- VARIABLE STUBS --------

package libdnf5::transaction;

*TransactionItemAction_INSTALL = *libdnf5::transactionc::TransactionItemAction_INSTALL;
*TransactionItemAction_UPGRADE = *libdnf5::transactionc::TransactionItemAction_UPGRADE;
*TransactionItemAction_DOWNGRADE = *libdnf5::transactionc::TransactionItemAction_DOWNGRADE;
*TransactionItemAction_REINSTALL = *libdnf5::transactionc::TransactionItemAction_REINSTALL;
*TransactionItemAction_REMOVE = *libdnf5::transactionc::TransactionItemAction_REMOVE;
*TransactionItemAction_REPLACED = *libdnf5::transactionc::TransactionItemAction_REPLACED;
*TransactionItemAction_REASON_CHANGE = *libdnf5::transactionc::TransactionItemAction_REASON_CHANGE;
*TransactionItemAction_ENABLE = *libdnf5::transactionc::TransactionItemAction_ENABLE;
*TransactionItemAction_DISABLE = *libdnf5::transactionc::TransactionItemAction_DISABLE;
*TransactionItemAction_RESET = *libdnf5::transactionc::TransactionItemAction_RESET;
*TransactionItemAction_SWITCH = *libdnf5::transactionc::TransactionItemAction_SWITCH;
*TransactionItemReason_NONE = *libdnf5::transactionc::TransactionItemReason_NONE;
*TransactionItemReason_DEPENDENCY = *libdnf5::transactionc::TransactionItemReason_DEPENDENCY;
*TransactionItemReason_USER = *libdnf5::transactionc::TransactionItemReason_USER;
*TransactionItemReason_CLEAN = *libdnf5::transactionc::TransactionItemReason_CLEAN;
*TransactionItemReason_WEAK_DEPENDENCY = *libdnf5::transactionc::TransactionItemReason_WEAK_DEPENDENCY;
*TransactionItemReason_GROUP = *libdnf5::transactionc::TransactionItemReason_GROUP;
*TransactionItemReason_EXTERNAL_USER = *libdnf5::transactionc::TransactionItemReason_EXTERNAL_USER;
*TransactionItemState_STARTED = *libdnf5::transactionc::TransactionItemState_STARTED;
*TransactionItemState_OK = *libdnf5::transactionc::TransactionItemState_OK;
*TransactionItemState_ERROR = *libdnf5::transactionc::TransactionItemState_ERROR;
*TransactionState_STARTED = *libdnf5::transactionc::TransactionState_STARTED;
*TransactionState_OK = *libdnf5::transactionc::TransactionState_OK;
*TransactionState_ERROR = *libdnf5::transactionc::TransactionState_ERROR;
1;
