// Code generated by ent, DO NOT EDIT.

package casmapping

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

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

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

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

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

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

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

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

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

// Digest applies equality check predicate on the "digest" field. It's identical to DigestEQ.
func Digest(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldEQ(FieldDigest, v))
}

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

// WorkflowRunID applies equality check predicate on the "workflow_run_id" field. It's identical to WorkflowRunIDEQ.
func WorkflowRunID(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldEQ(FieldWorkflowRunID, v))
}

// OrganizationID applies equality check predicate on the "organization_id" field. It's identical to OrganizationIDEQ.
func OrganizationID(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldEQ(FieldOrganizationID, v))
}

// ProjectID applies equality check predicate on the "project_id" field. It's identical to ProjectIDEQ.
func ProjectID(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldEQ(FieldProjectID, v))
}

// DigestEQ applies the EQ predicate on the "digest" field.
func DigestEQ(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldEQ(FieldDigest, v))
}

// DigestNEQ applies the NEQ predicate on the "digest" field.
func DigestNEQ(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldNEQ(FieldDigest, v))
}

// DigestIn applies the In predicate on the "digest" field.
func DigestIn(vs ...string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldIn(FieldDigest, vs...))
}

// DigestNotIn applies the NotIn predicate on the "digest" field.
func DigestNotIn(vs ...string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldNotIn(FieldDigest, vs...))
}

// DigestGT applies the GT predicate on the "digest" field.
func DigestGT(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldGT(FieldDigest, v))
}

// DigestGTE applies the GTE predicate on the "digest" field.
func DigestGTE(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldGTE(FieldDigest, v))
}

// DigestLT applies the LT predicate on the "digest" field.
func DigestLT(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldLT(FieldDigest, v))
}

// DigestLTE applies the LTE predicate on the "digest" field.
func DigestLTE(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldLTE(FieldDigest, v))
}

// DigestContains applies the Contains predicate on the "digest" field.
func DigestContains(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldContains(FieldDigest, v))
}

// DigestHasPrefix applies the HasPrefix predicate on the "digest" field.
func DigestHasPrefix(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldHasPrefix(FieldDigest, v))
}

// DigestHasSuffix applies the HasSuffix predicate on the "digest" field.
func DigestHasSuffix(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldHasSuffix(FieldDigest, v))
}

// DigestEqualFold applies the EqualFold predicate on the "digest" field.
func DigestEqualFold(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldEqualFold(FieldDigest, v))
}

// DigestContainsFold applies the ContainsFold predicate on the "digest" field.
func DigestContainsFold(v string) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldContainsFold(FieldDigest, v))
}

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

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

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

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

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

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

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

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

// WorkflowRunIDEQ applies the EQ predicate on the "workflow_run_id" field.
func WorkflowRunIDEQ(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldEQ(FieldWorkflowRunID, v))
}

// WorkflowRunIDNEQ applies the NEQ predicate on the "workflow_run_id" field.
func WorkflowRunIDNEQ(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldNEQ(FieldWorkflowRunID, v))
}

// WorkflowRunIDIn applies the In predicate on the "workflow_run_id" field.
func WorkflowRunIDIn(vs ...uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldIn(FieldWorkflowRunID, vs...))
}

// WorkflowRunIDNotIn applies the NotIn predicate on the "workflow_run_id" field.
func WorkflowRunIDNotIn(vs ...uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldNotIn(FieldWorkflowRunID, vs...))
}

// WorkflowRunIDGT applies the GT predicate on the "workflow_run_id" field.
func WorkflowRunIDGT(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldGT(FieldWorkflowRunID, v))
}

// WorkflowRunIDGTE applies the GTE predicate on the "workflow_run_id" field.
func WorkflowRunIDGTE(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldGTE(FieldWorkflowRunID, v))
}

// WorkflowRunIDLT applies the LT predicate on the "workflow_run_id" field.
func WorkflowRunIDLT(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldLT(FieldWorkflowRunID, v))
}

// WorkflowRunIDLTE applies the LTE predicate on the "workflow_run_id" field.
func WorkflowRunIDLTE(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldLTE(FieldWorkflowRunID, v))
}

// WorkflowRunIDIsNil applies the IsNil predicate on the "workflow_run_id" field.
func WorkflowRunIDIsNil() predicate.CASMapping {
	return predicate.CASMapping(sql.FieldIsNull(FieldWorkflowRunID))
}

// WorkflowRunIDNotNil applies the NotNil predicate on the "workflow_run_id" field.
func WorkflowRunIDNotNil() predicate.CASMapping {
	return predicate.CASMapping(sql.FieldNotNull(FieldWorkflowRunID))
}

// OrganizationIDEQ applies the EQ predicate on the "organization_id" field.
func OrganizationIDEQ(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldEQ(FieldOrganizationID, v))
}

// OrganizationIDNEQ applies the NEQ predicate on the "organization_id" field.
func OrganizationIDNEQ(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldNEQ(FieldOrganizationID, v))
}

// OrganizationIDIn applies the In predicate on the "organization_id" field.
func OrganizationIDIn(vs ...uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldIn(FieldOrganizationID, vs...))
}

// OrganizationIDNotIn applies the NotIn predicate on the "organization_id" field.
func OrganizationIDNotIn(vs ...uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldNotIn(FieldOrganizationID, vs...))
}

// ProjectIDEQ applies the EQ predicate on the "project_id" field.
func ProjectIDEQ(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldEQ(FieldProjectID, v))
}

// ProjectIDNEQ applies the NEQ predicate on the "project_id" field.
func ProjectIDNEQ(v uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldNEQ(FieldProjectID, v))
}

// ProjectIDIn applies the In predicate on the "project_id" field.
func ProjectIDIn(vs ...uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldIn(FieldProjectID, vs...))
}

// ProjectIDNotIn applies the NotIn predicate on the "project_id" field.
func ProjectIDNotIn(vs ...uuid.UUID) predicate.CASMapping {
	return predicate.CASMapping(sql.FieldNotIn(FieldProjectID, vs...))
}

// ProjectIDIsNil applies the IsNil predicate on the "project_id" field.
func ProjectIDIsNil() predicate.CASMapping {
	return predicate.CASMapping(sql.FieldIsNull(FieldProjectID))
}

// ProjectIDNotNil applies the NotNil predicate on the "project_id" field.
func ProjectIDNotNil() predicate.CASMapping {
	return predicate.CASMapping(sql.FieldNotNull(FieldProjectID))
}

// HasCasBackend applies the HasEdge predicate on the "cas_backend" edge.
func HasCasBackend() predicate.CASMapping {
	return predicate.CASMapping(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, false, CasBackendTable, CasBackendColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

// HasOrganization applies the HasEdge predicate on the "organization" edge.
func HasOrganization() predicate.CASMapping {
	return predicate.CASMapping(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, false, OrganizationTable, OrganizationColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

// HasProject applies the HasEdge predicate on the "project" edge.
func HasProject() predicate.CASMapping {
	return predicate.CASMapping(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, false, ProjectTable, ProjectColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasProjectWith applies the HasEdge predicate on the "project" edge with a given conditions (other predicates).
func HasProjectWith(preds ...predicate.Project) predicate.CASMapping {
	return predicate.CASMapping(func(s *sql.Selector) {
		step := newProjectStep()
		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.CASMapping) predicate.CASMapping {
	return predicate.CASMapping(sql.AndPredicates(predicates...))
}

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

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