func (n *KubernetesResourceName) Validate() error {
	if n == nil {
		return errors.Newf("cannot be undefined")
	}
	name := *n
	if name == "" {
		return errors.Newf("cannot be empty")
	}
	if err := IsValidName(name.String()); err != nil {
		return err
	}
	return nil
}
Validate validate if name is valid kubernetes DNS_LABEL
package v1
import (
	"strings"
	"github.com/arangodb/kube-arangodb/pkg/util/errors"
	"k8s.io/apimachinery/pkg/util/validation"
)
type KubernetesResourceName string
func AsKubernetesResourceName(s *string) *KubernetesResourceName {
	if s == nil {
		return nil
	}
	value := KubernetesResourceName(*s)
	return &value
}
func (n *KubernetesResourceName) StringP() *string {
	if n == nil {
		return nil
	}
	value := string(*n)
	return &value
}
func (n *KubernetesResourceName) String() string {
	value := n.StringP()
	if value == nil {
		return ""
	}
	return *value
}