// Code generated by ent, DO NOT EDIT.

package ent

import (
	"time"

	"github.com/google/uuid"
	"github.com/in-toto/archivista/ent/attestation"
	"github.com/in-toto/archivista/ent/attestationcollection"
	"github.com/in-toto/archivista/ent/attestationpolicy"
	"github.com/in-toto/archivista/ent/dsse"
	"github.com/in-toto/archivista/ent/payloaddigest"
	"github.com/in-toto/archivista/ent/schema"
	"github.com/in-toto/archivista/ent/signature"
	"github.com/in-toto/archivista/ent/statement"
	"github.com/in-toto/archivista/ent/subject"
	"github.com/in-toto/archivista/ent/subjectdigest"
	"github.com/in-toto/archivista/ent/timestamp"
)

// The init function reads all schema descriptors with runtime code
// (default values, validators, hooks and policies) and stitches it
// to their package variables.
func init() {
	attestationFields := schema.Attestation{}.Fields()
	_ = attestationFields
	// attestationDescType is the schema descriptor for type field.
	attestationDescType := attestationFields[1].Descriptor()
	// attestation.TypeValidator is a validator for the "type" field. It is called by the builders before save.
	attestation.TypeValidator = attestationDescType.Validators[0].(func(string) error)
	// attestationDescID is the schema descriptor for id field.
	attestationDescID := attestationFields[0].Descriptor()
	// attestation.DefaultID holds the default value on creation for the id field.
	attestation.DefaultID = attestationDescID.Default.(func() uuid.UUID)
	attestationcollectionFields := schema.AttestationCollection{}.Fields()
	_ = attestationcollectionFields
	// attestationcollectionDescName is the schema descriptor for name field.
	attestationcollectionDescName := attestationcollectionFields[1].Descriptor()
	// attestationcollection.NameValidator is a validator for the "name" field. It is called by the builders before save.
	attestationcollection.NameValidator = attestationcollectionDescName.Validators[0].(func(string) error)
	// attestationcollectionDescID is the schema descriptor for id field.
	attestationcollectionDescID := attestationcollectionFields[0].Descriptor()
	// attestationcollection.DefaultID holds the default value on creation for the id field.
	attestationcollection.DefaultID = attestationcollectionDescID.Default.(func() uuid.UUID)
	attestationpolicyFields := schema.AttestationPolicy{}.Fields()
	_ = attestationpolicyFields
	// attestationpolicyDescName is the schema descriptor for name field.
	attestationpolicyDescName := attestationpolicyFields[1].Descriptor()
	// attestationpolicy.NameValidator is a validator for the "name" field. It is called by the builders before save.
	attestationpolicy.NameValidator = attestationpolicyDescName.Validators[0].(func(string) error)
	// attestationpolicyDescID is the schema descriptor for id field.
	attestationpolicyDescID := attestationpolicyFields[0].Descriptor()
	// attestationpolicy.DefaultID holds the default value on creation for the id field.
	attestationpolicy.DefaultID = attestationpolicyDescID.Default.(func() uuid.UUID)
	dsseFields := schema.Dsse{}.Fields()
	_ = dsseFields
	// dsseDescCreatedAt is the schema descriptor for created_at field.
	dsseDescCreatedAt := dsseFields[1].Descriptor()
	// dsse.DefaultCreatedAt holds the default value on creation for the created_at field.
	dsse.DefaultCreatedAt = dsseDescCreatedAt.Default.(func() time.Time)
	// dsseDescGitoidSha256 is the schema descriptor for gitoid_sha256 field.
	dsseDescGitoidSha256 := dsseFields[2].Descriptor()
	// dsse.GitoidSha256Validator is a validator for the "gitoid_sha256" field. It is called by the builders before save.
	dsse.GitoidSha256Validator = dsseDescGitoidSha256.Validators[0].(func(string) error)
	// dsseDescPayloadType is the schema descriptor for payload_type field.
	dsseDescPayloadType := dsseFields[3].Descriptor()
	// dsse.PayloadTypeValidator is a validator for the "payload_type" field. It is called by the builders before save.
	dsse.PayloadTypeValidator = dsseDescPayloadType.Validators[0].(func(string) error)
	// dsseDescID is the schema descriptor for id field.
	dsseDescID := dsseFields[0].Descriptor()
	// dsse.DefaultID holds the default value on creation for the id field.
	dsse.DefaultID = dsseDescID.Default.(func() uuid.UUID)
	payloaddigestFields := schema.PayloadDigest{}.Fields()
	_ = payloaddigestFields
	// payloaddigestDescAlgorithm is the schema descriptor for algorithm field.
	payloaddigestDescAlgorithm := payloaddigestFields[1].Descriptor()
	// payloaddigest.AlgorithmValidator is a validator for the "algorithm" field. It is called by the builders before save.
	payloaddigest.AlgorithmValidator = payloaddigestDescAlgorithm.Validators[0].(func(string) error)
	// payloaddigestDescValue is the schema descriptor for value field.
	payloaddigestDescValue := payloaddigestFields[2].Descriptor()
	// payloaddigest.ValueValidator is a validator for the "value" field. It is called by the builders before save.
	payloaddigest.ValueValidator = payloaddigestDescValue.Validators[0].(func(string) error)
	// payloaddigestDescID is the schema descriptor for id field.
	payloaddigestDescID := payloaddigestFields[0].Descriptor()
	// payloaddigest.DefaultID holds the default value on creation for the id field.
	payloaddigest.DefaultID = payloaddigestDescID.Default.(func() uuid.UUID)
	signatureFields := schema.Signature{}.Fields()
	_ = signatureFields
	// signatureDescSignature is the schema descriptor for signature field.
	signatureDescSignature := signatureFields[2].Descriptor()
	// signature.SignatureValidator is a validator for the "signature" field. It is called by the builders before save.
	signature.SignatureValidator = signatureDescSignature.Validators[0].(func(string) error)
	// signatureDescID is the schema descriptor for id field.
	signatureDescID := signatureFields[0].Descriptor()
	// signature.DefaultID holds the default value on creation for the id field.
	signature.DefaultID = signatureDescID.Default.(func() uuid.UUID)
	statementFields := schema.Statement{}.Fields()
	_ = statementFields
	// statementDescPredicate is the schema descriptor for predicate field.
	statementDescPredicate := statementFields[1].Descriptor()
	// statement.PredicateValidator is a validator for the "predicate" field. It is called by the builders before save.
	statement.PredicateValidator = statementDescPredicate.Validators[0].(func(string) error)
	// statementDescID is the schema descriptor for id field.
	statementDescID := statementFields[0].Descriptor()
	// statement.DefaultID holds the default value on creation for the id field.
	statement.DefaultID = statementDescID.Default.(func() uuid.UUID)
	subjectFields := schema.Subject{}.Fields()
	_ = subjectFields
	// subjectDescCreatedAt is the schema descriptor for created_at field.
	subjectDescCreatedAt := subjectFields[1].Descriptor()
	// subject.DefaultCreatedAt holds the default value on creation for the created_at field.
	subject.DefaultCreatedAt = subjectDescCreatedAt.Default.(func() time.Time)
	// subjectDescName is the schema descriptor for name field.
	subjectDescName := subjectFields[2].Descriptor()
	// subject.NameValidator is a validator for the "name" field. It is called by the builders before save.
	subject.NameValidator = subjectDescName.Validators[0].(func(string) error)
	// subjectDescID is the schema descriptor for id field.
	subjectDescID := subjectFields[0].Descriptor()
	// subject.DefaultID holds the default value on creation for the id field.
	subject.DefaultID = subjectDescID.Default.(func() uuid.UUID)
	subjectdigestFields := schema.SubjectDigest{}.Fields()
	_ = subjectdigestFields
	// subjectdigestDescAlgorithm is the schema descriptor for algorithm field.
	subjectdigestDescAlgorithm := subjectdigestFields[1].Descriptor()
	// subjectdigest.AlgorithmValidator is a validator for the "algorithm" field. It is called by the builders before save.
	subjectdigest.AlgorithmValidator = subjectdigestDescAlgorithm.Validators[0].(func(string) error)
	// subjectdigestDescValue is the schema descriptor for value field.
	subjectdigestDescValue := subjectdigestFields[2].Descriptor()
	// subjectdigest.ValueValidator is a validator for the "value" field. It is called by the builders before save.
	subjectdigest.ValueValidator = subjectdigestDescValue.Validators[0].(func(string) error)
	// subjectdigestDescID is the schema descriptor for id field.
	subjectdigestDescID := subjectdigestFields[0].Descriptor()
	// subjectdigest.DefaultID holds the default value on creation for the id field.
	subjectdigest.DefaultID = subjectdigestDescID.Default.(func() uuid.UUID)
	timestampFields := schema.Timestamp{}.Fields()
	_ = timestampFields
	// timestampDescID is the schema descriptor for id field.
	timestampDescID := timestampFields[0].Descriptor()
	// timestamp.DefaultID holds the default value on creation for the id field.
	timestamp.DefaultID = timestampDescID.Default.(func() uuid.UUID)
}
