// Code generated by ent, DO NOT EDIT.

package integrationattachment

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

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

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

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

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

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

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

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

// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id uuid.UUID) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(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.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldEQ(FieldCreatedAt, v))
}

// Configuration applies equality check predicate on the "configuration" field. It's identical to ConfigurationEQ.
func Configuration(v []byte) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldEQ(FieldConfiguration, v))
}

// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAt(v time.Time) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldEQ(FieldDeletedAt, v))
}

// WorkflowID applies equality check predicate on the "workflow_id" field. It's identical to WorkflowIDEQ.
func WorkflowID(v uuid.UUID) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldEQ(FieldWorkflowID, v))
}

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

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

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

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

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

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

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

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

// ConfigurationEQ applies the EQ predicate on the "configuration" field.
func ConfigurationEQ(v []byte) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldEQ(FieldConfiguration, v))
}

// ConfigurationNEQ applies the NEQ predicate on the "configuration" field.
func ConfigurationNEQ(v []byte) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldNEQ(FieldConfiguration, v))
}

// ConfigurationIn applies the In predicate on the "configuration" field.
func ConfigurationIn(vs ...[]byte) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldIn(FieldConfiguration, vs...))
}

// ConfigurationNotIn applies the NotIn predicate on the "configuration" field.
func ConfigurationNotIn(vs ...[]byte) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldNotIn(FieldConfiguration, vs...))
}

// ConfigurationGT applies the GT predicate on the "configuration" field.
func ConfigurationGT(v []byte) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldGT(FieldConfiguration, v))
}

// ConfigurationGTE applies the GTE predicate on the "configuration" field.
func ConfigurationGTE(v []byte) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldGTE(FieldConfiguration, v))
}

// ConfigurationLT applies the LT predicate on the "configuration" field.
func ConfigurationLT(v []byte) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldLT(FieldConfiguration, v))
}

// ConfigurationLTE applies the LTE predicate on the "configuration" field.
func ConfigurationLTE(v []byte) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldLTE(FieldConfiguration, v))
}

// ConfigurationIsNil applies the IsNil predicate on the "configuration" field.
func ConfigurationIsNil() predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldIsNull(FieldConfiguration))
}

// ConfigurationNotNil applies the NotNil predicate on the "configuration" field.
func ConfigurationNotNil() predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldNotNull(FieldConfiguration))
}

// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtEQ(v time.Time) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldEQ(FieldDeletedAt, v))
}

// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNEQ(v time.Time) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldNEQ(FieldDeletedAt, v))
}

// DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIn(vs ...time.Time) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldIn(FieldDeletedAt, vs...))
}

// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotIn(vs ...time.Time) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldNotIn(FieldDeletedAt, vs...))
}

// DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGT(v time.Time) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldGT(FieldDeletedAt, v))
}

// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtGTE(v time.Time) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldGTE(FieldDeletedAt, v))
}

// DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLT(v time.Time) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldLT(FieldDeletedAt, v))
}

// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtLTE(v time.Time) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldLTE(FieldDeletedAt, v))
}

// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtIsNil() predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldIsNull(FieldDeletedAt))
}

// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func DeletedAtNotNil() predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldNotNull(FieldDeletedAt))
}

// WorkflowIDEQ applies the EQ predicate on the "workflow_id" field.
func WorkflowIDEQ(v uuid.UUID) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldEQ(FieldWorkflowID, v))
}

// WorkflowIDNEQ applies the NEQ predicate on the "workflow_id" field.
func WorkflowIDNEQ(v uuid.UUID) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldNEQ(FieldWorkflowID, v))
}

// WorkflowIDIn applies the In predicate on the "workflow_id" field.
func WorkflowIDIn(vs ...uuid.UUID) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldIn(FieldWorkflowID, vs...))
}

// WorkflowIDNotIn applies the NotIn predicate on the "workflow_id" field.
func WorkflowIDNotIn(vs ...uuid.UUID) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.FieldNotIn(FieldWorkflowID, vs...))
}

// HasIntegration applies the HasEdge predicate on the "integration" edge.
func HasIntegration() predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, false, IntegrationTable, IntegrationColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasIntegrationWith applies the HasEdge predicate on the "integration" edge with a given conditions (other predicates).
func HasIntegrationWith(preds ...predicate.Integration) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(func(s *sql.Selector) {
		step := newIntegrationStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasWorkflow applies the HasEdge predicate on the "workflow" edge.
func HasWorkflow() predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, false, WorkflowTable, WorkflowColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasWorkflowWith applies the HasEdge predicate on the "workflow" edge with a given conditions (other predicates).
func HasWorkflowWith(preds ...predicate.Workflow) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(func(s *sql.Selector) {
		step := newWorkflowStep()
		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.IntegrationAttachment) predicate.IntegrationAttachment {
	return predicate.IntegrationAttachment(sql.AndPredicates(predicates...))
}

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

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