github.com/cloudwan/edgelq-sdk@v1.15.4/iam/client/v1/user/user_custom.pb.validate.go (about)

     1  // Code generated by protoc-gen-goten-validate
     2  // File: edgelq/iam/proto/v1/user_custom.proto
     3  // DO NOT EDIT!!!
     4  
     5  package user_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  	user "github.com/cloudwan/edgelq-sdk/iam/resources/v1/user"
    24  	view "github.com/cloudwan/goten-sdk/types/view"
    25  	fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
    26  )
    27  
    28  var (
    29  	_ = bytes.Equal
    30  	_ = errors.New
    31  	_ = fmt.Errorf
    32  	_ = net.ParseIP
    33  	_ = regexp.Match
    34  	_ = strings.Split
    35  	_ = time.Now
    36  	_ = utf8.RuneCountInString
    37  	_ = url.Parse
    38  	_ = gotenvalidate.NewValidationError
    39  )
    40  
    41  // make sure we're using proto imports
    42  var (
    43  	_ = &user.User{}
    44  	_ = &fieldmaskpb.FieldMask{}
    45  	_ = view.View(0)
    46  )
    47  
    48  func (obj *GetUserByEmailRequest) GotenValidate() error {
    49  	if obj == nil {
    50  		return nil
    51  	}
    52  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    53  		return cvobj.GotenCustomValidate()
    54  	}
    55  	return nil
    56  }
    57  func (obj *BatchGetUsersByEmailRequest) GotenValidate() error {
    58  	if obj == nil {
    59  		return nil
    60  	}
    61  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    62  		return cvobj.GotenCustomValidate()
    63  	}
    64  	return nil
    65  }
    66  func (obj *BatchGetUsersByEmailResponse) GotenValidate() error {
    67  	if obj == nil {
    68  		return nil
    69  	}
    70  	for idx, elem := range obj.Users {
    71  		if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok {
    72  			if err := subobj.GotenValidate(); err != nil {
    73  				return gotenvalidate.NewValidationError("BatchGetUsersByEmailResponse", "users", obj.Users[idx], "nested object validation failed", err)
    74  			}
    75  		}
    76  	}
    77  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    78  		return cvobj.GotenCustomValidate()
    79  	}
    80  	return nil
    81  }
    82  func (obj *GetMySettingsRequest) GotenValidate() error {
    83  	if obj == nil {
    84  		return nil
    85  	}
    86  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    87  		return cvobj.GotenCustomValidate()
    88  	}
    89  	return nil
    90  }
    91  func (obj *GetMySettingsResponse) GotenValidate() error {
    92  	if obj == nil {
    93  		return nil
    94  	}
    95  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
    96  		return cvobj.GotenCustomValidate()
    97  	}
    98  	return nil
    99  }
   100  func (obj *SetMySettingsRequest) GotenValidate() error {
   101  	if obj == nil {
   102  		return nil
   103  	}
   104  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   105  		return cvobj.GotenCustomValidate()
   106  	}
   107  	return nil
   108  }
   109  func (obj *RefreshUserFromIdTokenRequest) GotenValidate() error {
   110  	if obj == nil {
   111  		return nil
   112  	}
   113  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   114  		return cvobj.GotenCustomValidate()
   115  	}
   116  	return nil
   117  }
   118  func (obj *RefreshUserFromIdTokenResponse) GotenValidate() error {
   119  	if obj == nil {
   120  		return nil
   121  	}
   122  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   123  		return cvobj.GotenCustomValidate()
   124  	}
   125  	return nil
   126  }
   127  func (obj *ResendVerificationEmailRequest) GotenValidate() error {
   128  	if obj == nil {
   129  		return nil
   130  	}
   131  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   132  		return cvobj.GotenCustomValidate()
   133  	}
   134  	return nil
   135  }
   136  func (obj *IsUserVerifiedRequest) GotenValidate() error {
   137  	if obj == nil {
   138  		return nil
   139  	}
   140  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   141  		return cvobj.GotenCustomValidate()
   142  	}
   143  	return nil
   144  }
   145  func (obj *ResetMFAIfRecoveryKeyUsedRequest) GotenValidate() error {
   146  	if obj == nil {
   147  		return nil
   148  	}
   149  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   150  		return cvobj.GotenCustomValidate()
   151  	}
   152  	return nil
   153  }
   154  func (obj *SetUsersNameInAuth0Request) GotenValidate() error {
   155  	if obj == nil {
   156  		return nil
   157  	}
   158  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   159  		return cvobj.GotenCustomValidate()
   160  	}
   161  	return nil
   162  }
   163  func (obj *DeleteUsersByCriteriaRequest) GotenValidate() error {
   164  	if obj == nil {
   165  		return nil
   166  	}
   167  	switch opt := obj.ToDelete.(type) {
   168  	case *DeleteUsersByCriteriaRequest_ByEmail:
   169  		if subobj, ok := interface{}(opt.ByEmail).(gotenvalidate.Validator); ok {
   170  			if err := subobj.GotenValidate(); err != nil {
   171  				return gotenvalidate.NewValidationError("DeleteUsersByCriteriaRequest", "byEmail", opt.ByEmail, "nested object validation failed", err)
   172  			}
   173  		}
   174  	case *DeleteUsersByCriteriaRequest_ByName:
   175  		if subobj, ok := interface{}(opt.ByName).(gotenvalidate.Validator); ok {
   176  			if err := subobj.GotenValidate(); err != nil {
   177  				return gotenvalidate.NewValidationError("DeleteUsersByCriteriaRequest", "byName", opt.ByName, "nested object validation failed", err)
   178  			}
   179  		}
   180  	default:
   181  		_ = opt
   182  	}
   183  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   184  		return cvobj.GotenCustomValidate()
   185  	}
   186  	return nil
   187  }
   188  func (obj *DeleteUsersByCriteriaRequest_UserEmails) GotenValidate() error {
   189  	if obj == nil {
   190  		return nil
   191  	}
   192  	if len(obj.Values) > 25 {
   193  		return gotenvalidate.NewValidationError("UserEmails", "values", obj.Values, "field must have at most 25 items", nil)
   194  	}
   195  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   196  		return cvobj.GotenCustomValidate()
   197  	}
   198  	return nil
   199  }
   200  func (obj *DeleteUsersByCriteriaRequest_UserNames) GotenValidate() error {
   201  	if obj == nil {
   202  		return nil
   203  	}
   204  	if len(obj.Values) > 25 {
   205  		return gotenvalidate.NewValidationError("UserNames", "values", obj.Values, "field must have at most 25 items", nil)
   206  	}
   207  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   208  		return cvobj.GotenCustomValidate()
   209  	}
   210  	return nil
   211  }
   212  func (obj *DeleteUsersByCriteriaResponse) GotenValidate() error {
   213  	if obj == nil {
   214  		return nil
   215  	}
   216  	if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok {
   217  		return cvobj.GotenCustomValidate()
   218  	}
   219  	return nil
   220  }