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

package v1

// PinnedImageSetSpecApplyConfiguration represents a declarative configuration of the PinnedImageSetSpec type for use
// with apply.
//
// PinnedImageSetSpec defines the desired state of a PinnedImageSet.
type PinnedImageSetSpecApplyConfiguration struct {
	// pinnedImages is a list of OCI Image referenced by digest that should be
	// pinned and pre-loaded by the nodes of a MachineConfigPool.
	// Translates into a new file inside the /etc/crio/crio.conf.d directory
	// with content similar to this:
	//
	// pinned_images = [
	// "quay.io/openshift-release-dev/ocp-release@sha256:...",
	// "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:...",
	// "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:...",
	// ...
	// ]
	//
	// Image references must be by digest.
	// A maximum of 500 images may be specified.
	PinnedImages []PinnedImageRefApplyConfiguration `json:"pinnedImages,omitempty"`
}

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

// WithPinnedImages adds the given value to the PinnedImages 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 PinnedImages field.
func (b *PinnedImageSetSpecApplyConfiguration) WithPinnedImages(values ...*PinnedImageRefApplyConfiguration) *PinnedImageSetSpecApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithPinnedImages")
		}
		b.PinnedImages = append(b.PinnedImages, *values[i])
	}
	return b
}
