func (e InterfaceValidationError) 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 %sInterface.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
Error satisfies the builtin error interface
package plugin
import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"sort"
	"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{}
	_ = sort.Sort
)
func (m *Interface) Validate() error {
	return m.validate(false)
}
func (m *Interface) ValidateAll() error {
	return m.validate(true)
}
func (m *Interface) validate(all bool) error {
	if m == nil {
		return nil
	}
	var errors []error
	if _, ok := _Interface_Status_NotInLookup[m.GetStatus()]; ok {
		err := InterfaceValidationError{
			field:  "Status",
			reason: "value must not be in list [0]",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}
	if _, ok := InterfaceStatus_name[int32(m.GetStatus())]; !ok {
		err := InterfaceValidationError{
			field:  "Status",
			reason: "value must be one of the defined enum values",
		}
		if !all {
			return err
		}
		errors = append(errors, err)
	}
	for idx, item := range m.GetAddresses() {
		_, _ = idx, item
		if all {
			switch v := interface{}(item).(type) {
			case interface{ ValidateAll() error }:
				if err := v.ValidateAll(); err != nil {
					errors = append(errors, InterfaceValidationError{
						field:  fmt.Sprintf("Addresses[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			case interface{ Validate() error }:
				if err := v.Validate(); err != nil {
					errors = append(errors, InterfaceValidationError{
						field:  fmt.Sprintf("Addresses[%v]", idx),
						reason: "embedded message failed validation",
						cause:  err,
					})
				}
			}
		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return InterfaceValidationError{
					field:  fmt.Sprintf("Addresses[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}
	}
	if len(errors) > 0 {
		return InterfaceMultiError(errors)
	}
	return nil
}
type InterfaceMultiError []error
func (m InterfaceMultiError) Error() string {
	var msgs []string
	for _, err := range m {
		msgs = append(msgs, err.Error())
	}
	return strings.Join(msgs, "; ")
}
func (m InterfaceMultiError) AllErrors() []error { return m }
type InterfaceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e InterfaceValidationError) Field() string { return e.field }
func (e InterfaceValidationError) Reason() string { return e.reason }
func (e InterfaceValidationError) Cause() error { return e.cause }
func (e InterfaceValidationError) Key() bool { return e.key }
func (e InterfaceValidationError) ErrorName() string { return "InterfaceValidationError" }