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

package v1

import (
	runtime "k8s.io/apimachinery/pkg/runtime"
)

// MachineConfigSpecApplyConfiguration represents a declarative configuration of the MachineConfigSpec type for use
// with apply.
//
// MachineConfigSpec is the spec for MachineConfig
type MachineConfigSpecApplyConfiguration struct {
	// osImageURL specifies the remote location that will be used to
	// fetch the OS.
	OSImageURL *string `json:"osImageURL,omitempty"`
	// baseOSExtensionsContainerImage specifies the remote location that will be used
	// to fetch the extensions container matching a new-format OS image
	BaseOSExtensionsContainerImage *string `json:"baseOSExtensionsContainerImage,omitempty"`
	// config is a Ignition Config object.
	Config *runtime.RawExtension `json:"config,omitempty"`
	// kernelArguments contains a list of kernel arguments to be added
	KernelArguments []string `json:"kernelArguments,omitempty"`
	// extensions contains a list of additional features that can be enabled on host
	Extensions []string `json:"extensions,omitempty"`
	// fips controls FIPS mode
	FIPS *bool `json:"fips,omitempty"`
	// kernelType contains which kernel we want to be running like default
	// (traditional), realtime, 64k-pages (aarch64 only).
	KernelType *string `json:"kernelType,omitempty"`
}

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

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

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

// WithConfig sets the Config 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 Config field is set to the value of the last call.
func (b *MachineConfigSpecApplyConfiguration) WithConfig(value runtime.RawExtension) *MachineConfigSpecApplyConfiguration {
	b.Config = &value
	return b
}

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

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

// WithFIPS sets the FIPS 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 FIPS field is set to the value of the last call.
func (b *MachineConfigSpecApplyConfiguration) WithFIPS(value bool) *MachineConfigSpecApplyConfiguration {
	b.FIPS = &value
	return b
}

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