Scott Baker | e7144bc | 2019-10-01 14:16:47 -0700 | [diff] [blame] | 1 | /* |
| 2 | Copyright The Kubernetes Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | // Code generated by protoc-gen-gogo. DO NOT EDIT. |
| 18 | // source: k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1/generated.proto |
| 19 | |
| 20 | /* |
| 21 | Package v1 is a generated protocol buffer package. |
| 22 | |
| 23 | It is generated from these files: |
| 24 | k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1/generated.proto |
| 25 | |
| 26 | It has these top-level messages: |
| 27 | ExtraValue |
| 28 | LocalSubjectAccessReview |
| 29 | NonResourceAttributes |
| 30 | NonResourceRule |
| 31 | ResourceAttributes |
| 32 | ResourceRule |
| 33 | SelfSubjectAccessReview |
| 34 | SelfSubjectAccessReviewSpec |
| 35 | SelfSubjectRulesReview |
| 36 | SelfSubjectRulesReviewSpec |
| 37 | SubjectAccessReview |
| 38 | SubjectAccessReviewSpec |
| 39 | SubjectAccessReviewStatus |
| 40 | SubjectRulesReviewStatus |
| 41 | */ |
| 42 | package v1 |
| 43 | |
| 44 | import proto "github.com/gogo/protobuf/proto" |
| 45 | import fmt "fmt" |
| 46 | import math "math" |
| 47 | |
| 48 | import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" |
| 49 | |
| 50 | import strings "strings" |
| 51 | import reflect "reflect" |
| 52 | |
| 53 | import io "io" |
| 54 | |
| 55 | // Reference imports to suppress errors if they are not otherwise used. |
| 56 | var _ = proto.Marshal |
| 57 | var _ = fmt.Errorf |
| 58 | var _ = math.Inf |
| 59 | |
| 60 | // This is a compile-time assertion to ensure that this generated file |
| 61 | // is compatible with the proto package it is being compiled against. |
| 62 | // A compilation error at this line likely means your copy of the |
| 63 | // proto package needs to be updated. |
| 64 | const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package |
| 65 | |
| 66 | func (m *ExtraValue) Reset() { *m = ExtraValue{} } |
| 67 | func (*ExtraValue) ProtoMessage() {} |
| 68 | func (*ExtraValue) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } |
| 69 | |
| 70 | func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } |
| 71 | func (*LocalSubjectAccessReview) ProtoMessage() {} |
| 72 | func (*LocalSubjectAccessReview) Descriptor() ([]byte, []int) { |
| 73 | return fileDescriptorGenerated, []int{1} |
| 74 | } |
| 75 | |
| 76 | func (m *NonResourceAttributes) Reset() { *m = NonResourceAttributes{} } |
| 77 | func (*NonResourceAttributes) ProtoMessage() {} |
| 78 | func (*NonResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } |
| 79 | |
| 80 | func (m *NonResourceRule) Reset() { *m = NonResourceRule{} } |
| 81 | func (*NonResourceRule) ProtoMessage() {} |
| 82 | func (*NonResourceRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } |
| 83 | |
| 84 | func (m *ResourceAttributes) Reset() { *m = ResourceAttributes{} } |
| 85 | func (*ResourceAttributes) ProtoMessage() {} |
| 86 | func (*ResourceAttributes) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } |
| 87 | |
| 88 | func (m *ResourceRule) Reset() { *m = ResourceRule{} } |
| 89 | func (*ResourceRule) ProtoMessage() {} |
| 90 | func (*ResourceRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } |
| 91 | |
| 92 | func (m *SelfSubjectAccessReview) Reset() { *m = SelfSubjectAccessReview{} } |
| 93 | func (*SelfSubjectAccessReview) ProtoMessage() {} |
| 94 | func (*SelfSubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } |
| 95 | |
| 96 | func (m *SelfSubjectAccessReviewSpec) Reset() { *m = SelfSubjectAccessReviewSpec{} } |
| 97 | func (*SelfSubjectAccessReviewSpec) ProtoMessage() {} |
| 98 | func (*SelfSubjectAccessReviewSpec) Descriptor() ([]byte, []int) { |
| 99 | return fileDescriptorGenerated, []int{7} |
| 100 | } |
| 101 | |
| 102 | func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} } |
| 103 | func (*SelfSubjectRulesReview) ProtoMessage() {} |
| 104 | func (*SelfSubjectRulesReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } |
| 105 | |
| 106 | func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} } |
| 107 | func (*SelfSubjectRulesReviewSpec) ProtoMessage() {} |
| 108 | func (*SelfSubjectRulesReviewSpec) Descriptor() ([]byte, []int) { |
| 109 | return fileDescriptorGenerated, []int{9} |
| 110 | } |
| 111 | |
| 112 | func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } |
| 113 | func (*SubjectAccessReview) ProtoMessage() {} |
| 114 | func (*SubjectAccessReview) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } |
| 115 | |
| 116 | func (m *SubjectAccessReviewSpec) Reset() { *m = SubjectAccessReviewSpec{} } |
| 117 | func (*SubjectAccessReviewSpec) ProtoMessage() {} |
| 118 | func (*SubjectAccessReviewSpec) Descriptor() ([]byte, []int) { |
| 119 | return fileDescriptorGenerated, []int{11} |
| 120 | } |
| 121 | |
| 122 | func (m *SubjectAccessReviewStatus) Reset() { *m = SubjectAccessReviewStatus{} } |
| 123 | func (*SubjectAccessReviewStatus) ProtoMessage() {} |
| 124 | func (*SubjectAccessReviewStatus) Descriptor() ([]byte, []int) { |
| 125 | return fileDescriptorGenerated, []int{12} |
| 126 | } |
| 127 | |
| 128 | func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} } |
| 129 | func (*SubjectRulesReviewStatus) ProtoMessage() {} |
| 130 | func (*SubjectRulesReviewStatus) Descriptor() ([]byte, []int) { |
| 131 | return fileDescriptorGenerated, []int{13} |
| 132 | } |
| 133 | |
| 134 | func init() { |
| 135 | proto.RegisterType((*ExtraValue)(nil), "k8s.io.api.authorization.v1.ExtraValue") |
| 136 | proto.RegisterType((*LocalSubjectAccessReview)(nil), "k8s.io.api.authorization.v1.LocalSubjectAccessReview") |
| 137 | proto.RegisterType((*NonResourceAttributes)(nil), "k8s.io.api.authorization.v1.NonResourceAttributes") |
| 138 | proto.RegisterType((*NonResourceRule)(nil), "k8s.io.api.authorization.v1.NonResourceRule") |
| 139 | proto.RegisterType((*ResourceAttributes)(nil), "k8s.io.api.authorization.v1.ResourceAttributes") |
| 140 | proto.RegisterType((*ResourceRule)(nil), "k8s.io.api.authorization.v1.ResourceRule") |
| 141 | proto.RegisterType((*SelfSubjectAccessReview)(nil), "k8s.io.api.authorization.v1.SelfSubjectAccessReview") |
| 142 | proto.RegisterType((*SelfSubjectAccessReviewSpec)(nil), "k8s.io.api.authorization.v1.SelfSubjectAccessReviewSpec") |
| 143 | proto.RegisterType((*SelfSubjectRulesReview)(nil), "k8s.io.api.authorization.v1.SelfSubjectRulesReview") |
| 144 | proto.RegisterType((*SelfSubjectRulesReviewSpec)(nil), "k8s.io.api.authorization.v1.SelfSubjectRulesReviewSpec") |
| 145 | proto.RegisterType((*SubjectAccessReview)(nil), "k8s.io.api.authorization.v1.SubjectAccessReview") |
| 146 | proto.RegisterType((*SubjectAccessReviewSpec)(nil), "k8s.io.api.authorization.v1.SubjectAccessReviewSpec") |
| 147 | proto.RegisterType((*SubjectAccessReviewStatus)(nil), "k8s.io.api.authorization.v1.SubjectAccessReviewStatus") |
| 148 | proto.RegisterType((*SubjectRulesReviewStatus)(nil), "k8s.io.api.authorization.v1.SubjectRulesReviewStatus") |
| 149 | } |
| 150 | func (m ExtraValue) Marshal() (dAtA []byte, err error) { |
| 151 | size := m.Size() |
| 152 | dAtA = make([]byte, size) |
| 153 | n, err := m.MarshalTo(dAtA) |
| 154 | if err != nil { |
| 155 | return nil, err |
| 156 | } |
| 157 | return dAtA[:n], nil |
| 158 | } |
| 159 | |
| 160 | func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) { |
| 161 | var i int |
| 162 | _ = i |
| 163 | var l int |
| 164 | _ = l |
| 165 | if len(m) > 0 { |
| 166 | for _, s := range m { |
| 167 | dAtA[i] = 0xa |
| 168 | i++ |
| 169 | l = len(s) |
| 170 | for l >= 1<<7 { |
| 171 | dAtA[i] = uint8(uint64(l)&0x7f | 0x80) |
| 172 | l >>= 7 |
| 173 | i++ |
| 174 | } |
| 175 | dAtA[i] = uint8(l) |
| 176 | i++ |
| 177 | i += copy(dAtA[i:], s) |
| 178 | } |
| 179 | } |
| 180 | return i, nil |
| 181 | } |
| 182 | |
| 183 | func (m *LocalSubjectAccessReview) Marshal() (dAtA []byte, err error) { |
| 184 | size := m.Size() |
| 185 | dAtA = make([]byte, size) |
| 186 | n, err := m.MarshalTo(dAtA) |
| 187 | if err != nil { |
| 188 | return nil, err |
| 189 | } |
| 190 | return dAtA[:n], nil |
| 191 | } |
| 192 | |
| 193 | func (m *LocalSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) { |
| 194 | var i int |
| 195 | _ = i |
| 196 | var l int |
| 197 | _ = l |
| 198 | dAtA[i] = 0xa |
| 199 | i++ |
| 200 | i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) |
| 201 | n1, err := m.ObjectMeta.MarshalTo(dAtA[i:]) |
| 202 | if err != nil { |
| 203 | return 0, err |
| 204 | } |
| 205 | i += n1 |
| 206 | dAtA[i] = 0x12 |
| 207 | i++ |
| 208 | i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) |
| 209 | n2, err := m.Spec.MarshalTo(dAtA[i:]) |
| 210 | if err != nil { |
| 211 | return 0, err |
| 212 | } |
| 213 | i += n2 |
| 214 | dAtA[i] = 0x1a |
| 215 | i++ |
| 216 | i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) |
| 217 | n3, err := m.Status.MarshalTo(dAtA[i:]) |
| 218 | if err != nil { |
| 219 | return 0, err |
| 220 | } |
| 221 | i += n3 |
| 222 | return i, nil |
| 223 | } |
| 224 | |
| 225 | func (m *NonResourceAttributes) Marshal() (dAtA []byte, err error) { |
| 226 | size := m.Size() |
| 227 | dAtA = make([]byte, size) |
| 228 | n, err := m.MarshalTo(dAtA) |
| 229 | if err != nil { |
| 230 | return nil, err |
| 231 | } |
| 232 | return dAtA[:n], nil |
| 233 | } |
| 234 | |
| 235 | func (m *NonResourceAttributes) MarshalTo(dAtA []byte) (int, error) { |
| 236 | var i int |
| 237 | _ = i |
| 238 | var l int |
| 239 | _ = l |
| 240 | dAtA[i] = 0xa |
| 241 | i++ |
| 242 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) |
| 243 | i += copy(dAtA[i:], m.Path) |
| 244 | dAtA[i] = 0x12 |
| 245 | i++ |
| 246 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb))) |
| 247 | i += copy(dAtA[i:], m.Verb) |
| 248 | return i, nil |
| 249 | } |
| 250 | |
| 251 | func (m *NonResourceRule) Marshal() (dAtA []byte, err error) { |
| 252 | size := m.Size() |
| 253 | dAtA = make([]byte, size) |
| 254 | n, err := m.MarshalTo(dAtA) |
| 255 | if err != nil { |
| 256 | return nil, err |
| 257 | } |
| 258 | return dAtA[:n], nil |
| 259 | } |
| 260 | |
| 261 | func (m *NonResourceRule) MarshalTo(dAtA []byte) (int, error) { |
| 262 | var i int |
| 263 | _ = i |
| 264 | var l int |
| 265 | _ = l |
| 266 | if len(m.Verbs) > 0 { |
| 267 | for _, s := range m.Verbs { |
| 268 | dAtA[i] = 0xa |
| 269 | i++ |
| 270 | l = len(s) |
| 271 | for l >= 1<<7 { |
| 272 | dAtA[i] = uint8(uint64(l)&0x7f | 0x80) |
| 273 | l >>= 7 |
| 274 | i++ |
| 275 | } |
| 276 | dAtA[i] = uint8(l) |
| 277 | i++ |
| 278 | i += copy(dAtA[i:], s) |
| 279 | } |
| 280 | } |
| 281 | if len(m.NonResourceURLs) > 0 { |
| 282 | for _, s := range m.NonResourceURLs { |
| 283 | dAtA[i] = 0x12 |
| 284 | i++ |
| 285 | l = len(s) |
| 286 | for l >= 1<<7 { |
| 287 | dAtA[i] = uint8(uint64(l)&0x7f | 0x80) |
| 288 | l >>= 7 |
| 289 | i++ |
| 290 | } |
| 291 | dAtA[i] = uint8(l) |
| 292 | i++ |
| 293 | i += copy(dAtA[i:], s) |
| 294 | } |
| 295 | } |
| 296 | return i, nil |
| 297 | } |
| 298 | |
| 299 | func (m *ResourceAttributes) Marshal() (dAtA []byte, err error) { |
| 300 | size := m.Size() |
| 301 | dAtA = make([]byte, size) |
| 302 | n, err := m.MarshalTo(dAtA) |
| 303 | if err != nil { |
| 304 | return nil, err |
| 305 | } |
| 306 | return dAtA[:n], nil |
| 307 | } |
| 308 | |
| 309 | func (m *ResourceAttributes) MarshalTo(dAtA []byte) (int, error) { |
| 310 | var i int |
| 311 | _ = i |
| 312 | var l int |
| 313 | _ = l |
| 314 | dAtA[i] = 0xa |
| 315 | i++ |
| 316 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) |
| 317 | i += copy(dAtA[i:], m.Namespace) |
| 318 | dAtA[i] = 0x12 |
| 319 | i++ |
| 320 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb))) |
| 321 | i += copy(dAtA[i:], m.Verb) |
| 322 | dAtA[i] = 0x1a |
| 323 | i++ |
| 324 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) |
| 325 | i += copy(dAtA[i:], m.Group) |
| 326 | dAtA[i] = 0x22 |
| 327 | i++ |
| 328 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) |
| 329 | i += copy(dAtA[i:], m.Version) |
| 330 | dAtA[i] = 0x2a |
| 331 | i++ |
| 332 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) |
| 333 | i += copy(dAtA[i:], m.Resource) |
| 334 | dAtA[i] = 0x32 |
| 335 | i++ |
| 336 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource))) |
| 337 | i += copy(dAtA[i:], m.Subresource) |
| 338 | dAtA[i] = 0x3a |
| 339 | i++ |
| 340 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) |
| 341 | i += copy(dAtA[i:], m.Name) |
| 342 | return i, nil |
| 343 | } |
| 344 | |
| 345 | func (m *ResourceRule) Marshal() (dAtA []byte, err error) { |
| 346 | size := m.Size() |
| 347 | dAtA = make([]byte, size) |
| 348 | n, err := m.MarshalTo(dAtA) |
| 349 | if err != nil { |
| 350 | return nil, err |
| 351 | } |
| 352 | return dAtA[:n], nil |
| 353 | } |
| 354 | |
| 355 | func (m *ResourceRule) MarshalTo(dAtA []byte) (int, error) { |
| 356 | var i int |
| 357 | _ = i |
| 358 | var l int |
| 359 | _ = l |
| 360 | if len(m.Verbs) > 0 { |
| 361 | for _, s := range m.Verbs { |
| 362 | dAtA[i] = 0xa |
| 363 | i++ |
| 364 | l = len(s) |
| 365 | for l >= 1<<7 { |
| 366 | dAtA[i] = uint8(uint64(l)&0x7f | 0x80) |
| 367 | l >>= 7 |
| 368 | i++ |
| 369 | } |
| 370 | dAtA[i] = uint8(l) |
| 371 | i++ |
| 372 | i += copy(dAtA[i:], s) |
| 373 | } |
| 374 | } |
| 375 | if len(m.APIGroups) > 0 { |
| 376 | for _, s := range m.APIGroups { |
| 377 | dAtA[i] = 0x12 |
| 378 | i++ |
| 379 | l = len(s) |
| 380 | for l >= 1<<7 { |
| 381 | dAtA[i] = uint8(uint64(l)&0x7f | 0x80) |
| 382 | l >>= 7 |
| 383 | i++ |
| 384 | } |
| 385 | dAtA[i] = uint8(l) |
| 386 | i++ |
| 387 | i += copy(dAtA[i:], s) |
| 388 | } |
| 389 | } |
| 390 | if len(m.Resources) > 0 { |
| 391 | for _, s := range m.Resources { |
| 392 | dAtA[i] = 0x1a |
| 393 | i++ |
| 394 | l = len(s) |
| 395 | for l >= 1<<7 { |
| 396 | dAtA[i] = uint8(uint64(l)&0x7f | 0x80) |
| 397 | l >>= 7 |
| 398 | i++ |
| 399 | } |
| 400 | dAtA[i] = uint8(l) |
| 401 | i++ |
| 402 | i += copy(dAtA[i:], s) |
| 403 | } |
| 404 | } |
| 405 | if len(m.ResourceNames) > 0 { |
| 406 | for _, s := range m.ResourceNames { |
| 407 | dAtA[i] = 0x22 |
| 408 | i++ |
| 409 | l = len(s) |
| 410 | for l >= 1<<7 { |
| 411 | dAtA[i] = uint8(uint64(l)&0x7f | 0x80) |
| 412 | l >>= 7 |
| 413 | i++ |
| 414 | } |
| 415 | dAtA[i] = uint8(l) |
| 416 | i++ |
| 417 | i += copy(dAtA[i:], s) |
| 418 | } |
| 419 | } |
| 420 | return i, nil |
| 421 | } |
| 422 | |
| 423 | func (m *SelfSubjectAccessReview) Marshal() (dAtA []byte, err error) { |
| 424 | size := m.Size() |
| 425 | dAtA = make([]byte, size) |
| 426 | n, err := m.MarshalTo(dAtA) |
| 427 | if err != nil { |
| 428 | return nil, err |
| 429 | } |
| 430 | return dAtA[:n], nil |
| 431 | } |
| 432 | |
| 433 | func (m *SelfSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) { |
| 434 | var i int |
| 435 | _ = i |
| 436 | var l int |
| 437 | _ = l |
| 438 | dAtA[i] = 0xa |
| 439 | i++ |
| 440 | i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) |
| 441 | n4, err := m.ObjectMeta.MarshalTo(dAtA[i:]) |
| 442 | if err != nil { |
| 443 | return 0, err |
| 444 | } |
| 445 | i += n4 |
| 446 | dAtA[i] = 0x12 |
| 447 | i++ |
| 448 | i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) |
| 449 | n5, err := m.Spec.MarshalTo(dAtA[i:]) |
| 450 | if err != nil { |
| 451 | return 0, err |
| 452 | } |
| 453 | i += n5 |
| 454 | dAtA[i] = 0x1a |
| 455 | i++ |
| 456 | i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) |
| 457 | n6, err := m.Status.MarshalTo(dAtA[i:]) |
| 458 | if err != nil { |
| 459 | return 0, err |
| 460 | } |
| 461 | i += n6 |
| 462 | return i, nil |
| 463 | } |
| 464 | |
| 465 | func (m *SelfSubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) { |
| 466 | size := m.Size() |
| 467 | dAtA = make([]byte, size) |
| 468 | n, err := m.MarshalTo(dAtA) |
| 469 | if err != nil { |
| 470 | return nil, err |
| 471 | } |
| 472 | return dAtA[:n], nil |
| 473 | } |
| 474 | |
| 475 | func (m *SelfSubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) { |
| 476 | var i int |
| 477 | _ = i |
| 478 | var l int |
| 479 | _ = l |
| 480 | if m.ResourceAttributes != nil { |
| 481 | dAtA[i] = 0xa |
| 482 | i++ |
| 483 | i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size())) |
| 484 | n7, err := m.ResourceAttributes.MarshalTo(dAtA[i:]) |
| 485 | if err != nil { |
| 486 | return 0, err |
| 487 | } |
| 488 | i += n7 |
| 489 | } |
| 490 | if m.NonResourceAttributes != nil { |
| 491 | dAtA[i] = 0x12 |
| 492 | i++ |
| 493 | i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size())) |
| 494 | n8, err := m.NonResourceAttributes.MarshalTo(dAtA[i:]) |
| 495 | if err != nil { |
| 496 | return 0, err |
| 497 | } |
| 498 | i += n8 |
| 499 | } |
| 500 | return i, nil |
| 501 | } |
| 502 | |
| 503 | func (m *SelfSubjectRulesReview) Marshal() (dAtA []byte, err error) { |
| 504 | size := m.Size() |
| 505 | dAtA = make([]byte, size) |
| 506 | n, err := m.MarshalTo(dAtA) |
| 507 | if err != nil { |
| 508 | return nil, err |
| 509 | } |
| 510 | return dAtA[:n], nil |
| 511 | } |
| 512 | |
| 513 | func (m *SelfSubjectRulesReview) MarshalTo(dAtA []byte) (int, error) { |
| 514 | var i int |
| 515 | _ = i |
| 516 | var l int |
| 517 | _ = l |
| 518 | dAtA[i] = 0xa |
| 519 | i++ |
| 520 | i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) |
| 521 | n9, err := m.ObjectMeta.MarshalTo(dAtA[i:]) |
| 522 | if err != nil { |
| 523 | return 0, err |
| 524 | } |
| 525 | i += n9 |
| 526 | dAtA[i] = 0x12 |
| 527 | i++ |
| 528 | i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) |
| 529 | n10, err := m.Spec.MarshalTo(dAtA[i:]) |
| 530 | if err != nil { |
| 531 | return 0, err |
| 532 | } |
| 533 | i += n10 |
| 534 | dAtA[i] = 0x1a |
| 535 | i++ |
| 536 | i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) |
| 537 | n11, err := m.Status.MarshalTo(dAtA[i:]) |
| 538 | if err != nil { |
| 539 | return 0, err |
| 540 | } |
| 541 | i += n11 |
| 542 | return i, nil |
| 543 | } |
| 544 | |
| 545 | func (m *SelfSubjectRulesReviewSpec) Marshal() (dAtA []byte, err error) { |
| 546 | size := m.Size() |
| 547 | dAtA = make([]byte, size) |
| 548 | n, err := m.MarshalTo(dAtA) |
| 549 | if err != nil { |
| 550 | return nil, err |
| 551 | } |
| 552 | return dAtA[:n], nil |
| 553 | } |
| 554 | |
| 555 | func (m *SelfSubjectRulesReviewSpec) MarshalTo(dAtA []byte) (int, error) { |
| 556 | var i int |
| 557 | _ = i |
| 558 | var l int |
| 559 | _ = l |
| 560 | dAtA[i] = 0xa |
| 561 | i++ |
| 562 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) |
| 563 | i += copy(dAtA[i:], m.Namespace) |
| 564 | return i, nil |
| 565 | } |
| 566 | |
| 567 | func (m *SubjectAccessReview) Marshal() (dAtA []byte, err error) { |
| 568 | size := m.Size() |
| 569 | dAtA = make([]byte, size) |
| 570 | n, err := m.MarshalTo(dAtA) |
| 571 | if err != nil { |
| 572 | return nil, err |
| 573 | } |
| 574 | return dAtA[:n], nil |
| 575 | } |
| 576 | |
| 577 | func (m *SubjectAccessReview) MarshalTo(dAtA []byte) (int, error) { |
| 578 | var i int |
| 579 | _ = i |
| 580 | var l int |
| 581 | _ = l |
| 582 | dAtA[i] = 0xa |
| 583 | i++ |
| 584 | i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) |
| 585 | n12, err := m.ObjectMeta.MarshalTo(dAtA[i:]) |
| 586 | if err != nil { |
| 587 | return 0, err |
| 588 | } |
| 589 | i += n12 |
| 590 | dAtA[i] = 0x12 |
| 591 | i++ |
| 592 | i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) |
| 593 | n13, err := m.Spec.MarshalTo(dAtA[i:]) |
| 594 | if err != nil { |
| 595 | return 0, err |
| 596 | } |
| 597 | i += n13 |
| 598 | dAtA[i] = 0x1a |
| 599 | i++ |
| 600 | i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) |
| 601 | n14, err := m.Status.MarshalTo(dAtA[i:]) |
| 602 | if err != nil { |
| 603 | return 0, err |
| 604 | } |
| 605 | i += n14 |
| 606 | return i, nil |
| 607 | } |
| 608 | |
| 609 | func (m *SubjectAccessReviewSpec) Marshal() (dAtA []byte, err error) { |
| 610 | size := m.Size() |
| 611 | dAtA = make([]byte, size) |
| 612 | n, err := m.MarshalTo(dAtA) |
| 613 | if err != nil { |
| 614 | return nil, err |
| 615 | } |
| 616 | return dAtA[:n], nil |
| 617 | } |
| 618 | |
| 619 | func (m *SubjectAccessReviewSpec) MarshalTo(dAtA []byte) (int, error) { |
| 620 | var i int |
| 621 | _ = i |
| 622 | var l int |
| 623 | _ = l |
| 624 | if m.ResourceAttributes != nil { |
| 625 | dAtA[i] = 0xa |
| 626 | i++ |
| 627 | i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceAttributes.Size())) |
| 628 | n15, err := m.ResourceAttributes.MarshalTo(dAtA[i:]) |
| 629 | if err != nil { |
| 630 | return 0, err |
| 631 | } |
| 632 | i += n15 |
| 633 | } |
| 634 | if m.NonResourceAttributes != nil { |
| 635 | dAtA[i] = 0x12 |
| 636 | i++ |
| 637 | i = encodeVarintGenerated(dAtA, i, uint64(m.NonResourceAttributes.Size())) |
| 638 | n16, err := m.NonResourceAttributes.MarshalTo(dAtA[i:]) |
| 639 | if err != nil { |
| 640 | return 0, err |
| 641 | } |
| 642 | i += n16 |
| 643 | } |
| 644 | dAtA[i] = 0x1a |
| 645 | i++ |
| 646 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.User))) |
| 647 | i += copy(dAtA[i:], m.User) |
| 648 | if len(m.Groups) > 0 { |
| 649 | for _, s := range m.Groups { |
| 650 | dAtA[i] = 0x22 |
| 651 | i++ |
| 652 | l = len(s) |
| 653 | for l >= 1<<7 { |
| 654 | dAtA[i] = uint8(uint64(l)&0x7f | 0x80) |
| 655 | l >>= 7 |
| 656 | i++ |
| 657 | } |
| 658 | dAtA[i] = uint8(l) |
| 659 | i++ |
| 660 | i += copy(dAtA[i:], s) |
| 661 | } |
| 662 | } |
| 663 | if len(m.Extra) > 0 { |
| 664 | keysForExtra := make([]string, 0, len(m.Extra)) |
| 665 | for k := range m.Extra { |
| 666 | keysForExtra = append(keysForExtra, string(k)) |
| 667 | } |
| 668 | github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) |
| 669 | for _, k := range keysForExtra { |
| 670 | dAtA[i] = 0x2a |
| 671 | i++ |
| 672 | v := m.Extra[string(k)] |
| 673 | msgSize := 0 |
| 674 | if (&v) != nil { |
| 675 | msgSize = (&v).Size() |
| 676 | msgSize += 1 + sovGenerated(uint64(msgSize)) |
| 677 | } |
| 678 | mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize |
| 679 | i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) |
| 680 | dAtA[i] = 0xa |
| 681 | i++ |
| 682 | i = encodeVarintGenerated(dAtA, i, uint64(len(k))) |
| 683 | i += copy(dAtA[i:], k) |
| 684 | dAtA[i] = 0x12 |
| 685 | i++ |
| 686 | i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) |
| 687 | n17, err := (&v).MarshalTo(dAtA[i:]) |
| 688 | if err != nil { |
| 689 | return 0, err |
| 690 | } |
| 691 | i += n17 |
| 692 | } |
| 693 | } |
| 694 | dAtA[i] = 0x32 |
| 695 | i++ |
| 696 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) |
| 697 | i += copy(dAtA[i:], m.UID) |
| 698 | return i, nil |
| 699 | } |
| 700 | |
| 701 | func (m *SubjectAccessReviewStatus) Marshal() (dAtA []byte, err error) { |
| 702 | size := m.Size() |
| 703 | dAtA = make([]byte, size) |
| 704 | n, err := m.MarshalTo(dAtA) |
| 705 | if err != nil { |
| 706 | return nil, err |
| 707 | } |
| 708 | return dAtA[:n], nil |
| 709 | } |
| 710 | |
| 711 | func (m *SubjectAccessReviewStatus) MarshalTo(dAtA []byte) (int, error) { |
| 712 | var i int |
| 713 | _ = i |
| 714 | var l int |
| 715 | _ = l |
| 716 | dAtA[i] = 0x8 |
| 717 | i++ |
| 718 | if m.Allowed { |
| 719 | dAtA[i] = 1 |
| 720 | } else { |
| 721 | dAtA[i] = 0 |
| 722 | } |
| 723 | i++ |
| 724 | dAtA[i] = 0x12 |
| 725 | i++ |
| 726 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) |
| 727 | i += copy(dAtA[i:], m.Reason) |
| 728 | dAtA[i] = 0x1a |
| 729 | i++ |
| 730 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError))) |
| 731 | i += copy(dAtA[i:], m.EvaluationError) |
| 732 | dAtA[i] = 0x20 |
| 733 | i++ |
| 734 | if m.Denied { |
| 735 | dAtA[i] = 1 |
| 736 | } else { |
| 737 | dAtA[i] = 0 |
| 738 | } |
| 739 | i++ |
| 740 | return i, nil |
| 741 | } |
| 742 | |
| 743 | func (m *SubjectRulesReviewStatus) Marshal() (dAtA []byte, err error) { |
| 744 | size := m.Size() |
| 745 | dAtA = make([]byte, size) |
| 746 | n, err := m.MarshalTo(dAtA) |
| 747 | if err != nil { |
| 748 | return nil, err |
| 749 | } |
| 750 | return dAtA[:n], nil |
| 751 | } |
| 752 | |
| 753 | func (m *SubjectRulesReviewStatus) MarshalTo(dAtA []byte) (int, error) { |
| 754 | var i int |
| 755 | _ = i |
| 756 | var l int |
| 757 | _ = l |
| 758 | if len(m.ResourceRules) > 0 { |
| 759 | for _, msg := range m.ResourceRules { |
| 760 | dAtA[i] = 0xa |
| 761 | i++ |
| 762 | i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) |
| 763 | n, err := msg.MarshalTo(dAtA[i:]) |
| 764 | if err != nil { |
| 765 | return 0, err |
| 766 | } |
| 767 | i += n |
| 768 | } |
| 769 | } |
| 770 | if len(m.NonResourceRules) > 0 { |
| 771 | for _, msg := range m.NonResourceRules { |
| 772 | dAtA[i] = 0x12 |
| 773 | i++ |
| 774 | i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) |
| 775 | n, err := msg.MarshalTo(dAtA[i:]) |
| 776 | if err != nil { |
| 777 | return 0, err |
| 778 | } |
| 779 | i += n |
| 780 | } |
| 781 | } |
| 782 | dAtA[i] = 0x18 |
| 783 | i++ |
| 784 | if m.Incomplete { |
| 785 | dAtA[i] = 1 |
| 786 | } else { |
| 787 | dAtA[i] = 0 |
| 788 | } |
| 789 | i++ |
| 790 | dAtA[i] = 0x22 |
| 791 | i++ |
| 792 | i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError))) |
| 793 | i += copy(dAtA[i:], m.EvaluationError) |
| 794 | return i, nil |
| 795 | } |
| 796 | |
| 797 | func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { |
| 798 | for v >= 1<<7 { |
| 799 | dAtA[offset] = uint8(v&0x7f | 0x80) |
| 800 | v >>= 7 |
| 801 | offset++ |
| 802 | } |
| 803 | dAtA[offset] = uint8(v) |
| 804 | return offset + 1 |
| 805 | } |
| 806 | func (m ExtraValue) Size() (n int) { |
| 807 | var l int |
| 808 | _ = l |
| 809 | if len(m) > 0 { |
| 810 | for _, s := range m { |
| 811 | l = len(s) |
| 812 | n += 1 + l + sovGenerated(uint64(l)) |
| 813 | } |
| 814 | } |
| 815 | return n |
| 816 | } |
| 817 | |
| 818 | func (m *LocalSubjectAccessReview) Size() (n int) { |
| 819 | var l int |
| 820 | _ = l |
| 821 | l = m.ObjectMeta.Size() |
| 822 | n += 1 + l + sovGenerated(uint64(l)) |
| 823 | l = m.Spec.Size() |
| 824 | n += 1 + l + sovGenerated(uint64(l)) |
| 825 | l = m.Status.Size() |
| 826 | n += 1 + l + sovGenerated(uint64(l)) |
| 827 | return n |
| 828 | } |
| 829 | |
| 830 | func (m *NonResourceAttributes) Size() (n int) { |
| 831 | var l int |
| 832 | _ = l |
| 833 | l = len(m.Path) |
| 834 | n += 1 + l + sovGenerated(uint64(l)) |
| 835 | l = len(m.Verb) |
| 836 | n += 1 + l + sovGenerated(uint64(l)) |
| 837 | return n |
| 838 | } |
| 839 | |
| 840 | func (m *NonResourceRule) Size() (n int) { |
| 841 | var l int |
| 842 | _ = l |
| 843 | if len(m.Verbs) > 0 { |
| 844 | for _, s := range m.Verbs { |
| 845 | l = len(s) |
| 846 | n += 1 + l + sovGenerated(uint64(l)) |
| 847 | } |
| 848 | } |
| 849 | if len(m.NonResourceURLs) > 0 { |
| 850 | for _, s := range m.NonResourceURLs { |
| 851 | l = len(s) |
| 852 | n += 1 + l + sovGenerated(uint64(l)) |
| 853 | } |
| 854 | } |
| 855 | return n |
| 856 | } |
| 857 | |
| 858 | func (m *ResourceAttributes) Size() (n int) { |
| 859 | var l int |
| 860 | _ = l |
| 861 | l = len(m.Namespace) |
| 862 | n += 1 + l + sovGenerated(uint64(l)) |
| 863 | l = len(m.Verb) |
| 864 | n += 1 + l + sovGenerated(uint64(l)) |
| 865 | l = len(m.Group) |
| 866 | n += 1 + l + sovGenerated(uint64(l)) |
| 867 | l = len(m.Version) |
| 868 | n += 1 + l + sovGenerated(uint64(l)) |
| 869 | l = len(m.Resource) |
| 870 | n += 1 + l + sovGenerated(uint64(l)) |
| 871 | l = len(m.Subresource) |
| 872 | n += 1 + l + sovGenerated(uint64(l)) |
| 873 | l = len(m.Name) |
| 874 | n += 1 + l + sovGenerated(uint64(l)) |
| 875 | return n |
| 876 | } |
| 877 | |
| 878 | func (m *ResourceRule) Size() (n int) { |
| 879 | var l int |
| 880 | _ = l |
| 881 | if len(m.Verbs) > 0 { |
| 882 | for _, s := range m.Verbs { |
| 883 | l = len(s) |
| 884 | n += 1 + l + sovGenerated(uint64(l)) |
| 885 | } |
| 886 | } |
| 887 | if len(m.APIGroups) > 0 { |
| 888 | for _, s := range m.APIGroups { |
| 889 | l = len(s) |
| 890 | n += 1 + l + sovGenerated(uint64(l)) |
| 891 | } |
| 892 | } |
| 893 | if len(m.Resources) > 0 { |
| 894 | for _, s := range m.Resources { |
| 895 | l = len(s) |
| 896 | n += 1 + l + sovGenerated(uint64(l)) |
| 897 | } |
| 898 | } |
| 899 | if len(m.ResourceNames) > 0 { |
| 900 | for _, s := range m.ResourceNames { |
| 901 | l = len(s) |
| 902 | n += 1 + l + sovGenerated(uint64(l)) |
| 903 | } |
| 904 | } |
| 905 | return n |
| 906 | } |
| 907 | |
| 908 | func (m *SelfSubjectAccessReview) Size() (n int) { |
| 909 | var l int |
| 910 | _ = l |
| 911 | l = m.ObjectMeta.Size() |
| 912 | n += 1 + l + sovGenerated(uint64(l)) |
| 913 | l = m.Spec.Size() |
| 914 | n += 1 + l + sovGenerated(uint64(l)) |
| 915 | l = m.Status.Size() |
| 916 | n += 1 + l + sovGenerated(uint64(l)) |
| 917 | return n |
| 918 | } |
| 919 | |
| 920 | func (m *SelfSubjectAccessReviewSpec) Size() (n int) { |
| 921 | var l int |
| 922 | _ = l |
| 923 | if m.ResourceAttributes != nil { |
| 924 | l = m.ResourceAttributes.Size() |
| 925 | n += 1 + l + sovGenerated(uint64(l)) |
| 926 | } |
| 927 | if m.NonResourceAttributes != nil { |
| 928 | l = m.NonResourceAttributes.Size() |
| 929 | n += 1 + l + sovGenerated(uint64(l)) |
| 930 | } |
| 931 | return n |
| 932 | } |
| 933 | |
| 934 | func (m *SelfSubjectRulesReview) Size() (n int) { |
| 935 | var l int |
| 936 | _ = l |
| 937 | l = m.ObjectMeta.Size() |
| 938 | n += 1 + l + sovGenerated(uint64(l)) |
| 939 | l = m.Spec.Size() |
| 940 | n += 1 + l + sovGenerated(uint64(l)) |
| 941 | l = m.Status.Size() |
| 942 | n += 1 + l + sovGenerated(uint64(l)) |
| 943 | return n |
| 944 | } |
| 945 | |
| 946 | func (m *SelfSubjectRulesReviewSpec) Size() (n int) { |
| 947 | var l int |
| 948 | _ = l |
| 949 | l = len(m.Namespace) |
| 950 | n += 1 + l + sovGenerated(uint64(l)) |
| 951 | return n |
| 952 | } |
| 953 | |
| 954 | func (m *SubjectAccessReview) Size() (n int) { |
| 955 | var l int |
| 956 | _ = l |
| 957 | l = m.ObjectMeta.Size() |
| 958 | n += 1 + l + sovGenerated(uint64(l)) |
| 959 | l = m.Spec.Size() |
| 960 | n += 1 + l + sovGenerated(uint64(l)) |
| 961 | l = m.Status.Size() |
| 962 | n += 1 + l + sovGenerated(uint64(l)) |
| 963 | return n |
| 964 | } |
| 965 | |
| 966 | func (m *SubjectAccessReviewSpec) Size() (n int) { |
| 967 | var l int |
| 968 | _ = l |
| 969 | if m.ResourceAttributes != nil { |
| 970 | l = m.ResourceAttributes.Size() |
| 971 | n += 1 + l + sovGenerated(uint64(l)) |
| 972 | } |
| 973 | if m.NonResourceAttributes != nil { |
| 974 | l = m.NonResourceAttributes.Size() |
| 975 | n += 1 + l + sovGenerated(uint64(l)) |
| 976 | } |
| 977 | l = len(m.User) |
| 978 | n += 1 + l + sovGenerated(uint64(l)) |
| 979 | if len(m.Groups) > 0 { |
| 980 | for _, s := range m.Groups { |
| 981 | l = len(s) |
| 982 | n += 1 + l + sovGenerated(uint64(l)) |
| 983 | } |
| 984 | } |
| 985 | if len(m.Extra) > 0 { |
| 986 | for k, v := range m.Extra { |
| 987 | _ = k |
| 988 | _ = v |
| 989 | l = v.Size() |
| 990 | mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) |
| 991 | n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) |
| 992 | } |
| 993 | } |
| 994 | l = len(m.UID) |
| 995 | n += 1 + l + sovGenerated(uint64(l)) |
| 996 | return n |
| 997 | } |
| 998 | |
| 999 | func (m *SubjectAccessReviewStatus) Size() (n int) { |
| 1000 | var l int |
| 1001 | _ = l |
| 1002 | n += 2 |
| 1003 | l = len(m.Reason) |
| 1004 | n += 1 + l + sovGenerated(uint64(l)) |
| 1005 | l = len(m.EvaluationError) |
| 1006 | n += 1 + l + sovGenerated(uint64(l)) |
| 1007 | n += 2 |
| 1008 | return n |
| 1009 | } |
| 1010 | |
| 1011 | func (m *SubjectRulesReviewStatus) Size() (n int) { |
| 1012 | var l int |
| 1013 | _ = l |
| 1014 | if len(m.ResourceRules) > 0 { |
| 1015 | for _, e := range m.ResourceRules { |
| 1016 | l = e.Size() |
| 1017 | n += 1 + l + sovGenerated(uint64(l)) |
| 1018 | } |
| 1019 | } |
| 1020 | if len(m.NonResourceRules) > 0 { |
| 1021 | for _, e := range m.NonResourceRules { |
| 1022 | l = e.Size() |
| 1023 | n += 1 + l + sovGenerated(uint64(l)) |
| 1024 | } |
| 1025 | } |
| 1026 | n += 2 |
| 1027 | l = len(m.EvaluationError) |
| 1028 | n += 1 + l + sovGenerated(uint64(l)) |
| 1029 | return n |
| 1030 | } |
| 1031 | |
| 1032 | func sovGenerated(x uint64) (n int) { |
| 1033 | for { |
| 1034 | n++ |
| 1035 | x >>= 7 |
| 1036 | if x == 0 { |
| 1037 | break |
| 1038 | } |
| 1039 | } |
| 1040 | return n |
| 1041 | } |
| 1042 | func sozGenerated(x uint64) (n int) { |
| 1043 | return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
| 1044 | } |
| 1045 | func (this *LocalSubjectAccessReview) String() string { |
| 1046 | if this == nil { |
| 1047 | return "nil" |
| 1048 | } |
| 1049 | s := strings.Join([]string{`&LocalSubjectAccessReview{`, |
| 1050 | `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, |
| 1051 | `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, |
| 1052 | `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, |
| 1053 | `}`, |
| 1054 | }, "") |
| 1055 | return s |
| 1056 | } |
| 1057 | func (this *NonResourceAttributes) String() string { |
| 1058 | if this == nil { |
| 1059 | return "nil" |
| 1060 | } |
| 1061 | s := strings.Join([]string{`&NonResourceAttributes{`, |
| 1062 | `Path:` + fmt.Sprintf("%v", this.Path) + `,`, |
| 1063 | `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`, |
| 1064 | `}`, |
| 1065 | }, "") |
| 1066 | return s |
| 1067 | } |
| 1068 | func (this *NonResourceRule) String() string { |
| 1069 | if this == nil { |
| 1070 | return "nil" |
| 1071 | } |
| 1072 | s := strings.Join([]string{`&NonResourceRule{`, |
| 1073 | `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, |
| 1074 | `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`, |
| 1075 | `}`, |
| 1076 | }, "") |
| 1077 | return s |
| 1078 | } |
| 1079 | func (this *ResourceAttributes) String() string { |
| 1080 | if this == nil { |
| 1081 | return "nil" |
| 1082 | } |
| 1083 | s := strings.Join([]string{`&ResourceAttributes{`, |
| 1084 | `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, |
| 1085 | `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`, |
| 1086 | `Group:` + fmt.Sprintf("%v", this.Group) + `,`, |
| 1087 | `Version:` + fmt.Sprintf("%v", this.Version) + `,`, |
| 1088 | `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, |
| 1089 | `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`, |
| 1090 | `Name:` + fmt.Sprintf("%v", this.Name) + `,`, |
| 1091 | `}`, |
| 1092 | }, "") |
| 1093 | return s |
| 1094 | } |
| 1095 | func (this *ResourceRule) String() string { |
| 1096 | if this == nil { |
| 1097 | return "nil" |
| 1098 | } |
| 1099 | s := strings.Join([]string{`&ResourceRule{`, |
| 1100 | `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, |
| 1101 | `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, |
| 1102 | `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, |
| 1103 | `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, |
| 1104 | `}`, |
| 1105 | }, "") |
| 1106 | return s |
| 1107 | } |
| 1108 | func (this *SelfSubjectAccessReview) String() string { |
| 1109 | if this == nil { |
| 1110 | return "nil" |
| 1111 | } |
| 1112 | s := strings.Join([]string{`&SelfSubjectAccessReview{`, |
| 1113 | `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, |
| 1114 | `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectAccessReviewSpec", "SelfSubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, |
| 1115 | `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, |
| 1116 | `}`, |
| 1117 | }, "") |
| 1118 | return s |
| 1119 | } |
| 1120 | func (this *SelfSubjectAccessReviewSpec) String() string { |
| 1121 | if this == nil { |
| 1122 | return "nil" |
| 1123 | } |
| 1124 | s := strings.Join([]string{`&SelfSubjectAccessReviewSpec{`, |
| 1125 | `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`, |
| 1126 | `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`, |
| 1127 | `}`, |
| 1128 | }, "") |
| 1129 | return s |
| 1130 | } |
| 1131 | func (this *SelfSubjectRulesReview) String() string { |
| 1132 | if this == nil { |
| 1133 | return "nil" |
| 1134 | } |
| 1135 | s := strings.Join([]string{`&SelfSubjectRulesReview{`, |
| 1136 | `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, |
| 1137 | `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectRulesReviewSpec", "SelfSubjectRulesReviewSpec", 1), `&`, ``, 1) + `,`, |
| 1138 | `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectRulesReviewStatus", "SubjectRulesReviewStatus", 1), `&`, ``, 1) + `,`, |
| 1139 | `}`, |
| 1140 | }, "") |
| 1141 | return s |
| 1142 | } |
| 1143 | func (this *SelfSubjectRulesReviewSpec) String() string { |
| 1144 | if this == nil { |
| 1145 | return "nil" |
| 1146 | } |
| 1147 | s := strings.Join([]string{`&SelfSubjectRulesReviewSpec{`, |
| 1148 | `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, |
| 1149 | `}`, |
| 1150 | }, "") |
| 1151 | return s |
| 1152 | } |
| 1153 | func (this *SubjectAccessReview) String() string { |
| 1154 | if this == nil { |
| 1155 | return "nil" |
| 1156 | } |
| 1157 | s := strings.Join([]string{`&SubjectAccessReview{`, |
| 1158 | `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, |
| 1159 | `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectAccessReviewSpec", "SubjectAccessReviewSpec", 1), `&`, ``, 1) + `,`, |
| 1160 | `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectAccessReviewStatus", "SubjectAccessReviewStatus", 1), `&`, ``, 1) + `,`, |
| 1161 | `}`, |
| 1162 | }, "") |
| 1163 | return s |
| 1164 | } |
| 1165 | func (this *SubjectAccessReviewSpec) String() string { |
| 1166 | if this == nil { |
| 1167 | return "nil" |
| 1168 | } |
| 1169 | keysForExtra := make([]string, 0, len(this.Extra)) |
| 1170 | for k := range this.Extra { |
| 1171 | keysForExtra = append(keysForExtra, k) |
| 1172 | } |
| 1173 | github_com_gogo_protobuf_sortkeys.Strings(keysForExtra) |
| 1174 | mapStringForExtra := "map[string]ExtraValue{" |
| 1175 | for _, k := range keysForExtra { |
| 1176 | mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) |
| 1177 | } |
| 1178 | mapStringForExtra += "}" |
| 1179 | s := strings.Join([]string{`&SubjectAccessReviewSpec{`, |
| 1180 | `ResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.ResourceAttributes), "ResourceAttributes", "ResourceAttributes", 1) + `,`, |
| 1181 | `NonResourceAttributes:` + strings.Replace(fmt.Sprintf("%v", this.NonResourceAttributes), "NonResourceAttributes", "NonResourceAttributes", 1) + `,`, |
| 1182 | `User:` + fmt.Sprintf("%v", this.User) + `,`, |
| 1183 | `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, |
| 1184 | `Extra:` + mapStringForExtra + `,`, |
| 1185 | `UID:` + fmt.Sprintf("%v", this.UID) + `,`, |
| 1186 | `}`, |
| 1187 | }, "") |
| 1188 | return s |
| 1189 | } |
| 1190 | func (this *SubjectAccessReviewStatus) String() string { |
| 1191 | if this == nil { |
| 1192 | return "nil" |
| 1193 | } |
| 1194 | s := strings.Join([]string{`&SubjectAccessReviewStatus{`, |
| 1195 | `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`, |
| 1196 | `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, |
| 1197 | `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`, |
| 1198 | `Denied:` + fmt.Sprintf("%v", this.Denied) + `,`, |
| 1199 | `}`, |
| 1200 | }, "") |
| 1201 | return s |
| 1202 | } |
| 1203 | func (this *SubjectRulesReviewStatus) String() string { |
| 1204 | if this == nil { |
| 1205 | return "nil" |
| 1206 | } |
| 1207 | s := strings.Join([]string{`&SubjectRulesReviewStatus{`, |
| 1208 | `ResourceRules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResourceRules), "ResourceRule", "ResourceRule", 1), `&`, ``, 1) + `,`, |
| 1209 | `NonResourceRules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NonResourceRules), "NonResourceRule", "NonResourceRule", 1), `&`, ``, 1) + `,`, |
| 1210 | `Incomplete:` + fmt.Sprintf("%v", this.Incomplete) + `,`, |
| 1211 | `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`, |
| 1212 | `}`, |
| 1213 | }, "") |
| 1214 | return s |
| 1215 | } |
| 1216 | func valueToStringGenerated(v interface{}) string { |
| 1217 | rv := reflect.ValueOf(v) |
| 1218 | if rv.IsNil() { |
| 1219 | return "nil" |
| 1220 | } |
| 1221 | pv := reflect.Indirect(rv).Interface() |
| 1222 | return fmt.Sprintf("*%v", pv) |
| 1223 | } |
| 1224 | func (m *ExtraValue) Unmarshal(dAtA []byte) error { |
| 1225 | l := len(dAtA) |
| 1226 | iNdEx := 0 |
| 1227 | for iNdEx < l { |
| 1228 | preIndex := iNdEx |
| 1229 | var wire uint64 |
| 1230 | for shift := uint(0); ; shift += 7 { |
| 1231 | if shift >= 64 { |
| 1232 | return ErrIntOverflowGenerated |
| 1233 | } |
| 1234 | if iNdEx >= l { |
| 1235 | return io.ErrUnexpectedEOF |
| 1236 | } |
| 1237 | b := dAtA[iNdEx] |
| 1238 | iNdEx++ |
| 1239 | wire |= (uint64(b) & 0x7F) << shift |
| 1240 | if b < 0x80 { |
| 1241 | break |
| 1242 | } |
| 1243 | } |
| 1244 | fieldNum := int32(wire >> 3) |
| 1245 | wireType := int(wire & 0x7) |
| 1246 | if wireType == 4 { |
| 1247 | return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group") |
| 1248 | } |
| 1249 | if fieldNum <= 0 { |
| 1250 | return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1251 | } |
| 1252 | switch fieldNum { |
| 1253 | case 1: |
| 1254 | if wireType != 2 { |
| 1255 | return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) |
| 1256 | } |
| 1257 | var stringLen uint64 |
| 1258 | for shift := uint(0); ; shift += 7 { |
| 1259 | if shift >= 64 { |
| 1260 | return ErrIntOverflowGenerated |
| 1261 | } |
| 1262 | if iNdEx >= l { |
| 1263 | return io.ErrUnexpectedEOF |
| 1264 | } |
| 1265 | b := dAtA[iNdEx] |
| 1266 | iNdEx++ |
| 1267 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1268 | if b < 0x80 { |
| 1269 | break |
| 1270 | } |
| 1271 | } |
| 1272 | intStringLen := int(stringLen) |
| 1273 | if intStringLen < 0 { |
| 1274 | return ErrInvalidLengthGenerated |
| 1275 | } |
| 1276 | postIndex := iNdEx + intStringLen |
| 1277 | if postIndex > l { |
| 1278 | return io.ErrUnexpectedEOF |
| 1279 | } |
| 1280 | *m = append(*m, string(dAtA[iNdEx:postIndex])) |
| 1281 | iNdEx = postIndex |
| 1282 | default: |
| 1283 | iNdEx = preIndex |
| 1284 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 1285 | if err != nil { |
| 1286 | return err |
| 1287 | } |
| 1288 | if skippy < 0 { |
| 1289 | return ErrInvalidLengthGenerated |
| 1290 | } |
| 1291 | if (iNdEx + skippy) > l { |
| 1292 | return io.ErrUnexpectedEOF |
| 1293 | } |
| 1294 | iNdEx += skippy |
| 1295 | } |
| 1296 | } |
| 1297 | |
| 1298 | if iNdEx > l { |
| 1299 | return io.ErrUnexpectedEOF |
| 1300 | } |
| 1301 | return nil |
| 1302 | } |
| 1303 | func (m *LocalSubjectAccessReview) Unmarshal(dAtA []byte) error { |
| 1304 | l := len(dAtA) |
| 1305 | iNdEx := 0 |
| 1306 | for iNdEx < l { |
| 1307 | preIndex := iNdEx |
| 1308 | var wire uint64 |
| 1309 | for shift := uint(0); ; shift += 7 { |
| 1310 | if shift >= 64 { |
| 1311 | return ErrIntOverflowGenerated |
| 1312 | } |
| 1313 | if iNdEx >= l { |
| 1314 | return io.ErrUnexpectedEOF |
| 1315 | } |
| 1316 | b := dAtA[iNdEx] |
| 1317 | iNdEx++ |
| 1318 | wire |= (uint64(b) & 0x7F) << shift |
| 1319 | if b < 0x80 { |
| 1320 | break |
| 1321 | } |
| 1322 | } |
| 1323 | fieldNum := int32(wire >> 3) |
| 1324 | wireType := int(wire & 0x7) |
| 1325 | if wireType == 4 { |
| 1326 | return fmt.Errorf("proto: LocalSubjectAccessReview: wiretype end group for non-group") |
| 1327 | } |
| 1328 | if fieldNum <= 0 { |
| 1329 | return fmt.Errorf("proto: LocalSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1330 | } |
| 1331 | switch fieldNum { |
| 1332 | case 1: |
| 1333 | if wireType != 2 { |
| 1334 | return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) |
| 1335 | } |
| 1336 | var msglen int |
| 1337 | for shift := uint(0); ; shift += 7 { |
| 1338 | if shift >= 64 { |
| 1339 | return ErrIntOverflowGenerated |
| 1340 | } |
| 1341 | if iNdEx >= l { |
| 1342 | return io.ErrUnexpectedEOF |
| 1343 | } |
| 1344 | b := dAtA[iNdEx] |
| 1345 | iNdEx++ |
| 1346 | msglen |= (int(b) & 0x7F) << shift |
| 1347 | if b < 0x80 { |
| 1348 | break |
| 1349 | } |
| 1350 | } |
| 1351 | if msglen < 0 { |
| 1352 | return ErrInvalidLengthGenerated |
| 1353 | } |
| 1354 | postIndex := iNdEx + msglen |
| 1355 | if postIndex > l { |
| 1356 | return io.ErrUnexpectedEOF |
| 1357 | } |
| 1358 | if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 1359 | return err |
| 1360 | } |
| 1361 | iNdEx = postIndex |
| 1362 | case 2: |
| 1363 | if wireType != 2 { |
| 1364 | return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) |
| 1365 | } |
| 1366 | var msglen int |
| 1367 | for shift := uint(0); ; shift += 7 { |
| 1368 | if shift >= 64 { |
| 1369 | return ErrIntOverflowGenerated |
| 1370 | } |
| 1371 | if iNdEx >= l { |
| 1372 | return io.ErrUnexpectedEOF |
| 1373 | } |
| 1374 | b := dAtA[iNdEx] |
| 1375 | iNdEx++ |
| 1376 | msglen |= (int(b) & 0x7F) << shift |
| 1377 | if b < 0x80 { |
| 1378 | break |
| 1379 | } |
| 1380 | } |
| 1381 | if msglen < 0 { |
| 1382 | return ErrInvalidLengthGenerated |
| 1383 | } |
| 1384 | postIndex := iNdEx + msglen |
| 1385 | if postIndex > l { |
| 1386 | return io.ErrUnexpectedEOF |
| 1387 | } |
| 1388 | if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 1389 | return err |
| 1390 | } |
| 1391 | iNdEx = postIndex |
| 1392 | case 3: |
| 1393 | if wireType != 2 { |
| 1394 | return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) |
| 1395 | } |
| 1396 | var msglen int |
| 1397 | for shift := uint(0); ; shift += 7 { |
| 1398 | if shift >= 64 { |
| 1399 | return ErrIntOverflowGenerated |
| 1400 | } |
| 1401 | if iNdEx >= l { |
| 1402 | return io.ErrUnexpectedEOF |
| 1403 | } |
| 1404 | b := dAtA[iNdEx] |
| 1405 | iNdEx++ |
| 1406 | msglen |= (int(b) & 0x7F) << shift |
| 1407 | if b < 0x80 { |
| 1408 | break |
| 1409 | } |
| 1410 | } |
| 1411 | if msglen < 0 { |
| 1412 | return ErrInvalidLengthGenerated |
| 1413 | } |
| 1414 | postIndex := iNdEx + msglen |
| 1415 | if postIndex > l { |
| 1416 | return io.ErrUnexpectedEOF |
| 1417 | } |
| 1418 | if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 1419 | return err |
| 1420 | } |
| 1421 | iNdEx = postIndex |
| 1422 | default: |
| 1423 | iNdEx = preIndex |
| 1424 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 1425 | if err != nil { |
| 1426 | return err |
| 1427 | } |
| 1428 | if skippy < 0 { |
| 1429 | return ErrInvalidLengthGenerated |
| 1430 | } |
| 1431 | if (iNdEx + skippy) > l { |
| 1432 | return io.ErrUnexpectedEOF |
| 1433 | } |
| 1434 | iNdEx += skippy |
| 1435 | } |
| 1436 | } |
| 1437 | |
| 1438 | if iNdEx > l { |
| 1439 | return io.ErrUnexpectedEOF |
| 1440 | } |
| 1441 | return nil |
| 1442 | } |
| 1443 | func (m *NonResourceAttributes) Unmarshal(dAtA []byte) error { |
| 1444 | l := len(dAtA) |
| 1445 | iNdEx := 0 |
| 1446 | for iNdEx < l { |
| 1447 | preIndex := iNdEx |
| 1448 | var wire uint64 |
| 1449 | for shift := uint(0); ; shift += 7 { |
| 1450 | if shift >= 64 { |
| 1451 | return ErrIntOverflowGenerated |
| 1452 | } |
| 1453 | if iNdEx >= l { |
| 1454 | return io.ErrUnexpectedEOF |
| 1455 | } |
| 1456 | b := dAtA[iNdEx] |
| 1457 | iNdEx++ |
| 1458 | wire |= (uint64(b) & 0x7F) << shift |
| 1459 | if b < 0x80 { |
| 1460 | break |
| 1461 | } |
| 1462 | } |
| 1463 | fieldNum := int32(wire >> 3) |
| 1464 | wireType := int(wire & 0x7) |
| 1465 | if wireType == 4 { |
| 1466 | return fmt.Errorf("proto: NonResourceAttributes: wiretype end group for non-group") |
| 1467 | } |
| 1468 | if fieldNum <= 0 { |
| 1469 | return fmt.Errorf("proto: NonResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1470 | } |
| 1471 | switch fieldNum { |
| 1472 | case 1: |
| 1473 | if wireType != 2 { |
| 1474 | return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) |
| 1475 | } |
| 1476 | var stringLen uint64 |
| 1477 | for shift := uint(0); ; shift += 7 { |
| 1478 | if shift >= 64 { |
| 1479 | return ErrIntOverflowGenerated |
| 1480 | } |
| 1481 | if iNdEx >= l { |
| 1482 | return io.ErrUnexpectedEOF |
| 1483 | } |
| 1484 | b := dAtA[iNdEx] |
| 1485 | iNdEx++ |
| 1486 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1487 | if b < 0x80 { |
| 1488 | break |
| 1489 | } |
| 1490 | } |
| 1491 | intStringLen := int(stringLen) |
| 1492 | if intStringLen < 0 { |
| 1493 | return ErrInvalidLengthGenerated |
| 1494 | } |
| 1495 | postIndex := iNdEx + intStringLen |
| 1496 | if postIndex > l { |
| 1497 | return io.ErrUnexpectedEOF |
| 1498 | } |
| 1499 | m.Path = string(dAtA[iNdEx:postIndex]) |
| 1500 | iNdEx = postIndex |
| 1501 | case 2: |
| 1502 | if wireType != 2 { |
| 1503 | return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType) |
| 1504 | } |
| 1505 | var stringLen uint64 |
| 1506 | for shift := uint(0); ; shift += 7 { |
| 1507 | if shift >= 64 { |
| 1508 | return ErrIntOverflowGenerated |
| 1509 | } |
| 1510 | if iNdEx >= l { |
| 1511 | return io.ErrUnexpectedEOF |
| 1512 | } |
| 1513 | b := dAtA[iNdEx] |
| 1514 | iNdEx++ |
| 1515 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1516 | if b < 0x80 { |
| 1517 | break |
| 1518 | } |
| 1519 | } |
| 1520 | intStringLen := int(stringLen) |
| 1521 | if intStringLen < 0 { |
| 1522 | return ErrInvalidLengthGenerated |
| 1523 | } |
| 1524 | postIndex := iNdEx + intStringLen |
| 1525 | if postIndex > l { |
| 1526 | return io.ErrUnexpectedEOF |
| 1527 | } |
| 1528 | m.Verb = string(dAtA[iNdEx:postIndex]) |
| 1529 | iNdEx = postIndex |
| 1530 | default: |
| 1531 | iNdEx = preIndex |
| 1532 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 1533 | if err != nil { |
| 1534 | return err |
| 1535 | } |
| 1536 | if skippy < 0 { |
| 1537 | return ErrInvalidLengthGenerated |
| 1538 | } |
| 1539 | if (iNdEx + skippy) > l { |
| 1540 | return io.ErrUnexpectedEOF |
| 1541 | } |
| 1542 | iNdEx += skippy |
| 1543 | } |
| 1544 | } |
| 1545 | |
| 1546 | if iNdEx > l { |
| 1547 | return io.ErrUnexpectedEOF |
| 1548 | } |
| 1549 | return nil |
| 1550 | } |
| 1551 | func (m *NonResourceRule) Unmarshal(dAtA []byte) error { |
| 1552 | l := len(dAtA) |
| 1553 | iNdEx := 0 |
| 1554 | for iNdEx < l { |
| 1555 | preIndex := iNdEx |
| 1556 | var wire uint64 |
| 1557 | for shift := uint(0); ; shift += 7 { |
| 1558 | if shift >= 64 { |
| 1559 | return ErrIntOverflowGenerated |
| 1560 | } |
| 1561 | if iNdEx >= l { |
| 1562 | return io.ErrUnexpectedEOF |
| 1563 | } |
| 1564 | b := dAtA[iNdEx] |
| 1565 | iNdEx++ |
| 1566 | wire |= (uint64(b) & 0x7F) << shift |
| 1567 | if b < 0x80 { |
| 1568 | break |
| 1569 | } |
| 1570 | } |
| 1571 | fieldNum := int32(wire >> 3) |
| 1572 | wireType := int(wire & 0x7) |
| 1573 | if wireType == 4 { |
| 1574 | return fmt.Errorf("proto: NonResourceRule: wiretype end group for non-group") |
| 1575 | } |
| 1576 | if fieldNum <= 0 { |
| 1577 | return fmt.Errorf("proto: NonResourceRule: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1578 | } |
| 1579 | switch fieldNum { |
| 1580 | case 1: |
| 1581 | if wireType != 2 { |
| 1582 | return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) |
| 1583 | } |
| 1584 | var stringLen uint64 |
| 1585 | for shift := uint(0); ; shift += 7 { |
| 1586 | if shift >= 64 { |
| 1587 | return ErrIntOverflowGenerated |
| 1588 | } |
| 1589 | if iNdEx >= l { |
| 1590 | return io.ErrUnexpectedEOF |
| 1591 | } |
| 1592 | b := dAtA[iNdEx] |
| 1593 | iNdEx++ |
| 1594 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1595 | if b < 0x80 { |
| 1596 | break |
| 1597 | } |
| 1598 | } |
| 1599 | intStringLen := int(stringLen) |
| 1600 | if intStringLen < 0 { |
| 1601 | return ErrInvalidLengthGenerated |
| 1602 | } |
| 1603 | postIndex := iNdEx + intStringLen |
| 1604 | if postIndex > l { |
| 1605 | return io.ErrUnexpectedEOF |
| 1606 | } |
| 1607 | m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) |
| 1608 | iNdEx = postIndex |
| 1609 | case 2: |
| 1610 | if wireType != 2 { |
| 1611 | return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType) |
| 1612 | } |
| 1613 | var stringLen uint64 |
| 1614 | for shift := uint(0); ; shift += 7 { |
| 1615 | if shift >= 64 { |
| 1616 | return ErrIntOverflowGenerated |
| 1617 | } |
| 1618 | if iNdEx >= l { |
| 1619 | return io.ErrUnexpectedEOF |
| 1620 | } |
| 1621 | b := dAtA[iNdEx] |
| 1622 | iNdEx++ |
| 1623 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1624 | if b < 0x80 { |
| 1625 | break |
| 1626 | } |
| 1627 | } |
| 1628 | intStringLen := int(stringLen) |
| 1629 | if intStringLen < 0 { |
| 1630 | return ErrInvalidLengthGenerated |
| 1631 | } |
| 1632 | postIndex := iNdEx + intStringLen |
| 1633 | if postIndex > l { |
| 1634 | return io.ErrUnexpectedEOF |
| 1635 | } |
| 1636 | m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex])) |
| 1637 | iNdEx = postIndex |
| 1638 | default: |
| 1639 | iNdEx = preIndex |
| 1640 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 1641 | if err != nil { |
| 1642 | return err |
| 1643 | } |
| 1644 | if skippy < 0 { |
| 1645 | return ErrInvalidLengthGenerated |
| 1646 | } |
| 1647 | if (iNdEx + skippy) > l { |
| 1648 | return io.ErrUnexpectedEOF |
| 1649 | } |
| 1650 | iNdEx += skippy |
| 1651 | } |
| 1652 | } |
| 1653 | |
| 1654 | if iNdEx > l { |
| 1655 | return io.ErrUnexpectedEOF |
| 1656 | } |
| 1657 | return nil |
| 1658 | } |
| 1659 | func (m *ResourceAttributes) Unmarshal(dAtA []byte) error { |
| 1660 | l := len(dAtA) |
| 1661 | iNdEx := 0 |
| 1662 | for iNdEx < l { |
| 1663 | preIndex := iNdEx |
| 1664 | var wire uint64 |
| 1665 | for shift := uint(0); ; shift += 7 { |
| 1666 | if shift >= 64 { |
| 1667 | return ErrIntOverflowGenerated |
| 1668 | } |
| 1669 | if iNdEx >= l { |
| 1670 | return io.ErrUnexpectedEOF |
| 1671 | } |
| 1672 | b := dAtA[iNdEx] |
| 1673 | iNdEx++ |
| 1674 | wire |= (uint64(b) & 0x7F) << shift |
| 1675 | if b < 0x80 { |
| 1676 | break |
| 1677 | } |
| 1678 | } |
| 1679 | fieldNum := int32(wire >> 3) |
| 1680 | wireType := int(wire & 0x7) |
| 1681 | if wireType == 4 { |
| 1682 | return fmt.Errorf("proto: ResourceAttributes: wiretype end group for non-group") |
| 1683 | } |
| 1684 | if fieldNum <= 0 { |
| 1685 | return fmt.Errorf("proto: ResourceAttributes: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1686 | } |
| 1687 | switch fieldNum { |
| 1688 | case 1: |
| 1689 | if wireType != 2 { |
| 1690 | return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) |
| 1691 | } |
| 1692 | var stringLen uint64 |
| 1693 | for shift := uint(0); ; shift += 7 { |
| 1694 | if shift >= 64 { |
| 1695 | return ErrIntOverflowGenerated |
| 1696 | } |
| 1697 | if iNdEx >= l { |
| 1698 | return io.ErrUnexpectedEOF |
| 1699 | } |
| 1700 | b := dAtA[iNdEx] |
| 1701 | iNdEx++ |
| 1702 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1703 | if b < 0x80 { |
| 1704 | break |
| 1705 | } |
| 1706 | } |
| 1707 | intStringLen := int(stringLen) |
| 1708 | if intStringLen < 0 { |
| 1709 | return ErrInvalidLengthGenerated |
| 1710 | } |
| 1711 | postIndex := iNdEx + intStringLen |
| 1712 | if postIndex > l { |
| 1713 | return io.ErrUnexpectedEOF |
| 1714 | } |
| 1715 | m.Namespace = string(dAtA[iNdEx:postIndex]) |
| 1716 | iNdEx = postIndex |
| 1717 | case 2: |
| 1718 | if wireType != 2 { |
| 1719 | return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType) |
| 1720 | } |
| 1721 | var stringLen uint64 |
| 1722 | for shift := uint(0); ; shift += 7 { |
| 1723 | if shift >= 64 { |
| 1724 | return ErrIntOverflowGenerated |
| 1725 | } |
| 1726 | if iNdEx >= l { |
| 1727 | return io.ErrUnexpectedEOF |
| 1728 | } |
| 1729 | b := dAtA[iNdEx] |
| 1730 | iNdEx++ |
| 1731 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1732 | if b < 0x80 { |
| 1733 | break |
| 1734 | } |
| 1735 | } |
| 1736 | intStringLen := int(stringLen) |
| 1737 | if intStringLen < 0 { |
| 1738 | return ErrInvalidLengthGenerated |
| 1739 | } |
| 1740 | postIndex := iNdEx + intStringLen |
| 1741 | if postIndex > l { |
| 1742 | return io.ErrUnexpectedEOF |
| 1743 | } |
| 1744 | m.Verb = string(dAtA[iNdEx:postIndex]) |
| 1745 | iNdEx = postIndex |
| 1746 | case 3: |
| 1747 | if wireType != 2 { |
| 1748 | return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) |
| 1749 | } |
| 1750 | var stringLen uint64 |
| 1751 | for shift := uint(0); ; shift += 7 { |
| 1752 | if shift >= 64 { |
| 1753 | return ErrIntOverflowGenerated |
| 1754 | } |
| 1755 | if iNdEx >= l { |
| 1756 | return io.ErrUnexpectedEOF |
| 1757 | } |
| 1758 | b := dAtA[iNdEx] |
| 1759 | iNdEx++ |
| 1760 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1761 | if b < 0x80 { |
| 1762 | break |
| 1763 | } |
| 1764 | } |
| 1765 | intStringLen := int(stringLen) |
| 1766 | if intStringLen < 0 { |
| 1767 | return ErrInvalidLengthGenerated |
| 1768 | } |
| 1769 | postIndex := iNdEx + intStringLen |
| 1770 | if postIndex > l { |
| 1771 | return io.ErrUnexpectedEOF |
| 1772 | } |
| 1773 | m.Group = string(dAtA[iNdEx:postIndex]) |
| 1774 | iNdEx = postIndex |
| 1775 | case 4: |
| 1776 | if wireType != 2 { |
| 1777 | return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) |
| 1778 | } |
| 1779 | var stringLen uint64 |
| 1780 | for shift := uint(0); ; shift += 7 { |
| 1781 | if shift >= 64 { |
| 1782 | return ErrIntOverflowGenerated |
| 1783 | } |
| 1784 | if iNdEx >= l { |
| 1785 | return io.ErrUnexpectedEOF |
| 1786 | } |
| 1787 | b := dAtA[iNdEx] |
| 1788 | iNdEx++ |
| 1789 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1790 | if b < 0x80 { |
| 1791 | break |
| 1792 | } |
| 1793 | } |
| 1794 | intStringLen := int(stringLen) |
| 1795 | if intStringLen < 0 { |
| 1796 | return ErrInvalidLengthGenerated |
| 1797 | } |
| 1798 | postIndex := iNdEx + intStringLen |
| 1799 | if postIndex > l { |
| 1800 | return io.ErrUnexpectedEOF |
| 1801 | } |
| 1802 | m.Version = string(dAtA[iNdEx:postIndex]) |
| 1803 | iNdEx = postIndex |
| 1804 | case 5: |
| 1805 | if wireType != 2 { |
| 1806 | return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) |
| 1807 | } |
| 1808 | var stringLen uint64 |
| 1809 | for shift := uint(0); ; shift += 7 { |
| 1810 | if shift >= 64 { |
| 1811 | return ErrIntOverflowGenerated |
| 1812 | } |
| 1813 | if iNdEx >= l { |
| 1814 | return io.ErrUnexpectedEOF |
| 1815 | } |
| 1816 | b := dAtA[iNdEx] |
| 1817 | iNdEx++ |
| 1818 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1819 | if b < 0x80 { |
| 1820 | break |
| 1821 | } |
| 1822 | } |
| 1823 | intStringLen := int(stringLen) |
| 1824 | if intStringLen < 0 { |
| 1825 | return ErrInvalidLengthGenerated |
| 1826 | } |
| 1827 | postIndex := iNdEx + intStringLen |
| 1828 | if postIndex > l { |
| 1829 | return io.ErrUnexpectedEOF |
| 1830 | } |
| 1831 | m.Resource = string(dAtA[iNdEx:postIndex]) |
| 1832 | iNdEx = postIndex |
| 1833 | case 6: |
| 1834 | if wireType != 2 { |
| 1835 | return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType) |
| 1836 | } |
| 1837 | var stringLen uint64 |
| 1838 | for shift := uint(0); ; shift += 7 { |
| 1839 | if shift >= 64 { |
| 1840 | return ErrIntOverflowGenerated |
| 1841 | } |
| 1842 | if iNdEx >= l { |
| 1843 | return io.ErrUnexpectedEOF |
| 1844 | } |
| 1845 | b := dAtA[iNdEx] |
| 1846 | iNdEx++ |
| 1847 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1848 | if b < 0x80 { |
| 1849 | break |
| 1850 | } |
| 1851 | } |
| 1852 | intStringLen := int(stringLen) |
| 1853 | if intStringLen < 0 { |
| 1854 | return ErrInvalidLengthGenerated |
| 1855 | } |
| 1856 | postIndex := iNdEx + intStringLen |
| 1857 | if postIndex > l { |
| 1858 | return io.ErrUnexpectedEOF |
| 1859 | } |
| 1860 | m.Subresource = string(dAtA[iNdEx:postIndex]) |
| 1861 | iNdEx = postIndex |
| 1862 | case 7: |
| 1863 | if wireType != 2 { |
| 1864 | return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) |
| 1865 | } |
| 1866 | var stringLen uint64 |
| 1867 | for shift := uint(0); ; shift += 7 { |
| 1868 | if shift >= 64 { |
| 1869 | return ErrIntOverflowGenerated |
| 1870 | } |
| 1871 | if iNdEx >= l { |
| 1872 | return io.ErrUnexpectedEOF |
| 1873 | } |
| 1874 | b := dAtA[iNdEx] |
| 1875 | iNdEx++ |
| 1876 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1877 | if b < 0x80 { |
| 1878 | break |
| 1879 | } |
| 1880 | } |
| 1881 | intStringLen := int(stringLen) |
| 1882 | if intStringLen < 0 { |
| 1883 | return ErrInvalidLengthGenerated |
| 1884 | } |
| 1885 | postIndex := iNdEx + intStringLen |
| 1886 | if postIndex > l { |
| 1887 | return io.ErrUnexpectedEOF |
| 1888 | } |
| 1889 | m.Name = string(dAtA[iNdEx:postIndex]) |
| 1890 | iNdEx = postIndex |
| 1891 | default: |
| 1892 | iNdEx = preIndex |
| 1893 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 1894 | if err != nil { |
| 1895 | return err |
| 1896 | } |
| 1897 | if skippy < 0 { |
| 1898 | return ErrInvalidLengthGenerated |
| 1899 | } |
| 1900 | if (iNdEx + skippy) > l { |
| 1901 | return io.ErrUnexpectedEOF |
| 1902 | } |
| 1903 | iNdEx += skippy |
| 1904 | } |
| 1905 | } |
| 1906 | |
| 1907 | if iNdEx > l { |
| 1908 | return io.ErrUnexpectedEOF |
| 1909 | } |
| 1910 | return nil |
| 1911 | } |
| 1912 | func (m *ResourceRule) Unmarshal(dAtA []byte) error { |
| 1913 | l := len(dAtA) |
| 1914 | iNdEx := 0 |
| 1915 | for iNdEx < l { |
| 1916 | preIndex := iNdEx |
| 1917 | var wire uint64 |
| 1918 | for shift := uint(0); ; shift += 7 { |
| 1919 | if shift >= 64 { |
| 1920 | return ErrIntOverflowGenerated |
| 1921 | } |
| 1922 | if iNdEx >= l { |
| 1923 | return io.ErrUnexpectedEOF |
| 1924 | } |
| 1925 | b := dAtA[iNdEx] |
| 1926 | iNdEx++ |
| 1927 | wire |= (uint64(b) & 0x7F) << shift |
| 1928 | if b < 0x80 { |
| 1929 | break |
| 1930 | } |
| 1931 | } |
| 1932 | fieldNum := int32(wire >> 3) |
| 1933 | wireType := int(wire & 0x7) |
| 1934 | if wireType == 4 { |
| 1935 | return fmt.Errorf("proto: ResourceRule: wiretype end group for non-group") |
| 1936 | } |
| 1937 | if fieldNum <= 0 { |
| 1938 | return fmt.Errorf("proto: ResourceRule: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1939 | } |
| 1940 | switch fieldNum { |
| 1941 | case 1: |
| 1942 | if wireType != 2 { |
| 1943 | return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) |
| 1944 | } |
| 1945 | var stringLen uint64 |
| 1946 | for shift := uint(0); ; shift += 7 { |
| 1947 | if shift >= 64 { |
| 1948 | return ErrIntOverflowGenerated |
| 1949 | } |
| 1950 | if iNdEx >= l { |
| 1951 | return io.ErrUnexpectedEOF |
| 1952 | } |
| 1953 | b := dAtA[iNdEx] |
| 1954 | iNdEx++ |
| 1955 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1956 | if b < 0x80 { |
| 1957 | break |
| 1958 | } |
| 1959 | } |
| 1960 | intStringLen := int(stringLen) |
| 1961 | if intStringLen < 0 { |
| 1962 | return ErrInvalidLengthGenerated |
| 1963 | } |
| 1964 | postIndex := iNdEx + intStringLen |
| 1965 | if postIndex > l { |
| 1966 | return io.ErrUnexpectedEOF |
| 1967 | } |
| 1968 | m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) |
| 1969 | iNdEx = postIndex |
| 1970 | case 2: |
| 1971 | if wireType != 2 { |
| 1972 | return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType) |
| 1973 | } |
| 1974 | var stringLen uint64 |
| 1975 | for shift := uint(0); ; shift += 7 { |
| 1976 | if shift >= 64 { |
| 1977 | return ErrIntOverflowGenerated |
| 1978 | } |
| 1979 | if iNdEx >= l { |
| 1980 | return io.ErrUnexpectedEOF |
| 1981 | } |
| 1982 | b := dAtA[iNdEx] |
| 1983 | iNdEx++ |
| 1984 | stringLen |= (uint64(b) & 0x7F) << shift |
| 1985 | if b < 0x80 { |
| 1986 | break |
| 1987 | } |
| 1988 | } |
| 1989 | intStringLen := int(stringLen) |
| 1990 | if intStringLen < 0 { |
| 1991 | return ErrInvalidLengthGenerated |
| 1992 | } |
| 1993 | postIndex := iNdEx + intStringLen |
| 1994 | if postIndex > l { |
| 1995 | return io.ErrUnexpectedEOF |
| 1996 | } |
| 1997 | m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex])) |
| 1998 | iNdEx = postIndex |
| 1999 | case 3: |
| 2000 | if wireType != 2 { |
| 2001 | return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) |
| 2002 | } |
| 2003 | var stringLen uint64 |
| 2004 | for shift := uint(0); ; shift += 7 { |
| 2005 | if shift >= 64 { |
| 2006 | return ErrIntOverflowGenerated |
| 2007 | } |
| 2008 | if iNdEx >= l { |
| 2009 | return io.ErrUnexpectedEOF |
| 2010 | } |
| 2011 | b := dAtA[iNdEx] |
| 2012 | iNdEx++ |
| 2013 | stringLen |= (uint64(b) & 0x7F) << shift |
| 2014 | if b < 0x80 { |
| 2015 | break |
| 2016 | } |
| 2017 | } |
| 2018 | intStringLen := int(stringLen) |
| 2019 | if intStringLen < 0 { |
| 2020 | return ErrInvalidLengthGenerated |
| 2021 | } |
| 2022 | postIndex := iNdEx + intStringLen |
| 2023 | if postIndex > l { |
| 2024 | return io.ErrUnexpectedEOF |
| 2025 | } |
| 2026 | m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex])) |
| 2027 | iNdEx = postIndex |
| 2028 | case 4: |
| 2029 | if wireType != 2 { |
| 2030 | return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType) |
| 2031 | } |
| 2032 | var stringLen uint64 |
| 2033 | for shift := uint(0); ; shift += 7 { |
| 2034 | if shift >= 64 { |
| 2035 | return ErrIntOverflowGenerated |
| 2036 | } |
| 2037 | if iNdEx >= l { |
| 2038 | return io.ErrUnexpectedEOF |
| 2039 | } |
| 2040 | b := dAtA[iNdEx] |
| 2041 | iNdEx++ |
| 2042 | stringLen |= (uint64(b) & 0x7F) << shift |
| 2043 | if b < 0x80 { |
| 2044 | break |
| 2045 | } |
| 2046 | } |
| 2047 | intStringLen := int(stringLen) |
| 2048 | if intStringLen < 0 { |
| 2049 | return ErrInvalidLengthGenerated |
| 2050 | } |
| 2051 | postIndex := iNdEx + intStringLen |
| 2052 | if postIndex > l { |
| 2053 | return io.ErrUnexpectedEOF |
| 2054 | } |
| 2055 | m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex])) |
| 2056 | iNdEx = postIndex |
| 2057 | default: |
| 2058 | iNdEx = preIndex |
| 2059 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 2060 | if err != nil { |
| 2061 | return err |
| 2062 | } |
| 2063 | if skippy < 0 { |
| 2064 | return ErrInvalidLengthGenerated |
| 2065 | } |
| 2066 | if (iNdEx + skippy) > l { |
| 2067 | return io.ErrUnexpectedEOF |
| 2068 | } |
| 2069 | iNdEx += skippy |
| 2070 | } |
| 2071 | } |
| 2072 | |
| 2073 | if iNdEx > l { |
| 2074 | return io.ErrUnexpectedEOF |
| 2075 | } |
| 2076 | return nil |
| 2077 | } |
| 2078 | func (m *SelfSubjectAccessReview) Unmarshal(dAtA []byte) error { |
| 2079 | l := len(dAtA) |
| 2080 | iNdEx := 0 |
| 2081 | for iNdEx < l { |
| 2082 | preIndex := iNdEx |
| 2083 | var wire uint64 |
| 2084 | for shift := uint(0); ; shift += 7 { |
| 2085 | if shift >= 64 { |
| 2086 | return ErrIntOverflowGenerated |
| 2087 | } |
| 2088 | if iNdEx >= l { |
| 2089 | return io.ErrUnexpectedEOF |
| 2090 | } |
| 2091 | b := dAtA[iNdEx] |
| 2092 | iNdEx++ |
| 2093 | wire |= (uint64(b) & 0x7F) << shift |
| 2094 | if b < 0x80 { |
| 2095 | break |
| 2096 | } |
| 2097 | } |
| 2098 | fieldNum := int32(wire >> 3) |
| 2099 | wireType := int(wire & 0x7) |
| 2100 | if wireType == 4 { |
| 2101 | return fmt.Errorf("proto: SelfSubjectAccessReview: wiretype end group for non-group") |
| 2102 | } |
| 2103 | if fieldNum <= 0 { |
| 2104 | return fmt.Errorf("proto: SelfSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) |
| 2105 | } |
| 2106 | switch fieldNum { |
| 2107 | case 1: |
| 2108 | if wireType != 2 { |
| 2109 | return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) |
| 2110 | } |
| 2111 | var msglen int |
| 2112 | for shift := uint(0); ; shift += 7 { |
| 2113 | if shift >= 64 { |
| 2114 | return ErrIntOverflowGenerated |
| 2115 | } |
| 2116 | if iNdEx >= l { |
| 2117 | return io.ErrUnexpectedEOF |
| 2118 | } |
| 2119 | b := dAtA[iNdEx] |
| 2120 | iNdEx++ |
| 2121 | msglen |= (int(b) & 0x7F) << shift |
| 2122 | if b < 0x80 { |
| 2123 | break |
| 2124 | } |
| 2125 | } |
| 2126 | if msglen < 0 { |
| 2127 | return ErrInvalidLengthGenerated |
| 2128 | } |
| 2129 | postIndex := iNdEx + msglen |
| 2130 | if postIndex > l { |
| 2131 | return io.ErrUnexpectedEOF |
| 2132 | } |
| 2133 | if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2134 | return err |
| 2135 | } |
| 2136 | iNdEx = postIndex |
| 2137 | case 2: |
| 2138 | if wireType != 2 { |
| 2139 | return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) |
| 2140 | } |
| 2141 | var msglen int |
| 2142 | for shift := uint(0); ; shift += 7 { |
| 2143 | if shift >= 64 { |
| 2144 | return ErrIntOverflowGenerated |
| 2145 | } |
| 2146 | if iNdEx >= l { |
| 2147 | return io.ErrUnexpectedEOF |
| 2148 | } |
| 2149 | b := dAtA[iNdEx] |
| 2150 | iNdEx++ |
| 2151 | msglen |= (int(b) & 0x7F) << shift |
| 2152 | if b < 0x80 { |
| 2153 | break |
| 2154 | } |
| 2155 | } |
| 2156 | if msglen < 0 { |
| 2157 | return ErrInvalidLengthGenerated |
| 2158 | } |
| 2159 | postIndex := iNdEx + msglen |
| 2160 | if postIndex > l { |
| 2161 | return io.ErrUnexpectedEOF |
| 2162 | } |
| 2163 | if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2164 | return err |
| 2165 | } |
| 2166 | iNdEx = postIndex |
| 2167 | case 3: |
| 2168 | if wireType != 2 { |
| 2169 | return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) |
| 2170 | } |
| 2171 | var msglen int |
| 2172 | for shift := uint(0); ; shift += 7 { |
| 2173 | if shift >= 64 { |
| 2174 | return ErrIntOverflowGenerated |
| 2175 | } |
| 2176 | if iNdEx >= l { |
| 2177 | return io.ErrUnexpectedEOF |
| 2178 | } |
| 2179 | b := dAtA[iNdEx] |
| 2180 | iNdEx++ |
| 2181 | msglen |= (int(b) & 0x7F) << shift |
| 2182 | if b < 0x80 { |
| 2183 | break |
| 2184 | } |
| 2185 | } |
| 2186 | if msglen < 0 { |
| 2187 | return ErrInvalidLengthGenerated |
| 2188 | } |
| 2189 | postIndex := iNdEx + msglen |
| 2190 | if postIndex > l { |
| 2191 | return io.ErrUnexpectedEOF |
| 2192 | } |
| 2193 | if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2194 | return err |
| 2195 | } |
| 2196 | iNdEx = postIndex |
| 2197 | default: |
| 2198 | iNdEx = preIndex |
| 2199 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 2200 | if err != nil { |
| 2201 | return err |
| 2202 | } |
| 2203 | if skippy < 0 { |
| 2204 | return ErrInvalidLengthGenerated |
| 2205 | } |
| 2206 | if (iNdEx + skippy) > l { |
| 2207 | return io.ErrUnexpectedEOF |
| 2208 | } |
| 2209 | iNdEx += skippy |
| 2210 | } |
| 2211 | } |
| 2212 | |
| 2213 | if iNdEx > l { |
| 2214 | return io.ErrUnexpectedEOF |
| 2215 | } |
| 2216 | return nil |
| 2217 | } |
| 2218 | func (m *SelfSubjectAccessReviewSpec) Unmarshal(dAtA []byte) error { |
| 2219 | l := len(dAtA) |
| 2220 | iNdEx := 0 |
| 2221 | for iNdEx < l { |
| 2222 | preIndex := iNdEx |
| 2223 | var wire uint64 |
| 2224 | for shift := uint(0); ; shift += 7 { |
| 2225 | if shift >= 64 { |
| 2226 | return ErrIntOverflowGenerated |
| 2227 | } |
| 2228 | if iNdEx >= l { |
| 2229 | return io.ErrUnexpectedEOF |
| 2230 | } |
| 2231 | b := dAtA[iNdEx] |
| 2232 | iNdEx++ |
| 2233 | wire |= (uint64(b) & 0x7F) << shift |
| 2234 | if b < 0x80 { |
| 2235 | break |
| 2236 | } |
| 2237 | } |
| 2238 | fieldNum := int32(wire >> 3) |
| 2239 | wireType := int(wire & 0x7) |
| 2240 | if wireType == 4 { |
| 2241 | return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: wiretype end group for non-group") |
| 2242 | } |
| 2243 | if fieldNum <= 0 { |
| 2244 | return fmt.Errorf("proto: SelfSubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) |
| 2245 | } |
| 2246 | switch fieldNum { |
| 2247 | case 1: |
| 2248 | if wireType != 2 { |
| 2249 | return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType) |
| 2250 | } |
| 2251 | var msglen int |
| 2252 | for shift := uint(0); ; shift += 7 { |
| 2253 | if shift >= 64 { |
| 2254 | return ErrIntOverflowGenerated |
| 2255 | } |
| 2256 | if iNdEx >= l { |
| 2257 | return io.ErrUnexpectedEOF |
| 2258 | } |
| 2259 | b := dAtA[iNdEx] |
| 2260 | iNdEx++ |
| 2261 | msglen |= (int(b) & 0x7F) << shift |
| 2262 | if b < 0x80 { |
| 2263 | break |
| 2264 | } |
| 2265 | } |
| 2266 | if msglen < 0 { |
| 2267 | return ErrInvalidLengthGenerated |
| 2268 | } |
| 2269 | postIndex := iNdEx + msglen |
| 2270 | if postIndex > l { |
| 2271 | return io.ErrUnexpectedEOF |
| 2272 | } |
| 2273 | if m.ResourceAttributes == nil { |
| 2274 | m.ResourceAttributes = &ResourceAttributes{} |
| 2275 | } |
| 2276 | if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2277 | return err |
| 2278 | } |
| 2279 | iNdEx = postIndex |
| 2280 | case 2: |
| 2281 | if wireType != 2 { |
| 2282 | return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType) |
| 2283 | } |
| 2284 | var msglen int |
| 2285 | for shift := uint(0); ; shift += 7 { |
| 2286 | if shift >= 64 { |
| 2287 | return ErrIntOverflowGenerated |
| 2288 | } |
| 2289 | if iNdEx >= l { |
| 2290 | return io.ErrUnexpectedEOF |
| 2291 | } |
| 2292 | b := dAtA[iNdEx] |
| 2293 | iNdEx++ |
| 2294 | msglen |= (int(b) & 0x7F) << shift |
| 2295 | if b < 0x80 { |
| 2296 | break |
| 2297 | } |
| 2298 | } |
| 2299 | if msglen < 0 { |
| 2300 | return ErrInvalidLengthGenerated |
| 2301 | } |
| 2302 | postIndex := iNdEx + msglen |
| 2303 | if postIndex > l { |
| 2304 | return io.ErrUnexpectedEOF |
| 2305 | } |
| 2306 | if m.NonResourceAttributes == nil { |
| 2307 | m.NonResourceAttributes = &NonResourceAttributes{} |
| 2308 | } |
| 2309 | if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2310 | return err |
| 2311 | } |
| 2312 | iNdEx = postIndex |
| 2313 | default: |
| 2314 | iNdEx = preIndex |
| 2315 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 2316 | if err != nil { |
| 2317 | return err |
| 2318 | } |
| 2319 | if skippy < 0 { |
| 2320 | return ErrInvalidLengthGenerated |
| 2321 | } |
| 2322 | if (iNdEx + skippy) > l { |
| 2323 | return io.ErrUnexpectedEOF |
| 2324 | } |
| 2325 | iNdEx += skippy |
| 2326 | } |
| 2327 | } |
| 2328 | |
| 2329 | if iNdEx > l { |
| 2330 | return io.ErrUnexpectedEOF |
| 2331 | } |
| 2332 | return nil |
| 2333 | } |
| 2334 | func (m *SelfSubjectRulesReview) Unmarshal(dAtA []byte) error { |
| 2335 | l := len(dAtA) |
| 2336 | iNdEx := 0 |
| 2337 | for iNdEx < l { |
| 2338 | preIndex := iNdEx |
| 2339 | var wire uint64 |
| 2340 | for shift := uint(0); ; shift += 7 { |
| 2341 | if shift >= 64 { |
| 2342 | return ErrIntOverflowGenerated |
| 2343 | } |
| 2344 | if iNdEx >= l { |
| 2345 | return io.ErrUnexpectedEOF |
| 2346 | } |
| 2347 | b := dAtA[iNdEx] |
| 2348 | iNdEx++ |
| 2349 | wire |= (uint64(b) & 0x7F) << shift |
| 2350 | if b < 0x80 { |
| 2351 | break |
| 2352 | } |
| 2353 | } |
| 2354 | fieldNum := int32(wire >> 3) |
| 2355 | wireType := int(wire & 0x7) |
| 2356 | if wireType == 4 { |
| 2357 | return fmt.Errorf("proto: SelfSubjectRulesReview: wiretype end group for non-group") |
| 2358 | } |
| 2359 | if fieldNum <= 0 { |
| 2360 | return fmt.Errorf("proto: SelfSubjectRulesReview: illegal tag %d (wire type %d)", fieldNum, wire) |
| 2361 | } |
| 2362 | switch fieldNum { |
| 2363 | case 1: |
| 2364 | if wireType != 2 { |
| 2365 | return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) |
| 2366 | } |
| 2367 | var msglen int |
| 2368 | for shift := uint(0); ; shift += 7 { |
| 2369 | if shift >= 64 { |
| 2370 | return ErrIntOverflowGenerated |
| 2371 | } |
| 2372 | if iNdEx >= l { |
| 2373 | return io.ErrUnexpectedEOF |
| 2374 | } |
| 2375 | b := dAtA[iNdEx] |
| 2376 | iNdEx++ |
| 2377 | msglen |= (int(b) & 0x7F) << shift |
| 2378 | if b < 0x80 { |
| 2379 | break |
| 2380 | } |
| 2381 | } |
| 2382 | if msglen < 0 { |
| 2383 | return ErrInvalidLengthGenerated |
| 2384 | } |
| 2385 | postIndex := iNdEx + msglen |
| 2386 | if postIndex > l { |
| 2387 | return io.ErrUnexpectedEOF |
| 2388 | } |
| 2389 | if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2390 | return err |
| 2391 | } |
| 2392 | iNdEx = postIndex |
| 2393 | case 2: |
| 2394 | if wireType != 2 { |
| 2395 | return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) |
| 2396 | } |
| 2397 | var msglen int |
| 2398 | for shift := uint(0); ; shift += 7 { |
| 2399 | if shift >= 64 { |
| 2400 | return ErrIntOverflowGenerated |
| 2401 | } |
| 2402 | if iNdEx >= l { |
| 2403 | return io.ErrUnexpectedEOF |
| 2404 | } |
| 2405 | b := dAtA[iNdEx] |
| 2406 | iNdEx++ |
| 2407 | msglen |= (int(b) & 0x7F) << shift |
| 2408 | if b < 0x80 { |
| 2409 | break |
| 2410 | } |
| 2411 | } |
| 2412 | if msglen < 0 { |
| 2413 | return ErrInvalidLengthGenerated |
| 2414 | } |
| 2415 | postIndex := iNdEx + msglen |
| 2416 | if postIndex > l { |
| 2417 | return io.ErrUnexpectedEOF |
| 2418 | } |
| 2419 | if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2420 | return err |
| 2421 | } |
| 2422 | iNdEx = postIndex |
| 2423 | case 3: |
| 2424 | if wireType != 2 { |
| 2425 | return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) |
| 2426 | } |
| 2427 | var msglen int |
| 2428 | for shift := uint(0); ; shift += 7 { |
| 2429 | if shift >= 64 { |
| 2430 | return ErrIntOverflowGenerated |
| 2431 | } |
| 2432 | if iNdEx >= l { |
| 2433 | return io.ErrUnexpectedEOF |
| 2434 | } |
| 2435 | b := dAtA[iNdEx] |
| 2436 | iNdEx++ |
| 2437 | msglen |= (int(b) & 0x7F) << shift |
| 2438 | if b < 0x80 { |
| 2439 | break |
| 2440 | } |
| 2441 | } |
| 2442 | if msglen < 0 { |
| 2443 | return ErrInvalidLengthGenerated |
| 2444 | } |
| 2445 | postIndex := iNdEx + msglen |
| 2446 | if postIndex > l { |
| 2447 | return io.ErrUnexpectedEOF |
| 2448 | } |
| 2449 | if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2450 | return err |
| 2451 | } |
| 2452 | iNdEx = postIndex |
| 2453 | default: |
| 2454 | iNdEx = preIndex |
| 2455 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 2456 | if err != nil { |
| 2457 | return err |
| 2458 | } |
| 2459 | if skippy < 0 { |
| 2460 | return ErrInvalidLengthGenerated |
| 2461 | } |
| 2462 | if (iNdEx + skippy) > l { |
| 2463 | return io.ErrUnexpectedEOF |
| 2464 | } |
| 2465 | iNdEx += skippy |
| 2466 | } |
| 2467 | } |
| 2468 | |
| 2469 | if iNdEx > l { |
| 2470 | return io.ErrUnexpectedEOF |
| 2471 | } |
| 2472 | return nil |
| 2473 | } |
| 2474 | func (m *SelfSubjectRulesReviewSpec) Unmarshal(dAtA []byte) error { |
| 2475 | l := len(dAtA) |
| 2476 | iNdEx := 0 |
| 2477 | for iNdEx < l { |
| 2478 | preIndex := iNdEx |
| 2479 | var wire uint64 |
| 2480 | for shift := uint(0); ; shift += 7 { |
| 2481 | if shift >= 64 { |
| 2482 | return ErrIntOverflowGenerated |
| 2483 | } |
| 2484 | if iNdEx >= l { |
| 2485 | return io.ErrUnexpectedEOF |
| 2486 | } |
| 2487 | b := dAtA[iNdEx] |
| 2488 | iNdEx++ |
| 2489 | wire |= (uint64(b) & 0x7F) << shift |
| 2490 | if b < 0x80 { |
| 2491 | break |
| 2492 | } |
| 2493 | } |
| 2494 | fieldNum := int32(wire >> 3) |
| 2495 | wireType := int(wire & 0x7) |
| 2496 | if wireType == 4 { |
| 2497 | return fmt.Errorf("proto: SelfSubjectRulesReviewSpec: wiretype end group for non-group") |
| 2498 | } |
| 2499 | if fieldNum <= 0 { |
| 2500 | return fmt.Errorf("proto: SelfSubjectRulesReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) |
| 2501 | } |
| 2502 | switch fieldNum { |
| 2503 | case 1: |
| 2504 | if wireType != 2 { |
| 2505 | return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) |
| 2506 | } |
| 2507 | var stringLen uint64 |
| 2508 | for shift := uint(0); ; shift += 7 { |
| 2509 | if shift >= 64 { |
| 2510 | return ErrIntOverflowGenerated |
| 2511 | } |
| 2512 | if iNdEx >= l { |
| 2513 | return io.ErrUnexpectedEOF |
| 2514 | } |
| 2515 | b := dAtA[iNdEx] |
| 2516 | iNdEx++ |
| 2517 | stringLen |= (uint64(b) & 0x7F) << shift |
| 2518 | if b < 0x80 { |
| 2519 | break |
| 2520 | } |
| 2521 | } |
| 2522 | intStringLen := int(stringLen) |
| 2523 | if intStringLen < 0 { |
| 2524 | return ErrInvalidLengthGenerated |
| 2525 | } |
| 2526 | postIndex := iNdEx + intStringLen |
| 2527 | if postIndex > l { |
| 2528 | return io.ErrUnexpectedEOF |
| 2529 | } |
| 2530 | m.Namespace = string(dAtA[iNdEx:postIndex]) |
| 2531 | iNdEx = postIndex |
| 2532 | default: |
| 2533 | iNdEx = preIndex |
| 2534 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 2535 | if err != nil { |
| 2536 | return err |
| 2537 | } |
| 2538 | if skippy < 0 { |
| 2539 | return ErrInvalidLengthGenerated |
| 2540 | } |
| 2541 | if (iNdEx + skippy) > l { |
| 2542 | return io.ErrUnexpectedEOF |
| 2543 | } |
| 2544 | iNdEx += skippy |
| 2545 | } |
| 2546 | } |
| 2547 | |
| 2548 | if iNdEx > l { |
| 2549 | return io.ErrUnexpectedEOF |
| 2550 | } |
| 2551 | return nil |
| 2552 | } |
| 2553 | func (m *SubjectAccessReview) Unmarshal(dAtA []byte) error { |
| 2554 | l := len(dAtA) |
| 2555 | iNdEx := 0 |
| 2556 | for iNdEx < l { |
| 2557 | preIndex := iNdEx |
| 2558 | var wire uint64 |
| 2559 | for shift := uint(0); ; shift += 7 { |
| 2560 | if shift >= 64 { |
| 2561 | return ErrIntOverflowGenerated |
| 2562 | } |
| 2563 | if iNdEx >= l { |
| 2564 | return io.ErrUnexpectedEOF |
| 2565 | } |
| 2566 | b := dAtA[iNdEx] |
| 2567 | iNdEx++ |
| 2568 | wire |= (uint64(b) & 0x7F) << shift |
| 2569 | if b < 0x80 { |
| 2570 | break |
| 2571 | } |
| 2572 | } |
| 2573 | fieldNum := int32(wire >> 3) |
| 2574 | wireType := int(wire & 0x7) |
| 2575 | if wireType == 4 { |
| 2576 | return fmt.Errorf("proto: SubjectAccessReview: wiretype end group for non-group") |
| 2577 | } |
| 2578 | if fieldNum <= 0 { |
| 2579 | return fmt.Errorf("proto: SubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) |
| 2580 | } |
| 2581 | switch fieldNum { |
| 2582 | case 1: |
| 2583 | if wireType != 2 { |
| 2584 | return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) |
| 2585 | } |
| 2586 | var msglen int |
| 2587 | for shift := uint(0); ; shift += 7 { |
| 2588 | if shift >= 64 { |
| 2589 | return ErrIntOverflowGenerated |
| 2590 | } |
| 2591 | if iNdEx >= l { |
| 2592 | return io.ErrUnexpectedEOF |
| 2593 | } |
| 2594 | b := dAtA[iNdEx] |
| 2595 | iNdEx++ |
| 2596 | msglen |= (int(b) & 0x7F) << shift |
| 2597 | if b < 0x80 { |
| 2598 | break |
| 2599 | } |
| 2600 | } |
| 2601 | if msglen < 0 { |
| 2602 | return ErrInvalidLengthGenerated |
| 2603 | } |
| 2604 | postIndex := iNdEx + msglen |
| 2605 | if postIndex > l { |
| 2606 | return io.ErrUnexpectedEOF |
| 2607 | } |
| 2608 | if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2609 | return err |
| 2610 | } |
| 2611 | iNdEx = postIndex |
| 2612 | case 2: |
| 2613 | if wireType != 2 { |
| 2614 | return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) |
| 2615 | } |
| 2616 | var msglen int |
| 2617 | for shift := uint(0); ; shift += 7 { |
| 2618 | if shift >= 64 { |
| 2619 | return ErrIntOverflowGenerated |
| 2620 | } |
| 2621 | if iNdEx >= l { |
| 2622 | return io.ErrUnexpectedEOF |
| 2623 | } |
| 2624 | b := dAtA[iNdEx] |
| 2625 | iNdEx++ |
| 2626 | msglen |= (int(b) & 0x7F) << shift |
| 2627 | if b < 0x80 { |
| 2628 | break |
| 2629 | } |
| 2630 | } |
| 2631 | if msglen < 0 { |
| 2632 | return ErrInvalidLengthGenerated |
| 2633 | } |
| 2634 | postIndex := iNdEx + msglen |
| 2635 | if postIndex > l { |
| 2636 | return io.ErrUnexpectedEOF |
| 2637 | } |
| 2638 | if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2639 | return err |
| 2640 | } |
| 2641 | iNdEx = postIndex |
| 2642 | case 3: |
| 2643 | if wireType != 2 { |
| 2644 | return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) |
| 2645 | } |
| 2646 | var msglen int |
| 2647 | for shift := uint(0); ; shift += 7 { |
| 2648 | if shift >= 64 { |
| 2649 | return ErrIntOverflowGenerated |
| 2650 | } |
| 2651 | if iNdEx >= l { |
| 2652 | return io.ErrUnexpectedEOF |
| 2653 | } |
| 2654 | b := dAtA[iNdEx] |
| 2655 | iNdEx++ |
| 2656 | msglen |= (int(b) & 0x7F) << shift |
| 2657 | if b < 0x80 { |
| 2658 | break |
| 2659 | } |
| 2660 | } |
| 2661 | if msglen < 0 { |
| 2662 | return ErrInvalidLengthGenerated |
| 2663 | } |
| 2664 | postIndex := iNdEx + msglen |
| 2665 | if postIndex > l { |
| 2666 | return io.ErrUnexpectedEOF |
| 2667 | } |
| 2668 | if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2669 | return err |
| 2670 | } |
| 2671 | iNdEx = postIndex |
| 2672 | default: |
| 2673 | iNdEx = preIndex |
| 2674 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 2675 | if err != nil { |
| 2676 | return err |
| 2677 | } |
| 2678 | if skippy < 0 { |
| 2679 | return ErrInvalidLengthGenerated |
| 2680 | } |
| 2681 | if (iNdEx + skippy) > l { |
| 2682 | return io.ErrUnexpectedEOF |
| 2683 | } |
| 2684 | iNdEx += skippy |
| 2685 | } |
| 2686 | } |
| 2687 | |
| 2688 | if iNdEx > l { |
| 2689 | return io.ErrUnexpectedEOF |
| 2690 | } |
| 2691 | return nil |
| 2692 | } |
| 2693 | func (m *SubjectAccessReviewSpec) Unmarshal(dAtA []byte) error { |
| 2694 | l := len(dAtA) |
| 2695 | iNdEx := 0 |
| 2696 | for iNdEx < l { |
| 2697 | preIndex := iNdEx |
| 2698 | var wire uint64 |
| 2699 | for shift := uint(0); ; shift += 7 { |
| 2700 | if shift >= 64 { |
| 2701 | return ErrIntOverflowGenerated |
| 2702 | } |
| 2703 | if iNdEx >= l { |
| 2704 | return io.ErrUnexpectedEOF |
| 2705 | } |
| 2706 | b := dAtA[iNdEx] |
| 2707 | iNdEx++ |
| 2708 | wire |= (uint64(b) & 0x7F) << shift |
| 2709 | if b < 0x80 { |
| 2710 | break |
| 2711 | } |
| 2712 | } |
| 2713 | fieldNum := int32(wire >> 3) |
| 2714 | wireType := int(wire & 0x7) |
| 2715 | if wireType == 4 { |
| 2716 | return fmt.Errorf("proto: SubjectAccessReviewSpec: wiretype end group for non-group") |
| 2717 | } |
| 2718 | if fieldNum <= 0 { |
| 2719 | return fmt.Errorf("proto: SubjectAccessReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) |
| 2720 | } |
| 2721 | switch fieldNum { |
| 2722 | case 1: |
| 2723 | if wireType != 2 { |
| 2724 | return fmt.Errorf("proto: wrong wireType = %d for field ResourceAttributes", wireType) |
| 2725 | } |
| 2726 | var msglen int |
| 2727 | for shift := uint(0); ; shift += 7 { |
| 2728 | if shift >= 64 { |
| 2729 | return ErrIntOverflowGenerated |
| 2730 | } |
| 2731 | if iNdEx >= l { |
| 2732 | return io.ErrUnexpectedEOF |
| 2733 | } |
| 2734 | b := dAtA[iNdEx] |
| 2735 | iNdEx++ |
| 2736 | msglen |= (int(b) & 0x7F) << shift |
| 2737 | if b < 0x80 { |
| 2738 | break |
| 2739 | } |
| 2740 | } |
| 2741 | if msglen < 0 { |
| 2742 | return ErrInvalidLengthGenerated |
| 2743 | } |
| 2744 | postIndex := iNdEx + msglen |
| 2745 | if postIndex > l { |
| 2746 | return io.ErrUnexpectedEOF |
| 2747 | } |
| 2748 | if m.ResourceAttributes == nil { |
| 2749 | m.ResourceAttributes = &ResourceAttributes{} |
| 2750 | } |
| 2751 | if err := m.ResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2752 | return err |
| 2753 | } |
| 2754 | iNdEx = postIndex |
| 2755 | case 2: |
| 2756 | if wireType != 2 { |
| 2757 | return fmt.Errorf("proto: wrong wireType = %d for field NonResourceAttributes", wireType) |
| 2758 | } |
| 2759 | var msglen int |
| 2760 | for shift := uint(0); ; shift += 7 { |
| 2761 | if shift >= 64 { |
| 2762 | return ErrIntOverflowGenerated |
| 2763 | } |
| 2764 | if iNdEx >= l { |
| 2765 | return io.ErrUnexpectedEOF |
| 2766 | } |
| 2767 | b := dAtA[iNdEx] |
| 2768 | iNdEx++ |
| 2769 | msglen |= (int(b) & 0x7F) << shift |
| 2770 | if b < 0x80 { |
| 2771 | break |
| 2772 | } |
| 2773 | } |
| 2774 | if msglen < 0 { |
| 2775 | return ErrInvalidLengthGenerated |
| 2776 | } |
| 2777 | postIndex := iNdEx + msglen |
| 2778 | if postIndex > l { |
| 2779 | return io.ErrUnexpectedEOF |
| 2780 | } |
| 2781 | if m.NonResourceAttributes == nil { |
| 2782 | m.NonResourceAttributes = &NonResourceAttributes{} |
| 2783 | } |
| 2784 | if err := m.NonResourceAttributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2785 | return err |
| 2786 | } |
| 2787 | iNdEx = postIndex |
| 2788 | case 3: |
| 2789 | if wireType != 2 { |
| 2790 | return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) |
| 2791 | } |
| 2792 | var stringLen uint64 |
| 2793 | for shift := uint(0); ; shift += 7 { |
| 2794 | if shift >= 64 { |
| 2795 | return ErrIntOverflowGenerated |
| 2796 | } |
| 2797 | if iNdEx >= l { |
| 2798 | return io.ErrUnexpectedEOF |
| 2799 | } |
| 2800 | b := dAtA[iNdEx] |
| 2801 | iNdEx++ |
| 2802 | stringLen |= (uint64(b) & 0x7F) << shift |
| 2803 | if b < 0x80 { |
| 2804 | break |
| 2805 | } |
| 2806 | } |
| 2807 | intStringLen := int(stringLen) |
| 2808 | if intStringLen < 0 { |
| 2809 | return ErrInvalidLengthGenerated |
| 2810 | } |
| 2811 | postIndex := iNdEx + intStringLen |
| 2812 | if postIndex > l { |
| 2813 | return io.ErrUnexpectedEOF |
| 2814 | } |
| 2815 | m.User = string(dAtA[iNdEx:postIndex]) |
| 2816 | iNdEx = postIndex |
| 2817 | case 4: |
| 2818 | if wireType != 2 { |
| 2819 | return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) |
| 2820 | } |
| 2821 | var stringLen uint64 |
| 2822 | for shift := uint(0); ; shift += 7 { |
| 2823 | if shift >= 64 { |
| 2824 | return ErrIntOverflowGenerated |
| 2825 | } |
| 2826 | if iNdEx >= l { |
| 2827 | return io.ErrUnexpectedEOF |
| 2828 | } |
| 2829 | b := dAtA[iNdEx] |
| 2830 | iNdEx++ |
| 2831 | stringLen |= (uint64(b) & 0x7F) << shift |
| 2832 | if b < 0x80 { |
| 2833 | break |
| 2834 | } |
| 2835 | } |
| 2836 | intStringLen := int(stringLen) |
| 2837 | if intStringLen < 0 { |
| 2838 | return ErrInvalidLengthGenerated |
| 2839 | } |
| 2840 | postIndex := iNdEx + intStringLen |
| 2841 | if postIndex > l { |
| 2842 | return io.ErrUnexpectedEOF |
| 2843 | } |
| 2844 | m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) |
| 2845 | iNdEx = postIndex |
| 2846 | case 5: |
| 2847 | if wireType != 2 { |
| 2848 | return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType) |
| 2849 | } |
| 2850 | var msglen int |
| 2851 | for shift := uint(0); ; shift += 7 { |
| 2852 | if shift >= 64 { |
| 2853 | return ErrIntOverflowGenerated |
| 2854 | } |
| 2855 | if iNdEx >= l { |
| 2856 | return io.ErrUnexpectedEOF |
| 2857 | } |
| 2858 | b := dAtA[iNdEx] |
| 2859 | iNdEx++ |
| 2860 | msglen |= (int(b) & 0x7F) << shift |
| 2861 | if b < 0x80 { |
| 2862 | break |
| 2863 | } |
| 2864 | } |
| 2865 | if msglen < 0 { |
| 2866 | return ErrInvalidLengthGenerated |
| 2867 | } |
| 2868 | postIndex := iNdEx + msglen |
| 2869 | if postIndex > l { |
| 2870 | return io.ErrUnexpectedEOF |
| 2871 | } |
| 2872 | if m.Extra == nil { |
| 2873 | m.Extra = make(map[string]ExtraValue) |
| 2874 | } |
| 2875 | var mapkey string |
| 2876 | mapvalue := &ExtraValue{} |
| 2877 | for iNdEx < postIndex { |
| 2878 | entryPreIndex := iNdEx |
| 2879 | var wire uint64 |
| 2880 | for shift := uint(0); ; shift += 7 { |
| 2881 | if shift >= 64 { |
| 2882 | return ErrIntOverflowGenerated |
| 2883 | } |
| 2884 | if iNdEx >= l { |
| 2885 | return io.ErrUnexpectedEOF |
| 2886 | } |
| 2887 | b := dAtA[iNdEx] |
| 2888 | iNdEx++ |
| 2889 | wire |= (uint64(b) & 0x7F) << shift |
| 2890 | if b < 0x80 { |
| 2891 | break |
| 2892 | } |
| 2893 | } |
| 2894 | fieldNum := int32(wire >> 3) |
| 2895 | if fieldNum == 1 { |
| 2896 | var stringLenmapkey uint64 |
| 2897 | for shift := uint(0); ; shift += 7 { |
| 2898 | if shift >= 64 { |
| 2899 | return ErrIntOverflowGenerated |
| 2900 | } |
| 2901 | if iNdEx >= l { |
| 2902 | return io.ErrUnexpectedEOF |
| 2903 | } |
| 2904 | b := dAtA[iNdEx] |
| 2905 | iNdEx++ |
| 2906 | stringLenmapkey |= (uint64(b) & 0x7F) << shift |
| 2907 | if b < 0x80 { |
| 2908 | break |
| 2909 | } |
| 2910 | } |
| 2911 | intStringLenmapkey := int(stringLenmapkey) |
| 2912 | if intStringLenmapkey < 0 { |
| 2913 | return ErrInvalidLengthGenerated |
| 2914 | } |
| 2915 | postStringIndexmapkey := iNdEx + intStringLenmapkey |
| 2916 | if postStringIndexmapkey > l { |
| 2917 | return io.ErrUnexpectedEOF |
| 2918 | } |
| 2919 | mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) |
| 2920 | iNdEx = postStringIndexmapkey |
| 2921 | } else if fieldNum == 2 { |
| 2922 | var mapmsglen int |
| 2923 | for shift := uint(0); ; shift += 7 { |
| 2924 | if shift >= 64 { |
| 2925 | return ErrIntOverflowGenerated |
| 2926 | } |
| 2927 | if iNdEx >= l { |
| 2928 | return io.ErrUnexpectedEOF |
| 2929 | } |
| 2930 | b := dAtA[iNdEx] |
| 2931 | iNdEx++ |
| 2932 | mapmsglen |= (int(b) & 0x7F) << shift |
| 2933 | if b < 0x80 { |
| 2934 | break |
| 2935 | } |
| 2936 | } |
| 2937 | if mapmsglen < 0 { |
| 2938 | return ErrInvalidLengthGenerated |
| 2939 | } |
| 2940 | postmsgIndex := iNdEx + mapmsglen |
| 2941 | if mapmsglen < 0 { |
| 2942 | return ErrInvalidLengthGenerated |
| 2943 | } |
| 2944 | if postmsgIndex > l { |
| 2945 | return io.ErrUnexpectedEOF |
| 2946 | } |
| 2947 | mapvalue = &ExtraValue{} |
| 2948 | if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { |
| 2949 | return err |
| 2950 | } |
| 2951 | iNdEx = postmsgIndex |
| 2952 | } else { |
| 2953 | iNdEx = entryPreIndex |
| 2954 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 2955 | if err != nil { |
| 2956 | return err |
| 2957 | } |
| 2958 | if skippy < 0 { |
| 2959 | return ErrInvalidLengthGenerated |
| 2960 | } |
| 2961 | if (iNdEx + skippy) > postIndex { |
| 2962 | return io.ErrUnexpectedEOF |
| 2963 | } |
| 2964 | iNdEx += skippy |
| 2965 | } |
| 2966 | } |
| 2967 | m.Extra[mapkey] = *mapvalue |
| 2968 | iNdEx = postIndex |
| 2969 | case 6: |
| 2970 | if wireType != 2 { |
| 2971 | return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) |
| 2972 | } |
| 2973 | var stringLen uint64 |
| 2974 | for shift := uint(0); ; shift += 7 { |
| 2975 | if shift >= 64 { |
| 2976 | return ErrIntOverflowGenerated |
| 2977 | } |
| 2978 | if iNdEx >= l { |
| 2979 | return io.ErrUnexpectedEOF |
| 2980 | } |
| 2981 | b := dAtA[iNdEx] |
| 2982 | iNdEx++ |
| 2983 | stringLen |= (uint64(b) & 0x7F) << shift |
| 2984 | if b < 0x80 { |
| 2985 | break |
| 2986 | } |
| 2987 | } |
| 2988 | intStringLen := int(stringLen) |
| 2989 | if intStringLen < 0 { |
| 2990 | return ErrInvalidLengthGenerated |
| 2991 | } |
| 2992 | postIndex := iNdEx + intStringLen |
| 2993 | if postIndex > l { |
| 2994 | return io.ErrUnexpectedEOF |
| 2995 | } |
| 2996 | m.UID = string(dAtA[iNdEx:postIndex]) |
| 2997 | iNdEx = postIndex |
| 2998 | default: |
| 2999 | iNdEx = preIndex |
| 3000 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 3001 | if err != nil { |
| 3002 | return err |
| 3003 | } |
| 3004 | if skippy < 0 { |
| 3005 | return ErrInvalidLengthGenerated |
| 3006 | } |
| 3007 | if (iNdEx + skippy) > l { |
| 3008 | return io.ErrUnexpectedEOF |
| 3009 | } |
| 3010 | iNdEx += skippy |
| 3011 | } |
| 3012 | } |
| 3013 | |
| 3014 | if iNdEx > l { |
| 3015 | return io.ErrUnexpectedEOF |
| 3016 | } |
| 3017 | return nil |
| 3018 | } |
| 3019 | func (m *SubjectAccessReviewStatus) Unmarshal(dAtA []byte) error { |
| 3020 | l := len(dAtA) |
| 3021 | iNdEx := 0 |
| 3022 | for iNdEx < l { |
| 3023 | preIndex := iNdEx |
| 3024 | var wire uint64 |
| 3025 | for shift := uint(0); ; shift += 7 { |
| 3026 | if shift >= 64 { |
| 3027 | return ErrIntOverflowGenerated |
| 3028 | } |
| 3029 | if iNdEx >= l { |
| 3030 | return io.ErrUnexpectedEOF |
| 3031 | } |
| 3032 | b := dAtA[iNdEx] |
| 3033 | iNdEx++ |
| 3034 | wire |= (uint64(b) & 0x7F) << shift |
| 3035 | if b < 0x80 { |
| 3036 | break |
| 3037 | } |
| 3038 | } |
| 3039 | fieldNum := int32(wire >> 3) |
| 3040 | wireType := int(wire & 0x7) |
| 3041 | if wireType == 4 { |
| 3042 | return fmt.Errorf("proto: SubjectAccessReviewStatus: wiretype end group for non-group") |
| 3043 | } |
| 3044 | if fieldNum <= 0 { |
| 3045 | return fmt.Errorf("proto: SubjectAccessReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire) |
| 3046 | } |
| 3047 | switch fieldNum { |
| 3048 | case 1: |
| 3049 | if wireType != 0 { |
| 3050 | return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType) |
| 3051 | } |
| 3052 | var v int |
| 3053 | for shift := uint(0); ; shift += 7 { |
| 3054 | if shift >= 64 { |
| 3055 | return ErrIntOverflowGenerated |
| 3056 | } |
| 3057 | if iNdEx >= l { |
| 3058 | return io.ErrUnexpectedEOF |
| 3059 | } |
| 3060 | b := dAtA[iNdEx] |
| 3061 | iNdEx++ |
| 3062 | v |= (int(b) & 0x7F) << shift |
| 3063 | if b < 0x80 { |
| 3064 | break |
| 3065 | } |
| 3066 | } |
| 3067 | m.Allowed = bool(v != 0) |
| 3068 | case 2: |
| 3069 | if wireType != 2 { |
| 3070 | return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) |
| 3071 | } |
| 3072 | var stringLen uint64 |
| 3073 | for shift := uint(0); ; shift += 7 { |
| 3074 | if shift >= 64 { |
| 3075 | return ErrIntOverflowGenerated |
| 3076 | } |
| 3077 | if iNdEx >= l { |
| 3078 | return io.ErrUnexpectedEOF |
| 3079 | } |
| 3080 | b := dAtA[iNdEx] |
| 3081 | iNdEx++ |
| 3082 | stringLen |= (uint64(b) & 0x7F) << shift |
| 3083 | if b < 0x80 { |
| 3084 | break |
| 3085 | } |
| 3086 | } |
| 3087 | intStringLen := int(stringLen) |
| 3088 | if intStringLen < 0 { |
| 3089 | return ErrInvalidLengthGenerated |
| 3090 | } |
| 3091 | postIndex := iNdEx + intStringLen |
| 3092 | if postIndex > l { |
| 3093 | return io.ErrUnexpectedEOF |
| 3094 | } |
| 3095 | m.Reason = string(dAtA[iNdEx:postIndex]) |
| 3096 | iNdEx = postIndex |
| 3097 | case 3: |
| 3098 | if wireType != 2 { |
| 3099 | return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType) |
| 3100 | } |
| 3101 | var stringLen uint64 |
| 3102 | for shift := uint(0); ; shift += 7 { |
| 3103 | if shift >= 64 { |
| 3104 | return ErrIntOverflowGenerated |
| 3105 | } |
| 3106 | if iNdEx >= l { |
| 3107 | return io.ErrUnexpectedEOF |
| 3108 | } |
| 3109 | b := dAtA[iNdEx] |
| 3110 | iNdEx++ |
| 3111 | stringLen |= (uint64(b) & 0x7F) << shift |
| 3112 | if b < 0x80 { |
| 3113 | break |
| 3114 | } |
| 3115 | } |
| 3116 | intStringLen := int(stringLen) |
| 3117 | if intStringLen < 0 { |
| 3118 | return ErrInvalidLengthGenerated |
| 3119 | } |
| 3120 | postIndex := iNdEx + intStringLen |
| 3121 | if postIndex > l { |
| 3122 | return io.ErrUnexpectedEOF |
| 3123 | } |
| 3124 | m.EvaluationError = string(dAtA[iNdEx:postIndex]) |
| 3125 | iNdEx = postIndex |
| 3126 | case 4: |
| 3127 | if wireType != 0 { |
| 3128 | return fmt.Errorf("proto: wrong wireType = %d for field Denied", wireType) |
| 3129 | } |
| 3130 | var v int |
| 3131 | for shift := uint(0); ; shift += 7 { |
| 3132 | if shift >= 64 { |
| 3133 | return ErrIntOverflowGenerated |
| 3134 | } |
| 3135 | if iNdEx >= l { |
| 3136 | return io.ErrUnexpectedEOF |
| 3137 | } |
| 3138 | b := dAtA[iNdEx] |
| 3139 | iNdEx++ |
| 3140 | v |= (int(b) & 0x7F) << shift |
| 3141 | if b < 0x80 { |
| 3142 | break |
| 3143 | } |
| 3144 | } |
| 3145 | m.Denied = bool(v != 0) |
| 3146 | default: |
| 3147 | iNdEx = preIndex |
| 3148 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 3149 | if err != nil { |
| 3150 | return err |
| 3151 | } |
| 3152 | if skippy < 0 { |
| 3153 | return ErrInvalidLengthGenerated |
| 3154 | } |
| 3155 | if (iNdEx + skippy) > l { |
| 3156 | return io.ErrUnexpectedEOF |
| 3157 | } |
| 3158 | iNdEx += skippy |
| 3159 | } |
| 3160 | } |
| 3161 | |
| 3162 | if iNdEx > l { |
| 3163 | return io.ErrUnexpectedEOF |
| 3164 | } |
| 3165 | return nil |
| 3166 | } |
| 3167 | func (m *SubjectRulesReviewStatus) Unmarshal(dAtA []byte) error { |
| 3168 | l := len(dAtA) |
| 3169 | iNdEx := 0 |
| 3170 | for iNdEx < l { |
| 3171 | preIndex := iNdEx |
| 3172 | var wire uint64 |
| 3173 | for shift := uint(0); ; shift += 7 { |
| 3174 | if shift >= 64 { |
| 3175 | return ErrIntOverflowGenerated |
| 3176 | } |
| 3177 | if iNdEx >= l { |
| 3178 | return io.ErrUnexpectedEOF |
| 3179 | } |
| 3180 | b := dAtA[iNdEx] |
| 3181 | iNdEx++ |
| 3182 | wire |= (uint64(b) & 0x7F) << shift |
| 3183 | if b < 0x80 { |
| 3184 | break |
| 3185 | } |
| 3186 | } |
| 3187 | fieldNum := int32(wire >> 3) |
| 3188 | wireType := int(wire & 0x7) |
| 3189 | if wireType == 4 { |
| 3190 | return fmt.Errorf("proto: SubjectRulesReviewStatus: wiretype end group for non-group") |
| 3191 | } |
| 3192 | if fieldNum <= 0 { |
| 3193 | return fmt.Errorf("proto: SubjectRulesReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire) |
| 3194 | } |
| 3195 | switch fieldNum { |
| 3196 | case 1: |
| 3197 | if wireType != 2 { |
| 3198 | return fmt.Errorf("proto: wrong wireType = %d for field ResourceRules", wireType) |
| 3199 | } |
| 3200 | var msglen int |
| 3201 | for shift := uint(0); ; shift += 7 { |
| 3202 | if shift >= 64 { |
| 3203 | return ErrIntOverflowGenerated |
| 3204 | } |
| 3205 | if iNdEx >= l { |
| 3206 | return io.ErrUnexpectedEOF |
| 3207 | } |
| 3208 | b := dAtA[iNdEx] |
| 3209 | iNdEx++ |
| 3210 | msglen |= (int(b) & 0x7F) << shift |
| 3211 | if b < 0x80 { |
| 3212 | break |
| 3213 | } |
| 3214 | } |
| 3215 | if msglen < 0 { |
| 3216 | return ErrInvalidLengthGenerated |
| 3217 | } |
| 3218 | postIndex := iNdEx + msglen |
| 3219 | if postIndex > l { |
| 3220 | return io.ErrUnexpectedEOF |
| 3221 | } |
| 3222 | m.ResourceRules = append(m.ResourceRules, ResourceRule{}) |
| 3223 | if err := m.ResourceRules[len(m.ResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 3224 | return err |
| 3225 | } |
| 3226 | iNdEx = postIndex |
| 3227 | case 2: |
| 3228 | if wireType != 2 { |
| 3229 | return fmt.Errorf("proto: wrong wireType = %d for field NonResourceRules", wireType) |
| 3230 | } |
| 3231 | var msglen int |
| 3232 | for shift := uint(0); ; shift += 7 { |
| 3233 | if shift >= 64 { |
| 3234 | return ErrIntOverflowGenerated |
| 3235 | } |
| 3236 | if iNdEx >= l { |
| 3237 | return io.ErrUnexpectedEOF |
| 3238 | } |
| 3239 | b := dAtA[iNdEx] |
| 3240 | iNdEx++ |
| 3241 | msglen |= (int(b) & 0x7F) << shift |
| 3242 | if b < 0x80 { |
| 3243 | break |
| 3244 | } |
| 3245 | } |
| 3246 | if msglen < 0 { |
| 3247 | return ErrInvalidLengthGenerated |
| 3248 | } |
| 3249 | postIndex := iNdEx + msglen |
| 3250 | if postIndex > l { |
| 3251 | return io.ErrUnexpectedEOF |
| 3252 | } |
| 3253 | m.NonResourceRules = append(m.NonResourceRules, NonResourceRule{}) |
| 3254 | if err := m.NonResourceRules[len(m.NonResourceRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 3255 | return err |
| 3256 | } |
| 3257 | iNdEx = postIndex |
| 3258 | case 3: |
| 3259 | if wireType != 0 { |
| 3260 | return fmt.Errorf("proto: wrong wireType = %d for field Incomplete", wireType) |
| 3261 | } |
| 3262 | var v int |
| 3263 | for shift := uint(0); ; shift += 7 { |
| 3264 | if shift >= 64 { |
| 3265 | return ErrIntOverflowGenerated |
| 3266 | } |
| 3267 | if iNdEx >= l { |
| 3268 | return io.ErrUnexpectedEOF |
| 3269 | } |
| 3270 | b := dAtA[iNdEx] |
| 3271 | iNdEx++ |
| 3272 | v |= (int(b) & 0x7F) << shift |
| 3273 | if b < 0x80 { |
| 3274 | break |
| 3275 | } |
| 3276 | } |
| 3277 | m.Incomplete = bool(v != 0) |
| 3278 | case 4: |
| 3279 | if wireType != 2 { |
| 3280 | return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType) |
| 3281 | } |
| 3282 | var stringLen uint64 |
| 3283 | for shift := uint(0); ; shift += 7 { |
| 3284 | if shift >= 64 { |
| 3285 | return ErrIntOverflowGenerated |
| 3286 | } |
| 3287 | if iNdEx >= l { |
| 3288 | return io.ErrUnexpectedEOF |
| 3289 | } |
| 3290 | b := dAtA[iNdEx] |
| 3291 | iNdEx++ |
| 3292 | stringLen |= (uint64(b) & 0x7F) << shift |
| 3293 | if b < 0x80 { |
| 3294 | break |
| 3295 | } |
| 3296 | } |
| 3297 | intStringLen := int(stringLen) |
| 3298 | if intStringLen < 0 { |
| 3299 | return ErrInvalidLengthGenerated |
| 3300 | } |
| 3301 | postIndex := iNdEx + intStringLen |
| 3302 | if postIndex > l { |
| 3303 | return io.ErrUnexpectedEOF |
| 3304 | } |
| 3305 | m.EvaluationError = string(dAtA[iNdEx:postIndex]) |
| 3306 | iNdEx = postIndex |
| 3307 | default: |
| 3308 | iNdEx = preIndex |
| 3309 | skippy, err := skipGenerated(dAtA[iNdEx:]) |
| 3310 | if err != nil { |
| 3311 | return err |
| 3312 | } |
| 3313 | if skippy < 0 { |
| 3314 | return ErrInvalidLengthGenerated |
| 3315 | } |
| 3316 | if (iNdEx + skippy) > l { |
| 3317 | return io.ErrUnexpectedEOF |
| 3318 | } |
| 3319 | iNdEx += skippy |
| 3320 | } |
| 3321 | } |
| 3322 | |
| 3323 | if iNdEx > l { |
| 3324 | return io.ErrUnexpectedEOF |
| 3325 | } |
| 3326 | return nil |
| 3327 | } |
| 3328 | func skipGenerated(dAtA []byte) (n int, err error) { |
| 3329 | l := len(dAtA) |
| 3330 | iNdEx := 0 |
| 3331 | for iNdEx < l { |
| 3332 | var wire uint64 |
| 3333 | for shift := uint(0); ; shift += 7 { |
| 3334 | if shift >= 64 { |
| 3335 | return 0, ErrIntOverflowGenerated |
| 3336 | } |
| 3337 | if iNdEx >= l { |
| 3338 | return 0, io.ErrUnexpectedEOF |
| 3339 | } |
| 3340 | b := dAtA[iNdEx] |
| 3341 | iNdEx++ |
| 3342 | wire |= (uint64(b) & 0x7F) << shift |
| 3343 | if b < 0x80 { |
| 3344 | break |
| 3345 | } |
| 3346 | } |
| 3347 | wireType := int(wire & 0x7) |
| 3348 | switch wireType { |
| 3349 | case 0: |
| 3350 | for shift := uint(0); ; shift += 7 { |
| 3351 | if shift >= 64 { |
| 3352 | return 0, ErrIntOverflowGenerated |
| 3353 | } |
| 3354 | if iNdEx >= l { |
| 3355 | return 0, io.ErrUnexpectedEOF |
| 3356 | } |
| 3357 | iNdEx++ |
| 3358 | if dAtA[iNdEx-1] < 0x80 { |
| 3359 | break |
| 3360 | } |
| 3361 | } |
| 3362 | return iNdEx, nil |
| 3363 | case 1: |
| 3364 | iNdEx += 8 |
| 3365 | return iNdEx, nil |
| 3366 | case 2: |
| 3367 | var length int |
| 3368 | for shift := uint(0); ; shift += 7 { |
| 3369 | if shift >= 64 { |
| 3370 | return 0, ErrIntOverflowGenerated |
| 3371 | } |
| 3372 | if iNdEx >= l { |
| 3373 | return 0, io.ErrUnexpectedEOF |
| 3374 | } |
| 3375 | b := dAtA[iNdEx] |
| 3376 | iNdEx++ |
| 3377 | length |= (int(b) & 0x7F) << shift |
| 3378 | if b < 0x80 { |
| 3379 | break |
| 3380 | } |
| 3381 | } |
| 3382 | iNdEx += length |
| 3383 | if length < 0 { |
| 3384 | return 0, ErrInvalidLengthGenerated |
| 3385 | } |
| 3386 | return iNdEx, nil |
| 3387 | case 3: |
| 3388 | for { |
| 3389 | var innerWire uint64 |
| 3390 | var start int = iNdEx |
| 3391 | for shift := uint(0); ; shift += 7 { |
| 3392 | if shift >= 64 { |
| 3393 | return 0, ErrIntOverflowGenerated |
| 3394 | } |
| 3395 | if iNdEx >= l { |
| 3396 | return 0, io.ErrUnexpectedEOF |
| 3397 | } |
| 3398 | b := dAtA[iNdEx] |
| 3399 | iNdEx++ |
| 3400 | innerWire |= (uint64(b) & 0x7F) << shift |
| 3401 | if b < 0x80 { |
| 3402 | break |
| 3403 | } |
| 3404 | } |
| 3405 | innerWireType := int(innerWire & 0x7) |
| 3406 | if innerWireType == 4 { |
| 3407 | break |
| 3408 | } |
| 3409 | next, err := skipGenerated(dAtA[start:]) |
| 3410 | if err != nil { |
| 3411 | return 0, err |
| 3412 | } |
| 3413 | iNdEx = start + next |
| 3414 | } |
| 3415 | return iNdEx, nil |
| 3416 | case 4: |
| 3417 | return iNdEx, nil |
| 3418 | case 5: |
| 3419 | iNdEx += 4 |
| 3420 | return iNdEx, nil |
| 3421 | default: |
| 3422 | return 0, fmt.Errorf("proto: illegal wireType %d", wireType) |
| 3423 | } |
| 3424 | } |
| 3425 | panic("unreachable") |
| 3426 | } |
| 3427 | |
| 3428 | var ( |
| 3429 | ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") |
| 3430 | ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") |
| 3431 | ) |
| 3432 | |
| 3433 | func init() { |
| 3434 | proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/authorization/v1/generated.proto", fileDescriptorGenerated) |
| 3435 | } |
| 3436 | |
| 3437 | var fileDescriptorGenerated = []byte{ |
| 3438 | // 1140 bytes of a gzipped FileDescriptorProto |
| 3439 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x6f, 0x1b, 0xc5, |
| 3440 | 0x1b, 0xf7, 0xae, 0xed, 0xc4, 0x1e, 0x37, 0xff, 0xa4, 0x13, 0xa5, 0xd9, 0xa6, 0xfa, 0xdb, 0xd1, |
| 3441 | 0x22, 0x41, 0x2a, 0xca, 0x2e, 0xb1, 0xda, 0x26, 0xaa, 0x54, 0xa1, 0x58, 0x89, 0x50, 0xa4, 0xb6, |
| 3442 | 0x54, 0x13, 0x25, 0x12, 0x45, 0x20, 0xc6, 0xeb, 0x89, 0xbd, 0xc4, 0xde, 0x5d, 0x66, 0x66, 0x1d, |
| 3443 | 0xc2, 0xa9, 0x12, 0x5f, 0x80, 0x23, 0x07, 0x0e, 0x7c, 0x03, 0x2e, 0x48, 0xdc, 0x38, 0x70, 0x40, |
| 3444 | 0x39, 0xf6, 0x58, 0x24, 0x64, 0x91, 0xe5, 0xcc, 0x77, 0x40, 0x33, 0x3b, 0xf6, 0xae, 0x93, 0xb5, |
| 3445 | 0x9b, 0x70, 0xa0, 0x97, 0xde, 0x76, 0x9f, 0xdf, 0xef, 0x79, 0x99, 0xe7, 0x65, 0xe6, 0x01, 0xdb, |
| 3446 | 0x47, 0x9b, 0xcc, 0x72, 0x7d, 0xfb, 0x28, 0x6c, 0x12, 0xea, 0x11, 0x4e, 0x98, 0xdd, 0x27, 0x5e, |
| 3447 | 0xcb, 0xa7, 0xb6, 0x02, 0x70, 0xe0, 0xda, 0x38, 0xe4, 0x1d, 0x9f, 0xba, 0x5f, 0x63, 0xee, 0xfa, |
| 3448 | 0x9e, 0xdd, 0x5f, 0xb7, 0xdb, 0xc4, 0x23, 0x14, 0x73, 0xd2, 0xb2, 0x02, 0xea, 0x73, 0x1f, 0xde, |
| 3449 | 0x8a, 0xc9, 0x16, 0x0e, 0x5c, 0x6b, 0x8c, 0x6c, 0xf5, 0xd7, 0x57, 0xde, 0x6b, 0xbb, 0xbc, 0x13, |
| 3450 | 0x36, 0x2d, 0xc7, 0xef, 0xd9, 0x6d, 0xbf, 0xed, 0xdb, 0x52, 0xa7, 0x19, 0x1e, 0xca, 0x3f, 0xf9, |
| 3451 | 0x23, 0xbf, 0x62, 0x5b, 0x2b, 0x77, 0x13, 0xc7, 0x3d, 0xec, 0x74, 0x5c, 0x8f, 0xd0, 0x13, 0x3b, |
| 3452 | 0x38, 0x6a, 0x0b, 0x01, 0xb3, 0x7b, 0x84, 0xe3, 0x8c, 0x08, 0x56, 0xec, 0x49, 0x5a, 0x34, 0xf4, |
| 3453 | 0xb8, 0xdb, 0x23, 0x17, 0x14, 0xee, 0xbf, 0x4a, 0x81, 0x39, 0x1d, 0xd2, 0xc3, 0xe7, 0xf5, 0xcc, |
| 3454 | 0x0d, 0x00, 0x76, 0xbe, 0xe2, 0x14, 0x1f, 0xe0, 0x6e, 0x48, 0x60, 0x0d, 0x14, 0x5d, 0x4e, 0x7a, |
| 3455 | 0xcc, 0xd0, 0x56, 0xf3, 0x6b, 0xe5, 0x46, 0x39, 0x1a, 0xd4, 0x8a, 0xbb, 0x42, 0x80, 0x62, 0xf9, |
| 3456 | 0x83, 0xd2, 0x77, 0x3f, 0xd4, 0x72, 0xcf, 0xff, 0x58, 0xcd, 0x99, 0x3f, 0xe9, 0xc0, 0x78, 0xe4, |
| 3457 | 0x3b, 0xb8, 0xbb, 0x17, 0x36, 0xbf, 0x20, 0x0e, 0xdf, 0x72, 0x1c, 0xc2, 0x18, 0x22, 0x7d, 0x97, |
| 3458 | 0x1c, 0xc3, 0xcf, 0x41, 0x49, 0x9c, 0xac, 0x85, 0x39, 0x36, 0xb4, 0x55, 0x6d, 0xad, 0x52, 0x7f, |
| 3459 | 0xdf, 0x4a, 0x72, 0x3a, 0x0a, 0xd0, 0x0a, 0x8e, 0xda, 0x42, 0xc0, 0x2c, 0xc1, 0xb6, 0xfa, 0xeb, |
| 3460 | 0xd6, 0x47, 0xd2, 0xd6, 0x63, 0xc2, 0x71, 0x03, 0x9e, 0x0e, 0x6a, 0xb9, 0x68, 0x50, 0x03, 0x89, |
| 3461 | 0x0c, 0x8d, 0xac, 0xc2, 0x03, 0x50, 0x60, 0x01, 0x71, 0x0c, 0x5d, 0x5a, 0xbf, 0x6b, 0x4d, 0xa9, |
| 3462 | 0x98, 0x95, 0x11, 0xe1, 0x5e, 0x40, 0x9c, 0xc6, 0x35, 0xe5, 0xa1, 0x20, 0xfe, 0x90, 0xb4, 0x07, |
| 3463 | 0x3f, 0x03, 0x33, 0x8c, 0x63, 0x1e, 0x32, 0x23, 0x2f, 0x2d, 0xdf, 0xbf, 0xb2, 0x65, 0xa9, 0xdd, |
| 3464 | 0xf8, 0x9f, 0xb2, 0x3d, 0x13, 0xff, 0x23, 0x65, 0xd5, 0xfc, 0x04, 0x2c, 0x3d, 0xf1, 0x3d, 0x44, |
| 3465 | 0x98, 0x1f, 0x52, 0x87, 0x6c, 0x71, 0x4e, 0xdd, 0x66, 0xc8, 0x09, 0x83, 0xab, 0xa0, 0x10, 0x60, |
| 3466 | 0xde, 0x91, 0xe9, 0x2a, 0x27, 0xa1, 0x3d, 0xc5, 0xbc, 0x83, 0x24, 0x22, 0x18, 0x7d, 0x42, 0x9b, |
| 3467 | 0xf2, 0xc8, 0x29, 0xc6, 0x01, 0xa1, 0x4d, 0x24, 0x11, 0xf3, 0x4b, 0x30, 0x9f, 0x32, 0x8e, 0xc2, |
| 3468 | 0xae, 0xac, 0xa8, 0x80, 0xc6, 0x2a, 0x2a, 0x34, 0x18, 0x8a, 0xe5, 0xf0, 0x21, 0x98, 0xf7, 0x12, |
| 3469 | 0x9d, 0x7d, 0xf4, 0x88, 0x19, 0xba, 0xa4, 0x2e, 0x46, 0x83, 0x5a, 0xda, 0x9c, 0x80, 0xd0, 0x79, |
| 3470 | 0xae, 0xf9, 0x8b, 0x0e, 0x60, 0xc6, 0x69, 0x6c, 0x50, 0xf6, 0x70, 0x8f, 0xb0, 0x00, 0x3b, 0x44, |
| 3471 | 0x1d, 0xe9, 0xba, 0x0a, 0xb8, 0xfc, 0x64, 0x08, 0xa0, 0x84, 0xf3, 0xea, 0xc3, 0xc1, 0xb7, 0x40, |
| 3472 | 0xb1, 0x4d, 0xfd, 0x30, 0x90, 0x85, 0x29, 0x37, 0xe6, 0x14, 0xa5, 0xf8, 0xa1, 0x10, 0xa2, 0x18, |
| 3473 | 0x83, 0xb7, 0xc1, 0x6c, 0x9f, 0x50, 0xe6, 0xfa, 0x9e, 0x51, 0x90, 0xb4, 0x79, 0x45, 0x9b, 0x3d, |
| 3474 | 0x88, 0xc5, 0x68, 0x88, 0xc3, 0x3b, 0xa0, 0x44, 0x55, 0xe0, 0x46, 0x51, 0x72, 0x17, 0x14, 0xb7, |
| 3475 | 0x34, 0xca, 0xe0, 0x88, 0x01, 0xef, 0x81, 0x0a, 0x0b, 0x9b, 0x23, 0x85, 0x19, 0xa9, 0xb0, 0xa8, |
| 3476 | 0x14, 0x2a, 0x7b, 0x09, 0x84, 0xd2, 0x3c, 0x71, 0x2c, 0x71, 0x46, 0x63, 0x76, 0xfc, 0x58, 0x22, |
| 3477 | 0x05, 0x48, 0x22, 0xe6, 0xaf, 0x1a, 0xb8, 0x76, 0xb5, 0x8a, 0xbd, 0x0b, 0xca, 0x38, 0x70, 0xe5, |
| 3478 | 0xb1, 0x87, 0xb5, 0x9a, 0x13, 0x79, 0xdd, 0x7a, 0xba, 0x1b, 0x0b, 0x51, 0x82, 0x0b, 0xf2, 0x30, |
| 3479 | 0x18, 0xd1, 0xd2, 0x23, 0xf2, 0xd0, 0x25, 0x43, 0x09, 0x0e, 0x37, 0xc0, 0xdc, 0xf0, 0x47, 0x16, |
| 3480 | 0xc9, 0x28, 0x48, 0x85, 0xeb, 0xd1, 0xa0, 0x36, 0x87, 0xd2, 0x00, 0x1a, 0xe7, 0x99, 0x3f, 0xeb, |
| 3481 | 0x60, 0x79, 0x8f, 0x74, 0x0f, 0x5f, 0xcf, 0x5d, 0xf0, 0x6c, 0xec, 0x2e, 0xd8, 0x9c, 0x3e, 0xb1, |
| 3482 | 0xd9, 0x51, 0xbe, 0xb6, 0xfb, 0xe0, 0x7b, 0x1d, 0xdc, 0x9a, 0x12, 0x13, 0x3c, 0x06, 0x90, 0x5e, |
| 3483 | 0x18, 0x2f, 0x95, 0x47, 0x7b, 0x6a, 0x2c, 0x17, 0xa7, 0xb2, 0x71, 0x23, 0x1a, 0xd4, 0x32, 0xa6, |
| 3484 | 0x15, 0x65, 0xb8, 0x80, 0xdf, 0x68, 0x60, 0xc9, 0xcb, 0xba, 0xa9, 0x54, 0x9a, 0xeb, 0x53, 0x9d, |
| 3485 | 0x67, 0xde, 0x71, 0x8d, 0x9b, 0xd1, 0xa0, 0x96, 0x7d, 0xfd, 0xa1, 0x6c, 0x5f, 0xe2, 0x95, 0xb9, |
| 3486 | 0x91, 0x4a, 0x8f, 0x18, 0x90, 0xff, 0xae, 0xaf, 0x3e, 0x1e, 0xeb, 0xab, 0x8d, 0xcb, 0xf6, 0x55, |
| 3487 | 0x2a, 0xc8, 0x89, 0x6d, 0xf5, 0xe9, 0xb9, 0xb6, 0xba, 0x77, 0x99, 0xb6, 0x4a, 0x1b, 0x9e, 0xde, |
| 3488 | 0x55, 0x8f, 0xc1, 0xca, 0xe4, 0x80, 0xae, 0x7c, 0x39, 0x9b, 0x3f, 0xea, 0x60, 0xf1, 0xcd, 0x33, |
| 3489 | 0x7f, 0x95, 0xb1, 0xfe, 0xad, 0x00, 0x96, 0xdf, 0x8c, 0xf4, 0xa4, 0x45, 0x27, 0x64, 0x84, 0xaa, |
| 3490 | 0x67, 0x7c, 0x54, 0x9c, 0x7d, 0x46, 0x28, 0x92, 0x08, 0x34, 0xc1, 0x4c, 0x3b, 0x7e, 0xdd, 0xe2, |
| 3491 | 0xf7, 0x07, 0x88, 0x04, 0xab, 0xa7, 0x4d, 0x21, 0xb0, 0x05, 0x8a, 0x44, 0xec, 0xad, 0x46, 0x71, |
| 3492 | 0x35, 0xbf, 0x56, 0xa9, 0x7f, 0xf0, 0x6f, 0x3a, 0xc3, 0x92, 0x9b, 0xef, 0x8e, 0xc7, 0xe9, 0x49, |
| 3493 | 0xb2, 0x4e, 0x48, 0x19, 0x8a, 0x8d, 0xc3, 0xff, 0x83, 0x7c, 0xe8, 0xb6, 0xd4, 0x6b, 0x5f, 0x51, |
| 3494 | 0x94, 0xfc, 0xfe, 0xee, 0x36, 0x12, 0xf2, 0x15, 0xac, 0x96, 0x67, 0x69, 0x02, 0x2e, 0x80, 0xfc, |
| 3495 | 0x11, 0x39, 0x89, 0x07, 0x0a, 0x89, 0x4f, 0xf8, 0x10, 0x14, 0xfb, 0x62, 0xaf, 0x56, 0xf9, 0x7d, |
| 3496 | 0x67, 0x6a, 0x90, 0xc9, 0x1a, 0x8e, 0x62, 0xad, 0x07, 0xfa, 0xa6, 0x66, 0xfe, 0xae, 0x81, 0x9b, |
| 3497 | 0x13, 0xdb, 0x4f, 0xac, 0x3b, 0xb8, 0xdb, 0xf5, 0x8f, 0x49, 0x4b, 0xba, 0x2d, 0x25, 0xeb, 0xce, |
| 3498 | 0x56, 0x2c, 0x46, 0x43, 0x1c, 0xbe, 0x0d, 0x66, 0x28, 0xc1, 0xcc, 0xf7, 0xd4, 0x8a, 0x35, 0xea, |
| 3499 | 0x5c, 0x24, 0xa5, 0x48, 0xa1, 0x70, 0x0b, 0xcc, 0x13, 0xe1, 0x5e, 0xc6, 0xb5, 0x43, 0xa9, 0x3f, |
| 3500 | 0xac, 0xd4, 0xb2, 0x52, 0x98, 0xdf, 0x19, 0x87, 0xd1, 0x79, 0xbe, 0x70, 0xd5, 0x22, 0x9e, 0x4b, |
| 3501 | 0x5a, 0x72, 0x07, 0x2b, 0x25, 0xae, 0xb6, 0xa5, 0x14, 0x29, 0xd4, 0xfc, 0x5b, 0x07, 0xc6, 0xa4, |
| 3502 | 0xab, 0x0d, 0x1e, 0x26, 0xbb, 0x88, 0x04, 0xe5, 0x3a, 0x54, 0xa9, 0xdf, 0xbe, 0xd4, 0x80, 0x08, |
| 3503 | 0x8d, 0xc6, 0x92, 0x72, 0x3b, 0x97, 0x96, 0xa6, 0x56, 0x17, 0xf9, 0x0b, 0x29, 0x58, 0xf0, 0xc6, |
| 3504 | 0x77, 0xe6, 0x78, 0xa9, 0xaa, 0xd4, 0xef, 0x5c, 0x76, 0x1c, 0xa4, 0x37, 0x43, 0x79, 0x5b, 0x38, |
| 3505 | 0x07, 0x30, 0x74, 0xc1, 0x3e, 0xac, 0x03, 0xe0, 0x7a, 0x8e, 0xdf, 0x0b, 0xba, 0x84, 0x13, 0x99, |
| 3506 | 0xde, 0x52, 0x72, 0x0f, 0xee, 0x8e, 0x10, 0x94, 0x62, 0x65, 0xd5, 0xa5, 0x70, 0xb5, 0xba, 0x34, |
| 3507 | 0xd6, 0x4e, 0xcf, 0xaa, 0xb9, 0x17, 0x67, 0xd5, 0xdc, 0xcb, 0xb3, 0x6a, 0xee, 0x79, 0x54, 0xd5, |
| 3508 | 0x4e, 0xa3, 0xaa, 0xf6, 0x22, 0xaa, 0x6a, 0x2f, 0xa3, 0xaa, 0xf6, 0x67, 0x54, 0xd5, 0xbe, 0xfd, |
| 3509 | 0xab, 0x9a, 0x7b, 0xa6, 0xf7, 0xd7, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x85, 0x45, 0x74, |
| 3510 | 0x47, 0x0f, 0x00, 0x00, |
| 3511 | } |