func (b *ClusterRoleApplyConfiguration) WithGenerateName(value string) *ClusterRoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.GenerateName = &value
	return b
}
WithGenerateName sets the GenerateName 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 GenerateName 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 ClusterRoleApplyConfiguration struct {
	v1.TypeMetaApplyConfiguration    `json:",inline"`
	*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
	Rules                            []PolicyRuleApplyConfiguration     `json:"rules,omitempty"`
	AggregationRule                  *AggregationRuleApplyConfiguration `json:"aggregationRule,omitempty"`
}
func ClusterRole(name string) *ClusterRoleApplyConfiguration {
	b := &ClusterRoleApplyConfiguration{}
	b.WithName(name)
	b.WithKind("ClusterRole")
	b.WithAPIVersion("rbac.authorization.k8s.io/v1")
	return b
}
func ExtractClusterRole(clusterRole *apirbacv1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) {
	return extractClusterRole(clusterRole, fieldManager, "")
}
func ExtractClusterRoleStatus(clusterRole *apirbacv1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) {
	return extractClusterRole(clusterRole, fieldManager, "status")
}
func extractClusterRole(clusterRole *apirbacv1.ClusterRole, fieldManager string, subresource string) (*ClusterRoleApplyConfiguration, error) {
	b := &ClusterRoleApplyConfiguration{}
	err := managedfields.ExtractInto(clusterRole, internal.Parser().Type("io.k8s.api.rbac.v1.ClusterRole"), fieldManager, b, subresource)
	if err != nil {
		return nil, err
	}
	b.WithName(clusterRole.Name)
	b.WithKind("ClusterRole")
	b.WithAPIVersion("rbac.authorization.k8s.io/v1")
	return b, nil
}
func (b *ClusterRoleApplyConfiguration) WithKind(value string) *ClusterRoleApplyConfiguration {
	b.Kind = &value
	return b
}
func (b *ClusterRoleApplyConfiguration) WithAPIVersion(value string) *ClusterRoleApplyConfiguration {
	b.APIVersion = &value
	return b
}
func (b *ClusterRoleApplyConfiguration) WithName(value string) *ClusterRoleApplyConfiguration {
	b.ensureObjectMetaApplyConfigurationExists()
	b.Name = &value
	return b
}