// Code generated by ent, DO NOT EDIT.

package workflowrun

import (
	"time"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/chainloop-dev/chainloop/app/controlplane/pkg/biz"
	"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.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldID, id))
}

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

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

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

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

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

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

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

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

// FinishedAt applies equality check predicate on the "finished_at" field. It's identical to FinishedAtEQ.
func FinishedAt(v time.Time) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldFinishedAt, v))
}

// Reason applies equality check predicate on the "reason" field. It's identical to ReasonEQ.
func Reason(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldReason, v))
}

// RunURL applies equality check predicate on the "run_url" field. It's identical to RunURLEQ.
func RunURL(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldRunURL, v))
}

// RunnerType applies equality check predicate on the "runner_type" field. It's identical to RunnerTypeEQ.
func RunnerType(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldRunnerType, v))
}

// AttestationDigest applies equality check predicate on the "attestation_digest" field. It's identical to AttestationDigestEQ.
func AttestationDigest(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldAttestationDigest, v))
}

// AttestationState applies equality check predicate on the "attestation_state" field. It's identical to AttestationStateEQ.
func AttestationState(v []byte) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldAttestationState, v))
}

// ContractRevisionUsed applies equality check predicate on the "contract_revision_used" field. It's identical to ContractRevisionUsedEQ.
func ContractRevisionUsed(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldContractRevisionUsed, v))
}

// ContractRevisionLatest applies equality check predicate on the "contract_revision_latest" field. It's identical to ContractRevisionLatestEQ.
func ContractRevisionLatest(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldContractRevisionLatest, v))
}

// VersionID applies equality check predicate on the "version_id" field. It's identical to VersionIDEQ.
func VersionID(v uuid.UUID) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldVersionID, v))
}

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

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

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

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

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

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

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

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

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

// FinishedAtEQ applies the EQ predicate on the "finished_at" field.
func FinishedAtEQ(v time.Time) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldFinishedAt, v))
}

// FinishedAtNEQ applies the NEQ predicate on the "finished_at" field.
func FinishedAtNEQ(v time.Time) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNEQ(FieldFinishedAt, v))
}

// FinishedAtIn applies the In predicate on the "finished_at" field.
func FinishedAtIn(vs ...time.Time) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIn(FieldFinishedAt, vs...))
}

// FinishedAtNotIn applies the NotIn predicate on the "finished_at" field.
func FinishedAtNotIn(vs ...time.Time) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotIn(FieldFinishedAt, vs...))
}

// FinishedAtGT applies the GT predicate on the "finished_at" field.
func FinishedAtGT(v time.Time) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGT(FieldFinishedAt, v))
}

// FinishedAtGTE applies the GTE predicate on the "finished_at" field.
func FinishedAtGTE(v time.Time) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGTE(FieldFinishedAt, v))
}

// FinishedAtLT applies the LT predicate on the "finished_at" field.
func FinishedAtLT(v time.Time) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLT(FieldFinishedAt, v))
}

// FinishedAtLTE applies the LTE predicate on the "finished_at" field.
func FinishedAtLTE(v time.Time) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLTE(FieldFinishedAt, v))
}

// FinishedAtIsNil applies the IsNil predicate on the "finished_at" field.
func FinishedAtIsNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIsNull(FieldFinishedAt))
}

// FinishedAtNotNil applies the NotNil predicate on the "finished_at" field.
func FinishedAtNotNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotNull(FieldFinishedAt))
}

// StateEQ applies the EQ predicate on the "state" field.
func StateEQ(v biz.WorkflowRunStatus) predicate.WorkflowRun {
	vc := v
	return predicate.WorkflowRun(sql.FieldEQ(FieldState, vc))
}

// StateNEQ applies the NEQ predicate on the "state" field.
func StateNEQ(v biz.WorkflowRunStatus) predicate.WorkflowRun {
	vc := v
	return predicate.WorkflowRun(sql.FieldNEQ(FieldState, vc))
}

// StateIn applies the In predicate on the "state" field.
func StateIn(vs ...biz.WorkflowRunStatus) predicate.WorkflowRun {
	v := make([]any, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.WorkflowRun(sql.FieldIn(FieldState, v...))
}

// StateNotIn applies the NotIn predicate on the "state" field.
func StateNotIn(vs ...biz.WorkflowRunStatus) predicate.WorkflowRun {
	v := make([]any, len(vs))
	for i := range v {
		v[i] = vs[i]
	}
	return predicate.WorkflowRun(sql.FieldNotIn(FieldState, v...))
}

// ReasonEQ applies the EQ predicate on the "reason" field.
func ReasonEQ(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldReason, v))
}

// ReasonNEQ applies the NEQ predicate on the "reason" field.
func ReasonNEQ(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNEQ(FieldReason, v))
}

// ReasonIn applies the In predicate on the "reason" field.
func ReasonIn(vs ...string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIn(FieldReason, vs...))
}

// ReasonNotIn applies the NotIn predicate on the "reason" field.
func ReasonNotIn(vs ...string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotIn(FieldReason, vs...))
}

// ReasonGT applies the GT predicate on the "reason" field.
func ReasonGT(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGT(FieldReason, v))
}

// ReasonGTE applies the GTE predicate on the "reason" field.
func ReasonGTE(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGTE(FieldReason, v))
}

// ReasonLT applies the LT predicate on the "reason" field.
func ReasonLT(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLT(FieldReason, v))
}

// ReasonLTE applies the LTE predicate on the "reason" field.
func ReasonLTE(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLTE(FieldReason, v))
}

// ReasonContains applies the Contains predicate on the "reason" field.
func ReasonContains(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldContains(FieldReason, v))
}

// ReasonHasPrefix applies the HasPrefix predicate on the "reason" field.
func ReasonHasPrefix(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldHasPrefix(FieldReason, v))
}

// ReasonHasSuffix applies the HasSuffix predicate on the "reason" field.
func ReasonHasSuffix(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldHasSuffix(FieldReason, v))
}

// ReasonIsNil applies the IsNil predicate on the "reason" field.
func ReasonIsNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIsNull(FieldReason))
}

// ReasonNotNil applies the NotNil predicate on the "reason" field.
func ReasonNotNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotNull(FieldReason))
}

// ReasonEqualFold applies the EqualFold predicate on the "reason" field.
func ReasonEqualFold(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEqualFold(FieldReason, v))
}

// ReasonContainsFold applies the ContainsFold predicate on the "reason" field.
func ReasonContainsFold(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldContainsFold(FieldReason, v))
}

// RunURLEQ applies the EQ predicate on the "run_url" field.
func RunURLEQ(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldRunURL, v))
}

// RunURLNEQ applies the NEQ predicate on the "run_url" field.
func RunURLNEQ(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNEQ(FieldRunURL, v))
}

// RunURLIn applies the In predicate on the "run_url" field.
func RunURLIn(vs ...string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIn(FieldRunURL, vs...))
}

// RunURLNotIn applies the NotIn predicate on the "run_url" field.
func RunURLNotIn(vs ...string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotIn(FieldRunURL, vs...))
}

// RunURLGT applies the GT predicate on the "run_url" field.
func RunURLGT(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGT(FieldRunURL, v))
}

// RunURLGTE applies the GTE predicate on the "run_url" field.
func RunURLGTE(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGTE(FieldRunURL, v))
}

// RunURLLT applies the LT predicate on the "run_url" field.
func RunURLLT(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLT(FieldRunURL, v))
}

// RunURLLTE applies the LTE predicate on the "run_url" field.
func RunURLLTE(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLTE(FieldRunURL, v))
}

// RunURLContains applies the Contains predicate on the "run_url" field.
func RunURLContains(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldContains(FieldRunURL, v))
}

// RunURLHasPrefix applies the HasPrefix predicate on the "run_url" field.
func RunURLHasPrefix(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldHasPrefix(FieldRunURL, v))
}

// RunURLHasSuffix applies the HasSuffix predicate on the "run_url" field.
func RunURLHasSuffix(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldHasSuffix(FieldRunURL, v))
}

// RunURLIsNil applies the IsNil predicate on the "run_url" field.
func RunURLIsNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIsNull(FieldRunURL))
}

// RunURLNotNil applies the NotNil predicate on the "run_url" field.
func RunURLNotNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotNull(FieldRunURL))
}

// RunURLEqualFold applies the EqualFold predicate on the "run_url" field.
func RunURLEqualFold(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEqualFold(FieldRunURL, v))
}

// RunURLContainsFold applies the ContainsFold predicate on the "run_url" field.
func RunURLContainsFold(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldContainsFold(FieldRunURL, v))
}

// RunnerTypeEQ applies the EQ predicate on the "runner_type" field.
func RunnerTypeEQ(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldRunnerType, v))
}

// RunnerTypeNEQ applies the NEQ predicate on the "runner_type" field.
func RunnerTypeNEQ(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNEQ(FieldRunnerType, v))
}

// RunnerTypeIn applies the In predicate on the "runner_type" field.
func RunnerTypeIn(vs ...string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIn(FieldRunnerType, vs...))
}

// RunnerTypeNotIn applies the NotIn predicate on the "runner_type" field.
func RunnerTypeNotIn(vs ...string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotIn(FieldRunnerType, vs...))
}

// RunnerTypeGT applies the GT predicate on the "runner_type" field.
func RunnerTypeGT(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGT(FieldRunnerType, v))
}

// RunnerTypeGTE applies the GTE predicate on the "runner_type" field.
func RunnerTypeGTE(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGTE(FieldRunnerType, v))
}

// RunnerTypeLT applies the LT predicate on the "runner_type" field.
func RunnerTypeLT(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLT(FieldRunnerType, v))
}

// RunnerTypeLTE applies the LTE predicate on the "runner_type" field.
func RunnerTypeLTE(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLTE(FieldRunnerType, v))
}

// RunnerTypeContains applies the Contains predicate on the "runner_type" field.
func RunnerTypeContains(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldContains(FieldRunnerType, v))
}

// RunnerTypeHasPrefix applies the HasPrefix predicate on the "runner_type" field.
func RunnerTypeHasPrefix(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldHasPrefix(FieldRunnerType, v))
}

// RunnerTypeHasSuffix applies the HasSuffix predicate on the "runner_type" field.
func RunnerTypeHasSuffix(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldHasSuffix(FieldRunnerType, v))
}

// RunnerTypeIsNil applies the IsNil predicate on the "runner_type" field.
func RunnerTypeIsNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIsNull(FieldRunnerType))
}

// RunnerTypeNotNil applies the NotNil predicate on the "runner_type" field.
func RunnerTypeNotNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotNull(FieldRunnerType))
}

// RunnerTypeEqualFold applies the EqualFold predicate on the "runner_type" field.
func RunnerTypeEqualFold(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEqualFold(FieldRunnerType, v))
}

// RunnerTypeContainsFold applies the ContainsFold predicate on the "runner_type" field.
func RunnerTypeContainsFold(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldContainsFold(FieldRunnerType, v))
}

// AttestationIsNil applies the IsNil predicate on the "attestation" field.
func AttestationIsNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIsNull(FieldAttestation))
}

// AttestationNotNil applies the NotNil predicate on the "attestation" field.
func AttestationNotNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotNull(FieldAttestation))
}

// AttestationDigestEQ applies the EQ predicate on the "attestation_digest" field.
func AttestationDigestEQ(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldAttestationDigest, v))
}

// AttestationDigestNEQ applies the NEQ predicate on the "attestation_digest" field.
func AttestationDigestNEQ(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNEQ(FieldAttestationDigest, v))
}

// AttestationDigestIn applies the In predicate on the "attestation_digest" field.
func AttestationDigestIn(vs ...string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIn(FieldAttestationDigest, vs...))
}

// AttestationDigestNotIn applies the NotIn predicate on the "attestation_digest" field.
func AttestationDigestNotIn(vs ...string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotIn(FieldAttestationDigest, vs...))
}

// AttestationDigestGT applies the GT predicate on the "attestation_digest" field.
func AttestationDigestGT(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGT(FieldAttestationDigest, v))
}

// AttestationDigestGTE applies the GTE predicate on the "attestation_digest" field.
func AttestationDigestGTE(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGTE(FieldAttestationDigest, v))
}

// AttestationDigestLT applies the LT predicate on the "attestation_digest" field.
func AttestationDigestLT(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLT(FieldAttestationDigest, v))
}

// AttestationDigestLTE applies the LTE predicate on the "attestation_digest" field.
func AttestationDigestLTE(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLTE(FieldAttestationDigest, v))
}

// AttestationDigestContains applies the Contains predicate on the "attestation_digest" field.
func AttestationDigestContains(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldContains(FieldAttestationDigest, v))
}

// AttestationDigestHasPrefix applies the HasPrefix predicate on the "attestation_digest" field.
func AttestationDigestHasPrefix(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldHasPrefix(FieldAttestationDigest, v))
}

// AttestationDigestHasSuffix applies the HasSuffix predicate on the "attestation_digest" field.
func AttestationDigestHasSuffix(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldHasSuffix(FieldAttestationDigest, v))
}

// AttestationDigestIsNil applies the IsNil predicate on the "attestation_digest" field.
func AttestationDigestIsNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIsNull(FieldAttestationDigest))
}

// AttestationDigestNotNil applies the NotNil predicate on the "attestation_digest" field.
func AttestationDigestNotNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotNull(FieldAttestationDigest))
}

// AttestationDigestEqualFold applies the EqualFold predicate on the "attestation_digest" field.
func AttestationDigestEqualFold(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEqualFold(FieldAttestationDigest, v))
}

// AttestationDigestContainsFold applies the ContainsFold predicate on the "attestation_digest" field.
func AttestationDigestContainsFold(v string) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldContainsFold(FieldAttestationDigest, v))
}

// AttestationStateEQ applies the EQ predicate on the "attestation_state" field.
func AttestationStateEQ(v []byte) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldAttestationState, v))
}

// AttestationStateNEQ applies the NEQ predicate on the "attestation_state" field.
func AttestationStateNEQ(v []byte) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNEQ(FieldAttestationState, v))
}

// AttestationStateIn applies the In predicate on the "attestation_state" field.
func AttestationStateIn(vs ...[]byte) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIn(FieldAttestationState, vs...))
}

// AttestationStateNotIn applies the NotIn predicate on the "attestation_state" field.
func AttestationStateNotIn(vs ...[]byte) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotIn(FieldAttestationState, vs...))
}

// AttestationStateGT applies the GT predicate on the "attestation_state" field.
func AttestationStateGT(v []byte) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGT(FieldAttestationState, v))
}

// AttestationStateGTE applies the GTE predicate on the "attestation_state" field.
func AttestationStateGTE(v []byte) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGTE(FieldAttestationState, v))
}

// AttestationStateLT applies the LT predicate on the "attestation_state" field.
func AttestationStateLT(v []byte) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLT(FieldAttestationState, v))
}

// AttestationStateLTE applies the LTE predicate on the "attestation_state" field.
func AttestationStateLTE(v []byte) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLTE(FieldAttestationState, v))
}

// AttestationStateIsNil applies the IsNil predicate on the "attestation_state" field.
func AttestationStateIsNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIsNull(FieldAttestationState))
}

// AttestationStateNotNil applies the NotNil predicate on the "attestation_state" field.
func AttestationStateNotNil() predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotNull(FieldAttestationState))
}

// ContractRevisionUsedEQ applies the EQ predicate on the "contract_revision_used" field.
func ContractRevisionUsedEQ(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldContractRevisionUsed, v))
}

// ContractRevisionUsedNEQ applies the NEQ predicate on the "contract_revision_used" field.
func ContractRevisionUsedNEQ(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNEQ(FieldContractRevisionUsed, v))
}

// ContractRevisionUsedIn applies the In predicate on the "contract_revision_used" field.
func ContractRevisionUsedIn(vs ...int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIn(FieldContractRevisionUsed, vs...))
}

// ContractRevisionUsedNotIn applies the NotIn predicate on the "contract_revision_used" field.
func ContractRevisionUsedNotIn(vs ...int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotIn(FieldContractRevisionUsed, vs...))
}

// ContractRevisionUsedGT applies the GT predicate on the "contract_revision_used" field.
func ContractRevisionUsedGT(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGT(FieldContractRevisionUsed, v))
}

// ContractRevisionUsedGTE applies the GTE predicate on the "contract_revision_used" field.
func ContractRevisionUsedGTE(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGTE(FieldContractRevisionUsed, v))
}

// ContractRevisionUsedLT applies the LT predicate on the "contract_revision_used" field.
func ContractRevisionUsedLT(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLT(FieldContractRevisionUsed, v))
}

// ContractRevisionUsedLTE applies the LTE predicate on the "contract_revision_used" field.
func ContractRevisionUsedLTE(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLTE(FieldContractRevisionUsed, v))
}

// ContractRevisionLatestEQ applies the EQ predicate on the "contract_revision_latest" field.
func ContractRevisionLatestEQ(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldContractRevisionLatest, v))
}

// ContractRevisionLatestNEQ applies the NEQ predicate on the "contract_revision_latest" field.
func ContractRevisionLatestNEQ(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNEQ(FieldContractRevisionLatest, v))
}

// ContractRevisionLatestIn applies the In predicate on the "contract_revision_latest" field.
func ContractRevisionLatestIn(vs ...int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIn(FieldContractRevisionLatest, vs...))
}

// ContractRevisionLatestNotIn applies the NotIn predicate on the "contract_revision_latest" field.
func ContractRevisionLatestNotIn(vs ...int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotIn(FieldContractRevisionLatest, vs...))
}

// ContractRevisionLatestGT applies the GT predicate on the "contract_revision_latest" field.
func ContractRevisionLatestGT(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGT(FieldContractRevisionLatest, v))
}

// ContractRevisionLatestGTE applies the GTE predicate on the "contract_revision_latest" field.
func ContractRevisionLatestGTE(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldGTE(FieldContractRevisionLatest, v))
}

// ContractRevisionLatestLT applies the LT predicate on the "contract_revision_latest" field.
func ContractRevisionLatestLT(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLT(FieldContractRevisionLatest, v))
}

// ContractRevisionLatestLTE applies the LTE predicate on the "contract_revision_latest" field.
func ContractRevisionLatestLTE(v int) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldLTE(FieldContractRevisionLatest, v))
}

// VersionIDEQ applies the EQ predicate on the "version_id" field.
func VersionIDEQ(v uuid.UUID) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldEQ(FieldVersionID, v))
}

// VersionIDNEQ applies the NEQ predicate on the "version_id" field.
func VersionIDNEQ(v uuid.UUID) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNEQ(FieldVersionID, v))
}

// VersionIDIn applies the In predicate on the "version_id" field.
func VersionIDIn(vs ...uuid.UUID) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldIn(FieldVersionID, vs...))
}

// VersionIDNotIn applies the NotIn predicate on the "version_id" field.
func VersionIDNotIn(vs ...uuid.UUID) predicate.WorkflowRun {
	return predicate.WorkflowRun(sql.FieldNotIn(FieldVersionID, vs...))
}

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

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

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

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

// HasWorkflow applies the HasEdge predicate on the "workflow" edge.
func HasWorkflow() predicate.WorkflowRun {
	return predicate.WorkflowRun(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, 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.WorkflowRun {
	return predicate.WorkflowRun(func(s *sql.Selector) {
		step := newWorkflowStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasContractVersion applies the HasEdge predicate on the "contract_version" edge.
func HasContractVersion() predicate.WorkflowRun {
	return predicate.WorkflowRun(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, false, ContractVersionTable, ContractVersionColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasContractVersionWith applies the HasEdge predicate on the "contract_version" edge with a given conditions (other predicates).
func HasContractVersionWith(preds ...predicate.WorkflowContractVersion) predicate.WorkflowRun {
	return predicate.WorkflowRun(func(s *sql.Selector) {
		step := newContractVersionStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasCasBackends applies the HasEdge predicate on the "cas_backends" edge.
func HasCasBackends() predicate.WorkflowRun {
	return predicate.WorkflowRun(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2M, false, CasBackendsTable, CasBackendsPrimaryKey...),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

// HasVersion applies the HasEdge predicate on the "version" edge.
func HasVersion() predicate.WorkflowRun {
	return predicate.WorkflowRun(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, VersionTable, VersionColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasVersionWith applies the HasEdge predicate on the "version" edge with a given conditions (other predicates).
func HasVersionWith(preds ...predicate.ProjectVersion) predicate.WorkflowRun {
	return predicate.WorkflowRun(func(s *sql.Selector) {
		step := newVersionStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasAttestationBundle applies the HasEdge predicate on the "attestation_bundle" edge.
func HasAttestationBundle() predicate.WorkflowRun {
	return predicate.WorkflowRun(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, false, AttestationBundleTable, AttestationBundleColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

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

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