// SPDX-License-Identifier: AGPL-3.0-only

// Code generated by applyconfiguration-gen. DO NOT EDIT.

package v0alpha1

// JobResourceSummaryApplyConfiguration represents a declarative configuration of the JobResourceSummary type for use
// with apply.
type JobResourceSummaryApplyConfiguration struct {
	Group  *string `json:"group,omitempty"`
	Kind   *string `json:"kind,omitempty"`
	Total  *int64  `json:"total,omitempty"`
	Create *int64  `json:"create,omitempty"`
	Update *int64  `json:"update,omitempty"`
	Delete *int64  `json:"delete,omitempty"`
	Write  *int64  `json:"write,omitempty"`
	// Create or update (export)
	Error *int64 `json:"error,omitempty"`
	// The error count
	Warning *int64 `json:"warning,omitempty"`
	// No action required (useful for sync)
	Noop *int64 `json:"noop,omitempty"`
	// Report errors/warnings for this resource type
	// This may not be an exhaustive list and recommend looking at the logs for more info
	Errors   []string `json:"errors,omitempty"`
	Warnings []string `json:"warnings,omitempty"`
}

// JobResourceSummaryApplyConfiguration constructs a declarative configuration of the JobResourceSummary type for use with
// apply.
func JobResourceSummary() *JobResourceSummaryApplyConfiguration {
	return &JobResourceSummaryApplyConfiguration{}
}

// WithGroup sets the Group field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Group field is set to the value of the last call.
func (b *JobResourceSummaryApplyConfiguration) WithGroup(value string) *JobResourceSummaryApplyConfiguration {
	b.Group = &value
	return b
}

// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *JobResourceSummaryApplyConfiguration) WithKind(value string) *JobResourceSummaryApplyConfiguration {
	b.Kind = &value
	return b
}

// WithTotal sets the Total field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Total field is set to the value of the last call.
func (b *JobResourceSummaryApplyConfiguration) WithTotal(value int64) *JobResourceSummaryApplyConfiguration {
	b.Total = &value
	return b
}

// WithCreate sets the Create field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Create field is set to the value of the last call.
func (b *JobResourceSummaryApplyConfiguration) WithCreate(value int64) *JobResourceSummaryApplyConfiguration {
	b.Create = &value
	return b
}

// WithUpdate sets the Update field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Update field is set to the value of the last call.
func (b *JobResourceSummaryApplyConfiguration) WithUpdate(value int64) *JobResourceSummaryApplyConfiguration {
	b.Update = &value
	return b
}

// WithDelete sets the Delete field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Delete field is set to the value of the last call.
func (b *JobResourceSummaryApplyConfiguration) WithDelete(value int64) *JobResourceSummaryApplyConfiguration {
	b.Delete = &value
	return b
}

// WithWrite sets the Write field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Write field is set to the value of the last call.
func (b *JobResourceSummaryApplyConfiguration) WithWrite(value int64) *JobResourceSummaryApplyConfiguration {
	b.Write = &value
	return b
}

// WithError sets the Error field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Error field is set to the value of the last call.
func (b *JobResourceSummaryApplyConfiguration) WithError(value int64) *JobResourceSummaryApplyConfiguration {
	b.Error = &value
	return b
}

// WithWarning sets the Warning field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Warning field is set to the value of the last call.
func (b *JobResourceSummaryApplyConfiguration) WithWarning(value int64) *JobResourceSummaryApplyConfiguration {
	b.Warning = &value
	return b
}

// WithNoop sets the Noop field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Noop field is set to the value of the last call.
func (b *JobResourceSummaryApplyConfiguration) WithNoop(value int64) *JobResourceSummaryApplyConfiguration {
	b.Noop = &value
	return b
}

// WithErrors adds the given value to the Errors field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Errors field.
func (b *JobResourceSummaryApplyConfiguration) WithErrors(values ...string) *JobResourceSummaryApplyConfiguration {
	for i := range values {
		b.Errors = append(b.Errors, values[i])
	}
	return b
}

// WithWarnings adds the given value to the Warnings field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Warnings field.
func (b *JobResourceSummaryApplyConfiguration) WithWarnings(values ...string) *JobResourceSummaryApplyConfiguration {
	for i := range values {
		b.Warnings = append(b.Warnings, values[i])
	}
	return b
}
