github.com/cloudwan/edgelq-sdk@v1.15.4/iam/resources/v1alpha2/condition/condition.pb.validate.go (about)

     1  // Code generated by protoc-gen-goten-validate
     2  // File: edgelq/iam/proto/v1alpha2/condition.proto
     3  // DO NOT EDIT!!!
     4  
     5  package condition
     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  	organization "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/organization"
    24  	project "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/project"
    25  	meta "github.com/cloudwan/goten-sdk/types/meta"
    26  	structpb "google.golang.org/protobuf/types/known/structpb"
    27  )
    28  
    29  var (
    30  	_ = bytes.Equal
    31  	_ = errors.New
    32  	_ = fmt.Errorf
    33  	_ = net.ParseIP
    34  	_ = regexp.Match
    35  	_ = strings.Split
    36  	_ = time.Now
    37  	_ = utf8.RuneCountInString
    38  	_ = url.Parse
    39  	_ = gotenvalidate.NewValidationError
    40  )
    41  
    42  // make sure we're using proto imports
    43  var (
    44  	_ = &organization.Organization{}
    45  	_ = &project.Project{}
    46  	_ = &structpb.Struct{}
    47  	_ = &meta.Meta{}
    48  )
    49  
    50  func (obj *Condition) GotenValidate() error {
    51  	if obj == nil {
    52  		return nil
    53  	}
    54  	for idx, elem := range obj.ParameterDeclarations {
    55  		if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok {
    56  			if err := subobj.GotenValidate(); err != nil {
    57  				return gotenvalidate.NewValidationError("Condition", "parameterDeclarations", obj.ParameterDeclarations[idx], "nested object validation failed", err)
    58  			}
    59  		}
    60  	}
    61  	if subobj, ok := interface{}(obj.Metadata).(gotenvalidate.Validator); ok {
    62  		if err := subobj.GotenValidate(); err != nil {
    63  			return gotenvalidate.NewValidationError("Condition", "metadata", obj.Metadata, "nested object validation failed", err)
    64  		}
    65  	}
    66  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    67  		return cvobj.GotenCustomValidate()
    68  	}
    69  	return nil
    70  }
    71  func (obj *Condition_ParameterDeclaration) GotenValidate() error {
    72  	if obj == nil {
    73  		return nil
    74  	}
    75  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    76  		return cvobj.GotenCustomValidate()
    77  	}
    78  	return nil
    79  }
    80  func (obj *ConditionBinding) GotenValidate() error {
    81  	if obj == nil {
    82  		return nil
    83  	}
    84  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    85  		return cvobj.GotenCustomValidate()
    86  	}
    87  	return nil
    88  }