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

package v1alpha1

// InternalReleaseImageSpecApplyConfiguration represents a declarative configuration of the InternalReleaseImageSpec type for use
// with apply.
//
// InternalReleaseImageSpec defines the desired state of a InternalReleaseImage.
type InternalReleaseImageSpecApplyConfiguration struct {
	// releases is a list of release bundle identifiers that the user wants to
	// add/remove to/from the control plane nodes.
	// Entries must be unique, keyed on the name field.
	// releases must contain at least one entry and must not exceed 16 entries.
	Releases []InternalReleaseImageRefApplyConfiguration `json:"releases,omitempty"`
}

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

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