func (b *NetworkPolicyApplyConfiguration) WithNamespace(value string) *NetworkPolicyApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Namespace = &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.
package v1beta1
import (
	extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
	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 NetworkPolicyApplyConfiguration struct {
	v1.TypeMetaApplyConfiguration    `json:",inline"`
	*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	Spec                             *NetworkPolicySpecApplyConfiguration `json:"spec,omitempty"`
}
func NetworkPolicy(name, namespace string) *NetworkPolicyApplyConfiguration {
	b := &NetworkPolicyApplyConfiguration{}
	b.WithName(name)
	b.WithNamespace(namespace)
	b.WithKind("NetworkPolicy")
	b.WithAPIVersion("extensions/v1beta1")
	return b
}
func ExtractNetworkPolicy(networkPolicy *extensionsv1beta1.NetworkPolicy, fieldManager string) (*NetworkPolicyApplyConfiguration, error) {
	return extractNetworkPolicy(networkPolicy, fieldManager, "")
}
func ExtractNetworkPolicyStatus(networkPolicy *extensionsv1beta1.NetworkPolicy, fieldManager string) (*NetworkPolicyApplyConfiguration, error) {
	return extractNetworkPolicy(networkPolicy, fieldManager, "status")
}
func extractNetworkPolicy(networkPolicy *extensionsv1beta1.NetworkPolicy, fieldManager string, subresource string) (*NetworkPolicyApplyConfiguration, error) {
	b := &NetworkPolicyApplyConfiguration{}
	err := managedfields.ExtractInto(networkPolicy, internal.Parser().Type("io.k8s.api.extensions.v1beta1.NetworkPolicy"), fieldManager, b, subresource)
	if err != nil {
		return nil, err
	}
	b.WithName(networkPolicy.Name)
	b.WithNamespace(networkPolicy.Namespace)
	b.WithKind("NetworkPolicy")
	b.WithAPIVersion("extensions/v1beta1")
	return b, nil
}
func (b *NetworkPolicyApplyConfiguration) WithKind(value string) *NetworkPolicyApplyConfiguration {
	b.Kind = &value
	return b
}
func (b *NetworkPolicyApplyConfiguration) WithAPIVersion(value string) *NetworkPolicyApplyConfiguration {
	b.APIVersion = &value
	return b
}
func (b *NetworkPolicyApplyConfiguration) WithName(value string) *NetworkPolicyApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Name = &value
	return b
}
func (b *NetworkPolicyApplyConfiguration) WithGenerateName(value string) *NetworkPolicyApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.GenerateName = &value
	return b
}