// Code generated by ent, DO NOT EDIT.

package payloaddigest

import (
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/google/uuid"
	"github.com/in-toto/archivista/ent/predicate"
)

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

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

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

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

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

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

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

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

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

// Algorithm applies equality check predicate on the "algorithm" field. It's identical to AlgorithmEQ.
func Algorithm(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldEQ(FieldAlgorithm, v))
}

// Value applies equality check predicate on the "value" field. It's identical to ValueEQ.
func Value(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldEQ(FieldValue, v))
}

// AlgorithmEQ applies the EQ predicate on the "algorithm" field.
func AlgorithmEQ(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldEQ(FieldAlgorithm, v))
}

// AlgorithmNEQ applies the NEQ predicate on the "algorithm" field.
func AlgorithmNEQ(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldNEQ(FieldAlgorithm, v))
}

// AlgorithmIn applies the In predicate on the "algorithm" field.
func AlgorithmIn(vs ...string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldIn(FieldAlgorithm, vs...))
}

// AlgorithmNotIn applies the NotIn predicate on the "algorithm" field.
func AlgorithmNotIn(vs ...string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldNotIn(FieldAlgorithm, vs...))
}

// AlgorithmGT applies the GT predicate on the "algorithm" field.
func AlgorithmGT(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldGT(FieldAlgorithm, v))
}

// AlgorithmGTE applies the GTE predicate on the "algorithm" field.
func AlgorithmGTE(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldGTE(FieldAlgorithm, v))
}

// AlgorithmLT applies the LT predicate on the "algorithm" field.
func AlgorithmLT(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldLT(FieldAlgorithm, v))
}

// AlgorithmLTE applies the LTE predicate on the "algorithm" field.
func AlgorithmLTE(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldLTE(FieldAlgorithm, v))
}

// AlgorithmContains applies the Contains predicate on the "algorithm" field.
func AlgorithmContains(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldContains(FieldAlgorithm, v))
}

// AlgorithmHasPrefix applies the HasPrefix predicate on the "algorithm" field.
func AlgorithmHasPrefix(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldHasPrefix(FieldAlgorithm, v))
}

// AlgorithmHasSuffix applies the HasSuffix predicate on the "algorithm" field.
func AlgorithmHasSuffix(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldHasSuffix(FieldAlgorithm, v))
}

// AlgorithmEqualFold applies the EqualFold predicate on the "algorithm" field.
func AlgorithmEqualFold(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldEqualFold(FieldAlgorithm, v))
}

// AlgorithmContainsFold applies the ContainsFold predicate on the "algorithm" field.
func AlgorithmContainsFold(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldContainsFold(FieldAlgorithm, v))
}

// ValueEQ applies the EQ predicate on the "value" field.
func ValueEQ(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldEQ(FieldValue, v))
}

// ValueNEQ applies the NEQ predicate on the "value" field.
func ValueNEQ(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldNEQ(FieldValue, v))
}

// ValueIn applies the In predicate on the "value" field.
func ValueIn(vs ...string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldIn(FieldValue, vs...))
}

// ValueNotIn applies the NotIn predicate on the "value" field.
func ValueNotIn(vs ...string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldNotIn(FieldValue, vs...))
}

// ValueGT applies the GT predicate on the "value" field.
func ValueGT(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldGT(FieldValue, v))
}

// ValueGTE applies the GTE predicate on the "value" field.
func ValueGTE(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldGTE(FieldValue, v))
}

// ValueLT applies the LT predicate on the "value" field.
func ValueLT(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldLT(FieldValue, v))
}

// ValueLTE applies the LTE predicate on the "value" field.
func ValueLTE(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldLTE(FieldValue, v))
}

// ValueContains applies the Contains predicate on the "value" field.
func ValueContains(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldContains(FieldValue, v))
}

// ValueHasPrefix applies the HasPrefix predicate on the "value" field.
func ValueHasPrefix(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldHasPrefix(FieldValue, v))
}

// ValueHasSuffix applies the HasSuffix predicate on the "value" field.
func ValueHasSuffix(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldHasSuffix(FieldValue, v))
}

// ValueEqualFold applies the EqualFold predicate on the "value" field.
func ValueEqualFold(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldEqualFold(FieldValue, v))
}

// ValueContainsFold applies the ContainsFold predicate on the "value" field.
func ValueContainsFold(v string) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.FieldContainsFold(FieldValue, v))
}

// HasDsse applies the HasEdge predicate on the "dsse" edge.
func HasDsse() predicate.PayloadDigest {
	return predicate.PayloadDigest(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, DsseTable, DsseColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasDsseWith applies the HasEdge predicate on the "dsse" edge with a given conditions (other predicates).
func HasDsseWith(preds ...predicate.Dsse) predicate.PayloadDigest {
	return predicate.PayloadDigest(func(s *sql.Selector) {
		step := newDsseStep()
		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.PayloadDigest) predicate.PayloadDigest {
	return predicate.PayloadDigest(sql.AndPredicates(predicates...))
}

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

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