func (m *DecodedZedToken) Validate() error {
	if m == nil {
		return nil
	}
	switch m.VersionOneof.(type) {
	case *DecodedZedToken_DeprecatedV1Zookie:
		if v, ok := interface{}(m.GetDeprecatedV1Zookie()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return DecodedZedTokenValidationError{
					field:  "DeprecatedV1Zookie",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	case *DecodedZedToken_V1:
		if v, ok := interface{}(m.GetV1()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return DecodedZedTokenValidationError{
					field:  "V1",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}
	return nil
}
Validate checks the field values on DecodedZedToken with the rules defined
in the proto definition for this message. If any rules are violated, an
error is returned.
package implv1
import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"strings"
	"time"
	"unicode/utf8"
	"google.golang.org/protobuf/types/known/anypb"
)
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)
	_ = anypb.Any{}
)
func (m *DecodedZookie) Validate() error {
	if m == nil {
		return nil
	}
	switch m.VersionOneof.(type) {
	case *DecodedZookie_V1:
		if v, ok := interface{}(m.GetV1()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return DecodedZookieValidationError{
					field:  "V1",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	case *DecodedZookie_V2:
		if v, ok := interface{}(m.GetV2()).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return DecodedZookieValidationError{
					field:  "V2",
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}
	return nil
}
type DecodedZookieValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e DecodedZookieValidationError) Field() string { return e.field }
func (e DecodedZookieValidationError) Reason() string { return e.reason }
func (e DecodedZookieValidationError) Cause() error { return e.cause }
func (e DecodedZookieValidationError) Key() bool { return e.key }
func (e DecodedZookieValidationError) ErrorName() string { return "DecodedZookieValidationError" }
func (e DecodedZookieValidationError) 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 %sDecodedZookie.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = DecodedZookieValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DecodedZookieValidationError{}