func (m *OAuthClientAuthorization) ValidateFields(paths ...string) error {
	if m == nil {
		return nil
	}
	if len(paths) == 0 {
		paths = OAuthClientAuthorizationFieldPathsNested
	}
	for name, subs := range _processPaths(append(paths[:0:0], paths...)) {
		_ = subs
		switch name {
		case "user_ids":
			if v, ok := interface{}(&m.UserIds).(interface{ ValidateFields(...string) error }); ok {
				if err := v.ValidateFields(subs...); err != nil {
					return OAuthClientAuthorizationValidationError{
						field:  "user_ids",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		case "client_ids":
			if v, ok := interface{}(&m.ClientIds).(interface{ ValidateFields(...string) error }); ok {
				if err := v.ValidateFields(subs...); err != nil {
					return OAuthClientAuthorizationValidationError{
						field:  "client_ids",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		case "rights":
		case "created_at":
			if v, ok := interface{}(&m.CreatedAt).(interface{ ValidateFields(...string) error }); ok {
				if err := v.ValidateFields(subs...); err != nil {
					return OAuthClientAuthorizationValidationError{
						field:  "created_at",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		case "updated_at":
			if v, ok := interface{}(&m.UpdatedAt).(interface{ ValidateFields(...string) error }); ok {
				if err := v.ValidateFields(subs...); err != nil {
					return OAuthClientAuthorizationValidationError{
						field:  "updated_at",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		default:
			return OAuthClientAuthorizationValidationError{
				field:  name,
				reason: "invalid field path",
			}
		}
	}
	return nil
}
ValidateFields checks the field values on OAuthClientAuthorization with the
rules defined in the proto definition for this message. If any rules are
violated, an error is returned.
package ttnpb
import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"strings"
	"time"
	"unicode/utf8"
	"github.com/gogo/protobuf/types"
)
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)
	_ = types.DynamicAny{}
)
var _oauth_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 *OAuthClientAuthorizationIdentifiers) ValidateFields(paths ...string) error {
	if m == nil {
		return nil
	}
	if len(paths) == 0 {
		paths = OAuthClientAuthorizationIdentifiersFieldPathsNested
	}
	for name, subs := range _processPaths(append(paths[:0:0], paths...)) {
		_ = subs
		switch name {
		case "user_ids":
			if v, ok := interface{}(&m.UserIds).(interface{ ValidateFields(...string) error }); ok {
				if err := v.ValidateFields(subs...); err != nil {
					return OAuthClientAuthorizationIdentifiersValidationError{
						field:  "user_ids",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		case "client_ids":
			if v, ok := interface{}(&m.ClientIds).(interface{ ValidateFields(...string) error }); ok {
				if err := v.ValidateFields(subs...); err != nil {
					return OAuthClientAuthorizationIdentifiersValidationError{
						field:  "client_ids",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		default:
			return OAuthClientAuthorizationIdentifiersValidationError{
				field:  name,
				reason: "invalid field path",
			}
		}
	}
	return nil
}
type OAuthClientAuthorizationIdentifiersValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e OAuthClientAuthorizationIdentifiersValidationError) Field() string { return e.field }
func (e OAuthClientAuthorizationIdentifiersValidationError) Reason() string { return e.reason }
func (e OAuthClientAuthorizationIdentifiersValidationError) Cause() error { return e.cause }
func (e OAuthClientAuthorizationIdentifiersValidationError) Key() bool { return e.key }
func (e OAuthClientAuthorizationIdentifiersValidationError) ErrorName() string {
	return "OAuthClientAuthorizationIdentifiersValidationError"
}
func (e OAuthClientAuthorizationIdentifiersValidationError) 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 %sOAuthClientAuthorizationIdentifiers.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
var _ error = OAuthClientAuthorizationIdentifiersValidationError{}
var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = OAuthClientAuthorizationIdentifiersValidationError{}