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

package v1alpha1

// ClusterAPISpecApplyConfiguration represents a declarative configuration of the ClusterAPISpec type for use
// with apply.
//
// ClusterAPISpec defines the desired configuration of the capi-operator.
// The spec is required but we deliberately allow it to be empty.
type ClusterAPISpecApplyConfiguration struct {
	// unmanagedCustomResourceDefinitions is a list of ClusterResourceDefinition (CRD)
	// names that should not be managed by the capi-operator installer
	// controller. This allows external actors to own specific CRDs while
	// capi-operator manages others.
	//
	// Each CRD name must be a valid DNS-1123 subdomain consisting of lowercase
	// alphanumeric characters, '-' or '.', and must start and end with an
	// alphanumeric character, with a maximum length of 253 characters.
	// CRD names must contain at least two '.' characters.
	// Example: "clusters.cluster.x-k8s.io"
	//
	// Items cannot be removed from this list once added.
	//
	// The maximum number of unmanagedCustomResourceDefinitions is 128.
	UnmanagedCustomResourceDefinitions []string `json:"unmanagedCustomResourceDefinitions,omitempty"`
}

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

// WithUnmanagedCustomResourceDefinitions adds the given value to the UnmanagedCustomResourceDefinitions 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 UnmanagedCustomResourceDefinitions field.
func (b *ClusterAPISpecApplyConfiguration) WithUnmanagedCustomResourceDefinitions(values ...string) *ClusterAPISpecApplyConfiguration {
	for i := range values {
		b.UnmanagedCustomResourceDefinitions = append(b.UnmanagedCustomResourceDefinitions, values[i])
	}
	return b
}
