func (b *LeaseApplyConfiguration) WithAnnotations(entries map[string]string) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	if b.Annotations == nil && len(entries) > 0 {
		b.Annotations = make(map[string]string, len(entries))
	}
	for k, v := range entries {
		b.Annotations[k] = v
	}
	return b
}
WithAnnotations puts the entries into the Annotations field in the declarative configuration
and returns the receiver, so that objects can be build by chaining "With" function invocations.
If called multiple times, the entries provided by each call will be put on the Annotations field,
overwriting an existing map entries in Annotations field with the same key.
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
}
func (b *LeaseApplyConfiguration) WithGenerateName(value string) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.GenerateName = &value
	return b
}
func (b *LeaseApplyConfiguration) WithNamespace(value string) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Namespace = &value
	return b
}
func (b *LeaseApplyConfiguration) WithSelfLink(value string) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.SelfLink = &value
	return b
}
func (b *LeaseApplyConfiguration) WithUID(value types.UID) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.UID = &value
	return b
}
func (b *LeaseApplyConfiguration) WithResourceVersion(value string) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.ResourceVersion = &value
	return b
}
func (b *LeaseApplyConfiguration) WithGeneration(value int64) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Generation = &value
	return b
}
func (b *LeaseApplyConfiguration) WithCreationTimestamp(value metav1.Time) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.CreationTimestamp = &value
	return b
}
func (b *LeaseApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.DeletionTimestamp = &value
	return b
}
func (b *LeaseApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.DeletionGracePeriodSeconds = &value
	return b
}
func (b *LeaseApplyConfiguration) WithLabels(entries map[string]string) *LeaseApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	if b.Labels == nil && len(entries) > 0 {
		b.Labels = make(map[string]string, len(entries))
	}
	for k, v := range entries {
		b.Labels[k] = v
	}
	return b
}