gitee.com/zhaochuninhefei/gmgo@v0.0.31-0.20240209061119-069254a02979/go-control-plane/envoy/data/accesslog/v3/accesslog.pb.validate.go (about) 1 // Code generated by protoc-gen-validate. DO NOT EDIT. 2 // source: envoy/data/accesslog/v3/accesslog.proto 3 4 package envoy_data_accesslog_v3 5 6 import ( 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 "google.golang.org/protobuf/types/known/anypb" 19 20 v3 "gitee.com/zhaochuninhefei/gmgo/go-control-plane/envoy/config/core/v3" 21 ) 22 23 // ensure the imports are used 24 var ( 25 _ = bytes.MinRead 26 _ = errors.New("") 27 _ = fmt.Print 28 _ = utf8.UTFMax 29 _ = (*regexp.Regexp)(nil) 30 _ = (*strings.Reader)(nil) 31 _ = net.IPv4len 32 _ = time.Duration(0) 33 _ = (*url.URL)(nil) 34 _ = (*mail.Address)(nil) 35 _ = anypb.Any{} 36 37 _ = v3.RequestMethod(0) 38 ) 39 40 // Validate checks the field values on TCPAccessLogEntry with the rules defined 41 // in the proto definition for this message. If any rules are violated, an 42 // error is returned. 43 func (m *TCPAccessLogEntry) Validate() error { 44 if m == nil { 45 return nil 46 } 47 48 if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { 49 if err := v.Validate(); err != nil { 50 return TCPAccessLogEntryValidationError{ 51 field: "CommonProperties", 52 reason: "embedded message failed validation", 53 cause: err, 54 } 55 } 56 } 57 58 if v, ok := interface{}(m.GetConnectionProperties()).(interface{ Validate() error }); ok { 59 if err := v.Validate(); err != nil { 60 return TCPAccessLogEntryValidationError{ 61 field: "ConnectionProperties", 62 reason: "embedded message failed validation", 63 cause: err, 64 } 65 } 66 } 67 68 return nil 69 } 70 71 // TCPAccessLogEntryValidationError is the validation error returned by 72 // TCPAccessLogEntry.Validate if the designated constraints aren't met. 73 type TCPAccessLogEntryValidationError struct { 74 field string 75 reason string 76 cause error 77 key bool 78 } 79 80 // Field function returns field value. 81 func (e TCPAccessLogEntryValidationError) Field() string { return e.field } 82 83 // Reason function returns reason value. 84 func (e TCPAccessLogEntryValidationError) Reason() string { return e.reason } 85 86 // Cause function returns cause value. 87 func (e TCPAccessLogEntryValidationError) Cause() error { return e.cause } 88 89 // Key function returns key value. 90 func (e TCPAccessLogEntryValidationError) Key() bool { return e.key } 91 92 // ErrorName returns error name. 93 func (e TCPAccessLogEntryValidationError) ErrorName() string { 94 return "TCPAccessLogEntryValidationError" 95 } 96 97 // Error satisfies the builtin error interface 98 func (e TCPAccessLogEntryValidationError) Error() string { 99 cause := "" 100 if e.cause != nil { 101 cause = fmt.Sprintf(" | caused by: %v", e.cause) 102 } 103 104 key := "" 105 if e.key { 106 key = "key for " 107 } 108 109 return fmt.Sprintf( 110 "invalid %sTCPAccessLogEntry.%s: %s%s", 111 key, 112 e.field, 113 e.reason, 114 cause) 115 } 116 117 var _ error = TCPAccessLogEntryValidationError{} 118 119 var _ interface { 120 Field() string 121 Reason() string 122 Key() bool 123 Cause() error 124 ErrorName() string 125 } = TCPAccessLogEntryValidationError{} 126 127 // Validate checks the field values on HTTPAccessLogEntry with the rules 128 // defined in the proto definition for this message. If any rules are 129 // violated, an error is returned. 130 func (m *HTTPAccessLogEntry) Validate() error { 131 if m == nil { 132 return nil 133 } 134 135 if v, ok := interface{}(m.GetCommonProperties()).(interface{ Validate() error }); ok { 136 if err := v.Validate(); err != nil { 137 return HTTPAccessLogEntryValidationError{ 138 field: "CommonProperties", 139 reason: "embedded message failed validation", 140 cause: err, 141 } 142 } 143 } 144 145 // no validation rules for ProtocolVersion 146 147 if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok { 148 if err := v.Validate(); err != nil { 149 return HTTPAccessLogEntryValidationError{ 150 field: "Request", 151 reason: "embedded message failed validation", 152 cause: err, 153 } 154 } 155 } 156 157 if v, ok := interface{}(m.GetResponse()).(interface{ Validate() error }); ok { 158 if err := v.Validate(); err != nil { 159 return HTTPAccessLogEntryValidationError{ 160 field: "Response", 161 reason: "embedded message failed validation", 162 cause: err, 163 } 164 } 165 } 166 167 return nil 168 } 169 170 // HTTPAccessLogEntryValidationError is the validation error returned by 171 // HTTPAccessLogEntry.Validate if the designated constraints aren't met. 172 type HTTPAccessLogEntryValidationError struct { 173 field string 174 reason string 175 cause error 176 key bool 177 } 178 179 // Field function returns field value. 180 func (e HTTPAccessLogEntryValidationError) Field() string { return e.field } 181 182 // Reason function returns reason value. 183 func (e HTTPAccessLogEntryValidationError) Reason() string { return e.reason } 184 185 // Cause function returns cause value. 186 func (e HTTPAccessLogEntryValidationError) Cause() error { return e.cause } 187 188 // Key function returns key value. 189 func (e HTTPAccessLogEntryValidationError) Key() bool { return e.key } 190 191 // ErrorName returns error name. 192 func (e HTTPAccessLogEntryValidationError) ErrorName() string { 193 return "HTTPAccessLogEntryValidationError" 194 } 195 196 // Error satisfies the builtin error interface 197 func (e HTTPAccessLogEntryValidationError) Error() string { 198 cause := "" 199 if e.cause != nil { 200 cause = fmt.Sprintf(" | caused by: %v", e.cause) 201 } 202 203 key := "" 204 if e.key { 205 key = "key for " 206 } 207 208 return fmt.Sprintf( 209 "invalid %sHTTPAccessLogEntry.%s: %s%s", 210 key, 211 e.field, 212 e.reason, 213 cause) 214 } 215 216 var _ error = HTTPAccessLogEntryValidationError{} 217 218 var _ interface { 219 Field() string 220 Reason() string 221 Key() bool 222 Cause() error 223 ErrorName() string 224 } = HTTPAccessLogEntryValidationError{} 225 226 // Validate checks the field values on ConnectionProperties with the rules 227 // defined in the proto definition for this message. If any rules are 228 // violated, an error is returned. 229 func (m *ConnectionProperties) Validate() error { 230 if m == nil { 231 return nil 232 } 233 234 // no validation rules for ReceivedBytes 235 236 // no validation rules for SentBytes 237 238 return nil 239 } 240 241 // ConnectionPropertiesValidationError is the validation error returned by 242 // ConnectionProperties.Validate if the designated constraints aren't met. 243 type ConnectionPropertiesValidationError struct { 244 field string 245 reason string 246 cause error 247 key bool 248 } 249 250 // Field function returns field value. 251 func (e ConnectionPropertiesValidationError) Field() string { return e.field } 252 253 // Reason function returns reason value. 254 func (e ConnectionPropertiesValidationError) Reason() string { return e.reason } 255 256 // Cause function returns cause value. 257 func (e ConnectionPropertiesValidationError) Cause() error { return e.cause } 258 259 // Key function returns key value. 260 func (e ConnectionPropertiesValidationError) Key() bool { return e.key } 261 262 // ErrorName returns error name. 263 func (e ConnectionPropertiesValidationError) ErrorName() string { 264 return "ConnectionPropertiesValidationError" 265 } 266 267 // Error satisfies the builtin error interface 268 func (e ConnectionPropertiesValidationError) Error() string { 269 cause := "" 270 if e.cause != nil { 271 cause = fmt.Sprintf(" | caused by: %v", e.cause) 272 } 273 274 key := "" 275 if e.key { 276 key = "key for " 277 } 278 279 return fmt.Sprintf( 280 "invalid %sConnectionProperties.%s: %s%s", 281 key, 282 e.field, 283 e.reason, 284 cause) 285 } 286 287 var _ error = ConnectionPropertiesValidationError{} 288 289 var _ interface { 290 Field() string 291 Reason() string 292 Key() bool 293 Cause() error 294 ErrorName() string 295 } = ConnectionPropertiesValidationError{} 296 297 // Validate checks the field values on AccessLogCommon with the rules defined 298 // in the proto definition for this message. If any rules are violated, an 299 // error is returned. 300 func (m *AccessLogCommon) Validate() error { 301 if m == nil { 302 return nil 303 } 304 305 if val := m.GetSampleRate(); val <= 0 || val > 1 { 306 return AccessLogCommonValidationError{ 307 field: "SampleRate", 308 reason: "value must be inside range (0, 1]", 309 } 310 } 311 312 if v, ok := interface{}(m.GetDownstreamRemoteAddress()).(interface{ Validate() error }); ok { 313 if err := v.Validate(); err != nil { 314 return AccessLogCommonValidationError{ 315 field: "DownstreamRemoteAddress", 316 reason: "embedded message failed validation", 317 cause: err, 318 } 319 } 320 } 321 322 if v, ok := interface{}(m.GetDownstreamLocalAddress()).(interface{ Validate() error }); ok { 323 if err := v.Validate(); err != nil { 324 return AccessLogCommonValidationError{ 325 field: "DownstreamLocalAddress", 326 reason: "embedded message failed validation", 327 cause: err, 328 } 329 } 330 } 331 332 if v, ok := interface{}(m.GetTlsProperties()).(interface{ Validate() error }); ok { 333 if err := v.Validate(); err != nil { 334 return AccessLogCommonValidationError{ 335 field: "TlsProperties", 336 reason: "embedded message failed validation", 337 cause: err, 338 } 339 } 340 } 341 342 if v, ok := interface{}(m.GetStartTime()).(interface{ Validate() error }); ok { 343 if err := v.Validate(); err != nil { 344 return AccessLogCommonValidationError{ 345 field: "StartTime", 346 reason: "embedded message failed validation", 347 cause: err, 348 } 349 } 350 } 351 352 if v, ok := interface{}(m.GetTimeToLastRxByte()).(interface{ Validate() error }); ok { 353 if err := v.Validate(); err != nil { 354 return AccessLogCommonValidationError{ 355 field: "TimeToLastRxByte", 356 reason: "embedded message failed validation", 357 cause: err, 358 } 359 } 360 } 361 362 if v, ok := interface{}(m.GetTimeToFirstUpstreamTxByte()).(interface{ Validate() error }); ok { 363 if err := v.Validate(); err != nil { 364 return AccessLogCommonValidationError{ 365 field: "TimeToFirstUpstreamTxByte", 366 reason: "embedded message failed validation", 367 cause: err, 368 } 369 } 370 } 371 372 if v, ok := interface{}(m.GetTimeToLastUpstreamTxByte()).(interface{ Validate() error }); ok { 373 if err := v.Validate(); err != nil { 374 return AccessLogCommonValidationError{ 375 field: "TimeToLastUpstreamTxByte", 376 reason: "embedded message failed validation", 377 cause: err, 378 } 379 } 380 } 381 382 if v, ok := interface{}(m.GetTimeToFirstUpstreamRxByte()).(interface{ Validate() error }); ok { 383 if err := v.Validate(); err != nil { 384 return AccessLogCommonValidationError{ 385 field: "TimeToFirstUpstreamRxByte", 386 reason: "embedded message failed validation", 387 cause: err, 388 } 389 } 390 } 391 392 if v, ok := interface{}(m.GetTimeToLastUpstreamRxByte()).(interface{ Validate() error }); ok { 393 if err := v.Validate(); err != nil { 394 return AccessLogCommonValidationError{ 395 field: "TimeToLastUpstreamRxByte", 396 reason: "embedded message failed validation", 397 cause: err, 398 } 399 } 400 } 401 402 if v, ok := interface{}(m.GetTimeToFirstDownstreamTxByte()).(interface{ Validate() error }); ok { 403 if err := v.Validate(); err != nil { 404 return AccessLogCommonValidationError{ 405 field: "TimeToFirstDownstreamTxByte", 406 reason: "embedded message failed validation", 407 cause: err, 408 } 409 } 410 } 411 412 if v, ok := interface{}(m.GetTimeToLastDownstreamTxByte()).(interface{ Validate() error }); ok { 413 if err := v.Validate(); err != nil { 414 return AccessLogCommonValidationError{ 415 field: "TimeToLastDownstreamTxByte", 416 reason: "embedded message failed validation", 417 cause: err, 418 } 419 } 420 } 421 422 if v, ok := interface{}(m.GetUpstreamRemoteAddress()).(interface{ Validate() error }); ok { 423 if err := v.Validate(); err != nil { 424 return AccessLogCommonValidationError{ 425 field: "UpstreamRemoteAddress", 426 reason: "embedded message failed validation", 427 cause: err, 428 } 429 } 430 } 431 432 if v, ok := interface{}(m.GetUpstreamLocalAddress()).(interface{ Validate() error }); ok { 433 if err := v.Validate(); err != nil { 434 return AccessLogCommonValidationError{ 435 field: "UpstreamLocalAddress", 436 reason: "embedded message failed validation", 437 cause: err, 438 } 439 } 440 } 441 442 // no validation rules for UpstreamCluster 443 444 if v, ok := interface{}(m.GetResponseFlags()).(interface{ Validate() error }); ok { 445 if err := v.Validate(); err != nil { 446 return AccessLogCommonValidationError{ 447 field: "ResponseFlags", 448 reason: "embedded message failed validation", 449 cause: err, 450 } 451 } 452 } 453 454 if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { 455 if err := v.Validate(); err != nil { 456 return AccessLogCommonValidationError{ 457 field: "Metadata", 458 reason: "embedded message failed validation", 459 cause: err, 460 } 461 } 462 } 463 464 // no validation rules for UpstreamTransportFailureReason 465 466 // no validation rules for RouteName 467 468 if v, ok := interface{}(m.GetDownstreamDirectRemoteAddress()).(interface{ Validate() error }); ok { 469 if err := v.Validate(); err != nil { 470 return AccessLogCommonValidationError{ 471 field: "DownstreamDirectRemoteAddress", 472 reason: "embedded message failed validation", 473 cause: err, 474 } 475 } 476 } 477 478 for key, val := range m.GetFilterStateObjects() { 479 _ = val 480 481 // no validation rules for FilterStateObjects[key] 482 483 if v, ok := interface{}(val).(interface{ Validate() error }); ok { 484 if err := v.Validate(); err != nil { 485 return AccessLogCommonValidationError{ 486 field: fmt.Sprintf("FilterStateObjects[%v]", key), 487 reason: "embedded message failed validation", 488 cause: err, 489 } 490 } 491 } 492 493 } 494 495 return nil 496 } 497 498 // AccessLogCommonValidationError is the validation error returned by 499 // AccessLogCommon.Validate if the designated constraints aren't met. 500 type AccessLogCommonValidationError struct { 501 field string 502 reason string 503 cause error 504 key bool 505 } 506 507 // Field function returns field value. 508 func (e AccessLogCommonValidationError) Field() string { return e.field } 509 510 // Reason function returns reason value. 511 func (e AccessLogCommonValidationError) Reason() string { return e.reason } 512 513 // Cause function returns cause value. 514 func (e AccessLogCommonValidationError) Cause() error { return e.cause } 515 516 // Key function returns key value. 517 func (e AccessLogCommonValidationError) Key() bool { return e.key } 518 519 // ErrorName returns error name. 520 func (e AccessLogCommonValidationError) ErrorName() string { return "AccessLogCommonValidationError" } 521 522 // Error satisfies the builtin error interface 523 func (e AccessLogCommonValidationError) Error() string { 524 cause := "" 525 if e.cause != nil { 526 cause = fmt.Sprintf(" | caused by: %v", e.cause) 527 } 528 529 key := "" 530 if e.key { 531 key = "key for " 532 } 533 534 return fmt.Sprintf( 535 "invalid %sAccessLogCommon.%s: %s%s", 536 key, 537 e.field, 538 e.reason, 539 cause) 540 } 541 542 var _ error = AccessLogCommonValidationError{} 543 544 var _ interface { 545 Field() string 546 Reason() string 547 Key() bool 548 Cause() error 549 ErrorName() string 550 } = AccessLogCommonValidationError{} 551 552 // Validate checks the field values on ResponseFlags with the rules defined in 553 // the proto definition for this message. If any rules are violated, an error 554 // is returned. 555 func (m *ResponseFlags) Validate() error { 556 if m == nil { 557 return nil 558 } 559 560 // no validation rules for FailedLocalHealthcheck 561 562 // no validation rules for NoHealthyUpstream 563 564 // no validation rules for UpstreamRequestTimeout 565 566 // no validation rules for LocalReset 567 568 // no validation rules for UpstreamRemoteReset 569 570 // no validation rules for UpstreamConnectionFailure 571 572 // no validation rules for UpstreamConnectionTermination 573 574 // no validation rules for UpstreamOverflow 575 576 // no validation rules for NoRouteFound 577 578 // no validation rules for DelayInjected 579 580 // no validation rules for FaultInjected 581 582 // no validation rules for RateLimited 583 584 if v, ok := interface{}(m.GetUnauthorizedDetails()).(interface{ Validate() error }); ok { 585 if err := v.Validate(); err != nil { 586 return ResponseFlagsValidationError{ 587 field: "UnauthorizedDetails", 588 reason: "embedded message failed validation", 589 cause: err, 590 } 591 } 592 } 593 594 // no validation rules for RateLimitServiceError 595 596 // no validation rules for DownstreamConnectionTermination 597 598 // no validation rules for UpstreamRetryLimitExceeded 599 600 // no validation rules for StreamIdleTimeout 601 602 // no validation rules for InvalidEnvoyRequestHeaders 603 604 // no validation rules for DownstreamProtocolError 605 606 // no validation rules for UpstreamMaxStreamDurationReached 607 608 // no validation rules for ResponseFromCacheFilter 609 610 // no validation rules for NoFilterConfigFound 611 612 // no validation rules for DurationTimeout 613 614 // no validation rules for UpstreamProtocolError 615 616 // no validation rules for NoClusterFound 617 618 // no validation rules for OverloadManager 619 620 return nil 621 } 622 623 // ResponseFlagsValidationError is the validation error returned by 624 // ResponseFlags.Validate if the designated constraints aren't met. 625 type ResponseFlagsValidationError struct { 626 field string 627 reason string 628 cause error 629 key bool 630 } 631 632 // Field function returns field value. 633 func (e ResponseFlagsValidationError) Field() string { return e.field } 634 635 // Reason function returns reason value. 636 func (e ResponseFlagsValidationError) Reason() string { return e.reason } 637 638 // Cause function returns cause value. 639 func (e ResponseFlagsValidationError) Cause() error { return e.cause } 640 641 // Key function returns key value. 642 func (e ResponseFlagsValidationError) Key() bool { return e.key } 643 644 // ErrorName returns error name. 645 func (e ResponseFlagsValidationError) ErrorName() string { return "ResponseFlagsValidationError" } 646 647 // Error satisfies the builtin error interface 648 func (e ResponseFlagsValidationError) Error() string { 649 cause := "" 650 if e.cause != nil { 651 cause = fmt.Sprintf(" | caused by: %v", e.cause) 652 } 653 654 key := "" 655 if e.key { 656 key = "key for " 657 } 658 659 return fmt.Sprintf( 660 "invalid %sResponseFlags.%s: %s%s", 661 key, 662 e.field, 663 e.reason, 664 cause) 665 } 666 667 var _ error = ResponseFlagsValidationError{} 668 669 var _ interface { 670 Field() string 671 Reason() string 672 Key() bool 673 Cause() error 674 ErrorName() string 675 } = ResponseFlagsValidationError{} 676 677 // Validate checks the field values on TLSProperties with the rules defined in 678 // the proto definition for this message. If any rules are violated, an error 679 // is returned. 680 func (m *TLSProperties) Validate() error { 681 if m == nil { 682 return nil 683 } 684 685 // no validation rules for TlsVersion 686 687 if v, ok := interface{}(m.GetTlsCipherSuite()).(interface{ Validate() error }); ok { 688 if err := v.Validate(); err != nil { 689 return TLSPropertiesValidationError{ 690 field: "TlsCipherSuite", 691 reason: "embedded message failed validation", 692 cause: err, 693 } 694 } 695 } 696 697 // no validation rules for TlsSniHostname 698 699 if v, ok := interface{}(m.GetLocalCertificateProperties()).(interface{ Validate() error }); ok { 700 if err := v.Validate(); err != nil { 701 return TLSPropertiesValidationError{ 702 field: "LocalCertificateProperties", 703 reason: "embedded message failed validation", 704 cause: err, 705 } 706 } 707 } 708 709 if v, ok := interface{}(m.GetPeerCertificateProperties()).(interface{ Validate() error }); ok { 710 if err := v.Validate(); err != nil { 711 return TLSPropertiesValidationError{ 712 field: "PeerCertificateProperties", 713 reason: "embedded message failed validation", 714 cause: err, 715 } 716 } 717 } 718 719 // no validation rules for TlsSessionId 720 721 return nil 722 } 723 724 // TLSPropertiesValidationError is the validation error returned by 725 // TLSProperties.Validate if the designated constraints aren't met. 726 type TLSPropertiesValidationError struct { 727 field string 728 reason string 729 cause error 730 key bool 731 } 732 733 // Field function returns field value. 734 func (e TLSPropertiesValidationError) Field() string { return e.field } 735 736 // Reason function returns reason value. 737 func (e TLSPropertiesValidationError) Reason() string { return e.reason } 738 739 // Cause function returns cause value. 740 func (e TLSPropertiesValidationError) Cause() error { return e.cause } 741 742 // Key function returns key value. 743 func (e TLSPropertiesValidationError) Key() bool { return e.key } 744 745 // ErrorName returns error name. 746 func (e TLSPropertiesValidationError) ErrorName() string { return "TLSPropertiesValidationError" } 747 748 // Error satisfies the builtin error interface 749 func (e TLSPropertiesValidationError) Error() string { 750 cause := "" 751 if e.cause != nil { 752 cause = fmt.Sprintf(" | caused by: %v", e.cause) 753 } 754 755 key := "" 756 if e.key { 757 key = "key for " 758 } 759 760 return fmt.Sprintf( 761 "invalid %sTLSProperties.%s: %s%s", 762 key, 763 e.field, 764 e.reason, 765 cause) 766 } 767 768 var _ error = TLSPropertiesValidationError{} 769 770 var _ interface { 771 Field() string 772 Reason() string 773 Key() bool 774 Cause() error 775 ErrorName() string 776 } = TLSPropertiesValidationError{} 777 778 // Validate checks the field values on HTTPRequestProperties with the rules 779 // defined in the proto definition for this message. If any rules are 780 // violated, an error is returned. 781 func (m *HTTPRequestProperties) Validate() error { 782 if m == nil { 783 return nil 784 } 785 786 if _, ok := v3.RequestMethod_name[int32(m.GetRequestMethod())]; !ok { 787 return HTTPRequestPropertiesValidationError{ 788 field: "RequestMethod", 789 reason: "value must be one of the defined enum values", 790 } 791 } 792 793 // no validation rules for Scheme 794 795 // no validation rules for Authority 796 797 if v, ok := interface{}(m.GetPort()).(interface{ Validate() error }); ok { 798 if err := v.Validate(); err != nil { 799 return HTTPRequestPropertiesValidationError{ 800 field: "Port", 801 reason: "embedded message failed validation", 802 cause: err, 803 } 804 } 805 } 806 807 // no validation rules for Path 808 809 // no validation rules for UserAgent 810 811 // no validation rules for Referer 812 813 // no validation rules for ForwardedFor 814 815 // no validation rules for RequestId 816 817 // no validation rules for OriginalPath 818 819 // no validation rules for RequestHeadersBytes 820 821 // no validation rules for RequestBodyBytes 822 823 // no validation rules for RequestHeaders 824 825 return nil 826 } 827 828 // HTTPRequestPropertiesValidationError is the validation error returned by 829 // HTTPRequestProperties.Validate if the designated constraints aren't met. 830 type HTTPRequestPropertiesValidationError struct { 831 field string 832 reason string 833 cause error 834 key bool 835 } 836 837 // Field function returns field value. 838 func (e HTTPRequestPropertiesValidationError) Field() string { return e.field } 839 840 // Reason function returns reason value. 841 func (e HTTPRequestPropertiesValidationError) Reason() string { return e.reason } 842 843 // Cause function returns cause value. 844 func (e HTTPRequestPropertiesValidationError) Cause() error { return e.cause } 845 846 // Key function returns key value. 847 func (e HTTPRequestPropertiesValidationError) Key() bool { return e.key } 848 849 // ErrorName returns error name. 850 func (e HTTPRequestPropertiesValidationError) ErrorName() string { 851 return "HTTPRequestPropertiesValidationError" 852 } 853 854 // Error satisfies the builtin error interface 855 func (e HTTPRequestPropertiesValidationError) Error() string { 856 cause := "" 857 if e.cause != nil { 858 cause = fmt.Sprintf(" | caused by: %v", e.cause) 859 } 860 861 key := "" 862 if e.key { 863 key = "key for " 864 } 865 866 return fmt.Sprintf( 867 "invalid %sHTTPRequestProperties.%s: %s%s", 868 key, 869 e.field, 870 e.reason, 871 cause) 872 } 873 874 var _ error = HTTPRequestPropertiesValidationError{} 875 876 var _ interface { 877 Field() string 878 Reason() string 879 Key() bool 880 Cause() error 881 ErrorName() string 882 } = HTTPRequestPropertiesValidationError{} 883 884 // Validate checks the field values on HTTPResponseProperties with the rules 885 // defined in the proto definition for this message. If any rules are 886 // violated, an error is returned. 887 func (m *HTTPResponseProperties) Validate() error { 888 if m == nil { 889 return nil 890 } 891 892 if v, ok := interface{}(m.GetResponseCode()).(interface{ Validate() error }); ok { 893 if err := v.Validate(); err != nil { 894 return HTTPResponsePropertiesValidationError{ 895 field: "ResponseCode", 896 reason: "embedded message failed validation", 897 cause: err, 898 } 899 } 900 } 901 902 // no validation rules for ResponseHeadersBytes 903 904 // no validation rules for ResponseBodyBytes 905 906 // no validation rules for ResponseHeaders 907 908 // no validation rules for ResponseTrailers 909 910 // no validation rules for ResponseCodeDetails 911 912 return nil 913 } 914 915 // HTTPResponsePropertiesValidationError is the validation error returned by 916 // HTTPResponseProperties.Validate if the designated constraints aren't met. 917 type HTTPResponsePropertiesValidationError struct { 918 field string 919 reason string 920 cause error 921 key bool 922 } 923 924 // Field function returns field value. 925 func (e HTTPResponsePropertiesValidationError) Field() string { return e.field } 926 927 // Reason function returns reason value. 928 func (e HTTPResponsePropertiesValidationError) Reason() string { return e.reason } 929 930 // Cause function returns cause value. 931 func (e HTTPResponsePropertiesValidationError) Cause() error { return e.cause } 932 933 // Key function returns key value. 934 func (e HTTPResponsePropertiesValidationError) Key() bool { return e.key } 935 936 // ErrorName returns error name. 937 func (e HTTPResponsePropertiesValidationError) ErrorName() string { 938 return "HTTPResponsePropertiesValidationError" 939 } 940 941 // Error satisfies the builtin error interface 942 func (e HTTPResponsePropertiesValidationError) Error() string { 943 cause := "" 944 if e.cause != nil { 945 cause = fmt.Sprintf(" | caused by: %v", e.cause) 946 } 947 948 key := "" 949 if e.key { 950 key = "key for " 951 } 952 953 return fmt.Sprintf( 954 "invalid %sHTTPResponseProperties.%s: %s%s", 955 key, 956 e.field, 957 e.reason, 958 cause) 959 } 960 961 var _ error = HTTPResponsePropertiesValidationError{} 962 963 var _ interface { 964 Field() string 965 Reason() string 966 Key() bool 967 Cause() error 968 ErrorName() string 969 } = HTTPResponsePropertiesValidationError{} 970 971 // Validate checks the field values on ResponseFlags_Unauthorized with the 972 // rules defined in the proto definition for this message. If any rules are 973 // violated, an error is returned. 974 func (m *ResponseFlags_Unauthorized) Validate() error { 975 if m == nil { 976 return nil 977 } 978 979 // no validation rules for Reason 980 981 return nil 982 } 983 984 // ResponseFlags_UnauthorizedValidationError is the validation error returned 985 // by ResponseFlags_Unauthorized.Validate if the designated constraints aren't met. 986 type ResponseFlags_UnauthorizedValidationError struct { 987 field string 988 reason string 989 cause error 990 key bool 991 } 992 993 // Field function returns field value. 994 func (e ResponseFlags_UnauthorizedValidationError) Field() string { return e.field } 995 996 // Reason function returns reason value. 997 func (e ResponseFlags_UnauthorizedValidationError) Reason() string { return e.reason } 998 999 // Cause function returns cause value. 1000 func (e ResponseFlags_UnauthorizedValidationError) Cause() error { return e.cause } 1001 1002 // Key function returns key value. 1003 func (e ResponseFlags_UnauthorizedValidationError) Key() bool { return e.key } 1004 1005 // ErrorName returns error name. 1006 func (e ResponseFlags_UnauthorizedValidationError) ErrorName() string { 1007 return "ResponseFlags_UnauthorizedValidationError" 1008 } 1009 1010 // Error satisfies the builtin error interface 1011 func (e ResponseFlags_UnauthorizedValidationError) Error() string { 1012 cause := "" 1013 if e.cause != nil { 1014 cause = fmt.Sprintf(" | caused by: %v", e.cause) 1015 } 1016 1017 key := "" 1018 if e.key { 1019 key = "key for " 1020 } 1021 1022 return fmt.Sprintf( 1023 "invalid %sResponseFlags_Unauthorized.%s: %s%s", 1024 key, 1025 e.field, 1026 e.reason, 1027 cause) 1028 } 1029 1030 var _ error = ResponseFlags_UnauthorizedValidationError{} 1031 1032 var _ interface { 1033 Field() string 1034 Reason() string 1035 Key() bool 1036 Cause() error 1037 ErrorName() string 1038 } = ResponseFlags_UnauthorizedValidationError{} 1039 1040 // Validate checks the field values on TLSProperties_CertificateProperties with 1041 // the rules defined in the proto definition for this message. If any rules 1042 // are violated, an error is returned. 1043 func (m *TLSProperties_CertificateProperties) Validate() error { 1044 if m == nil { 1045 return nil 1046 } 1047 1048 for idx, item := range m.GetSubjectAltName() { 1049 _, _ = idx, item 1050 1051 if v, ok := interface{}(item).(interface{ Validate() error }); ok { 1052 if err := v.Validate(); err != nil { 1053 return TLSProperties_CertificatePropertiesValidationError{ 1054 field: fmt.Sprintf("SubjectAltName[%v]", idx), 1055 reason: "embedded message failed validation", 1056 cause: err, 1057 } 1058 } 1059 } 1060 1061 } 1062 1063 // no validation rules for Subject 1064 1065 return nil 1066 } 1067 1068 // TLSProperties_CertificatePropertiesValidationError is the validation error 1069 // returned by TLSProperties_CertificateProperties.Validate if the designated 1070 // constraints aren't met. 1071 type TLSProperties_CertificatePropertiesValidationError struct { 1072 field string 1073 reason string 1074 cause error 1075 key bool 1076 } 1077 1078 // Field function returns field value. 1079 func (e TLSProperties_CertificatePropertiesValidationError) Field() string { return e.field } 1080 1081 // Reason function returns reason value. 1082 func (e TLSProperties_CertificatePropertiesValidationError) Reason() string { return e.reason } 1083 1084 // Cause function returns cause value. 1085 func (e TLSProperties_CertificatePropertiesValidationError) Cause() error { return e.cause } 1086 1087 // Key function returns key value. 1088 func (e TLSProperties_CertificatePropertiesValidationError) Key() bool { return e.key } 1089 1090 // ErrorName returns error name. 1091 func (e TLSProperties_CertificatePropertiesValidationError) ErrorName() string { 1092 return "TLSProperties_CertificatePropertiesValidationError" 1093 } 1094 1095 // Error satisfies the builtin error interface 1096 func (e TLSProperties_CertificatePropertiesValidationError) Error() string { 1097 cause := "" 1098 if e.cause != nil { 1099 cause = fmt.Sprintf(" | caused by: %v", e.cause) 1100 } 1101 1102 key := "" 1103 if e.key { 1104 key = "key for " 1105 } 1106 1107 return fmt.Sprintf( 1108 "invalid %sTLSProperties_CertificateProperties.%s: %s%s", 1109 key, 1110 e.field, 1111 e.reason, 1112 cause) 1113 } 1114 1115 var _ error = TLSProperties_CertificatePropertiesValidationError{} 1116 1117 var _ interface { 1118 Field() string 1119 Reason() string 1120 Key() bool 1121 Cause() error 1122 ErrorName() string 1123 } = TLSProperties_CertificatePropertiesValidationError{} 1124 1125 // Validate checks the field values on 1126 // TLSProperties_CertificateProperties_SubjectAltName with the rules defined 1127 // in the proto definition for this message. If any rules are violated, an 1128 // error is returned. 1129 func (m *TLSProperties_CertificateProperties_SubjectAltName) Validate() error { 1130 if m == nil { 1131 return nil 1132 } 1133 1134 switch m.San.(type) { 1135 1136 case *TLSProperties_CertificateProperties_SubjectAltName_Uri: 1137 // no validation rules for Uri 1138 1139 case *TLSProperties_CertificateProperties_SubjectAltName_Dns: 1140 // no validation rules for Dns 1141 1142 } 1143 1144 return nil 1145 } 1146 1147 // TLSProperties_CertificateProperties_SubjectAltNameValidationError is the 1148 // validation error returned by 1149 // TLSProperties_CertificateProperties_SubjectAltName.Validate if the 1150 // designated constraints aren't met. 1151 type TLSProperties_CertificateProperties_SubjectAltNameValidationError struct { 1152 field string 1153 reason string 1154 cause error 1155 key bool 1156 } 1157 1158 // Field function returns field value. 1159 func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Field() string { 1160 return e.field 1161 } 1162 1163 // Reason function returns reason value. 1164 func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Reason() string { 1165 return e.reason 1166 } 1167 1168 // Cause function returns cause value. 1169 func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Cause() error { 1170 return e.cause 1171 } 1172 1173 // Key function returns key value. 1174 func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Key() bool { return e.key } 1175 1176 // ErrorName returns error name. 1177 func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) ErrorName() string { 1178 return "TLSProperties_CertificateProperties_SubjectAltNameValidationError" 1179 } 1180 1181 // Error satisfies the builtin error interface 1182 func (e TLSProperties_CertificateProperties_SubjectAltNameValidationError) Error() string { 1183 cause := "" 1184 if e.cause != nil { 1185 cause = fmt.Sprintf(" | caused by: %v", e.cause) 1186 } 1187 1188 key := "" 1189 if e.key { 1190 key = "key for " 1191 } 1192 1193 return fmt.Sprintf( 1194 "invalid %sTLSProperties_CertificateProperties_SubjectAltName.%s: %s%s", 1195 key, 1196 e.field, 1197 e.reason, 1198 cause) 1199 } 1200 1201 var _ error = TLSProperties_CertificateProperties_SubjectAltNameValidationError{} 1202 1203 var _ interface { 1204 Field() string 1205 Reason() string 1206 Key() bool 1207 Cause() error 1208 ErrorName() string 1209 } = TLSProperties_CertificateProperties_SubjectAltNameValidationError{}