func (r Rule) HasVerifyImages() bool {
	return r.VerifyImages != nil && !reflect.DeepEqual(r.VerifyImages, ImageVerification{})
}
HasVerifyImages checks for verifyImages rule
package v1
import (
	"encoding/json"
	"reflect"
	"strings"
	"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
)
func (p *ClusterPolicy) HasAutoGenAnnotation() bool {
	annotations := p.GetAnnotations()
	val, ok := annotations["pod-policies.kyverno.io/autogen-controllers"]
	if ok && strings.ToLower(val) != "none" {
		return true
	}
	return false
}
func (p *ClusterPolicy) HasMutateOrValidateOrGenerate() bool {
	for _, rule := range p.Spec.Rules {
		if rule.HasMutate() || rule.HasValidate() || rule.HasGenerate() {
			return true
		}
	}
	return false
}
func (p *ClusterPolicy) HasMutate() bool {
	for _, rule := range p.Spec.Rules {
		if rule.HasMutate() {
			return true
		}
	}
	return false
}
func (p *ClusterPolicy) HasValidate() bool {
	for _, rule := range p.Spec.Rules {
		if rule.HasValidate() {
			return true
		}
	}
	return false
}
func (p *ClusterPolicy) HasGenerate() bool {
	for _, rule := range p.Spec.Rules {
		if rule.HasGenerate() {
			return true
		}
	}
	return false
}
func (p *ClusterPolicy) HasVerifyImages() bool {
	for _, rule := range p.Spec.Rules {
		if rule.HasVerifyImages() {
			return true
		}
	}
	return false
}
func (p *ClusterPolicy) BackgroundProcessingEnabled() bool {
	if p.Spec.Background == nil {
		return true
	}
	return *p.Spec.Background
}
func (r Rule) HasMutate() bool {
	return !reflect.DeepEqual(r.Mutation, Mutation{})
}