github.com/cloudwan/edgelq-sdk@v1.15.4/audit/client/v1alpha2/activity_log/activity_log_custom.pb.validate.go (about)

     1  // Code generated by protoc-gen-goten-validate
     2  // File: edgelq/audit/proto/v1alpha2/activity_log_custom.proto
     3  // DO NOT EDIT!!!
     4  
     5  package activity_log_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  	activity_log "github.com/cloudwan/edgelq-sdk/audit/resources/v1alpha2/activity_log"
    24  	common "github.com/cloudwan/edgelq-sdk/audit/resources/v1alpha2/common"
    25  	rpc "github.com/cloudwan/edgelq-sdk/common/rpc"
    26  	iam_organization "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/organization"
    27  	iam_project "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/project"
    28  )
    29  
    30  var (
    31  	_ = bytes.Equal
    32  	_ = errors.New
    33  	_ = fmt.Errorf
    34  	_ = net.ParseIP
    35  	_ = regexp.Match
    36  	_ = strings.Split
    37  	_ = time.Now
    38  	_ = utf8.RuneCountInString
    39  	_ = url.Parse
    40  	_ = gotenvalidate.NewValidationError
    41  )
    42  
    43  // make sure we're using proto imports
    44  var (
    45  	_ = &activity_log.ActivityLog{}
    46  	_ = &common.Authentication{}
    47  	_ = &rpc.Status{}
    48  	_ = &iam_organization.Organization{}
    49  	_ = &iam_project.Project{}
    50  )
    51  
    52  func (obj *ListActivityLogsRequest) GotenValidate() error {
    53  	if obj == nil {
    54  		return nil
    55  	}
    56  	if obj.Interval == nil {
    57  		return gotenvalidate.NewValidationError("ListActivityLogsRequest", "interval", obj.Interval, "field is required", nil)
    58  	}
    59  	if subobj, ok := interface{}(obj.Interval).(gotenvalidate.Validator); ok {
    60  		if err := subobj.GotenValidate(); err != nil {
    61  			return gotenvalidate.NewValidationError("ListActivityLogsRequest", "interval", obj.Interval, "nested object validation failed", err)
    62  		}
    63  	}
    64  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    65  		return cvobj.GotenCustomValidate()
    66  	}
    67  	return nil
    68  }
    69  func (obj *ListActivityLogsResponse) GotenValidate() error {
    70  	if obj == nil {
    71  		return nil
    72  	}
    73  	for idx, elem := range obj.ActivityLogs {
    74  		if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok {
    75  			if err := subobj.GotenValidate(); err != nil {
    76  				return gotenvalidate.NewValidationError("ListActivityLogsResponse", "activityLogs", obj.ActivityLogs[idx], "nested object validation failed", err)
    77  			}
    78  		}
    79  	}
    80  	for idx, elem := range obj.ExecutionErrors {
    81  		if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok {
    82  			if err := subobj.GotenValidate(); err != nil {
    83  				return gotenvalidate.NewValidationError("ListActivityLogsResponse", "executionErrors", obj.ExecutionErrors[idx], "nested object validation failed", err)
    84  			}
    85  		}
    86  	}
    87  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    88  		return cvobj.GotenCustomValidate()
    89  	}
    90  	return nil
    91  }
    92  func (obj *ListActivityLogsResponse_ErrorDetails) GotenValidate() error {
    93  	if obj == nil {
    94  		return nil
    95  	}
    96  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    97  		return cvobj.GotenCustomValidate()
    98  	}
    99  	return nil
   100  }
   101  func (obj *CreateActivityLogsRequest) GotenValidate() error {
   102  	if obj == nil {
   103  		return nil
   104  	}
   105  	for idx, elem := range obj.ActivityLogs {
   106  		if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok {
   107  			if err := subobj.GotenValidate(); err != nil {
   108  				return gotenvalidate.NewValidationError("CreateActivityLogsRequest", "activityLogs", obj.ActivityLogs[idx], "nested object validation failed", err)
   109  			}
   110  		}
   111  	}
   112  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   113  		return cvobj.GotenCustomValidate()
   114  	}
   115  	return nil
   116  }
   117  func (obj *CreateActivityLogsResponse) GotenValidate() error {
   118  	if obj == nil {
   119  		return nil
   120  	}
   121  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   122  		return cvobj.GotenCustomValidate()
   123  	}
   124  	return nil
   125  }