func (b *RoleApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.DeletionTimestamp = &value
	return b
}
WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
package v1
import (
	apirbacv1 "k8s.io/api/rbac/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 RoleApplyConfiguration struct {
	v1.TypeMetaApplyConfiguration    `json:",inline"`
	*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	Rules                            []PolicyRuleApplyConfiguration `json:"rules,omitempty"`
}
func Role(name, namespace string) *RoleApplyConfiguration {
	b := &RoleApplyConfiguration{}
	b.WithName(name)
	b.WithNamespace(namespace)
	b.WithKind("Role")
	b.WithAPIVersion("rbac.authorization.k8s.io/v1")
	return b
}
func ExtractRole(role *apirbacv1.Role, fieldManager string) (*RoleApplyConfiguration, error) {
	return extractRole(role, fieldManager, "")
}
func ExtractRoleStatus(role *apirbacv1.Role, fieldManager string) (*RoleApplyConfiguration, error) {
	return extractRole(role, fieldManager, "status")
}
func extractRole(role *apirbacv1.Role, fieldManager string, subresource string) (*RoleApplyConfiguration, error) {
	b := &RoleApplyConfiguration{}
	err := managedfields.ExtractInto(role, internal.Parser().Type("io.k8s.api.rbac.v1.Role"), fieldManager, b, subresource)
	if err != nil {
		return nil, err
	}
	b.WithName(role.Name)
	b.WithNamespace(role.Namespace)
	b.WithKind("Role")
	b.WithAPIVersion("rbac.authorization.k8s.io/v1")
	return b, nil
}
func (b *RoleApplyConfiguration) WithKind(value string) *RoleApplyConfiguration {
	b.Kind = &value
	return b
}
func (b *RoleApplyConfiguration) WithAPIVersion(value string) *RoleApplyConfiguration {
	b.APIVersion = &value
	return b
}
func (b *RoleApplyConfiguration) WithName(value string) *RoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Name = &value
	return b
}
func (b *RoleApplyConfiguration) WithGenerateName(value string) *RoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.GenerateName = &value
	return b
}
func (b *RoleApplyConfiguration) WithNamespace(value string) *RoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Namespace = &value
	return b
}
func (b *RoleApplyConfiguration) WithSelfLink(value string) *RoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.SelfLink = &value
	return b
}
func (b *RoleApplyConfiguration) WithUID(value types.UID) *RoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.UID = &value
	return b
}
func (b *RoleApplyConfiguration) WithResourceVersion(value string) *RoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.ResourceVersion = &value
	return b
}
func (b *RoleApplyConfiguration) WithGeneration(value int64) *RoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Generation = &value
	return b
}
func (b *RoleApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.CreationTimestamp = &value
	return b
}