func (b *SecretApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithOwnerReferences")
		}
		b.OwnerReferences = append(b.OwnerReferences, *values[i])
	}
	return b
}
WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
package v1
import (
	corev1 "k8s.io/api/core/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 SecretApplyConfiguration struct {
	v1.TypeMetaApplyConfiguration    `json:",inline"`
	*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	Immutable                        *bool              `json:"immutable,omitempty"`
	Data                             map[string][]byte  `json:"data,omitempty"`
	StringData                       map[string]string  `json:"stringData,omitempty"`
	Type                             *corev1.SecretType `json:"type,omitempty"`
}
func Secret(name, namespace string) *SecretApplyConfiguration {
	b := &SecretApplyConfiguration{}
	b.WithName(name)
	b.WithNamespace(namespace)
	b.WithKind("Secret")
	b.WithAPIVersion("v1")
	return b
}
func ExtractSecret(secret *corev1.Secret, fieldManager string) (*SecretApplyConfiguration, error) {
	return extractSecret(secret, fieldManager, "")
}
func ExtractSecretStatus(secret *corev1.Secret, fieldManager string) (*SecretApplyConfiguration, error) {
	return extractSecret(secret, fieldManager, "status")
}
func extractSecret(secret *corev1.Secret, fieldManager string, subresource string) (*SecretApplyConfiguration, error) {
	b := &SecretApplyConfiguration{}
	err := managedfields.ExtractInto(secret, internal.Parser().Type("io.k8s.api.core.v1.Secret"), fieldManager, b, subresource)
	if err != nil {
		return nil, err
	}
	b.WithName(secret.Name)
	b.WithNamespace(secret.Namespace)
	b.WithKind("Secret")
	b.WithAPIVersion("v1")
	return b, nil
}
func (b *SecretApplyConfiguration) WithKind(value string) *SecretApplyConfiguration {
	b.Kind = &value
	return b
}
func (b *SecretApplyConfiguration) WithAPIVersion(value string) *SecretApplyConfiguration {
	b.APIVersion = &value
	return b
}
func (b *SecretApplyConfiguration) WithName(value string) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Name = &value
	return b
}
func (b *SecretApplyConfiguration) WithGenerateName(value string) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.GenerateName = &value
	return b
}
func (b *SecretApplyConfiguration) WithNamespace(value string) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Namespace = &value
	return b
}
func (b *SecretApplyConfiguration) WithSelfLink(value string) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.SelfLink = &value
	return b
}
func (b *SecretApplyConfiguration) WithUID(value types.UID) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.UID = &value
	return b
}
func (b *SecretApplyConfiguration) WithResourceVersion(value string) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.ResourceVersion = &value
	return b
}
func (b *SecretApplyConfiguration) WithGeneration(value int64) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Generation = &value
	return b
}
func (b *SecretApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.CreationTimestamp = &value
	return b
}
func (b *SecretApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.DeletionTimestamp = &value
	return b
}
func (b *SecretApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SecretApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.DeletionGracePeriodSeconds = &value
	return b
}
func (b *SecretApplyConfiguration) WithLabels(entries map[string]string) *SecretApplyConfiguration {
	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
}
func (b *SecretApplyConfiguration) WithAnnotations(entries map[string]string) *SecretApplyConfiguration {
	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
}