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

     1  // Code generated by protoc-gen-goten-validate
     2  // File: edgelq/iam/proto/v1alpha2/common.proto
     3  // DO NOT EDIT!!!
     4  
     5  package iam_common
     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  	meta_service "github.com/cloudwan/edgelq-sdk/meta/resources/v1alpha2/service"
    24  )
    25  
    26  var (
    27  	_ = bytes.Equal
    28  	_ = errors.New
    29  	_ = fmt.Errorf
    30  	_ = net.ParseIP
    31  	_ = regexp.Match
    32  	_ = strings.Split
    33  	_ = time.Now
    34  	_ = utf8.RuneCountInString
    35  	_ = url.Parse
    36  	_ = gotenvalidate.NewValidationError
    37  )
    38  
    39  // make sure we're using proto imports
    40  var (
    41  	_ = &meta_service.Service{}
    42  )
    43  
    44  func (obj *PCR) GotenValidate() error {
    45  	if obj == nil {
    46  		return nil
    47  	}
    48  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    49  		return cvobj.GotenCustomValidate()
    50  	}
    51  	return nil
    52  }
    53  func (obj *ServiceBusinessTier) GotenValidate() error {
    54  	if obj == nil {
    55  		return nil
    56  	}
    57  	if _, ok := BusinessTier_name[int32(obj.BusinessTier)]; !ok {
    58  		return gotenvalidate.NewValidationError("ServiceBusinessTier", "businessTier", obj.BusinessTier, "field must be a defined enum value", nil)
    59  	}
    60  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    61  		return cvobj.GotenCustomValidate()
    62  	}
    63  	return nil
    64  }
    65  func (obj *ServiceErrors) GotenValidate() error {
    66  	if obj == nil {
    67  		return nil
    68  	}
    69  	for idx, elem := range obj.Errors {
    70  		if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok {
    71  			if err := subobj.GotenValidate(); err != nil {
    72  				return gotenvalidate.NewValidationError("ServiceErrors", "errors", obj.Errors[idx], "nested object validation failed", err)
    73  			}
    74  		}
    75  	}
    76  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    77  		return cvobj.GotenCustomValidate()
    78  	}
    79  	return nil
    80  }
    81  func (obj *ServiceErrors_Error) GotenValidate() error {
    82  	if obj == nil {
    83  		return nil
    84  	}
    85  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    86  		return cvobj.GotenCustomValidate()
    87  	}
    88  	return nil
    89  }