# 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::comps;
use base qw(Exporter);
use base qw(DynaLoader);
require libdnf5::common;
require libdnf5::exception;
require libdnf5::repo;
require libdnf5::conf;
require libdnf5::logger;
require libdnf5::transaction;
package libdnf5::compsc;
bootstrap libdnf5::comps;
package libdnf5::comps;
@EXPORT = qw();

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

package libdnf5::comps;

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::comps;

*__or__ = *libdnf5::compsc::__or__;
*__and__ = *libdnf5::compsc::__and__;
*any = *libdnf5::compsc::any;
*package_type_from_string = *libdnf5::compsc::package_type_from_string;
*package_type_to_string = *libdnf5::compsc::package_type_to_string;
*package_types_to_strings = *libdnf5::compsc::package_types_to_strings;
*__eq__ = *libdnf5::compsc::__eq__;

############# Class : libdnf5::comps::Package ##############

package libdnf5::comps::Package;
use overload
    "!=" => sub { $_[0]->__ne__($_[1])},
    "==" => sub { $_[0]->__eq__($_[1])},
    "=" => sub { my $class = ref($_[0]); $class->new($_[0]) },
    "fallback" => 1;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps );
%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::compsc::delete_Package($self);
        delete $OWNER{$self};
    }
}

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

*__eq__ = *libdnf5::compsc::Package___eq__;
*__ne__ = *libdnf5::compsc::Package___ne__;
*get_name = *libdnf5::compsc::Package_get_name;
*set_name = *libdnf5::compsc::Package_set_name;
*get_type = *libdnf5::compsc::Package_get_type;
*set_type = *libdnf5::compsc::Package_set_type;
*get_type_string = *libdnf5::compsc::Package_get_type_string;
*get_condition = *libdnf5::compsc::Package_get_condition;
*set_condition = *libdnf5::compsc::Package_set_condition;
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::comps::GroupId ##############

package libdnf5::comps::GroupId;
use overload
    "!=" => sub { $_[0]->__ne__($_[1])},
    "==" => sub { $_[0]->__eq__($_[1])},
    "=" => sub { my $class = ref($_[0]); $class->new($_[0]) },
    "fallback" => 1;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::compsc::new_GroupId(@_);
    bless $self, $pkg if defined($self);
}

*__eq__ = *libdnf5::compsc::GroupId___eq__;
*__ne__ = *libdnf5::compsc::GroupId___ne__;
*swig_id_get = *libdnf5::compsc::GroupId_id_get;
*swig_id_set = *libdnf5::compsc::GroupId_id_set;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::compsc::delete_GroupId($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::comps::Group ##############

package libdnf5::comps::Group;
use overload
    "!=" => sub { $_[0]->__ne__($_[1])},
    "==" => sub { $_[0]->__eq__($_[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::comps );
%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::compsc::delete_Group($self);
        delete $OWNER{$self};
    }
}

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

*get_base = *libdnf5::compsc::Group_get_base;
*get_groupid = *libdnf5::compsc::Group_get_groupid;
*get_name = *libdnf5::compsc::Group_get_name;
*get_description = *libdnf5::compsc::Group_get_description;
*get_translated_name = *libdnf5::compsc::Group_get_translated_name;
*get_translated_description = *libdnf5::compsc::Group_get_translated_description;
*get_order = *libdnf5::compsc::Group_get_order;
*get_order_int = *libdnf5::compsc::Group_get_order_int;
*get_langonly = *libdnf5::compsc::Group_get_langonly;
*get_uservisible = *libdnf5::compsc::Group_get_uservisible;
*get_default = *libdnf5::compsc::Group_get_default;
*get_packages = *libdnf5::compsc::Group_get_packages;
*get_packages_of_type = *libdnf5::compsc::Group_get_packages_of_type;
*get_repos = *libdnf5::compsc::Group_get_repos;
*get_installed = *libdnf5::compsc::Group_get_installed;
*get_reason = *libdnf5::compsc::Group_get_reason;
*__iadd__ = *libdnf5::compsc::Group___iadd__;
*__eq__ = *libdnf5::compsc::Group___eq__;
*__ne__ = *libdnf5::compsc::Group___ne__;
*__lt__ = *libdnf5::compsc::Group___lt__;
*serialize = *libdnf5::compsc::Group_serialize;
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::comps::VectorPackage ##############

package libdnf5::comps::VectorPackage;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::compsc::new_VectorPackage(@_);
    bless $self, $pkg if defined($self);
}

*size = *libdnf5::compsc::VectorPackage_size;
*empty = *libdnf5::compsc::VectorPackage_empty;
*clear = *libdnf5::compsc::VectorPackage_clear;
*push = *libdnf5::compsc::VectorPackage_push;
*pop = *libdnf5::compsc::VectorPackage_pop;
*get = *libdnf5::compsc::VectorPackage_get;
*set = *libdnf5::compsc::VectorPackage_set;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::compsc::delete_VectorPackage($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::comps::SetConstIteratorGroup ##############

package libdnf5::comps::SetConstIteratorGroup;
use overload
    "!=" => sub { $_[0]->__ne__($_[1])},
    "==" => sub { $_[0]->__eq__($_[1])},
    "=" => sub { my $class = ref($_[0]); $class->new($_[0]) },
    "fallback" => 1;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps );
%OWNER = ();
%ITERATORS = ();
*value = *libdnf5::compsc::SetConstIteratorGroup_value;
*next = *libdnf5::compsc::SetConstIteratorGroup_next;
*prev = *libdnf5::compsc::SetConstIteratorGroup_prev;
*__eq__ = *libdnf5::compsc::SetConstIteratorGroup___eq__;
*__ne__ = *libdnf5::compsc::SetConstIteratorGroup___ne__;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::compsc::delete_SetConstIteratorGroup($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::comps::SetGroup ##############

package libdnf5::comps::SetGroup;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps );
%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::compsc::delete_SetGroup($self);
        delete $OWNER{$self};
    }
}

*empty = *libdnf5::compsc::SetGroup_empty;
*size = *libdnf5::compsc::SetGroup_size;
*clear = *libdnf5::compsc::SetGroup_clear;
*add = *libdnf5::compsc::SetGroup_add;
*remove = *libdnf5::compsc::SetGroup_remove;
*find = *libdnf5::compsc::SetGroup_find;
*contains = *libdnf5::compsc::SetGroup_contains;
*__isub__ = *libdnf5::compsc::SetGroup___isub__;
*update = *libdnf5::compsc::SetGroup_update;
*intersection = *libdnf5::compsc::SetGroup_intersection;
*difference = *libdnf5::compsc::SetGroup_difference;
*symmetric_difference = *libdnf5::compsc::SetGroup_symmetric_difference;
*is_subset = *libdnf5::compsc::SetGroup_is_subset;
*is_superset = *libdnf5::compsc::SetGroup_is_superset;
*swap = *libdnf5::compsc::SetGroup_swap;
*get_data = *libdnf5::compsc::SetGroup_get_data;
*begin = *libdnf5::compsc::SetGroup_begin;
*end = *libdnf5::compsc::SetGroup_end;
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::comps::SackQueryGroup ##############

package libdnf5::comps::SackQueryGroup;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps::SetGroup libdnf5::comps );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::compsc::new_SackQueryGroup(@_);
    bless $self, $pkg if defined($self);
}

*filter = *libdnf5::compsc::SackQueryGroup_filter;
*get = *libdnf5::compsc::SackQueryGroup_get;
*list = *libdnf5::compsc::SackQueryGroup_list;
*get_data = *libdnf5::compsc::SackQueryGroup_get_data;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::compsc::delete_SackQueryGroup($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::comps::GroupQuery ##############

package libdnf5::comps::GroupQuery;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps::SackQueryGroup libdnf5::comps );
%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::compsc::delete_GroupQuery($self);
        delete $OWNER{$self};
    }
}

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

*get_base = *libdnf5::compsc::GroupQuery_get_base;
*filter_groupid = *libdnf5::compsc::GroupQuery_filter_groupid;
*filter_package_name = *libdnf5::compsc::GroupQuery_filter_package_name;
*filter_name = *libdnf5::compsc::GroupQuery_filter_name;
*filter_uservisible = *libdnf5::compsc::GroupQuery_filter_uservisible;
*filter_default = *libdnf5::compsc::GroupQuery_filter_default;
*filter_installed = *libdnf5::compsc::GroupQuery_filter_installed;
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::comps::EnvironmentId ##############

package libdnf5::comps::EnvironmentId;
use overload
    "!=" => sub { $_[0]->__ne__($_[1])},
    "==" => sub { $_[0]->__eq__($_[1])},
    "=" => sub { my $class = ref($_[0]); $class->new($_[0]) },
    "fallback" => 1;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::compsc::new_EnvironmentId(@_);
    bless $self, $pkg if defined($self);
}

*__eq__ = *libdnf5::compsc::EnvironmentId___eq__;
*__ne__ = *libdnf5::compsc::EnvironmentId___ne__;
*swig_id_get = *libdnf5::compsc::EnvironmentId_id_get;
*swig_id_set = *libdnf5::compsc::EnvironmentId_id_set;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::compsc::delete_EnvironmentId($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::comps::Environment ##############

package libdnf5::comps::Environment;
use overload
    "!=" => sub { $_[0]->__ne__($_[1])},
    "==" => sub { $_[0]->__eq__($_[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::comps );
%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::compsc::delete_Environment($self);
        delete $OWNER{$self};
    }
}

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

*get_base = *libdnf5::compsc::Environment_get_base;
*get_environmentid = *libdnf5::compsc::Environment_get_environmentid;
*get_name = *libdnf5::compsc::Environment_get_name;
*get_description = *libdnf5::compsc::Environment_get_description;
*get_translated_name = *libdnf5::compsc::Environment_get_translated_name;
*get_translated_description = *libdnf5::compsc::Environment_get_translated_description;
*get_order = *libdnf5::compsc::Environment_get_order;
*get_order_int = *libdnf5::compsc::Environment_get_order_int;
*get_groups = *libdnf5::compsc::Environment_get_groups;
*get_default_groups = *libdnf5::compsc::Environment_get_default_groups;
*get_optional_groups = *libdnf5::compsc::Environment_get_optional_groups;
*get_repos = *libdnf5::compsc::Environment_get_repos;
*get_installed = *libdnf5::compsc::Environment_get_installed;
*get_reason = *libdnf5::compsc::Environment_get_reason;
*__iadd__ = *libdnf5::compsc::Environment___iadd__;
*__eq__ = *libdnf5::compsc::Environment___eq__;
*__ne__ = *libdnf5::compsc::Environment___ne__;
*__lt__ = *libdnf5::compsc::Environment___lt__;
*serialize = *libdnf5::compsc::Environment_serialize;
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::comps::SetConstIteratorEnvironment ##############

package libdnf5::comps::SetConstIteratorEnvironment;
use overload
    "!=" => sub { $_[0]->__ne__($_[1])},
    "==" => sub { $_[0]->__eq__($_[1])},
    "=" => sub { my $class = ref($_[0]); $class->new($_[0]) },
    "fallback" => 1;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps );
%OWNER = ();
%ITERATORS = ();
*value = *libdnf5::compsc::SetConstIteratorEnvironment_value;
*next = *libdnf5::compsc::SetConstIteratorEnvironment_next;
*prev = *libdnf5::compsc::SetConstIteratorEnvironment_prev;
*__eq__ = *libdnf5::compsc::SetConstIteratorEnvironment___eq__;
*__ne__ = *libdnf5::compsc::SetConstIteratorEnvironment___ne__;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::compsc::delete_SetConstIteratorEnvironment($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::comps::SetEnvironment ##############

package libdnf5::comps::SetEnvironment;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps );
%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::compsc::delete_SetEnvironment($self);
        delete $OWNER{$self};
    }
}

*empty = *libdnf5::compsc::SetEnvironment_empty;
*size = *libdnf5::compsc::SetEnvironment_size;
*clear = *libdnf5::compsc::SetEnvironment_clear;
*add = *libdnf5::compsc::SetEnvironment_add;
*remove = *libdnf5::compsc::SetEnvironment_remove;
*find = *libdnf5::compsc::SetEnvironment_find;
*contains = *libdnf5::compsc::SetEnvironment_contains;
*__isub__ = *libdnf5::compsc::SetEnvironment___isub__;
*update = *libdnf5::compsc::SetEnvironment_update;
*intersection = *libdnf5::compsc::SetEnvironment_intersection;
*difference = *libdnf5::compsc::SetEnvironment_difference;
*symmetric_difference = *libdnf5::compsc::SetEnvironment_symmetric_difference;
*is_subset = *libdnf5::compsc::SetEnvironment_is_subset;
*is_superset = *libdnf5::compsc::SetEnvironment_is_superset;
*swap = *libdnf5::compsc::SetEnvironment_swap;
*get_data = *libdnf5::compsc::SetEnvironment_get_data;
*begin = *libdnf5::compsc::SetEnvironment_begin;
*end = *libdnf5::compsc::SetEnvironment_end;
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::comps::SackQueryEnvironment ##############

package libdnf5::comps::SackQueryEnvironment;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps::SetEnvironment libdnf5::comps );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::compsc::new_SackQueryEnvironment(@_);
    bless $self, $pkg if defined($self);
}

*filter = *libdnf5::compsc::SackQueryEnvironment_filter;
*get = *libdnf5::compsc::SackQueryEnvironment_get;
*list = *libdnf5::compsc::SackQueryEnvironment_list;
*get_data = *libdnf5::compsc::SackQueryEnvironment_get_data;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        libdnf5::compsc::delete_SackQueryEnvironment($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::comps::EnvironmentQuery ##############

package libdnf5::comps::EnvironmentQuery;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps::SackQueryEnvironment libdnf5::comps );
%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::compsc::delete_EnvironmentQuery($self);
        delete $OWNER{$self};
    }
}

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

*get_base = *libdnf5::compsc::EnvironmentQuery_get_base;
*filter_environmentid = *libdnf5::compsc::EnvironmentQuery_filter_environmentid;
*filter_name = *libdnf5::compsc::EnvironmentQuery_filter_name;
*filter_installed = *libdnf5::compsc::EnvironmentQuery_filter_installed;
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::comps::CompsSack ##############

package libdnf5::comps::CompsSack;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( libdnf5::comps );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::compsc::new_CompsSack(@_);
    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::compsc::delete_CompsSack($self);
        delete $OWNER{$self};
    }
}

*get_weak_ptr = *libdnf5::compsc::CompsSack_get_weak_ptr;
*get_base = *libdnf5::compsc::CompsSack_get_base;
*load_config_excludes = *libdnf5::compsc::CompsSack_load_config_excludes;
*get_config_environment_excludes = *libdnf5::compsc::CompsSack_get_config_environment_excludes;
*get_config_group_excludes = *libdnf5::compsc::CompsSack_get_config_group_excludes;
*get_user_environment_excludes = *libdnf5::compsc::CompsSack_get_user_environment_excludes;
*add_user_environment_excludes = *libdnf5::compsc::CompsSack_add_user_environment_excludes;
*remove_user_environment_excludes = *libdnf5::compsc::CompsSack_remove_user_environment_excludes;
*set_user_environment_excludes = *libdnf5::compsc::CompsSack_set_user_environment_excludes;
*clear_user_environment_excludes = *libdnf5::compsc::CompsSack_clear_user_environment_excludes;
*get_user_group_excludes = *libdnf5::compsc::CompsSack_get_user_group_excludes;
*add_user_group_excludes = *libdnf5::compsc::CompsSack_add_user_group_excludes;
*remove_user_group_excludes = *libdnf5::compsc::CompsSack_remove_user_group_excludes;
*set_user_group_excludes = *libdnf5::compsc::CompsSack_set_user_group_excludes;
*clear_user_group_excludes = *libdnf5::compsc::CompsSack_clear_user_group_excludes;
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::comps::CompsSackWeakPtr ##############

package libdnf5::comps::CompsSackWeakPtr;
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::comps );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = libdnf5::compsc::new_CompsSackWeakPtr(@_);
    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::compsc::delete_CompsSackWeakPtr($self);
        delete $OWNER{$self};
    }
}

*__deref__ = *libdnf5::compsc::CompsSackWeakPtr___deref__;
*get = *libdnf5::compsc::CompsSackWeakPtr_get;
*is_valid = *libdnf5::compsc::CompsSackWeakPtr_is_valid;
*has_same_guard = *libdnf5::compsc::CompsSackWeakPtr_has_same_guard;
*__ref__ = *libdnf5::compsc::CompsSackWeakPtr___ref__;
*__eq__ = *libdnf5::compsc::CompsSackWeakPtr___eq__;
*__ne__ = *libdnf5::compsc::CompsSackWeakPtr___ne__;
*__lt__ = *libdnf5::compsc::CompsSackWeakPtr___lt__;
*__gt__ = *libdnf5::compsc::CompsSackWeakPtr___gt__;
*__le__ = *libdnf5::compsc::CompsSackWeakPtr___le__;
*__ge__ = *libdnf5::compsc::CompsSackWeakPtr___ge__;
*get_weak_ptr = *libdnf5::compsc::CompsSackWeakPtr_get_weak_ptr;
*get_base = *libdnf5::compsc::CompsSackWeakPtr_get_base;
*load_config_excludes = *libdnf5::compsc::CompsSackWeakPtr_load_config_excludes;
*get_config_environment_excludes = *libdnf5::compsc::CompsSackWeakPtr_get_config_environment_excludes;
*get_config_group_excludes = *libdnf5::compsc::CompsSackWeakPtr_get_config_group_excludes;
*get_user_environment_excludes = *libdnf5::compsc::CompsSackWeakPtr_get_user_environment_excludes;
*add_user_environment_excludes = *libdnf5::compsc::CompsSackWeakPtr_add_user_environment_excludes;
*remove_user_environment_excludes = *libdnf5::compsc::CompsSackWeakPtr_remove_user_environment_excludes;
*set_user_environment_excludes = *libdnf5::compsc::CompsSackWeakPtr_set_user_environment_excludes;
*clear_user_environment_excludes = *libdnf5::compsc::CompsSackWeakPtr_clear_user_environment_excludes;
*get_user_group_excludes = *libdnf5::compsc::CompsSackWeakPtr_get_user_group_excludes;
*add_user_group_excludes = *libdnf5::compsc::CompsSackWeakPtr_add_user_group_excludes;
*remove_user_group_excludes = *libdnf5::compsc::CompsSackWeakPtr_remove_user_group_excludes;
*set_user_group_excludes = *libdnf5::compsc::CompsSackWeakPtr_set_user_group_excludes;
*clear_user_group_excludes = *libdnf5::compsc::CompsSackWeakPtr_clear_user_group_excludes;
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::comps;

*PackageType_CONDITIONAL = *libdnf5::compsc::PackageType_CONDITIONAL;
*PackageType_DEFAULT = *libdnf5::compsc::PackageType_DEFAULT;
*PackageType_MANDATORY = *libdnf5::compsc::PackageType_MANDATORY;
*PackageType_OPTIONAL = *libdnf5::compsc::PackageType_OPTIONAL;
1;
