1// Code generated by protoc-gen-validate. DO NOT EDIT.
2// source: envoy/api/v2/lds.proto
3
4package envoy_api_v2
5
6import (
7	"bytes"
8	"errors"
9	"fmt"
10	"net"
11	"net/mail"
12	"net/url"
13	"regexp"
14	"strings"
15	"time"
16	"unicode/utf8"
17
18	"github.com/golang/protobuf/ptypes"
19)
20
21// ensure the imports are used
22var (
23	_ = bytes.MinRead
24	_ = errors.New("")
25	_ = fmt.Print
26	_ = utf8.UTFMax
27	_ = (*regexp.Regexp)(nil)
28	_ = (*strings.Reader)(nil)
29	_ = net.IPv4len
30	_ = time.Duration(0)
31	_ = (*url.URL)(nil)
32	_ = (*mail.Address)(nil)
33	_ = ptypes.DynamicAny{}
34)
35
36// Validate checks the field values on LdsDummy with the rules defined in the
37// proto definition for this message. If any rules are violated, an error is returned.
38func (m *LdsDummy) Validate() error {
39	if m == nil {
40		return nil
41	}
42
43	return nil
44}
45
46// LdsDummyValidationError is the validation error returned by
47// LdsDummy.Validate if the designated constraints aren't met.
48type LdsDummyValidationError struct {
49	field  string
50	reason string
51	cause  error
52	key    bool
53}
54
55// Field function returns field value.
56func (e LdsDummyValidationError) Field() string { return e.field }
57
58// Reason function returns reason value.
59func (e LdsDummyValidationError) Reason() string { return e.reason }
60
61// Cause function returns cause value.
62func (e LdsDummyValidationError) Cause() error { return e.cause }
63
64// Key function returns key value.
65func (e LdsDummyValidationError) Key() bool { return e.key }
66
67// ErrorName returns error name.
68func (e LdsDummyValidationError) ErrorName() string { return "LdsDummyValidationError" }
69
70// Error satisfies the builtin error interface
71func (e LdsDummyValidationError) Error() string {
72	cause := ""
73	if e.cause != nil {
74		cause = fmt.Sprintf(" | caused by: %v", e.cause)
75	}
76
77	key := ""
78	if e.key {
79		key = "key for "
80	}
81
82	return fmt.Sprintf(
83		"invalid %sLdsDummy.%s: %s%s",
84		key,
85		e.field,
86		e.reason,
87		cause)
88}
89
90var _ error = LdsDummyValidationError{}
91
92var _ interface {
93	Field() string
94	Reason() string
95	Key() bool
96	Cause() error
97	ErrorName() string
98} = LdsDummyValidationError{}
99