/*
Copyright The Volcano 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

// WorkloadRefApplyConfiguration represents a declarative configuration of the WorkloadRef type for use
// with apply.
//
// WorkloadRef defines a reference to a workload resource that can be used with Dynamic Client.
// It provides the minimal fields needed to precisely identify and retrieve a workload.
type WorkloadRefApplyConfiguration struct {
	// APIVersion is the API version of the workload resource.
	// e.g., "apps/v1", "batch.volcano.sh/v1alpha1"
	APIVersion *string `json:"apiVersion,omitempty"`
	// Kind is the kind of the workload resource.
	// e.g., "Deployment", "Job"
	Kind *string `json:"kind,omitempty"`
	// Name is the name of the workload resource.
	Name *string `json:"name,omitempty"`
	// Namespace is the namespace of the workload resource.
	// If empty, defaults to the namespace of the DataSourceClaim.
	Namespace *string `json:"namespace,omitempty"`
}

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

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

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

// 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 *WorkloadRefApplyConfiguration) WithName(value string) *WorkloadRefApplyConfiguration {
	b.Name = &value
	return b
}

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