/*
Copyright The Clusternet Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.

package v1alpha1

// HelmReleaseSpecApplyConfiguration represents a declarative configuration of the HelmReleaseSpec type for use
// with apply.
type HelmReleaseSpecApplyConfiguration struct {
	HelmOptionsApplyConfiguration `json:",inline"`
	ReleaseName                   *string `json:"releaseName,omitempty"`
	TargetNamespace               *string `json:"targetNamespace,omitempty"`
	Overrides                     []byte  `json:"overrides,omitempty"`
}

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

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

// WithChartPullSecret sets the ChartPullSecret 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 ChartPullSecret field is set to the value of the last call.
func (b *HelmReleaseSpecApplyConfiguration) WithChartPullSecret(value *ChartPullSecretApplyConfiguration) *HelmReleaseSpecApplyConfiguration {
	b.HelmOptionsApplyConfiguration.ChartPullSecret = value
	return b
}

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

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

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

// WithTimeoutSeconds sets the TimeoutSeconds 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 TimeoutSeconds field is set to the value of the last call.
func (b *HelmReleaseSpecApplyConfiguration) WithTimeoutSeconds(value int32) *HelmReleaseSpecApplyConfiguration {
	b.HelmOptionsApplyConfiguration.TimeoutSeconds = &value
	return b
}

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

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

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

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

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

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

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

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

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

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

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

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