func (m *NodeMetadataMatch) Validate() error {
	if m == nil {
		return nil
	}
	if len(m.GetPath()) < 1 {
		return NodeMetadataMatchValidationError{
			field:  "Path",
			reason: "value must contain at least 1 item(s)",
		}
	}
	for idx, item := range m.GetPath() {
		_, _ = idx, item
		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return NodeMetadataMatchValidationError{
					field:  fmt.Sprintf("Path[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}
	if m.GetMatch() == nil {
		return NodeMetadataMatchValidationError{
			field:  "Match",
			reason: "value is required",
		}
	}
	if v, ok := interface{}(m.GetMatch()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return NodeMetadataMatchValidationError{
				field:  "Match",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}
	return nil
}
Validate checks the field values on NodeMetadataMatch with the rules defined
in the proto definition for this message. If any rules are violated, an
error is returned.
package aggregationv1
import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"strings"
	"time"
	"unicode/utf8"
	"github.com/golang/protobuf/ptypes"
)
var (
	_ = bytes.MinRead
	_ = errors.New("")
	_ = fmt.Print
	_ = utf8.UTFMax
	_ = (*regexp.Regexp)(nil)
	_ = (*strings.Reader)(nil)
	_ = net.IPv4len
	_ = time.Duration(0)
	_ = (*url.URL)(nil)
	_ = (*mail.Address)(nil)
	_ = ptypes.DynamicAny{}
)
var _aggregation_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
func (m *KeyerConfiguration) Validate() error {
	if m == nil {
		return nil
	}
	if len(m.GetFragments()) < 1 {
		return KeyerConfigurationValidationError{
			field:  "Fragments",
			reason: "value must contain at least 1 item(s)",
		}
	}
	for idx, item := range m.GetFragments() {
		_, _ = idx, item
		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return KeyerConfigurationValidationError{
					field:  fmt.Sprintf("Fragments[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}
	return nil
}
type KeyerConfigurationValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e KeyerConfigurationValidationError) Field() string { return e.field }
func (e KeyerConfigurationValidationError) Reason() string { return e.reason }
func (e KeyerConfigurationValidationError) Cause() error { return e.cause }
func (e KeyerConfigurationValidationError) Key() bool { return e.key }
func (e KeyerConfigurationValidationError) ErrorName() string {
	return "KeyerConfigurationValidationError"
}
func (e KeyerConfigurationValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}
	key := ""
	if e.key {
		key = "key for "
	}
	return fmt.Sprintf(
		"invalid %sKeyerConfiguration.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = KeyerConfigurationValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = KeyerConfigurationValidationError{}
func (m *StringMatch) Validate() error {
	if m == nil {
		return nil
	}
	switch m.Type.(type) {
	case *StringMatch_ExactMatch:
	case *StringMatch_RegexMatch:
	default:
		return StringMatchValidationError{
			field:  "Type",
			reason: "value is required",
		}
	}
	return nil
}
type StringMatchValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e StringMatchValidationError) Field() string { return e.field }
func (e StringMatchValidationError) Reason() string { return e.reason }
func (e StringMatchValidationError) Cause() error { return e.cause }
func (e StringMatchValidationError) Key() bool { return e.key }
func (e StringMatchValidationError) ErrorName() string { return "StringMatchValidationError" }
func (e StringMatchValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}
	key := ""
	if e.key {
		key = "key for "
	}
	return fmt.Sprintf(
		"invalid %sStringMatch.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = StringMatchValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = StringMatchValidationError{}
func (m *BoolMatch) Validate() error {
	if m == nil {
		return nil
	}
	return nil
}
type BoolMatchValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e BoolMatchValidationError) Field() string { return e.field }
func (e BoolMatchValidationError) Reason() string { return e.reason }
func (e BoolMatchValidationError) Cause() error { return e.cause }
func (e BoolMatchValidationError) Key() bool { return e.key }
func (e BoolMatchValidationError) ErrorName() string { return "BoolMatchValidationError" }
func (e BoolMatchValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}
	key := ""
	if e.key {
		key = "key for "
	}
	return fmt.Sprintf(
		"invalid %sBoolMatch.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = BoolMatchValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = BoolMatchValidationError{}
func (m *LocalityMatch) Validate() error {
	if m == nil {
		return nil
	}
	if v, ok := interface{}(m.GetRegion()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return LocalityMatchValidationError{
				field:  "Region",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}
	if v, ok := interface{}(m.GetZone()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return LocalityMatchValidationError{
				field:  "Zone",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}
	if v, ok := interface{}(m.GetSubZone()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return LocalityMatchValidationError{
				field:  "SubZone",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}
	return nil
}
type LocalityMatchValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e LocalityMatchValidationError) Field() string { return e.field }
func (e LocalityMatchValidationError) Reason() string { return e.reason }
func (e LocalityMatchValidationError) Cause() error { return e.cause }
func (e LocalityMatchValidationError) Key() bool { return e.key }
func (e LocalityMatchValidationError) ErrorName() string { return "LocalityMatchValidationError" }
func (e LocalityMatchValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}
	key := ""
	if e.key {
		key = "key for "
	}
	return fmt.Sprintf(
		"invalid %sLocalityMatch.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = LocalityMatchValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = LocalityMatchValidationError{}
func (m *PathSegment) Validate() error {
	if m == nil {
		return nil
	}
	if utf8.RuneCountInString(m.GetKey()) < 1 {
		return PathSegmentValidationError{
			field:  "Key",
			reason: "value length must be at least 1 runes",
		}
	}
	return nil
}
type PathSegmentValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e PathSegmentValidationError) Field() string { return e.field }
func (e PathSegmentValidationError) Reason() string { return e.reason }
func (e PathSegmentValidationError) Cause() error { return e.cause }
func (e PathSegmentValidationError) Key() bool { return e.key }
func (e PathSegmentValidationError) ErrorName() string { return "PathSegmentValidationError" }
func (e PathSegmentValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}
	key := ""
	if e.key {
		key = "key for "
	}
	return fmt.Sprintf(
		"invalid %sPathSegment.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = PathSegmentValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = PathSegmentValidationError{}
func (m *StructValueMatch) Validate() error {
	if m == nil {
		return nil
	}
	switch m.Match.(type) {
	case *StructValueMatch_StringMatch:
		if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return StructValueMatchValidationError{
					field:  "StringMatch",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	case *StructValueMatch_BoolMatch:
		if v, ok := interface{}(m.GetBoolMatch()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return StructValueMatchValidationError{
					field:  "BoolMatch",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	default:
		return StructValueMatchValidationError{
			field:  "Match",
			reason: "value is required",
		}
	}
	return nil
}
type StructValueMatchValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e StructValueMatchValidationError) Field() string { return e.field }
func (e StructValueMatchValidationError) Reason() string { return e.reason }
func (e StructValueMatchValidationError) Cause() error { return e.cause }
func (e StructValueMatchValidationError) Key() bool { return e.key }
func (e StructValueMatchValidationError) ErrorName() string { return "StructValueMatchValidationError" }
func (e StructValueMatchValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}
	key := ""
	if e.key {
		key = "key for "
	}
	return fmt.Sprintf(
		"invalid %sStructValueMatch.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = StructValueMatchValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = StructValueMatchValidationError{}