// Code generated by ent, DO NOT EDIT.

package targetpair

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

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

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

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

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

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

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

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

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

// DurationInMs applies equality check predicate on the "duration_in_ms" field. It's identical to DurationInMsEQ.
func DurationInMs(v int64) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldEQ(FieldDurationInMs, v))
}

// Success applies equality check predicate on the "success" field. It's identical to SuccessEQ.
func Success(v bool) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldEQ(FieldSuccess, v))
}

// TargetKind applies equality check predicate on the "target_kind" field. It's identical to TargetKindEQ.
func TargetKind(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldEQ(FieldTargetKind, v))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// DurationInMsEQ applies the EQ predicate on the "duration_in_ms" field.
func DurationInMsEQ(v int64) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldEQ(FieldDurationInMs, v))
}

// DurationInMsNEQ applies the NEQ predicate on the "duration_in_ms" field.
func DurationInMsNEQ(v int64) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNEQ(FieldDurationInMs, v))
}

// DurationInMsIn applies the In predicate on the "duration_in_ms" field.
func DurationInMsIn(vs ...int64) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldIn(FieldDurationInMs, vs...))
}

// DurationInMsNotIn applies the NotIn predicate on the "duration_in_ms" field.
func DurationInMsNotIn(vs ...int64) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNotIn(FieldDurationInMs, vs...))
}

// DurationInMsGT applies the GT predicate on the "duration_in_ms" field.
func DurationInMsGT(v int64) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldGT(FieldDurationInMs, v))
}

// DurationInMsGTE applies the GTE predicate on the "duration_in_ms" field.
func DurationInMsGTE(v int64) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldGTE(FieldDurationInMs, v))
}

// DurationInMsLT applies the LT predicate on the "duration_in_ms" field.
func DurationInMsLT(v int64) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldLT(FieldDurationInMs, v))
}

// DurationInMsLTE applies the LTE predicate on the "duration_in_ms" field.
func DurationInMsLTE(v int64) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldLTE(FieldDurationInMs, v))
}

// DurationInMsIsNil applies the IsNil predicate on the "duration_in_ms" field.
func DurationInMsIsNil() predicate.TargetPair {
	return predicate.TargetPair(sql.FieldIsNull(FieldDurationInMs))
}

// DurationInMsNotNil applies the NotNil predicate on the "duration_in_ms" field.
func DurationInMsNotNil() predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNotNull(FieldDurationInMs))
}

// SuccessEQ applies the EQ predicate on the "success" field.
func SuccessEQ(v bool) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldEQ(FieldSuccess, v))
}

// SuccessNEQ applies the NEQ predicate on the "success" field.
func SuccessNEQ(v bool) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNEQ(FieldSuccess, v))
}

// SuccessIsNil applies the IsNil predicate on the "success" field.
func SuccessIsNil() predicate.TargetPair {
	return predicate.TargetPair(sql.FieldIsNull(FieldSuccess))
}

// SuccessNotNil applies the NotNil predicate on the "success" field.
func SuccessNotNil() predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNotNull(FieldSuccess))
}

// TargetKindEQ applies the EQ predicate on the "target_kind" field.
func TargetKindEQ(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldEQ(FieldTargetKind, v))
}

// TargetKindNEQ applies the NEQ predicate on the "target_kind" field.
func TargetKindNEQ(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNEQ(FieldTargetKind, v))
}

// TargetKindIn applies the In predicate on the "target_kind" field.
func TargetKindIn(vs ...string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldIn(FieldTargetKind, vs...))
}

// TargetKindNotIn applies the NotIn predicate on the "target_kind" field.
func TargetKindNotIn(vs ...string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNotIn(FieldTargetKind, vs...))
}

// TargetKindGT applies the GT predicate on the "target_kind" field.
func TargetKindGT(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldGT(FieldTargetKind, v))
}

// TargetKindGTE applies the GTE predicate on the "target_kind" field.
func TargetKindGTE(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldGTE(FieldTargetKind, v))
}

// TargetKindLT applies the LT predicate on the "target_kind" field.
func TargetKindLT(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldLT(FieldTargetKind, v))
}

// TargetKindLTE applies the LTE predicate on the "target_kind" field.
func TargetKindLTE(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldLTE(FieldTargetKind, v))
}

// TargetKindContains applies the Contains predicate on the "target_kind" field.
func TargetKindContains(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldContains(FieldTargetKind, v))
}

// TargetKindHasPrefix applies the HasPrefix predicate on the "target_kind" field.
func TargetKindHasPrefix(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldHasPrefix(FieldTargetKind, v))
}

// TargetKindHasSuffix applies the HasSuffix predicate on the "target_kind" field.
func TargetKindHasSuffix(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldHasSuffix(FieldTargetKind, v))
}

// TargetKindIsNil applies the IsNil predicate on the "target_kind" field.
func TargetKindIsNil() predicate.TargetPair {
	return predicate.TargetPair(sql.FieldIsNull(FieldTargetKind))
}

// TargetKindNotNil applies the NotNil predicate on the "target_kind" field.
func TargetKindNotNil() predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNotNull(FieldTargetKind))
}

// TargetKindEqualFold applies the EqualFold predicate on the "target_kind" field.
func TargetKindEqualFold(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldEqualFold(FieldTargetKind, v))
}

// TargetKindContainsFold applies the ContainsFold predicate on the "target_kind" field.
func TargetKindContainsFold(v string) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldContainsFold(FieldTargetKind, v))
}

// TestSizeEQ applies the EQ predicate on the "test_size" field.
func TestSizeEQ(v TestSize) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldEQ(FieldTestSize, v))
}

// TestSizeNEQ applies the NEQ predicate on the "test_size" field.
func TestSizeNEQ(v TestSize) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNEQ(FieldTestSize, v))
}

// TestSizeIn applies the In predicate on the "test_size" field.
func TestSizeIn(vs ...TestSize) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldIn(FieldTestSize, vs...))
}

// TestSizeNotIn applies the NotIn predicate on the "test_size" field.
func TestSizeNotIn(vs ...TestSize) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNotIn(FieldTestSize, vs...))
}

// TestSizeIsNil applies the IsNil predicate on the "test_size" field.
func TestSizeIsNil() predicate.TargetPair {
	return predicate.TargetPair(sql.FieldIsNull(FieldTestSize))
}

// TestSizeNotNil applies the NotNil predicate on the "test_size" field.
func TestSizeNotNil() predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNotNull(FieldTestSize))
}

// AbortReasonEQ applies the EQ predicate on the "abort_reason" field.
func AbortReasonEQ(v AbortReason) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldEQ(FieldAbortReason, v))
}

// AbortReasonNEQ applies the NEQ predicate on the "abort_reason" field.
func AbortReasonNEQ(v AbortReason) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNEQ(FieldAbortReason, v))
}

// AbortReasonIn applies the In predicate on the "abort_reason" field.
func AbortReasonIn(vs ...AbortReason) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldIn(FieldAbortReason, vs...))
}

// AbortReasonNotIn applies the NotIn predicate on the "abort_reason" field.
func AbortReasonNotIn(vs ...AbortReason) predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNotIn(FieldAbortReason, vs...))
}

// AbortReasonIsNil applies the IsNil predicate on the "abort_reason" field.
func AbortReasonIsNil() predicate.TargetPair {
	return predicate.TargetPair(sql.FieldIsNull(FieldAbortReason))
}

// AbortReasonNotNil applies the NotNil predicate on the "abort_reason" field.
func AbortReasonNotNil() predicate.TargetPair {
	return predicate.TargetPair(sql.FieldNotNull(FieldAbortReason))
}

// HasBazelInvocation applies the HasEdge predicate on the "bazel_invocation" edge.
func HasBazelInvocation() predicate.TargetPair {
	return predicate.TargetPair(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.TargetPair {
	return predicate.TargetPair(func(s *sql.Selector) {
		step := newBazelInvocationStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasConfiguration applies the HasEdge predicate on the "configuration" edge.
func HasConfiguration() predicate.TargetPair {
	return predicate.TargetPair(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, false, ConfigurationTable, ConfigurationColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

// HasCompletion applies the HasEdge predicate on the "completion" edge.
func HasCompletion() predicate.TargetPair {
	return predicate.TargetPair(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, false, CompletionTable, CompletionColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasCompletionWith applies the HasEdge predicate on the "completion" edge with a given conditions (other predicates).
func HasCompletionWith(preds ...predicate.TargetComplete) predicate.TargetPair {
	return predicate.TargetPair(func(s *sql.Selector) {
		step := newCompletionStep()
		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.TargetPair) predicate.TargetPair {
	return predicate.TargetPair(sql.AndPredicates(predicates...))
}

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

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