// Code generated by ent, DO NOT EDIT.

package webauthnchallenge

import (
	"PasswordManager/ent/predicate"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/google/uuid"
)

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

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

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

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

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

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

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

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

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

// SdChallenge applies equality check predicate on the "sdChallenge" field. It's identical to SdChallengeEQ.
func SdChallenge(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldEQ(FieldSdChallenge, v))
}

// UserId applies equality check predicate on the "userId" field. It's identical to UserIdEQ.
func UserId(v []byte) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldEQ(FieldUserId, v))
}

// UserVerification applies equality check predicate on the "userVerification" field. It's identical to UserVerificationEQ.
func UserVerification(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldEQ(FieldUserVerification, v))
}

// SdChallengeEQ applies the EQ predicate on the "sdChallenge" field.
func SdChallengeEQ(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldEQ(FieldSdChallenge, v))
}

// SdChallengeNEQ applies the NEQ predicate on the "sdChallenge" field.
func SdChallengeNEQ(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNEQ(FieldSdChallenge, v))
}

// SdChallengeIn applies the In predicate on the "sdChallenge" field.
func SdChallengeIn(vs ...string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldIn(FieldSdChallenge, vs...))
}

// SdChallengeNotIn applies the NotIn predicate on the "sdChallenge" field.
func SdChallengeNotIn(vs ...string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNotIn(FieldSdChallenge, vs...))
}

// SdChallengeGT applies the GT predicate on the "sdChallenge" field.
func SdChallengeGT(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldGT(FieldSdChallenge, v))
}

// SdChallengeGTE applies the GTE predicate on the "sdChallenge" field.
func SdChallengeGTE(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldGTE(FieldSdChallenge, v))
}

// SdChallengeLT applies the LT predicate on the "sdChallenge" field.
func SdChallengeLT(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldLT(FieldSdChallenge, v))
}

// SdChallengeLTE applies the LTE predicate on the "sdChallenge" field.
func SdChallengeLTE(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldLTE(FieldSdChallenge, v))
}

// SdChallengeContains applies the Contains predicate on the "sdChallenge" field.
func SdChallengeContains(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldContains(FieldSdChallenge, v))
}

// SdChallengeHasPrefix applies the HasPrefix predicate on the "sdChallenge" field.
func SdChallengeHasPrefix(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldHasPrefix(FieldSdChallenge, v))
}

// SdChallengeHasSuffix applies the HasSuffix predicate on the "sdChallenge" field.
func SdChallengeHasSuffix(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldHasSuffix(FieldSdChallenge, v))
}

// SdChallengeIsNil applies the IsNil predicate on the "sdChallenge" field.
func SdChallengeIsNil() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldIsNull(FieldSdChallenge))
}

// SdChallengeNotNil applies the NotNil predicate on the "sdChallenge" field.
func SdChallengeNotNil() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNotNull(FieldSdChallenge))
}

// SdChallengeEqualFold applies the EqualFold predicate on the "sdChallenge" field.
func SdChallengeEqualFold(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldEqualFold(FieldSdChallenge, v))
}

// SdChallengeContainsFold applies the ContainsFold predicate on the "sdChallenge" field.
func SdChallengeContainsFold(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldContainsFold(FieldSdChallenge, v))
}

// UserIdEQ applies the EQ predicate on the "userId" field.
func UserIdEQ(v []byte) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldEQ(FieldUserId, v))
}

// UserIdNEQ applies the NEQ predicate on the "userId" field.
func UserIdNEQ(v []byte) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNEQ(FieldUserId, v))
}

// UserIdIn applies the In predicate on the "userId" field.
func UserIdIn(vs ...[]byte) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldIn(FieldUserId, vs...))
}

// UserIdNotIn applies the NotIn predicate on the "userId" field.
func UserIdNotIn(vs ...[]byte) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNotIn(FieldUserId, vs...))
}

// UserIdGT applies the GT predicate on the "userId" field.
func UserIdGT(v []byte) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldGT(FieldUserId, v))
}

// UserIdGTE applies the GTE predicate on the "userId" field.
func UserIdGTE(v []byte) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldGTE(FieldUserId, v))
}

// UserIdLT applies the LT predicate on the "userId" field.
func UserIdLT(v []byte) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldLT(FieldUserId, v))
}

// UserIdLTE applies the LTE predicate on the "userId" field.
func UserIdLTE(v []byte) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldLTE(FieldUserId, v))
}

// UserIdIsNil applies the IsNil predicate on the "userId" field.
func UserIdIsNil() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldIsNull(FieldUserId))
}

// UserIdNotNil applies the NotNil predicate on the "userId" field.
func UserIdNotNil() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNotNull(FieldUserId))
}

// AllowedCredentialIdsIsNil applies the IsNil predicate on the "allowedCredentialIds" field.
func AllowedCredentialIdsIsNil() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldIsNull(FieldAllowedCredentialIds))
}

// AllowedCredentialIdsNotNil applies the NotNil predicate on the "allowedCredentialIds" field.
func AllowedCredentialIdsNotNil() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNotNull(FieldAllowedCredentialIds))
}

// UserVerificationEQ applies the EQ predicate on the "userVerification" field.
func UserVerificationEQ(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldEQ(FieldUserVerification, v))
}

// UserVerificationNEQ applies the NEQ predicate on the "userVerification" field.
func UserVerificationNEQ(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNEQ(FieldUserVerification, v))
}

// UserVerificationIn applies the In predicate on the "userVerification" field.
func UserVerificationIn(vs ...string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldIn(FieldUserVerification, vs...))
}

// UserVerificationNotIn applies the NotIn predicate on the "userVerification" field.
func UserVerificationNotIn(vs ...string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNotIn(FieldUserVerification, vs...))
}

// UserVerificationGT applies the GT predicate on the "userVerification" field.
func UserVerificationGT(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldGT(FieldUserVerification, v))
}

// UserVerificationGTE applies the GTE predicate on the "userVerification" field.
func UserVerificationGTE(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldGTE(FieldUserVerification, v))
}

// UserVerificationLT applies the LT predicate on the "userVerification" field.
func UserVerificationLT(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldLT(FieldUserVerification, v))
}

// UserVerificationLTE applies the LTE predicate on the "userVerification" field.
func UserVerificationLTE(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldLTE(FieldUserVerification, v))
}

// UserVerificationContains applies the Contains predicate on the "userVerification" field.
func UserVerificationContains(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldContains(FieldUserVerification, v))
}

// UserVerificationHasPrefix applies the HasPrefix predicate on the "userVerification" field.
func UserVerificationHasPrefix(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldHasPrefix(FieldUserVerification, v))
}

// UserVerificationHasSuffix applies the HasSuffix predicate on the "userVerification" field.
func UserVerificationHasSuffix(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldHasSuffix(FieldUserVerification, v))
}

// UserVerificationIsNil applies the IsNil predicate on the "userVerification" field.
func UserVerificationIsNil() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldIsNull(FieldUserVerification))
}

// UserVerificationNotNil applies the NotNil predicate on the "userVerification" field.
func UserVerificationNotNil() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNotNull(FieldUserVerification))
}

// UserVerificationEqualFold applies the EqualFold predicate on the "userVerification" field.
func UserVerificationEqualFold(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldEqualFold(FieldUserVerification, v))
}

// UserVerificationContainsFold applies the ContainsFold predicate on the "userVerification" field.
func UserVerificationContainsFold(v string) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldContainsFold(FieldUserVerification, v))
}

// ExtensionsIsNil applies the IsNil predicate on the "extensions" field.
func ExtensionsIsNil() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldIsNull(FieldExtensions))
}

// ExtensionsNotNil applies the NotNil predicate on the "extensions" field.
func ExtensionsNotNil() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(sql.FieldNotNull(FieldExtensions))
}

// HasChallenge applies the HasEdge predicate on the "challenge" edge.
func HasChallenge() predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, true, ChallengeTable, ChallengeColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasChallengeWith applies the HasEdge predicate on the "challenge" edge with a given conditions (other predicates).
func HasChallengeWith(preds ...predicate.Challenge) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.To(ChallengeInverseTable, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, true, ChallengeTable, ChallengeColumn),
		)
		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.WebAuthnChallenge) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(func(s *sql.Selector) {
		s1 := s.Clone().SetP(nil)
		for _, p := range predicates {
			p(s1)
		}
		s.Where(s1.P())
	})
}

// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.WebAuthnChallenge) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(func(s *sql.Selector) {
		s1 := s.Clone().SetP(nil)
		for i, p := range predicates {
			if i > 0 {
				s1.Or()
			}
			p(s1)
		}
		s.Where(s1.P())
	})
}

// Not applies the not operator on the given predicate.
func Not(p predicate.WebAuthnChallenge) predicate.WebAuthnChallenge {
	return predicate.WebAuthnChallenge(func(s *sql.Selector) {
		p(s.Not())
	})
}
