// Code generated by ent, DO NOT EDIT.

package testcollection

import (
	"time"

	"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.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldID, id))
}

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

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

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

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

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

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

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

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

// Strategy applies equality check predicate on the "strategy" field. It's identical to StrategyEQ.
func Strategy(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldStrategy, v))
}

// CachedLocally applies equality check predicate on the "cached_locally" field. It's identical to CachedLocallyEQ.
func CachedLocally(v bool) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldCachedLocally, v))
}

// CachedRemotely applies equality check predicate on the "cached_remotely" field. It's identical to CachedRemotelyEQ.
func CachedRemotely(v bool) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldCachedRemotely, v))
}

// FirstSeen applies equality check predicate on the "first_seen" field. It's identical to FirstSeenEQ.
func FirstSeen(v time.Time) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldFirstSeen, v))
}

// DurationMs applies equality check predicate on the "duration_ms" field. It's identical to DurationMsEQ.
func DurationMs(v int64) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldDurationMs, v))
}

// LabelEQ applies the EQ predicate on the "label" field.
func LabelEQ(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldLabel, v))
}

// LabelNEQ applies the NEQ predicate on the "label" field.
func LabelNEQ(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNEQ(FieldLabel, v))
}

// LabelIn applies the In predicate on the "label" field.
func LabelIn(vs ...string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIn(FieldLabel, vs...))
}

// LabelNotIn applies the NotIn predicate on the "label" field.
func LabelNotIn(vs ...string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotIn(FieldLabel, vs...))
}

// LabelGT applies the GT predicate on the "label" field.
func LabelGT(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldGT(FieldLabel, v))
}

// LabelGTE applies the GTE predicate on the "label" field.
func LabelGTE(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldGTE(FieldLabel, v))
}

// LabelLT applies the LT predicate on the "label" field.
func LabelLT(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldLT(FieldLabel, v))
}

// LabelLTE applies the LTE predicate on the "label" field.
func LabelLTE(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldLTE(FieldLabel, v))
}

// LabelContains applies the Contains predicate on the "label" field.
func LabelContains(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldContains(FieldLabel, v))
}

// LabelHasPrefix applies the HasPrefix predicate on the "label" field.
func LabelHasPrefix(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldHasPrefix(FieldLabel, v))
}

// LabelHasSuffix applies the HasSuffix predicate on the "label" field.
func LabelHasSuffix(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldHasSuffix(FieldLabel, v))
}

// LabelIsNil applies the IsNil predicate on the "label" field.
func LabelIsNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIsNull(FieldLabel))
}

// LabelNotNil applies the NotNil predicate on the "label" field.
func LabelNotNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotNull(FieldLabel))
}

// LabelEqualFold applies the EqualFold predicate on the "label" field.
func LabelEqualFold(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEqualFold(FieldLabel, v))
}

// LabelContainsFold applies the ContainsFold predicate on the "label" field.
func LabelContainsFold(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldContainsFold(FieldLabel, v))
}

// OverallStatusEQ applies the EQ predicate on the "overall_status" field.
func OverallStatusEQ(v OverallStatus) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldOverallStatus, v))
}

// OverallStatusNEQ applies the NEQ predicate on the "overall_status" field.
func OverallStatusNEQ(v OverallStatus) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNEQ(FieldOverallStatus, v))
}

// OverallStatusIn applies the In predicate on the "overall_status" field.
func OverallStatusIn(vs ...OverallStatus) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIn(FieldOverallStatus, vs...))
}

// OverallStatusNotIn applies the NotIn predicate on the "overall_status" field.
func OverallStatusNotIn(vs ...OverallStatus) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotIn(FieldOverallStatus, vs...))
}

// OverallStatusIsNil applies the IsNil predicate on the "overall_status" field.
func OverallStatusIsNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIsNull(FieldOverallStatus))
}

// OverallStatusNotNil applies the NotNil predicate on the "overall_status" field.
func OverallStatusNotNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotNull(FieldOverallStatus))
}

// StrategyEQ applies the EQ predicate on the "strategy" field.
func StrategyEQ(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldStrategy, v))
}

// StrategyNEQ applies the NEQ predicate on the "strategy" field.
func StrategyNEQ(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNEQ(FieldStrategy, v))
}

// StrategyIn applies the In predicate on the "strategy" field.
func StrategyIn(vs ...string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIn(FieldStrategy, vs...))
}

// StrategyNotIn applies the NotIn predicate on the "strategy" field.
func StrategyNotIn(vs ...string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotIn(FieldStrategy, vs...))
}

// StrategyGT applies the GT predicate on the "strategy" field.
func StrategyGT(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldGT(FieldStrategy, v))
}

// StrategyGTE applies the GTE predicate on the "strategy" field.
func StrategyGTE(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldGTE(FieldStrategy, v))
}

// StrategyLT applies the LT predicate on the "strategy" field.
func StrategyLT(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldLT(FieldStrategy, v))
}

// StrategyLTE applies the LTE predicate on the "strategy" field.
func StrategyLTE(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldLTE(FieldStrategy, v))
}

// StrategyContains applies the Contains predicate on the "strategy" field.
func StrategyContains(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldContains(FieldStrategy, v))
}

// StrategyHasPrefix applies the HasPrefix predicate on the "strategy" field.
func StrategyHasPrefix(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldHasPrefix(FieldStrategy, v))
}

// StrategyHasSuffix applies the HasSuffix predicate on the "strategy" field.
func StrategyHasSuffix(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldHasSuffix(FieldStrategy, v))
}

// StrategyIsNil applies the IsNil predicate on the "strategy" field.
func StrategyIsNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIsNull(FieldStrategy))
}

// StrategyNotNil applies the NotNil predicate on the "strategy" field.
func StrategyNotNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotNull(FieldStrategy))
}

// StrategyEqualFold applies the EqualFold predicate on the "strategy" field.
func StrategyEqualFold(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEqualFold(FieldStrategy, v))
}

// StrategyContainsFold applies the ContainsFold predicate on the "strategy" field.
func StrategyContainsFold(v string) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldContainsFold(FieldStrategy, v))
}

// CachedLocallyEQ applies the EQ predicate on the "cached_locally" field.
func CachedLocallyEQ(v bool) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldCachedLocally, v))
}

// CachedLocallyNEQ applies the NEQ predicate on the "cached_locally" field.
func CachedLocallyNEQ(v bool) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNEQ(FieldCachedLocally, v))
}

// CachedLocallyIsNil applies the IsNil predicate on the "cached_locally" field.
func CachedLocallyIsNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIsNull(FieldCachedLocally))
}

// CachedLocallyNotNil applies the NotNil predicate on the "cached_locally" field.
func CachedLocallyNotNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotNull(FieldCachedLocally))
}

// CachedRemotelyEQ applies the EQ predicate on the "cached_remotely" field.
func CachedRemotelyEQ(v bool) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldCachedRemotely, v))
}

// CachedRemotelyNEQ applies the NEQ predicate on the "cached_remotely" field.
func CachedRemotelyNEQ(v bool) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNEQ(FieldCachedRemotely, v))
}

// CachedRemotelyIsNil applies the IsNil predicate on the "cached_remotely" field.
func CachedRemotelyIsNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIsNull(FieldCachedRemotely))
}

// CachedRemotelyNotNil applies the NotNil predicate on the "cached_remotely" field.
func CachedRemotelyNotNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotNull(FieldCachedRemotely))
}

// FirstSeenEQ applies the EQ predicate on the "first_seen" field.
func FirstSeenEQ(v time.Time) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldFirstSeen, v))
}

// FirstSeenNEQ applies the NEQ predicate on the "first_seen" field.
func FirstSeenNEQ(v time.Time) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNEQ(FieldFirstSeen, v))
}

// FirstSeenIn applies the In predicate on the "first_seen" field.
func FirstSeenIn(vs ...time.Time) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIn(FieldFirstSeen, vs...))
}

// FirstSeenNotIn applies the NotIn predicate on the "first_seen" field.
func FirstSeenNotIn(vs ...time.Time) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotIn(FieldFirstSeen, vs...))
}

// FirstSeenGT applies the GT predicate on the "first_seen" field.
func FirstSeenGT(v time.Time) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldGT(FieldFirstSeen, v))
}

// FirstSeenGTE applies the GTE predicate on the "first_seen" field.
func FirstSeenGTE(v time.Time) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldGTE(FieldFirstSeen, v))
}

// FirstSeenLT applies the LT predicate on the "first_seen" field.
func FirstSeenLT(v time.Time) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldLT(FieldFirstSeen, v))
}

// FirstSeenLTE applies the LTE predicate on the "first_seen" field.
func FirstSeenLTE(v time.Time) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldLTE(FieldFirstSeen, v))
}

// FirstSeenIsNil applies the IsNil predicate on the "first_seen" field.
func FirstSeenIsNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIsNull(FieldFirstSeen))
}

// FirstSeenNotNil applies the NotNil predicate on the "first_seen" field.
func FirstSeenNotNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotNull(FieldFirstSeen))
}

// DurationMsEQ applies the EQ predicate on the "duration_ms" field.
func DurationMsEQ(v int64) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldEQ(FieldDurationMs, v))
}

// DurationMsNEQ applies the NEQ predicate on the "duration_ms" field.
func DurationMsNEQ(v int64) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNEQ(FieldDurationMs, v))
}

// DurationMsIn applies the In predicate on the "duration_ms" field.
func DurationMsIn(vs ...int64) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIn(FieldDurationMs, vs...))
}

// DurationMsNotIn applies the NotIn predicate on the "duration_ms" field.
func DurationMsNotIn(vs ...int64) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotIn(FieldDurationMs, vs...))
}

// DurationMsGT applies the GT predicate on the "duration_ms" field.
func DurationMsGT(v int64) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldGT(FieldDurationMs, v))
}

// DurationMsGTE applies the GTE predicate on the "duration_ms" field.
func DurationMsGTE(v int64) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldGTE(FieldDurationMs, v))
}

// DurationMsLT applies the LT predicate on the "duration_ms" field.
func DurationMsLT(v int64) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldLT(FieldDurationMs, v))
}

// DurationMsLTE applies the LTE predicate on the "duration_ms" field.
func DurationMsLTE(v int64) predicate.TestCollection {
	return predicate.TestCollection(sql.FieldLTE(FieldDurationMs, v))
}

// DurationMsIsNil applies the IsNil predicate on the "duration_ms" field.
func DurationMsIsNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldIsNull(FieldDurationMs))
}

// DurationMsNotNil applies the NotNil predicate on the "duration_ms" field.
func DurationMsNotNil() predicate.TestCollection {
	return predicate.TestCollection(sql.FieldNotNull(FieldDurationMs))
}

// HasBazelInvocation applies the HasEdge predicate on the "bazel_invocation" edge.
func HasBazelInvocation() predicate.TestCollection {
	return predicate.TestCollection(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, BazelInvocationTable, BazelInvocationColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

// HasTestSummary applies the HasEdge predicate on the "test_summary" edge.
func HasTestSummary() predicate.TestCollection {
	return predicate.TestCollection(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, false, TestSummaryTable, TestSummaryColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

// HasTestResults applies the HasEdge predicate on the "test_results" edge.
func HasTestResults() predicate.TestCollection {
	return predicate.TestCollection(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, TestResultsTable, TestResultsColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasTestResultsWith applies the HasEdge predicate on the "test_results" edge with a given conditions (other predicates).
func HasTestResultsWith(preds ...predicate.TestResultBES) predicate.TestCollection {
	return predicate.TestCollection(func(s *sql.Selector) {
		step := newTestResultsStep()
		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.TestCollection) predicate.TestCollection {
	return predicate.TestCollection(sql.AndPredicates(predicates...))
}

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

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