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

package v1

import (
	configv1 "github.com/openshift/api/config/v1"
)

// ImageDigestMirrorsApplyConfiguration represents a declarative configuration of the ImageDigestMirrors type for use
// with apply.
type ImageDigestMirrorsApplyConfiguration struct {
	Source             *string                      `json:"source,omitempty"`
	Mirrors            []configv1.ImageMirror       `json:"mirrors,omitempty"`
	MirrorSourcePolicy *configv1.MirrorSourcePolicy `json:"mirrorSourcePolicy,omitempty"`
}

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

// WithSource sets the Source 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 Source field is set to the value of the last call.
func (b *ImageDigestMirrorsApplyConfiguration) WithSource(value string) *ImageDigestMirrorsApplyConfiguration {
	b.Source = &value
	return b
}

// WithMirrors adds the given value to the Mirrors 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 Mirrors field.
func (b *ImageDigestMirrorsApplyConfiguration) WithMirrors(values ...configv1.ImageMirror) *ImageDigestMirrorsApplyConfiguration {
	for i := range values {
		b.Mirrors = append(b.Mirrors, values[i])
	}
	return b
}

// WithMirrorSourcePolicy sets the MirrorSourcePolicy 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 MirrorSourcePolicy field is set to the value of the last call.
func (b *ImageDigestMirrorsApplyConfiguration) WithMirrorSourcePolicy(value configv1.MirrorSourcePolicy) *ImageDigestMirrorsApplyConfiguration {
	b.MirrorSourcePolicy = &value
	return b
}
