migrate.pb.validate.go 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. // Code generated by protoc-gen-validate. DO NOT EDIT.
  2. // source: udpa/annotations/migrate.proto
  3. package annotations
  4. import (
  5. "bytes"
  6. "errors"
  7. "fmt"
  8. "net"
  9. "net/mail"
  10. "net/url"
  11. "regexp"
  12. "strings"
  13. "time"
  14. "unicode/utf8"
  15. "google.golang.org/protobuf/types/known/anypb"
  16. )
  17. // ensure the imports are used
  18. var (
  19. _ = bytes.MinRead
  20. _ = errors.New("")
  21. _ = fmt.Print
  22. _ = utf8.UTFMax
  23. _ = (*regexp.Regexp)(nil)
  24. _ = (*strings.Reader)(nil)
  25. _ = net.IPv4len
  26. _ = time.Duration(0)
  27. _ = (*url.URL)(nil)
  28. _ = (*mail.Address)(nil)
  29. _ = anypb.Any{}
  30. )
  31. // Validate checks the field values on MigrateAnnotation with the rules defined
  32. // in the proto definition for this message. If any rules are violated, an
  33. // error is returned.
  34. func (m *MigrateAnnotation) Validate() error {
  35. if m == nil {
  36. return nil
  37. }
  38. // no validation rules for Rename
  39. return nil
  40. }
  41. // MigrateAnnotationValidationError is the validation error returned by
  42. // MigrateAnnotation.Validate if the designated constraints aren't met.
  43. type MigrateAnnotationValidationError struct {
  44. field string
  45. reason string
  46. cause error
  47. key bool
  48. }
  49. // Field function returns field value.
  50. func (e MigrateAnnotationValidationError) Field() string { return e.field }
  51. // Reason function returns reason value.
  52. func (e MigrateAnnotationValidationError) Reason() string { return e.reason }
  53. // Cause function returns cause value.
  54. func (e MigrateAnnotationValidationError) Cause() error { return e.cause }
  55. // Key function returns key value.
  56. func (e MigrateAnnotationValidationError) Key() bool { return e.key }
  57. // ErrorName returns error name.
  58. func (e MigrateAnnotationValidationError) ErrorName() string {
  59. return "MigrateAnnotationValidationError"
  60. }
  61. // Error satisfies the builtin error interface
  62. func (e MigrateAnnotationValidationError) Error() string {
  63. cause := ""
  64. if e.cause != nil {
  65. cause = fmt.Sprintf(" | caused by: %v", e.cause)
  66. }
  67. key := ""
  68. if e.key {
  69. key = "key for "
  70. }
  71. return fmt.Sprintf(
  72. "invalid %sMigrateAnnotation.%s: %s%s",
  73. key,
  74. e.field,
  75. e.reason,
  76. cause)
  77. }
  78. var _ error = MigrateAnnotationValidationError{}
  79. var _ interface {
  80. Field() string
  81. Reason() string
  82. Key() bool
  83. Cause() error
  84. ErrorName() string
  85. } = MigrateAnnotationValidationError{}
  86. // Validate checks the field values on FieldMigrateAnnotation with the rules
  87. // defined in the proto definition for this message. If any rules are
  88. // violated, an error is returned.
  89. func (m *FieldMigrateAnnotation) Validate() error {
  90. if m == nil {
  91. return nil
  92. }
  93. // no validation rules for Rename
  94. // no validation rules for OneofPromotion
  95. return nil
  96. }
  97. // FieldMigrateAnnotationValidationError is the validation error returned by
  98. // FieldMigrateAnnotation.Validate if the designated constraints aren't met.
  99. type FieldMigrateAnnotationValidationError struct {
  100. field string
  101. reason string
  102. cause error
  103. key bool
  104. }
  105. // Field function returns field value.
  106. func (e FieldMigrateAnnotationValidationError) Field() string { return e.field }
  107. // Reason function returns reason value.
  108. func (e FieldMigrateAnnotationValidationError) Reason() string { return e.reason }
  109. // Cause function returns cause value.
  110. func (e FieldMigrateAnnotationValidationError) Cause() error { return e.cause }
  111. // Key function returns key value.
  112. func (e FieldMigrateAnnotationValidationError) Key() bool { return e.key }
  113. // ErrorName returns error name.
  114. func (e FieldMigrateAnnotationValidationError) ErrorName() string {
  115. return "FieldMigrateAnnotationValidationError"
  116. }
  117. // Error satisfies the builtin error interface
  118. func (e FieldMigrateAnnotationValidationError) Error() string {
  119. cause := ""
  120. if e.cause != nil {
  121. cause = fmt.Sprintf(" | caused by: %v", e.cause)
  122. }
  123. key := ""
  124. if e.key {
  125. key = "key for "
  126. }
  127. return fmt.Sprintf(
  128. "invalid %sFieldMigrateAnnotation.%s: %s%s",
  129. key,
  130. e.field,
  131. e.reason,
  132. cause)
  133. }
  134. var _ error = FieldMigrateAnnotationValidationError{}
  135. var _ interface {
  136. Field() string
  137. Reason() string
  138. Key() bool
  139. Cause() error
  140. ErrorName() string
  141. } = FieldMigrateAnnotationValidationError{}
  142. // Validate checks the field values on FileMigrateAnnotation with the rules
  143. // defined in the proto definition for this message. If any rules are
  144. // violated, an error is returned.
  145. func (m *FileMigrateAnnotation) Validate() error {
  146. if m == nil {
  147. return nil
  148. }
  149. // no validation rules for MoveToPackage
  150. return nil
  151. }
  152. // FileMigrateAnnotationValidationError is the validation error returned by
  153. // FileMigrateAnnotation.Validate if the designated constraints aren't met.
  154. type FileMigrateAnnotationValidationError struct {
  155. field string
  156. reason string
  157. cause error
  158. key bool
  159. }
  160. // Field function returns field value.
  161. func (e FileMigrateAnnotationValidationError) Field() string { return e.field }
  162. // Reason function returns reason value.
  163. func (e FileMigrateAnnotationValidationError) Reason() string { return e.reason }
  164. // Cause function returns cause value.
  165. func (e FileMigrateAnnotationValidationError) Cause() error { return e.cause }
  166. // Key function returns key value.
  167. func (e FileMigrateAnnotationValidationError) Key() bool { return e.key }
  168. // ErrorName returns error name.
  169. func (e FileMigrateAnnotationValidationError) ErrorName() string {
  170. return "FileMigrateAnnotationValidationError"
  171. }
  172. // Error satisfies the builtin error interface
  173. func (e FileMigrateAnnotationValidationError) Error() string {
  174. cause := ""
  175. if e.cause != nil {
  176. cause = fmt.Sprintf(" | caused by: %v", e.cause)
  177. }
  178. key := ""
  179. if e.key {
  180. key = "key for "
  181. }
  182. return fmt.Sprintf(
  183. "invalid %sFileMigrateAnnotation.%s: %s%s",
  184. key,
  185. e.field,
  186. e.reason,
  187. cause)
  188. }
  189. var _ error = FileMigrateAnnotationValidationError{}
  190. var _ interface {
  191. Field() string
  192. Reason() string
  193. Key() bool
  194. Cause() error
  195. ErrorName() string
  196. } = FileMigrateAnnotationValidationError{}