// Code generated by ent, DO NOT EDIT.

package attestation

import (
	"time"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/chainloop-dev/chainloop/app/controlplane/pkg/data/ent/predicate"
	"github.com/google/uuid"
)

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

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

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

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

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

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

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

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

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

// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.Attestation {
	return predicate.Attestation(sql.FieldEQ(FieldCreatedAt, v))
}

// Bundle applies equality check predicate on the "bundle" field. It's identical to BundleEQ.
func Bundle(v []byte) predicate.Attestation {
	return predicate.Attestation(sql.FieldEQ(FieldBundle, v))
}

// WorkflowrunID applies equality check predicate on the "workflowrun_id" field. It's identical to WorkflowrunIDEQ.
func WorkflowrunID(v uuid.UUID) predicate.Attestation {
	return predicate.Attestation(sql.FieldEQ(FieldWorkflowrunID, v))
}

// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.Attestation {
	return predicate.Attestation(sql.FieldEQ(FieldCreatedAt, v))
}

// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.Attestation {
	return predicate.Attestation(sql.FieldNEQ(FieldCreatedAt, v))
}

// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.Attestation {
	return predicate.Attestation(sql.FieldIn(FieldCreatedAt, vs...))
}

// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.Attestation {
	return predicate.Attestation(sql.FieldNotIn(FieldCreatedAt, vs...))
}

// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.Attestation {
	return predicate.Attestation(sql.FieldGT(FieldCreatedAt, v))
}

// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.Attestation {
	return predicate.Attestation(sql.FieldGTE(FieldCreatedAt, v))
}

// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.Attestation {
	return predicate.Attestation(sql.FieldLT(FieldCreatedAt, v))
}

// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.Attestation {
	return predicate.Attestation(sql.FieldLTE(FieldCreatedAt, v))
}

// BundleEQ applies the EQ predicate on the "bundle" field.
func BundleEQ(v []byte) predicate.Attestation {
	return predicate.Attestation(sql.FieldEQ(FieldBundle, v))
}

// BundleNEQ applies the NEQ predicate on the "bundle" field.
func BundleNEQ(v []byte) predicate.Attestation {
	return predicate.Attestation(sql.FieldNEQ(FieldBundle, v))
}

// BundleIn applies the In predicate on the "bundle" field.
func BundleIn(vs ...[]byte) predicate.Attestation {
	return predicate.Attestation(sql.FieldIn(FieldBundle, vs...))
}

// BundleNotIn applies the NotIn predicate on the "bundle" field.
func BundleNotIn(vs ...[]byte) predicate.Attestation {
	return predicate.Attestation(sql.FieldNotIn(FieldBundle, vs...))
}

// BundleGT applies the GT predicate on the "bundle" field.
func BundleGT(v []byte) predicate.Attestation {
	return predicate.Attestation(sql.FieldGT(FieldBundle, v))
}

// BundleGTE applies the GTE predicate on the "bundle" field.
func BundleGTE(v []byte) predicate.Attestation {
	return predicate.Attestation(sql.FieldGTE(FieldBundle, v))
}

// BundleLT applies the LT predicate on the "bundle" field.
func BundleLT(v []byte) predicate.Attestation {
	return predicate.Attestation(sql.FieldLT(FieldBundle, v))
}

// BundleLTE applies the LTE predicate on the "bundle" field.
func BundleLTE(v []byte) predicate.Attestation {
	return predicate.Attestation(sql.FieldLTE(FieldBundle, v))
}

// WorkflowrunIDEQ applies the EQ predicate on the "workflowrun_id" field.
func WorkflowrunIDEQ(v uuid.UUID) predicate.Attestation {
	return predicate.Attestation(sql.FieldEQ(FieldWorkflowrunID, v))
}

// WorkflowrunIDNEQ applies the NEQ predicate on the "workflowrun_id" field.
func WorkflowrunIDNEQ(v uuid.UUID) predicate.Attestation {
	return predicate.Attestation(sql.FieldNEQ(FieldWorkflowrunID, v))
}

// WorkflowrunIDIn applies the In predicate on the "workflowrun_id" field.
func WorkflowrunIDIn(vs ...uuid.UUID) predicate.Attestation {
	return predicate.Attestation(sql.FieldIn(FieldWorkflowrunID, vs...))
}

// WorkflowrunIDNotIn applies the NotIn predicate on the "workflowrun_id" field.
func WorkflowrunIDNotIn(vs ...uuid.UUID) predicate.Attestation {
	return predicate.Attestation(sql.FieldNotIn(FieldWorkflowrunID, vs...))
}

// HasWorkflowrun applies the HasEdge predicate on the "workflowrun" edge.
func HasWorkflowrun() predicate.Attestation {
	return predicate.Attestation(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, true, WorkflowrunTable, WorkflowrunColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasWorkflowrunWith applies the HasEdge predicate on the "workflowrun" edge with a given conditions (other predicates).
func HasWorkflowrunWith(preds ...predicate.WorkflowRun) predicate.Attestation {
	return predicate.Attestation(func(s *sql.Selector) {
		step := newWorkflowrunStep()
		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.Attestation) predicate.Attestation {
	return predicate.Attestation(sql.AndPredicates(predicates...))
}

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

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