func (b *DeploymentApplyConfiguration) WithAPIVersion(value string) *DeploymentApplyConfiguration {
	b.APIVersion = &value
	return b
}
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.
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 DeploymentApplyConfiguration struct {
	v1.TypeMetaApplyConfiguration    `json:",inline"`
	*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	Spec                             *DeploymentSpecApplyConfiguration   `json:"spec,omitempty"`
	Status                           *DeploymentStatusApplyConfiguration `json:"status,omitempty"`
}
func Deployment(name, namespace string) *DeploymentApplyConfiguration {
	b := &DeploymentApplyConfiguration{}
	b.WithName(name)
	b.WithNamespace(namespace)
	b.WithKind("Deployment")
	b.WithAPIVersion("extensions/v1beta1")
	return b
}
func ExtractDeployment(deployment *extensionsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) {
	return extractDeployment(deployment, fieldManager, "")
}
func ExtractDeploymentStatus(deployment *extensionsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) {
	return extractDeployment(deployment, fieldManager, "status")
}
func extractDeployment(deployment *extensionsv1beta1.Deployment, fieldManager string, subresource string) (*DeploymentApplyConfiguration, error) {
	b := &DeploymentApplyConfiguration{}
	err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.extensions.v1beta1.Deployment"), fieldManager, b, subresource)
	if err != nil {
		return nil, err
	}
	b.WithName(deployment.Name)
	b.WithNamespace(deployment.Namespace)
	b.WithKind("Deployment")
	b.WithAPIVersion("extensions/v1beta1")
	return b, nil
}
func (b *DeploymentApplyConfiguration) WithKind(value string) *DeploymentApplyConfiguration {
	b.Kind = &value
	return b
}