/*
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

import (
	appsv1alpha1 "github.com/clusternet/clusternet/pkg/apis/apps/v1alpha1"
)

// OverrideConfigApplyConfiguration represents a declarative configuration of the OverrideConfig type for use
// with apply.
type OverrideConfigApplyConfiguration struct {
	Name          *string                       `json:"name,omitempty"`
	Value         *string                       `json:"value,omitempty"`
	Type          *appsv1alpha1.OverrideType    `json:"type,omitempty"`
	OverrideChart *bool                         `json:"overrideChart,omitempty"`
	FieldPath     *string                       `json:"fieldPath,omitempty"`
	FieldFormat   *appsv1alpha1.FieldFormatType `json:"fieldFormat,omitempty"`
}

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

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

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

// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *OverrideConfigApplyConfiguration) WithType(value appsv1alpha1.OverrideType) *OverrideConfigApplyConfiguration {
	b.Type = &value
	return b
}

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

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

// WithFieldFormat sets the FieldFormat 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 FieldFormat field is set to the value of the last call.
func (b *OverrideConfigApplyConfiguration) WithFieldFormat(value appsv1alpha1.FieldFormatType) *OverrideConfigApplyConfiguration {
	b.FieldFormat = &value
	return b
}
