func (b *LeaseApplyConfiguration) WithGenerateName(value string) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.GenerateName = &value
	return b
}
WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
package v1
import (
	apicoordinationv1 "k8s.io/api/coordination/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	types "k8s.io/apimachinery/pkg/types"
	managedfields "k8s.io/apimachinery/pkg/util/managedfields"
	internal "k8s.io/client-go/applyconfigurations/internal"
	v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
type LeaseApplyConfiguration struct {
	v1.TypeMetaApplyConfiguration    `json:",inline"`
	*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	Spec                             *LeaseSpecApplyConfiguration `json:"spec,omitempty"`
}
func Lease(name, namespace string) *LeaseApplyConfiguration {
	b := &LeaseApplyConfiguration{}
	b.WithName(name)
	b.WithNamespace(namespace)
	b.WithKind("Lease")
	b.WithAPIVersion("coordination.k8s.io/v1")
	return b
}
func ExtractLease(lease *apicoordinationv1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) {
	return extractLease(lease, fieldManager, "")
}
func ExtractLeaseStatus(lease *apicoordinationv1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) {
	return extractLease(lease, fieldManager, "status")
}
func extractLease(lease *apicoordinationv1.Lease, fieldManager string, subresource string) (*LeaseApplyConfiguration, error) {
	b := &LeaseApplyConfiguration{}
	err := managedfields.ExtractInto(lease, internal.Parser().Type("io.k8s.api.coordination.v1.Lease"), fieldManager, b, subresource)
	if err != nil {
		return nil, err
	}
	b.WithName(lease.Name)
	b.WithNamespace(lease.Namespace)
	b.WithKind("Lease")
	b.WithAPIVersion("coordination.k8s.io/v1")
	return b, nil
}
func (b *LeaseApplyConfiguration) WithKind(value string) *LeaseApplyConfiguration {
	b.Kind = &value
	return b
}
func (b *LeaseApplyConfiguration) WithAPIVersion(value string) *LeaseApplyConfiguration {
	b.APIVersion = &value
	return b
}
func (b *LeaseApplyConfiguration) WithName(value string) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Name = &value
	return b
}