// Code generated by ent, DO NOT EDIT.

package ent

import (
	"context"
	"errors"
	"fmt"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"entgo.io/ent/schema/field"
	"github.com/buildbarn/bb-portal/ent/gen/ent/buildgraphmetrics"
	"github.com/buildbarn/bb-portal/ent/gen/ent/evaluationstat"
	"github.com/buildbarn/bb-portal/ent/gen/ent/metrics"
	"github.com/buildbarn/bb-portal/ent/gen/ent/predicate"
)

// BuildGraphMetricsUpdate is the builder for updating BuildGraphMetrics entities.
type BuildGraphMetricsUpdate struct {
	config
	hooks    []Hook
	mutation *BuildGraphMetricsMutation
}

// Where appends a list predicates to the BuildGraphMetricsUpdate builder.
func (bgmu *BuildGraphMetricsUpdate) Where(ps ...predicate.BuildGraphMetrics) *BuildGraphMetricsUpdate {
	bgmu.mutation.Where(ps...)
	return bgmu
}

// SetActionLookupValueCount sets the "action_lookup_value_count" field.
func (bgmu *BuildGraphMetricsUpdate) SetActionLookupValueCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.ResetActionLookupValueCount()
	bgmu.mutation.SetActionLookupValueCount(i)
	return bgmu
}

// SetNillableActionLookupValueCount sets the "action_lookup_value_count" field if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableActionLookupValueCount(i *int32) *BuildGraphMetricsUpdate {
	if i != nil {
		bgmu.SetActionLookupValueCount(*i)
	}
	return bgmu
}

// AddActionLookupValueCount adds i to the "action_lookup_value_count" field.
func (bgmu *BuildGraphMetricsUpdate) AddActionLookupValueCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.AddActionLookupValueCount(i)
	return bgmu
}

// ClearActionLookupValueCount clears the value of the "action_lookup_value_count" field.
func (bgmu *BuildGraphMetricsUpdate) ClearActionLookupValueCount() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearActionLookupValueCount()
	return bgmu
}

// SetActionLookupValueCountNotIncludingAspects sets the "action_lookup_value_count_not_including_aspects" field.
func (bgmu *BuildGraphMetricsUpdate) SetActionLookupValueCountNotIncludingAspects(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.ResetActionLookupValueCountNotIncludingAspects()
	bgmu.mutation.SetActionLookupValueCountNotIncludingAspects(i)
	return bgmu
}

// SetNillableActionLookupValueCountNotIncludingAspects sets the "action_lookup_value_count_not_including_aspects" field if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableActionLookupValueCountNotIncludingAspects(i *int32) *BuildGraphMetricsUpdate {
	if i != nil {
		bgmu.SetActionLookupValueCountNotIncludingAspects(*i)
	}
	return bgmu
}

// AddActionLookupValueCountNotIncludingAspects adds i to the "action_lookup_value_count_not_including_aspects" field.
func (bgmu *BuildGraphMetricsUpdate) AddActionLookupValueCountNotIncludingAspects(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.AddActionLookupValueCountNotIncludingAspects(i)
	return bgmu
}

// ClearActionLookupValueCountNotIncludingAspects clears the value of the "action_lookup_value_count_not_including_aspects" field.
func (bgmu *BuildGraphMetricsUpdate) ClearActionLookupValueCountNotIncludingAspects() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearActionLookupValueCountNotIncludingAspects()
	return bgmu
}

// SetActionCount sets the "action_count" field.
func (bgmu *BuildGraphMetricsUpdate) SetActionCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.ResetActionCount()
	bgmu.mutation.SetActionCount(i)
	return bgmu
}

// SetNillableActionCount sets the "action_count" field if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableActionCount(i *int32) *BuildGraphMetricsUpdate {
	if i != nil {
		bgmu.SetActionCount(*i)
	}
	return bgmu
}

// AddActionCount adds i to the "action_count" field.
func (bgmu *BuildGraphMetricsUpdate) AddActionCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.AddActionCount(i)
	return bgmu
}

// ClearActionCount clears the value of the "action_count" field.
func (bgmu *BuildGraphMetricsUpdate) ClearActionCount() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearActionCount()
	return bgmu
}

// SetActionCountNotIncludingAspects sets the "action_count_not_including_aspects" field.
func (bgmu *BuildGraphMetricsUpdate) SetActionCountNotIncludingAspects(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.ResetActionCountNotIncludingAspects()
	bgmu.mutation.SetActionCountNotIncludingAspects(i)
	return bgmu
}

// SetNillableActionCountNotIncludingAspects sets the "action_count_not_including_aspects" field if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableActionCountNotIncludingAspects(i *int32) *BuildGraphMetricsUpdate {
	if i != nil {
		bgmu.SetActionCountNotIncludingAspects(*i)
	}
	return bgmu
}

// AddActionCountNotIncludingAspects adds i to the "action_count_not_including_aspects" field.
func (bgmu *BuildGraphMetricsUpdate) AddActionCountNotIncludingAspects(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.AddActionCountNotIncludingAspects(i)
	return bgmu
}

// ClearActionCountNotIncludingAspects clears the value of the "action_count_not_including_aspects" field.
func (bgmu *BuildGraphMetricsUpdate) ClearActionCountNotIncludingAspects() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearActionCountNotIncludingAspects()
	return bgmu
}

// SetInputFileConfiguredTargetCount sets the "input_file_configured_target_count" field.
func (bgmu *BuildGraphMetricsUpdate) SetInputFileConfiguredTargetCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.ResetInputFileConfiguredTargetCount()
	bgmu.mutation.SetInputFileConfiguredTargetCount(i)
	return bgmu
}

// SetNillableInputFileConfiguredTargetCount sets the "input_file_configured_target_count" field if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableInputFileConfiguredTargetCount(i *int32) *BuildGraphMetricsUpdate {
	if i != nil {
		bgmu.SetInputFileConfiguredTargetCount(*i)
	}
	return bgmu
}

// AddInputFileConfiguredTargetCount adds i to the "input_file_configured_target_count" field.
func (bgmu *BuildGraphMetricsUpdate) AddInputFileConfiguredTargetCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.AddInputFileConfiguredTargetCount(i)
	return bgmu
}

// ClearInputFileConfiguredTargetCount clears the value of the "input_file_configured_target_count" field.
func (bgmu *BuildGraphMetricsUpdate) ClearInputFileConfiguredTargetCount() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearInputFileConfiguredTargetCount()
	return bgmu
}

// SetOutputFileConfiguredTargetCount sets the "output_file_configured_target_count" field.
func (bgmu *BuildGraphMetricsUpdate) SetOutputFileConfiguredTargetCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.ResetOutputFileConfiguredTargetCount()
	bgmu.mutation.SetOutputFileConfiguredTargetCount(i)
	return bgmu
}

// SetNillableOutputFileConfiguredTargetCount sets the "output_file_configured_target_count" field if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableOutputFileConfiguredTargetCount(i *int32) *BuildGraphMetricsUpdate {
	if i != nil {
		bgmu.SetOutputFileConfiguredTargetCount(*i)
	}
	return bgmu
}

// AddOutputFileConfiguredTargetCount adds i to the "output_file_configured_target_count" field.
func (bgmu *BuildGraphMetricsUpdate) AddOutputFileConfiguredTargetCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.AddOutputFileConfiguredTargetCount(i)
	return bgmu
}

// ClearOutputFileConfiguredTargetCount clears the value of the "output_file_configured_target_count" field.
func (bgmu *BuildGraphMetricsUpdate) ClearOutputFileConfiguredTargetCount() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearOutputFileConfiguredTargetCount()
	return bgmu
}

// SetOtherConfiguredTargetCount sets the "other_configured_target_count" field.
func (bgmu *BuildGraphMetricsUpdate) SetOtherConfiguredTargetCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.ResetOtherConfiguredTargetCount()
	bgmu.mutation.SetOtherConfiguredTargetCount(i)
	return bgmu
}

// SetNillableOtherConfiguredTargetCount sets the "other_configured_target_count" field if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableOtherConfiguredTargetCount(i *int32) *BuildGraphMetricsUpdate {
	if i != nil {
		bgmu.SetOtherConfiguredTargetCount(*i)
	}
	return bgmu
}

// AddOtherConfiguredTargetCount adds i to the "other_configured_target_count" field.
func (bgmu *BuildGraphMetricsUpdate) AddOtherConfiguredTargetCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.AddOtherConfiguredTargetCount(i)
	return bgmu
}

// ClearOtherConfiguredTargetCount clears the value of the "other_configured_target_count" field.
func (bgmu *BuildGraphMetricsUpdate) ClearOtherConfiguredTargetCount() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearOtherConfiguredTargetCount()
	return bgmu
}

// SetOutputArtifactCount sets the "output_artifact_count" field.
func (bgmu *BuildGraphMetricsUpdate) SetOutputArtifactCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.ResetOutputArtifactCount()
	bgmu.mutation.SetOutputArtifactCount(i)
	return bgmu
}

// SetNillableOutputArtifactCount sets the "output_artifact_count" field if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableOutputArtifactCount(i *int32) *BuildGraphMetricsUpdate {
	if i != nil {
		bgmu.SetOutputArtifactCount(*i)
	}
	return bgmu
}

// AddOutputArtifactCount adds i to the "output_artifact_count" field.
func (bgmu *BuildGraphMetricsUpdate) AddOutputArtifactCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.AddOutputArtifactCount(i)
	return bgmu
}

// ClearOutputArtifactCount clears the value of the "output_artifact_count" field.
func (bgmu *BuildGraphMetricsUpdate) ClearOutputArtifactCount() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearOutputArtifactCount()
	return bgmu
}

// SetPostInvocationSkyframeNodeCount sets the "post_invocation_skyframe_node_count" field.
func (bgmu *BuildGraphMetricsUpdate) SetPostInvocationSkyframeNodeCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.ResetPostInvocationSkyframeNodeCount()
	bgmu.mutation.SetPostInvocationSkyframeNodeCount(i)
	return bgmu
}

// SetNillablePostInvocationSkyframeNodeCount sets the "post_invocation_skyframe_node_count" field if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillablePostInvocationSkyframeNodeCount(i *int32) *BuildGraphMetricsUpdate {
	if i != nil {
		bgmu.SetPostInvocationSkyframeNodeCount(*i)
	}
	return bgmu
}

// AddPostInvocationSkyframeNodeCount adds i to the "post_invocation_skyframe_node_count" field.
func (bgmu *BuildGraphMetricsUpdate) AddPostInvocationSkyframeNodeCount(i int32) *BuildGraphMetricsUpdate {
	bgmu.mutation.AddPostInvocationSkyframeNodeCount(i)
	return bgmu
}

// ClearPostInvocationSkyframeNodeCount clears the value of the "post_invocation_skyframe_node_count" field.
func (bgmu *BuildGraphMetricsUpdate) ClearPostInvocationSkyframeNodeCount() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearPostInvocationSkyframeNodeCount()
	return bgmu
}

// SetMetricsID sets the "metrics" edge to the Metrics entity by ID.
func (bgmu *BuildGraphMetricsUpdate) SetMetricsID(id int) *BuildGraphMetricsUpdate {
	bgmu.mutation.SetMetricsID(id)
	return bgmu
}

// SetNillableMetricsID sets the "metrics" edge to the Metrics entity by ID if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableMetricsID(id *int) *BuildGraphMetricsUpdate {
	if id != nil {
		bgmu = bgmu.SetMetricsID(*id)
	}
	return bgmu
}

// SetMetrics sets the "metrics" edge to the Metrics entity.
func (bgmu *BuildGraphMetricsUpdate) SetMetrics(m *Metrics) *BuildGraphMetricsUpdate {
	return bgmu.SetMetricsID(m.ID)
}

// SetDirtiedValuesID sets the "dirtied_values" edge to the EvaluationStat entity by ID.
func (bgmu *BuildGraphMetricsUpdate) SetDirtiedValuesID(id int) *BuildGraphMetricsUpdate {
	bgmu.mutation.SetDirtiedValuesID(id)
	return bgmu
}

// SetNillableDirtiedValuesID sets the "dirtied_values" edge to the EvaluationStat entity by ID if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableDirtiedValuesID(id *int) *BuildGraphMetricsUpdate {
	if id != nil {
		bgmu = bgmu.SetDirtiedValuesID(*id)
	}
	return bgmu
}

// SetDirtiedValues sets the "dirtied_values" edge to the EvaluationStat entity.
func (bgmu *BuildGraphMetricsUpdate) SetDirtiedValues(e *EvaluationStat) *BuildGraphMetricsUpdate {
	return bgmu.SetDirtiedValuesID(e.ID)
}

// SetChangedValuesID sets the "changed_values" edge to the EvaluationStat entity by ID.
func (bgmu *BuildGraphMetricsUpdate) SetChangedValuesID(id int) *BuildGraphMetricsUpdate {
	bgmu.mutation.SetChangedValuesID(id)
	return bgmu
}

// SetNillableChangedValuesID sets the "changed_values" edge to the EvaluationStat entity by ID if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableChangedValuesID(id *int) *BuildGraphMetricsUpdate {
	if id != nil {
		bgmu = bgmu.SetChangedValuesID(*id)
	}
	return bgmu
}

// SetChangedValues sets the "changed_values" edge to the EvaluationStat entity.
func (bgmu *BuildGraphMetricsUpdate) SetChangedValues(e *EvaluationStat) *BuildGraphMetricsUpdate {
	return bgmu.SetChangedValuesID(e.ID)
}

// SetBuiltValuesID sets the "built_values" edge to the EvaluationStat entity by ID.
func (bgmu *BuildGraphMetricsUpdate) SetBuiltValuesID(id int) *BuildGraphMetricsUpdate {
	bgmu.mutation.SetBuiltValuesID(id)
	return bgmu
}

// SetNillableBuiltValuesID sets the "built_values" edge to the EvaluationStat entity by ID if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableBuiltValuesID(id *int) *BuildGraphMetricsUpdate {
	if id != nil {
		bgmu = bgmu.SetBuiltValuesID(*id)
	}
	return bgmu
}

// SetBuiltValues sets the "built_values" edge to the EvaluationStat entity.
func (bgmu *BuildGraphMetricsUpdate) SetBuiltValues(e *EvaluationStat) *BuildGraphMetricsUpdate {
	return bgmu.SetBuiltValuesID(e.ID)
}

// SetCleanedValuesID sets the "cleaned_values" edge to the EvaluationStat entity by ID.
func (bgmu *BuildGraphMetricsUpdate) SetCleanedValuesID(id int) *BuildGraphMetricsUpdate {
	bgmu.mutation.SetCleanedValuesID(id)
	return bgmu
}

// SetNillableCleanedValuesID sets the "cleaned_values" edge to the EvaluationStat entity by ID if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableCleanedValuesID(id *int) *BuildGraphMetricsUpdate {
	if id != nil {
		bgmu = bgmu.SetCleanedValuesID(*id)
	}
	return bgmu
}

// SetCleanedValues sets the "cleaned_values" edge to the EvaluationStat entity.
func (bgmu *BuildGraphMetricsUpdate) SetCleanedValues(e *EvaluationStat) *BuildGraphMetricsUpdate {
	return bgmu.SetCleanedValuesID(e.ID)
}

// SetEvaluatedValuesID sets the "evaluated_values" edge to the EvaluationStat entity by ID.
func (bgmu *BuildGraphMetricsUpdate) SetEvaluatedValuesID(id int) *BuildGraphMetricsUpdate {
	bgmu.mutation.SetEvaluatedValuesID(id)
	return bgmu
}

// SetNillableEvaluatedValuesID sets the "evaluated_values" edge to the EvaluationStat entity by ID if the given value is not nil.
func (bgmu *BuildGraphMetricsUpdate) SetNillableEvaluatedValuesID(id *int) *BuildGraphMetricsUpdate {
	if id != nil {
		bgmu = bgmu.SetEvaluatedValuesID(*id)
	}
	return bgmu
}

// SetEvaluatedValues sets the "evaluated_values" edge to the EvaluationStat entity.
func (bgmu *BuildGraphMetricsUpdate) SetEvaluatedValues(e *EvaluationStat) *BuildGraphMetricsUpdate {
	return bgmu.SetEvaluatedValuesID(e.ID)
}

// Mutation returns the BuildGraphMetricsMutation object of the builder.
func (bgmu *BuildGraphMetricsUpdate) Mutation() *BuildGraphMetricsMutation {
	return bgmu.mutation
}

// ClearMetrics clears the "metrics" edge to the Metrics entity.
func (bgmu *BuildGraphMetricsUpdate) ClearMetrics() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearMetrics()
	return bgmu
}

// ClearDirtiedValues clears the "dirtied_values" edge to the EvaluationStat entity.
func (bgmu *BuildGraphMetricsUpdate) ClearDirtiedValues() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearDirtiedValues()
	return bgmu
}

// ClearChangedValues clears the "changed_values" edge to the EvaluationStat entity.
func (bgmu *BuildGraphMetricsUpdate) ClearChangedValues() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearChangedValues()
	return bgmu
}

// ClearBuiltValues clears the "built_values" edge to the EvaluationStat entity.
func (bgmu *BuildGraphMetricsUpdate) ClearBuiltValues() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearBuiltValues()
	return bgmu
}

// ClearCleanedValues clears the "cleaned_values" edge to the EvaluationStat entity.
func (bgmu *BuildGraphMetricsUpdate) ClearCleanedValues() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearCleanedValues()
	return bgmu
}

// ClearEvaluatedValues clears the "evaluated_values" edge to the EvaluationStat entity.
func (bgmu *BuildGraphMetricsUpdate) ClearEvaluatedValues() *BuildGraphMetricsUpdate {
	bgmu.mutation.ClearEvaluatedValues()
	return bgmu
}

// Save executes the query and returns the number of nodes affected by the update operation.
func (bgmu *BuildGraphMetricsUpdate) Save(ctx context.Context) (int, error) {
	return withHooks(ctx, bgmu.sqlSave, bgmu.mutation, bgmu.hooks)
}

// SaveX is like Save, but panics if an error occurs.
func (bgmu *BuildGraphMetricsUpdate) SaveX(ctx context.Context) int {
	affected, err := bgmu.Save(ctx)
	if err != nil {
		panic(err)
	}
	return affected
}

// Exec executes the query.
func (bgmu *BuildGraphMetricsUpdate) Exec(ctx context.Context) error {
	_, err := bgmu.Save(ctx)
	return err
}

// ExecX is like Exec, but panics if an error occurs.
func (bgmu *BuildGraphMetricsUpdate) ExecX(ctx context.Context) {
	if err := bgmu.Exec(ctx); err != nil {
		panic(err)
	}
}

func (bgmu *BuildGraphMetricsUpdate) sqlSave(ctx context.Context) (n int, err error) {
	_spec := sqlgraph.NewUpdateSpec(buildgraphmetrics.Table, buildgraphmetrics.Columns, sqlgraph.NewFieldSpec(buildgraphmetrics.FieldID, field.TypeInt))
	if ps := bgmu.mutation.predicates; len(ps) > 0 {
		_spec.Predicate = func(selector *sql.Selector) {
			for i := range ps {
				ps[i](selector)
			}
		}
	}
	if value, ok := bgmu.mutation.ActionLookupValueCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldActionLookupValueCount, field.TypeInt32, value)
	}
	if value, ok := bgmu.mutation.AddedActionLookupValueCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldActionLookupValueCount, field.TypeInt32, value)
	}
	if bgmu.mutation.ActionLookupValueCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldActionLookupValueCount, field.TypeInt32)
	}
	if value, ok := bgmu.mutation.ActionLookupValueCountNotIncludingAspects(); ok {
		_spec.SetField(buildgraphmetrics.FieldActionLookupValueCountNotIncludingAspects, field.TypeInt32, value)
	}
	if value, ok := bgmu.mutation.AddedActionLookupValueCountNotIncludingAspects(); ok {
		_spec.AddField(buildgraphmetrics.FieldActionLookupValueCountNotIncludingAspects, field.TypeInt32, value)
	}
	if bgmu.mutation.ActionLookupValueCountNotIncludingAspectsCleared() {
		_spec.ClearField(buildgraphmetrics.FieldActionLookupValueCountNotIncludingAspects, field.TypeInt32)
	}
	if value, ok := bgmu.mutation.ActionCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldActionCount, field.TypeInt32, value)
	}
	if value, ok := bgmu.mutation.AddedActionCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldActionCount, field.TypeInt32, value)
	}
	if bgmu.mutation.ActionCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldActionCount, field.TypeInt32)
	}
	if value, ok := bgmu.mutation.ActionCountNotIncludingAspects(); ok {
		_spec.SetField(buildgraphmetrics.FieldActionCountNotIncludingAspects, field.TypeInt32, value)
	}
	if value, ok := bgmu.mutation.AddedActionCountNotIncludingAspects(); ok {
		_spec.AddField(buildgraphmetrics.FieldActionCountNotIncludingAspects, field.TypeInt32, value)
	}
	if bgmu.mutation.ActionCountNotIncludingAspectsCleared() {
		_spec.ClearField(buildgraphmetrics.FieldActionCountNotIncludingAspects, field.TypeInt32)
	}
	if value, ok := bgmu.mutation.InputFileConfiguredTargetCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldInputFileConfiguredTargetCount, field.TypeInt32, value)
	}
	if value, ok := bgmu.mutation.AddedInputFileConfiguredTargetCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldInputFileConfiguredTargetCount, field.TypeInt32, value)
	}
	if bgmu.mutation.InputFileConfiguredTargetCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldInputFileConfiguredTargetCount, field.TypeInt32)
	}
	if value, ok := bgmu.mutation.OutputFileConfiguredTargetCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldOutputFileConfiguredTargetCount, field.TypeInt32, value)
	}
	if value, ok := bgmu.mutation.AddedOutputFileConfiguredTargetCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldOutputFileConfiguredTargetCount, field.TypeInt32, value)
	}
	if bgmu.mutation.OutputFileConfiguredTargetCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldOutputFileConfiguredTargetCount, field.TypeInt32)
	}
	if value, ok := bgmu.mutation.OtherConfiguredTargetCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldOtherConfiguredTargetCount, field.TypeInt32, value)
	}
	if value, ok := bgmu.mutation.AddedOtherConfiguredTargetCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldOtherConfiguredTargetCount, field.TypeInt32, value)
	}
	if bgmu.mutation.OtherConfiguredTargetCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldOtherConfiguredTargetCount, field.TypeInt32)
	}
	if value, ok := bgmu.mutation.OutputArtifactCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldOutputArtifactCount, field.TypeInt32, value)
	}
	if value, ok := bgmu.mutation.AddedOutputArtifactCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldOutputArtifactCount, field.TypeInt32, value)
	}
	if bgmu.mutation.OutputArtifactCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldOutputArtifactCount, field.TypeInt32)
	}
	if value, ok := bgmu.mutation.PostInvocationSkyframeNodeCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldPostInvocationSkyframeNodeCount, field.TypeInt32, value)
	}
	if value, ok := bgmu.mutation.AddedPostInvocationSkyframeNodeCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldPostInvocationSkyframeNodeCount, field.TypeInt32, value)
	}
	if bgmu.mutation.PostInvocationSkyframeNodeCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldPostInvocationSkyframeNodeCount, field.TypeInt32)
	}
	if bgmu.mutation.MetricsCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.O2O,
			Inverse: true,
			Table:   buildgraphmetrics.MetricsTable,
			Columns: []string{buildgraphmetrics.MetricsColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(metrics.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmu.mutation.MetricsIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.O2O,
			Inverse: true,
			Table:   buildgraphmetrics.MetricsTable,
			Columns: []string{buildgraphmetrics.MetricsColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(metrics.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if bgmu.mutation.DirtiedValuesCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.DirtiedValuesTable,
			Columns: []string{buildgraphmetrics.DirtiedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmu.mutation.DirtiedValuesIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.DirtiedValuesTable,
			Columns: []string{buildgraphmetrics.DirtiedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if bgmu.mutation.ChangedValuesCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.ChangedValuesTable,
			Columns: []string{buildgraphmetrics.ChangedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmu.mutation.ChangedValuesIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.ChangedValuesTable,
			Columns: []string{buildgraphmetrics.ChangedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if bgmu.mutation.BuiltValuesCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.BuiltValuesTable,
			Columns: []string{buildgraphmetrics.BuiltValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmu.mutation.BuiltValuesIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.BuiltValuesTable,
			Columns: []string{buildgraphmetrics.BuiltValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if bgmu.mutation.CleanedValuesCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.CleanedValuesTable,
			Columns: []string{buildgraphmetrics.CleanedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmu.mutation.CleanedValuesIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.CleanedValuesTable,
			Columns: []string{buildgraphmetrics.CleanedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if bgmu.mutation.EvaluatedValuesCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.O2O,
			Inverse: false,
			Table:   buildgraphmetrics.EvaluatedValuesTable,
			Columns: []string{buildgraphmetrics.EvaluatedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmu.mutation.EvaluatedValuesIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.O2O,
			Inverse: false,
			Table:   buildgraphmetrics.EvaluatedValuesTable,
			Columns: []string{buildgraphmetrics.EvaluatedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if n, err = sqlgraph.UpdateNodes(ctx, bgmu.driver, _spec); err != nil {
		if _, ok := err.(*sqlgraph.NotFoundError); ok {
			err = &NotFoundError{buildgraphmetrics.Label}
		} else if sqlgraph.IsConstraintError(err) {
			err = &ConstraintError{msg: err.Error(), wrap: err}
		}
		return 0, err
	}
	bgmu.mutation.done = true
	return n, nil
}

// BuildGraphMetricsUpdateOne is the builder for updating a single BuildGraphMetrics entity.
type BuildGraphMetricsUpdateOne struct {
	config
	fields   []string
	hooks    []Hook
	mutation *BuildGraphMetricsMutation
}

// SetActionLookupValueCount sets the "action_lookup_value_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) SetActionLookupValueCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ResetActionLookupValueCount()
	bgmuo.mutation.SetActionLookupValueCount(i)
	return bgmuo
}

// SetNillableActionLookupValueCount sets the "action_lookup_value_count" field if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableActionLookupValueCount(i *int32) *BuildGraphMetricsUpdateOne {
	if i != nil {
		bgmuo.SetActionLookupValueCount(*i)
	}
	return bgmuo
}

// AddActionLookupValueCount adds i to the "action_lookup_value_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) AddActionLookupValueCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.AddActionLookupValueCount(i)
	return bgmuo
}

// ClearActionLookupValueCount clears the value of the "action_lookup_value_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearActionLookupValueCount() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearActionLookupValueCount()
	return bgmuo
}

// SetActionLookupValueCountNotIncludingAspects sets the "action_lookup_value_count_not_including_aspects" field.
func (bgmuo *BuildGraphMetricsUpdateOne) SetActionLookupValueCountNotIncludingAspects(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ResetActionLookupValueCountNotIncludingAspects()
	bgmuo.mutation.SetActionLookupValueCountNotIncludingAspects(i)
	return bgmuo
}

// SetNillableActionLookupValueCountNotIncludingAspects sets the "action_lookup_value_count_not_including_aspects" field if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableActionLookupValueCountNotIncludingAspects(i *int32) *BuildGraphMetricsUpdateOne {
	if i != nil {
		bgmuo.SetActionLookupValueCountNotIncludingAspects(*i)
	}
	return bgmuo
}

// AddActionLookupValueCountNotIncludingAspects adds i to the "action_lookup_value_count_not_including_aspects" field.
func (bgmuo *BuildGraphMetricsUpdateOne) AddActionLookupValueCountNotIncludingAspects(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.AddActionLookupValueCountNotIncludingAspects(i)
	return bgmuo
}

// ClearActionLookupValueCountNotIncludingAspects clears the value of the "action_lookup_value_count_not_including_aspects" field.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearActionLookupValueCountNotIncludingAspects() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearActionLookupValueCountNotIncludingAspects()
	return bgmuo
}

// SetActionCount sets the "action_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) SetActionCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ResetActionCount()
	bgmuo.mutation.SetActionCount(i)
	return bgmuo
}

// SetNillableActionCount sets the "action_count" field if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableActionCount(i *int32) *BuildGraphMetricsUpdateOne {
	if i != nil {
		bgmuo.SetActionCount(*i)
	}
	return bgmuo
}

// AddActionCount adds i to the "action_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) AddActionCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.AddActionCount(i)
	return bgmuo
}

// ClearActionCount clears the value of the "action_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearActionCount() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearActionCount()
	return bgmuo
}

// SetActionCountNotIncludingAspects sets the "action_count_not_including_aspects" field.
func (bgmuo *BuildGraphMetricsUpdateOne) SetActionCountNotIncludingAspects(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ResetActionCountNotIncludingAspects()
	bgmuo.mutation.SetActionCountNotIncludingAspects(i)
	return bgmuo
}

// SetNillableActionCountNotIncludingAspects sets the "action_count_not_including_aspects" field if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableActionCountNotIncludingAspects(i *int32) *BuildGraphMetricsUpdateOne {
	if i != nil {
		bgmuo.SetActionCountNotIncludingAspects(*i)
	}
	return bgmuo
}

// AddActionCountNotIncludingAspects adds i to the "action_count_not_including_aspects" field.
func (bgmuo *BuildGraphMetricsUpdateOne) AddActionCountNotIncludingAspects(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.AddActionCountNotIncludingAspects(i)
	return bgmuo
}

// ClearActionCountNotIncludingAspects clears the value of the "action_count_not_including_aspects" field.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearActionCountNotIncludingAspects() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearActionCountNotIncludingAspects()
	return bgmuo
}

// SetInputFileConfiguredTargetCount sets the "input_file_configured_target_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) SetInputFileConfiguredTargetCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ResetInputFileConfiguredTargetCount()
	bgmuo.mutation.SetInputFileConfiguredTargetCount(i)
	return bgmuo
}

// SetNillableInputFileConfiguredTargetCount sets the "input_file_configured_target_count" field if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableInputFileConfiguredTargetCount(i *int32) *BuildGraphMetricsUpdateOne {
	if i != nil {
		bgmuo.SetInputFileConfiguredTargetCount(*i)
	}
	return bgmuo
}

// AddInputFileConfiguredTargetCount adds i to the "input_file_configured_target_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) AddInputFileConfiguredTargetCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.AddInputFileConfiguredTargetCount(i)
	return bgmuo
}

// ClearInputFileConfiguredTargetCount clears the value of the "input_file_configured_target_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearInputFileConfiguredTargetCount() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearInputFileConfiguredTargetCount()
	return bgmuo
}

// SetOutputFileConfiguredTargetCount sets the "output_file_configured_target_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) SetOutputFileConfiguredTargetCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ResetOutputFileConfiguredTargetCount()
	bgmuo.mutation.SetOutputFileConfiguredTargetCount(i)
	return bgmuo
}

// SetNillableOutputFileConfiguredTargetCount sets the "output_file_configured_target_count" field if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableOutputFileConfiguredTargetCount(i *int32) *BuildGraphMetricsUpdateOne {
	if i != nil {
		bgmuo.SetOutputFileConfiguredTargetCount(*i)
	}
	return bgmuo
}

// AddOutputFileConfiguredTargetCount adds i to the "output_file_configured_target_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) AddOutputFileConfiguredTargetCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.AddOutputFileConfiguredTargetCount(i)
	return bgmuo
}

// ClearOutputFileConfiguredTargetCount clears the value of the "output_file_configured_target_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearOutputFileConfiguredTargetCount() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearOutputFileConfiguredTargetCount()
	return bgmuo
}

// SetOtherConfiguredTargetCount sets the "other_configured_target_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) SetOtherConfiguredTargetCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ResetOtherConfiguredTargetCount()
	bgmuo.mutation.SetOtherConfiguredTargetCount(i)
	return bgmuo
}

// SetNillableOtherConfiguredTargetCount sets the "other_configured_target_count" field if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableOtherConfiguredTargetCount(i *int32) *BuildGraphMetricsUpdateOne {
	if i != nil {
		bgmuo.SetOtherConfiguredTargetCount(*i)
	}
	return bgmuo
}

// AddOtherConfiguredTargetCount adds i to the "other_configured_target_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) AddOtherConfiguredTargetCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.AddOtherConfiguredTargetCount(i)
	return bgmuo
}

// ClearOtherConfiguredTargetCount clears the value of the "other_configured_target_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearOtherConfiguredTargetCount() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearOtherConfiguredTargetCount()
	return bgmuo
}

// SetOutputArtifactCount sets the "output_artifact_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) SetOutputArtifactCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ResetOutputArtifactCount()
	bgmuo.mutation.SetOutputArtifactCount(i)
	return bgmuo
}

// SetNillableOutputArtifactCount sets the "output_artifact_count" field if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableOutputArtifactCount(i *int32) *BuildGraphMetricsUpdateOne {
	if i != nil {
		bgmuo.SetOutputArtifactCount(*i)
	}
	return bgmuo
}

// AddOutputArtifactCount adds i to the "output_artifact_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) AddOutputArtifactCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.AddOutputArtifactCount(i)
	return bgmuo
}

// ClearOutputArtifactCount clears the value of the "output_artifact_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearOutputArtifactCount() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearOutputArtifactCount()
	return bgmuo
}

// SetPostInvocationSkyframeNodeCount sets the "post_invocation_skyframe_node_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) SetPostInvocationSkyframeNodeCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ResetPostInvocationSkyframeNodeCount()
	bgmuo.mutation.SetPostInvocationSkyframeNodeCount(i)
	return bgmuo
}

// SetNillablePostInvocationSkyframeNodeCount sets the "post_invocation_skyframe_node_count" field if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillablePostInvocationSkyframeNodeCount(i *int32) *BuildGraphMetricsUpdateOne {
	if i != nil {
		bgmuo.SetPostInvocationSkyframeNodeCount(*i)
	}
	return bgmuo
}

// AddPostInvocationSkyframeNodeCount adds i to the "post_invocation_skyframe_node_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) AddPostInvocationSkyframeNodeCount(i int32) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.AddPostInvocationSkyframeNodeCount(i)
	return bgmuo
}

// ClearPostInvocationSkyframeNodeCount clears the value of the "post_invocation_skyframe_node_count" field.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearPostInvocationSkyframeNodeCount() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearPostInvocationSkyframeNodeCount()
	return bgmuo
}

// SetMetricsID sets the "metrics" edge to the Metrics entity by ID.
func (bgmuo *BuildGraphMetricsUpdateOne) SetMetricsID(id int) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.SetMetricsID(id)
	return bgmuo
}

// SetNillableMetricsID sets the "metrics" edge to the Metrics entity by ID if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableMetricsID(id *int) *BuildGraphMetricsUpdateOne {
	if id != nil {
		bgmuo = bgmuo.SetMetricsID(*id)
	}
	return bgmuo
}

// SetMetrics sets the "metrics" edge to the Metrics entity.
func (bgmuo *BuildGraphMetricsUpdateOne) SetMetrics(m *Metrics) *BuildGraphMetricsUpdateOne {
	return bgmuo.SetMetricsID(m.ID)
}

// SetDirtiedValuesID sets the "dirtied_values" edge to the EvaluationStat entity by ID.
func (bgmuo *BuildGraphMetricsUpdateOne) SetDirtiedValuesID(id int) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.SetDirtiedValuesID(id)
	return bgmuo
}

// SetNillableDirtiedValuesID sets the "dirtied_values" edge to the EvaluationStat entity by ID if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableDirtiedValuesID(id *int) *BuildGraphMetricsUpdateOne {
	if id != nil {
		bgmuo = bgmuo.SetDirtiedValuesID(*id)
	}
	return bgmuo
}

// SetDirtiedValues sets the "dirtied_values" edge to the EvaluationStat entity.
func (bgmuo *BuildGraphMetricsUpdateOne) SetDirtiedValues(e *EvaluationStat) *BuildGraphMetricsUpdateOne {
	return bgmuo.SetDirtiedValuesID(e.ID)
}

// SetChangedValuesID sets the "changed_values" edge to the EvaluationStat entity by ID.
func (bgmuo *BuildGraphMetricsUpdateOne) SetChangedValuesID(id int) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.SetChangedValuesID(id)
	return bgmuo
}

// SetNillableChangedValuesID sets the "changed_values" edge to the EvaluationStat entity by ID if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableChangedValuesID(id *int) *BuildGraphMetricsUpdateOne {
	if id != nil {
		bgmuo = bgmuo.SetChangedValuesID(*id)
	}
	return bgmuo
}

// SetChangedValues sets the "changed_values" edge to the EvaluationStat entity.
func (bgmuo *BuildGraphMetricsUpdateOne) SetChangedValues(e *EvaluationStat) *BuildGraphMetricsUpdateOne {
	return bgmuo.SetChangedValuesID(e.ID)
}

// SetBuiltValuesID sets the "built_values" edge to the EvaluationStat entity by ID.
func (bgmuo *BuildGraphMetricsUpdateOne) SetBuiltValuesID(id int) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.SetBuiltValuesID(id)
	return bgmuo
}

// SetNillableBuiltValuesID sets the "built_values" edge to the EvaluationStat entity by ID if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableBuiltValuesID(id *int) *BuildGraphMetricsUpdateOne {
	if id != nil {
		bgmuo = bgmuo.SetBuiltValuesID(*id)
	}
	return bgmuo
}

// SetBuiltValues sets the "built_values" edge to the EvaluationStat entity.
func (bgmuo *BuildGraphMetricsUpdateOne) SetBuiltValues(e *EvaluationStat) *BuildGraphMetricsUpdateOne {
	return bgmuo.SetBuiltValuesID(e.ID)
}

// SetCleanedValuesID sets the "cleaned_values" edge to the EvaluationStat entity by ID.
func (bgmuo *BuildGraphMetricsUpdateOne) SetCleanedValuesID(id int) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.SetCleanedValuesID(id)
	return bgmuo
}

// SetNillableCleanedValuesID sets the "cleaned_values" edge to the EvaluationStat entity by ID if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableCleanedValuesID(id *int) *BuildGraphMetricsUpdateOne {
	if id != nil {
		bgmuo = bgmuo.SetCleanedValuesID(*id)
	}
	return bgmuo
}

// SetCleanedValues sets the "cleaned_values" edge to the EvaluationStat entity.
func (bgmuo *BuildGraphMetricsUpdateOne) SetCleanedValues(e *EvaluationStat) *BuildGraphMetricsUpdateOne {
	return bgmuo.SetCleanedValuesID(e.ID)
}

// SetEvaluatedValuesID sets the "evaluated_values" edge to the EvaluationStat entity by ID.
func (bgmuo *BuildGraphMetricsUpdateOne) SetEvaluatedValuesID(id int) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.SetEvaluatedValuesID(id)
	return bgmuo
}

// SetNillableEvaluatedValuesID sets the "evaluated_values" edge to the EvaluationStat entity by ID if the given value is not nil.
func (bgmuo *BuildGraphMetricsUpdateOne) SetNillableEvaluatedValuesID(id *int) *BuildGraphMetricsUpdateOne {
	if id != nil {
		bgmuo = bgmuo.SetEvaluatedValuesID(*id)
	}
	return bgmuo
}

// SetEvaluatedValues sets the "evaluated_values" edge to the EvaluationStat entity.
func (bgmuo *BuildGraphMetricsUpdateOne) SetEvaluatedValues(e *EvaluationStat) *BuildGraphMetricsUpdateOne {
	return bgmuo.SetEvaluatedValuesID(e.ID)
}

// Mutation returns the BuildGraphMetricsMutation object of the builder.
func (bgmuo *BuildGraphMetricsUpdateOne) Mutation() *BuildGraphMetricsMutation {
	return bgmuo.mutation
}

// ClearMetrics clears the "metrics" edge to the Metrics entity.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearMetrics() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearMetrics()
	return bgmuo
}

// ClearDirtiedValues clears the "dirtied_values" edge to the EvaluationStat entity.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearDirtiedValues() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearDirtiedValues()
	return bgmuo
}

// ClearChangedValues clears the "changed_values" edge to the EvaluationStat entity.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearChangedValues() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearChangedValues()
	return bgmuo
}

// ClearBuiltValues clears the "built_values" edge to the EvaluationStat entity.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearBuiltValues() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearBuiltValues()
	return bgmuo
}

// ClearCleanedValues clears the "cleaned_values" edge to the EvaluationStat entity.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearCleanedValues() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearCleanedValues()
	return bgmuo
}

// ClearEvaluatedValues clears the "evaluated_values" edge to the EvaluationStat entity.
func (bgmuo *BuildGraphMetricsUpdateOne) ClearEvaluatedValues() *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.ClearEvaluatedValues()
	return bgmuo
}

// Where appends a list predicates to the BuildGraphMetricsUpdate builder.
func (bgmuo *BuildGraphMetricsUpdateOne) Where(ps ...predicate.BuildGraphMetrics) *BuildGraphMetricsUpdateOne {
	bgmuo.mutation.Where(ps...)
	return bgmuo
}

// Select allows selecting one or more fields (columns) of the returned entity.
// The default is selecting all fields defined in the entity schema.
func (bgmuo *BuildGraphMetricsUpdateOne) Select(field string, fields ...string) *BuildGraphMetricsUpdateOne {
	bgmuo.fields = append([]string{field}, fields...)
	return bgmuo
}

// Save executes the query and returns the updated BuildGraphMetrics entity.
func (bgmuo *BuildGraphMetricsUpdateOne) Save(ctx context.Context) (*BuildGraphMetrics, error) {
	return withHooks(ctx, bgmuo.sqlSave, bgmuo.mutation, bgmuo.hooks)
}

// SaveX is like Save, but panics if an error occurs.
func (bgmuo *BuildGraphMetricsUpdateOne) SaveX(ctx context.Context) *BuildGraphMetrics {
	node, err := bgmuo.Save(ctx)
	if err != nil {
		panic(err)
	}
	return node
}

// Exec executes the query on the entity.
func (bgmuo *BuildGraphMetricsUpdateOne) Exec(ctx context.Context) error {
	_, err := bgmuo.Save(ctx)
	return err
}

// ExecX is like Exec, but panics if an error occurs.
func (bgmuo *BuildGraphMetricsUpdateOne) ExecX(ctx context.Context) {
	if err := bgmuo.Exec(ctx); err != nil {
		panic(err)
	}
}

func (bgmuo *BuildGraphMetricsUpdateOne) sqlSave(ctx context.Context) (_node *BuildGraphMetrics, err error) {
	_spec := sqlgraph.NewUpdateSpec(buildgraphmetrics.Table, buildgraphmetrics.Columns, sqlgraph.NewFieldSpec(buildgraphmetrics.FieldID, field.TypeInt))
	id, ok := bgmuo.mutation.ID()
	if !ok {
		return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "BuildGraphMetrics.id" for update`)}
	}
	_spec.Node.ID.Value = id
	if fields := bgmuo.fields; len(fields) > 0 {
		_spec.Node.Columns = make([]string, 0, len(fields))
		_spec.Node.Columns = append(_spec.Node.Columns, buildgraphmetrics.FieldID)
		for _, f := range fields {
			if !buildgraphmetrics.ValidColumn(f) {
				return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)}
			}
			if f != buildgraphmetrics.FieldID {
				_spec.Node.Columns = append(_spec.Node.Columns, f)
			}
		}
	}
	if ps := bgmuo.mutation.predicates; len(ps) > 0 {
		_spec.Predicate = func(selector *sql.Selector) {
			for i := range ps {
				ps[i](selector)
			}
		}
	}
	if value, ok := bgmuo.mutation.ActionLookupValueCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldActionLookupValueCount, field.TypeInt32, value)
	}
	if value, ok := bgmuo.mutation.AddedActionLookupValueCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldActionLookupValueCount, field.TypeInt32, value)
	}
	if bgmuo.mutation.ActionLookupValueCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldActionLookupValueCount, field.TypeInt32)
	}
	if value, ok := bgmuo.mutation.ActionLookupValueCountNotIncludingAspects(); ok {
		_spec.SetField(buildgraphmetrics.FieldActionLookupValueCountNotIncludingAspects, field.TypeInt32, value)
	}
	if value, ok := bgmuo.mutation.AddedActionLookupValueCountNotIncludingAspects(); ok {
		_spec.AddField(buildgraphmetrics.FieldActionLookupValueCountNotIncludingAspects, field.TypeInt32, value)
	}
	if bgmuo.mutation.ActionLookupValueCountNotIncludingAspectsCleared() {
		_spec.ClearField(buildgraphmetrics.FieldActionLookupValueCountNotIncludingAspects, field.TypeInt32)
	}
	if value, ok := bgmuo.mutation.ActionCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldActionCount, field.TypeInt32, value)
	}
	if value, ok := bgmuo.mutation.AddedActionCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldActionCount, field.TypeInt32, value)
	}
	if bgmuo.mutation.ActionCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldActionCount, field.TypeInt32)
	}
	if value, ok := bgmuo.mutation.ActionCountNotIncludingAspects(); ok {
		_spec.SetField(buildgraphmetrics.FieldActionCountNotIncludingAspects, field.TypeInt32, value)
	}
	if value, ok := bgmuo.mutation.AddedActionCountNotIncludingAspects(); ok {
		_spec.AddField(buildgraphmetrics.FieldActionCountNotIncludingAspects, field.TypeInt32, value)
	}
	if bgmuo.mutation.ActionCountNotIncludingAspectsCleared() {
		_spec.ClearField(buildgraphmetrics.FieldActionCountNotIncludingAspects, field.TypeInt32)
	}
	if value, ok := bgmuo.mutation.InputFileConfiguredTargetCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldInputFileConfiguredTargetCount, field.TypeInt32, value)
	}
	if value, ok := bgmuo.mutation.AddedInputFileConfiguredTargetCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldInputFileConfiguredTargetCount, field.TypeInt32, value)
	}
	if bgmuo.mutation.InputFileConfiguredTargetCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldInputFileConfiguredTargetCount, field.TypeInt32)
	}
	if value, ok := bgmuo.mutation.OutputFileConfiguredTargetCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldOutputFileConfiguredTargetCount, field.TypeInt32, value)
	}
	if value, ok := bgmuo.mutation.AddedOutputFileConfiguredTargetCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldOutputFileConfiguredTargetCount, field.TypeInt32, value)
	}
	if bgmuo.mutation.OutputFileConfiguredTargetCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldOutputFileConfiguredTargetCount, field.TypeInt32)
	}
	if value, ok := bgmuo.mutation.OtherConfiguredTargetCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldOtherConfiguredTargetCount, field.TypeInt32, value)
	}
	if value, ok := bgmuo.mutation.AddedOtherConfiguredTargetCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldOtherConfiguredTargetCount, field.TypeInt32, value)
	}
	if bgmuo.mutation.OtherConfiguredTargetCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldOtherConfiguredTargetCount, field.TypeInt32)
	}
	if value, ok := bgmuo.mutation.OutputArtifactCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldOutputArtifactCount, field.TypeInt32, value)
	}
	if value, ok := bgmuo.mutation.AddedOutputArtifactCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldOutputArtifactCount, field.TypeInt32, value)
	}
	if bgmuo.mutation.OutputArtifactCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldOutputArtifactCount, field.TypeInt32)
	}
	if value, ok := bgmuo.mutation.PostInvocationSkyframeNodeCount(); ok {
		_spec.SetField(buildgraphmetrics.FieldPostInvocationSkyframeNodeCount, field.TypeInt32, value)
	}
	if value, ok := bgmuo.mutation.AddedPostInvocationSkyframeNodeCount(); ok {
		_spec.AddField(buildgraphmetrics.FieldPostInvocationSkyframeNodeCount, field.TypeInt32, value)
	}
	if bgmuo.mutation.PostInvocationSkyframeNodeCountCleared() {
		_spec.ClearField(buildgraphmetrics.FieldPostInvocationSkyframeNodeCount, field.TypeInt32)
	}
	if bgmuo.mutation.MetricsCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.O2O,
			Inverse: true,
			Table:   buildgraphmetrics.MetricsTable,
			Columns: []string{buildgraphmetrics.MetricsColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(metrics.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmuo.mutation.MetricsIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.O2O,
			Inverse: true,
			Table:   buildgraphmetrics.MetricsTable,
			Columns: []string{buildgraphmetrics.MetricsColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(metrics.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if bgmuo.mutation.DirtiedValuesCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.DirtiedValuesTable,
			Columns: []string{buildgraphmetrics.DirtiedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmuo.mutation.DirtiedValuesIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.DirtiedValuesTable,
			Columns: []string{buildgraphmetrics.DirtiedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if bgmuo.mutation.ChangedValuesCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.ChangedValuesTable,
			Columns: []string{buildgraphmetrics.ChangedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmuo.mutation.ChangedValuesIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.ChangedValuesTable,
			Columns: []string{buildgraphmetrics.ChangedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if bgmuo.mutation.BuiltValuesCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.BuiltValuesTable,
			Columns: []string{buildgraphmetrics.BuiltValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmuo.mutation.BuiltValuesIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.BuiltValuesTable,
			Columns: []string{buildgraphmetrics.BuiltValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if bgmuo.mutation.CleanedValuesCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.CleanedValuesTable,
			Columns: []string{buildgraphmetrics.CleanedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmuo.mutation.CleanedValuesIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.M2O,
			Inverse: false,
			Table:   buildgraphmetrics.CleanedValuesTable,
			Columns: []string{buildgraphmetrics.CleanedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	if bgmuo.mutation.EvaluatedValuesCleared() {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.O2O,
			Inverse: false,
			Table:   buildgraphmetrics.EvaluatedValuesTable,
			Columns: []string{buildgraphmetrics.EvaluatedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
	}
	if nodes := bgmuo.mutation.EvaluatedValuesIDs(); len(nodes) > 0 {
		edge := &sqlgraph.EdgeSpec{
			Rel:     sqlgraph.O2O,
			Inverse: false,
			Table:   buildgraphmetrics.EvaluatedValuesTable,
			Columns: []string{buildgraphmetrics.EvaluatedValuesColumn},
			Bidi:    false,
			Target: &sqlgraph.EdgeTarget{
				IDSpec: sqlgraph.NewFieldSpec(evaluationstat.FieldID, field.TypeInt),
			},
		}
		for _, k := range nodes {
			edge.Target.Nodes = append(edge.Target.Nodes, k)
		}
		_spec.Edges.Add = append(_spec.Edges.Add, edge)
	}
	_node = &BuildGraphMetrics{config: bgmuo.config}
	_spec.Assign = _node.assignValues
	_spec.ScanValues = _node.scanValues
	if err = sqlgraph.UpdateNode(ctx, bgmuo.driver, _spec); err != nil {
		if _, ok := err.(*sqlgraph.NotFoundError); ok {
			err = &NotFoundError{buildgraphmetrics.Label}
		} else if sqlgraph.IsConstraintError(err) {
			err = &ConstraintError{msg: err.Error(), wrap: err}
		}
		return nil, err
	}
	bgmuo.mutation.done = true
	return _node, nil
}
