// Code generated by ent, DO NOT EDIT.

package namedsetoffiles

import (
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/buildbarn/bb-portal/ent/gen/ent/predicate"
)

// ID filters vertices based on their ID field.
func ID(id int) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.FieldEQ(FieldID, id))
}

// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.FieldEQ(FieldID, id))
}

// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.FieldNEQ(FieldID, id))
}

// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.FieldIn(FieldID, ids...))
}

// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.FieldNotIn(FieldID, ids...))
}

// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.FieldGT(FieldID, id))
}

// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.FieldGTE(FieldID, id))
}

// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.FieldLT(FieldID, id))
}

// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.FieldLTE(FieldID, id))
}

// HasOutputGroup applies the HasEdge predicate on the "output_group" edge.
func HasOutputGroup() predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, true, OutputGroupTable, OutputGroupColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasOutputGroupWith applies the HasEdge predicate on the "output_group" edge with a given conditions (other predicates).
func HasOutputGroupWith(preds ...predicate.OutputGroup) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(func(s *sql.Selector) {
		step := newOutputGroupStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasFiles applies the HasEdge predicate on the "files" edge.
func HasFiles() predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, FilesTable, FilesColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasFilesWith applies the HasEdge predicate on the "files" edge with a given conditions (other predicates).
func HasFilesWith(preds ...predicate.TestFile) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(func(s *sql.Selector) {
		step := newFilesStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasFileSets applies the HasEdge predicate on the "file_sets" edge.
func HasFileSets() predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, false, FileSetsTable, FileSetsColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasFileSetsWith applies the HasEdge predicate on the "file_sets" edge with a given conditions (other predicates).
func HasFileSetsWith(preds ...predicate.NamedSetOfFiles) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(func(s *sql.Selector) {
		step := newFileSetsStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// And groups predicates with the AND operator between them.
func And(predicates ...predicate.NamedSetOfFiles) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.AndPredicates(predicates...))
}

// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.NamedSetOfFiles) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.OrPredicates(predicates...))
}

// Not applies the not operator on the given predicate.
func Not(p predicate.NamedSetOfFiles) predicate.NamedSetOfFiles {
	return predicate.NamedSetOfFiles(sql.NotPredicates(p))
}
