github.com/cloudwan/edgelq-sdk@v1.15.4/alerting/client/v1/alert/alert_custom.pb.validate.go (about)

     1  // Code generated by protoc-gen-goten-validate
     2  // File: edgelq/alerting/proto/v1/alert_custom.proto
     3  // DO NOT EDIT!!!
     4  
     5  package alert_client
     6  
     7  import (
     8  	"bytes"
     9  	"errors"
    10  	"fmt"
    11  	"net"
    12  	"net/url"
    13  	"regexp"
    14  	"strings"
    15  	"time"
    16  	"unicode/utf8"
    17  
    18  	gotenvalidate "github.com/cloudwan/goten-sdk/runtime/validate"
    19  )
    20  
    21  // proto imports
    22  import (
    23  	alert "github.com/cloudwan/edgelq-sdk/alerting/resources/v1/alert"
    24  	log_condition "github.com/cloudwan/edgelq-sdk/alerting/resources/v1/log_condition"
    25  	notification_channel "github.com/cloudwan/edgelq-sdk/alerting/resources/v1/notification_channel"
    26  	ts_condition "github.com/cloudwan/edgelq-sdk/alerting/resources/v1/ts_condition"
    27  	iam_project "github.com/cloudwan/edgelq-sdk/iam/resources/v1/project"
    28  	fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
    29  )
    30  
    31  var (
    32  	_ = bytes.Equal
    33  	_ = errors.New
    34  	_ = fmt.Errorf
    35  	_ = net.ParseIP
    36  	_ = regexp.Match
    37  	_ = strings.Split
    38  	_ = time.Now
    39  	_ = utf8.RuneCountInString
    40  	_ = url.Parse
    41  	_ = gotenvalidate.NewValidationError
    42  )
    43  
    44  // make sure we're using proto imports
    45  var (
    46  	_ = &alert.Alert{}
    47  	_ = &log_condition.LogCondition{}
    48  	_ = &notification_channel.NotificationChannel{}
    49  	_ = &ts_condition.TsCondition{}
    50  	_ = &iam_project.Project{}
    51  	_ = &fieldmaskpb.FieldMask{}
    52  )
    53  
    54  func (obj *BulkSaveAlertsRequest) GotenValidate() error {
    55  	if obj == nil {
    56  		return nil
    57  	}
    58  	for idx, elem := range obj.Alerts {
    59  		if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok {
    60  			if err := subobj.GotenValidate(); err != nil {
    61  				return gotenvalidate.NewValidationError("BulkSaveAlertsRequest", "alerts", obj.Alerts[idx], "nested object validation failed", err)
    62  			}
    63  		}
    64  	}
    65  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    66  		return cvobj.GotenCustomValidate()
    67  	}
    68  	return nil
    69  }
    70  func (obj *BulkSaveAlertsResponse) GotenValidate() error {
    71  	if obj == nil {
    72  		return nil
    73  	}
    74  	for idx, elem := range obj.Alerts {
    75  		if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok {
    76  			if err := subobj.GotenValidate(); err != nil {
    77  				return gotenvalidate.NewValidationError("BulkSaveAlertsResponse", "alerts", obj.Alerts[idx], "nested object validation failed", err)
    78  			}
    79  		}
    80  	}
    81  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    82  		return cvobj.GotenCustomValidate()
    83  	}
    84  	return nil
    85  }
    86  func (obj *BulkMarkAsNotifiedRequest) GotenValidate() error {
    87  	if obj == nil {
    88  		return nil
    89  	}
    90  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    91  		return cvobj.GotenCustomValidate()
    92  	}
    93  	return nil
    94  }
    95  func (obj *BulkMarkAsNotifiedResponse) GotenValidate() error {
    96  	if obj == nil {
    97  		return nil
    98  	}
    99  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   100  		return cvobj.GotenCustomValidate()
   101  	}
   102  	return nil
   103  }