github.com/cloudwan/edgelq-sdk@v1.15.4/iam/client/v1alpha2/authorization/authorization_custom.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/iam/proto/v1alpha2/authorization_custom.proto 3 // DO NOT EDIT!!! 4 5 package authorization_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 condition "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/condition" 24 permission "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/permission" 25 role "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/role" 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 _ = &condition.Condition{} 44 _ = &permission.Permission{} 45 _ = &role.Role{} 46 ) 47 48 func (obj *Check) 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 *ConditionalGrant) GotenValidate() error { 58 if obj == nil { 59 return nil 60 } 61 for idx, elem := range obj.ConditionBindings { 62 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 63 if err := subobj.GotenValidate(); err != nil { 64 return gotenvalidate.NewValidationError("ConditionalGrant", "conditionBindings", obj.ConditionBindings[idx], "nested object validation failed", err) 65 } 66 } 67 } 68 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 69 return cvobj.GotenCustomValidate() 70 } 71 return nil 72 } 73 func (obj *CheckResult) GotenValidate() error { 74 if obj == nil { 75 return nil 76 } 77 for idx, elem := range obj.ConditionallyGrantedPermissions { 78 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 79 if err := subobj.GotenValidate(); err != nil { 80 return gotenvalidate.NewValidationError("CheckResult", "conditionallyGrantedPermissions", obj.ConditionallyGrantedPermissions[idx], "nested object validation failed", err) 81 } 82 } 83 } 84 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 85 return cvobj.GotenCustomValidate() 86 } 87 return nil 88 } 89 func (obj *CheckPermissionsRequest) GotenValidate() error { 90 if obj == nil { 91 return nil 92 } 93 for idx, elem := range obj.Checks { 94 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 95 if err := subobj.GotenValidate(); err != nil { 96 return gotenvalidate.NewValidationError("CheckPermissionsRequest", "checks", obj.Checks[idx], "nested object validation failed", err) 97 } 98 } 99 } 100 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 101 return cvobj.GotenCustomValidate() 102 } 103 return nil 104 } 105 func (obj *CheckPermissionsResponse) GotenValidate() error { 106 if obj == nil { 107 return nil 108 } 109 for idx, elem := range obj.CheckResults { 110 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 111 if err := subobj.GotenValidate(); err != nil { 112 return gotenvalidate.NewValidationError("CheckPermissionsResponse", "checkResults", obj.CheckResults[idx], "nested object validation failed", err) 113 } 114 } 115 } 116 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 117 return cvobj.GotenCustomValidate() 118 } 119 return nil 120 } 121 func (obj *CheckMyPermissionsRequest) GotenValidate() error { 122 if obj == nil { 123 return nil 124 } 125 for idx, elem := range obj.Checks { 126 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 127 if err := subobj.GotenValidate(); err != nil { 128 return gotenvalidate.NewValidationError("CheckMyPermissionsRequest", "checks", obj.Checks[idx], "nested object validation failed", err) 129 } 130 } 131 } 132 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 133 return cvobj.GotenCustomValidate() 134 } 135 return nil 136 } 137 func (obj *CheckMyPermissionsResponse) GotenValidate() error { 138 if obj == nil { 139 return nil 140 } 141 for idx, elem := range obj.CheckResults { 142 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 143 if err := subobj.GotenValidate(); err != nil { 144 return gotenvalidate.NewValidationError("CheckMyPermissionsResponse", "checkResults", obj.CheckResults[idx], "nested object validation failed", err) 145 } 146 } 147 } 148 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 149 return cvobj.GotenCustomValidate() 150 } 151 return nil 152 } 153 func (obj *CheckMyRolesRequest) GotenValidate() error { 154 if obj == nil { 155 return nil 156 } 157 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 158 return cvobj.GotenCustomValidate() 159 } 160 return nil 161 } 162 func (obj *CheckMyRolesResponse) GotenValidate() error { 163 if obj == nil { 164 return nil 165 } 166 for idx, elem := range obj.ConditionallyGrantedRoles { 167 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 168 if err := subobj.GotenValidate(); err != nil { 169 return gotenvalidate.NewValidationError("CheckMyRolesResponse", "conditionallyGrantedRoles", obj.ConditionallyGrantedRoles[idx], "nested object validation failed", err) 170 } 171 } 172 } 173 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 174 return cvobj.GotenCustomValidate() 175 } 176 return nil 177 } 178 func (obj *CheckMyRolesResponse_ConditionalGrant) GotenValidate() error { 179 if obj == nil { 180 return nil 181 } 182 for idx, elem := range obj.ConditionBindings { 183 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 184 if err := subobj.GotenValidate(); err != nil { 185 return gotenvalidate.NewValidationError("ConditionalGrant", "conditionBindings", obj.ConditionBindings[idx], "nested object validation failed", err) 186 } 187 } 188 } 189 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 190 return cvobj.GotenCustomValidate() 191 } 192 return nil 193 }