github.com/cosmos/cosmos-proto@v1.0.0-beta.3/internal/testprotos/test3/test_nesting.pulsar.go (about) 1 // Code generated by protoc-gen-go-pulsar. DO NOT EDIT. 2 package test3 3 4 import ( 5 fmt "fmt" 6 runtime "github.com/cosmos/cosmos-proto/runtime" 7 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 8 protoiface "google.golang.org/protobuf/runtime/protoiface" 9 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 10 io "io" 11 reflect "reflect" 12 sync "sync" 13 ) 14 15 var ( 16 md_MultiLayeredNesting protoreflect.MessageDescriptor 17 fd_MultiLayeredNesting_nested1 protoreflect.FieldDescriptor 18 ) 19 20 func init() { 21 file_internal_testprotos_test3_test_nesting_proto_init() 22 md_MultiLayeredNesting = File_internal_testprotos_test3_test_nesting_proto.Messages().ByName("MultiLayeredNesting") 23 fd_MultiLayeredNesting_nested1 = md_MultiLayeredNesting.Fields().ByName("nested1") 24 } 25 26 var _ protoreflect.Message = (*fastReflection_MultiLayeredNesting)(nil) 27 28 type fastReflection_MultiLayeredNesting MultiLayeredNesting 29 30 func (x *MultiLayeredNesting) ProtoReflect() protoreflect.Message { 31 return (*fastReflection_MultiLayeredNesting)(x) 32 } 33 34 func (x *MultiLayeredNesting) slowProtoReflect() protoreflect.Message { 35 mi := &file_internal_testprotos_test3_test_nesting_proto_msgTypes[0] 36 if protoimpl.UnsafeEnabled && x != nil { 37 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 38 if ms.LoadMessageInfo() == nil { 39 ms.StoreMessageInfo(mi) 40 } 41 return ms 42 } 43 return mi.MessageOf(x) 44 } 45 46 var _fastReflection_MultiLayeredNesting_messageType fastReflection_MultiLayeredNesting_messageType 47 var _ protoreflect.MessageType = fastReflection_MultiLayeredNesting_messageType{} 48 49 type fastReflection_MultiLayeredNesting_messageType struct{} 50 51 func (x fastReflection_MultiLayeredNesting_messageType) Zero() protoreflect.Message { 52 return (*fastReflection_MultiLayeredNesting)(nil) 53 } 54 func (x fastReflection_MultiLayeredNesting_messageType) New() protoreflect.Message { 55 return new(fastReflection_MultiLayeredNesting) 56 } 57 func (x fastReflection_MultiLayeredNesting_messageType) Descriptor() protoreflect.MessageDescriptor { 58 return md_MultiLayeredNesting 59 } 60 61 // Descriptor returns message descriptor, which contains only the protobuf 62 // type information for the message. 63 func (x *fastReflection_MultiLayeredNesting) Descriptor() protoreflect.MessageDescriptor { 64 return md_MultiLayeredNesting 65 } 66 67 // Type returns the message type, which encapsulates both Go and protobuf 68 // type information. If the Go type information is not needed, 69 // it is recommended that the message descriptor be used instead. 70 func (x *fastReflection_MultiLayeredNesting) Type() protoreflect.MessageType { 71 return _fastReflection_MultiLayeredNesting_messageType 72 } 73 74 // New returns a newly allocated and mutable empty message. 75 func (x *fastReflection_MultiLayeredNesting) New() protoreflect.Message { 76 return new(fastReflection_MultiLayeredNesting) 77 } 78 79 // Interface unwraps the message reflection interface and 80 // returns the underlying ProtoMessage interface. 81 func (x *fastReflection_MultiLayeredNesting) Interface() protoreflect.ProtoMessage { 82 return (*MultiLayeredNesting)(x) 83 } 84 85 // Range iterates over every populated field in an undefined order, 86 // calling f for each field descriptor and value encountered. 87 // Range returns immediately if f returns false. 88 // While iterating, mutating operations may only be performed 89 // on the current field descriptor. 90 func (x *fastReflection_MultiLayeredNesting) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { 91 if x.Nested1 != nil { 92 value := protoreflect.ValueOfMessage(x.Nested1.ProtoReflect()) 93 if !f(fd_MultiLayeredNesting_nested1, value) { 94 return 95 } 96 } 97 } 98 99 // Has reports whether a field is populated. 100 // 101 // Some fields have the property of nullability where it is possible to 102 // distinguish between the default value of a field and whether the field 103 // was explicitly populated with the default value. Singular message fields, 104 // member fields of a oneof, and proto2 scalar fields are nullable. Such 105 // fields are populated only if explicitly set. 106 // 107 // In other cases (aside from the nullable cases above), 108 // a proto3 scalar field is populated if it contains a non-zero value, and 109 // a repeated field is populated if it is non-empty. 110 func (x *fastReflection_MultiLayeredNesting) Has(fd protoreflect.FieldDescriptor) bool { 111 switch fd.FullName() { 112 case "goproto.proto.test3.MultiLayeredNesting.nested1": 113 return x.Nested1 != nil 114 default: 115 if fd.IsExtension() { 116 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting")) 117 } 118 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting does not contain field %s", fd.FullName())) 119 } 120 } 121 122 // Clear clears the field such that a subsequent Has call reports false. 123 // 124 // Clearing an extension field clears both the extension type and value 125 // associated with the given field number. 126 // 127 // Clear is a mutating operation and unsafe for concurrent use. 128 func (x *fastReflection_MultiLayeredNesting) Clear(fd protoreflect.FieldDescriptor) { 129 switch fd.FullName() { 130 case "goproto.proto.test3.MultiLayeredNesting.nested1": 131 x.Nested1 = nil 132 default: 133 if fd.IsExtension() { 134 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting")) 135 } 136 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting does not contain field %s", fd.FullName())) 137 } 138 } 139 140 // Get retrieves the value for a field. 141 // 142 // For unpopulated scalars, it returns the default value, where 143 // the default value of a bytes scalar is guaranteed to be a copy. 144 // For unpopulated composite types, it returns an empty, read-only view 145 // of the value; to obtain a mutable reference, use Mutable. 146 func (x *fastReflection_MultiLayeredNesting) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { 147 switch descriptor.FullName() { 148 case "goproto.proto.test3.MultiLayeredNesting.nested1": 149 value := x.Nested1 150 return protoreflect.ValueOfMessage(value.ProtoReflect()) 151 default: 152 if descriptor.IsExtension() { 153 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting")) 154 } 155 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting does not contain field %s", descriptor.FullName())) 156 } 157 } 158 159 // Set stores the value for a field. 160 // 161 // For a field belonging to a oneof, it implicitly clears any other field 162 // that may be currently set within the same oneof. 163 // For extension fields, it implicitly stores the provided ExtensionType. 164 // When setting a composite type, it is unspecified whether the stored value 165 // aliases the source's memory in any way. If the composite value is an 166 // empty, read-only value, then it panics. 167 // 168 // Set is a mutating operation and unsafe for concurrent use. 169 func (x *fastReflection_MultiLayeredNesting) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { 170 switch fd.FullName() { 171 case "goproto.proto.test3.MultiLayeredNesting.nested1": 172 x.Nested1 = value.Message().Interface().(*MultiLayeredNesting_Nested1) 173 default: 174 if fd.IsExtension() { 175 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting")) 176 } 177 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting does not contain field %s", fd.FullName())) 178 } 179 } 180 181 // Mutable returns a mutable reference to a composite type. 182 // 183 // If the field is unpopulated, it may allocate a composite value. 184 // For a field belonging to a oneof, it implicitly clears any other field 185 // that may be currently set within the same oneof. 186 // For extension fields, it implicitly stores the provided ExtensionType 187 // if not already stored. 188 // It panics if the field does not contain a composite type. 189 // 190 // Mutable is a mutating operation and unsafe for concurrent use. 191 func (x *fastReflection_MultiLayeredNesting) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { 192 switch fd.FullName() { 193 case "goproto.proto.test3.MultiLayeredNesting.nested1": 194 if x.Nested1 == nil { 195 x.Nested1 = new(MultiLayeredNesting_Nested1) 196 } 197 return protoreflect.ValueOfMessage(x.Nested1.ProtoReflect()) 198 default: 199 if fd.IsExtension() { 200 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting")) 201 } 202 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting does not contain field %s", fd.FullName())) 203 } 204 } 205 206 // NewField returns a new value that is assignable to the field 207 // for the given descriptor. For scalars, this returns the default value. 208 // For lists, maps, and messages, this returns a new, empty, mutable value. 209 func (x *fastReflection_MultiLayeredNesting) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { 210 switch fd.FullName() { 211 case "goproto.proto.test3.MultiLayeredNesting.nested1": 212 m := new(MultiLayeredNesting_Nested1) 213 return protoreflect.ValueOfMessage(m.ProtoReflect()) 214 default: 215 if fd.IsExtension() { 216 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting")) 217 } 218 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting does not contain field %s", fd.FullName())) 219 } 220 } 221 222 // WhichOneof reports which field within the oneof is populated, 223 // returning nil if none are populated. 224 // It panics if the oneof descriptor does not belong to this message. 225 func (x *fastReflection_MultiLayeredNesting) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { 226 switch d.FullName() { 227 default: 228 panic(fmt.Errorf("%s is not a oneof field in goproto.proto.test3.MultiLayeredNesting", d.FullName())) 229 } 230 panic("unreachable") 231 } 232 233 // GetUnknown retrieves the entire list of unknown fields. 234 // The caller may only mutate the contents of the RawFields 235 // if the mutated bytes are stored back into the message with SetUnknown. 236 func (x *fastReflection_MultiLayeredNesting) GetUnknown() protoreflect.RawFields { 237 return x.unknownFields 238 } 239 240 // SetUnknown stores an entire list of unknown fields. 241 // The raw fields must be syntactically valid according to the wire format. 242 // An implementation may panic if this is not the case. 243 // Once stored, the caller must not mutate the content of the RawFields. 244 // An empty RawFields may be passed to clear the fields. 245 // 246 // SetUnknown is a mutating operation and unsafe for concurrent use. 247 func (x *fastReflection_MultiLayeredNesting) SetUnknown(fields protoreflect.RawFields) { 248 x.unknownFields = fields 249 } 250 251 // IsValid reports whether the message is valid. 252 // 253 // An invalid message is an empty, read-only value. 254 // 255 // An invalid message often corresponds to a nil pointer of the concrete 256 // message type, but the details are implementation dependent. 257 // Validity is not part of the protobuf data model, and may not 258 // be preserved in marshaling or other operations. 259 func (x *fastReflection_MultiLayeredNesting) IsValid() bool { 260 return x != nil 261 } 262 263 // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. 264 // This method may return nil. 265 // 266 // The returned methods type is identical to 267 // "google.golang.org/protobuf/runtime/protoiface".Methods. 268 // Consult the protoiface package documentation for details. 269 func (x *fastReflection_MultiLayeredNesting) ProtoMethods() *protoiface.Methods { 270 size := func(input protoiface.SizeInput) protoiface.SizeOutput { 271 x := input.Message.Interface().(*MultiLayeredNesting) 272 if x == nil { 273 return protoiface.SizeOutput{ 274 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 275 Size: 0, 276 } 277 } 278 options := runtime.SizeInputToOptions(input) 279 _ = options 280 var n int 281 var l int 282 _ = l 283 if x.Nested1 != nil { 284 l = options.Size(x.Nested1) 285 n += 1 + l + runtime.Sov(uint64(l)) 286 } 287 if x.unknownFields != nil { 288 n += len(x.unknownFields) 289 } 290 return protoiface.SizeOutput{ 291 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 292 Size: n, 293 } 294 } 295 296 marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { 297 x := input.Message.Interface().(*MultiLayeredNesting) 298 if x == nil { 299 return protoiface.MarshalOutput{ 300 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 301 Buf: input.Buf, 302 }, nil 303 } 304 options := runtime.MarshalInputToOptions(input) 305 _ = options 306 size := options.Size(x) 307 dAtA := make([]byte, size) 308 i := len(dAtA) 309 _ = i 310 var l int 311 _ = l 312 if x.unknownFields != nil { 313 i -= len(x.unknownFields) 314 copy(dAtA[i:], x.unknownFields) 315 } 316 if x.Nested1 != nil { 317 encoded, err := options.Marshal(x.Nested1) 318 if err != nil { 319 return protoiface.MarshalOutput{ 320 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 321 Buf: input.Buf, 322 }, err 323 } 324 i -= len(encoded) 325 copy(dAtA[i:], encoded) 326 i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) 327 i-- 328 dAtA[i] = 0xa 329 } 330 if input.Buf != nil { 331 input.Buf = append(input.Buf, dAtA...) 332 } else { 333 input.Buf = dAtA 334 } 335 return protoiface.MarshalOutput{ 336 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 337 Buf: input.Buf, 338 }, nil 339 } 340 unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { 341 x := input.Message.Interface().(*MultiLayeredNesting) 342 if x == nil { 343 return protoiface.UnmarshalOutput{ 344 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 345 Flags: input.Flags, 346 }, nil 347 } 348 options := runtime.UnmarshalInputToOptions(input) 349 _ = options 350 dAtA := input.Buf 351 l := len(dAtA) 352 iNdEx := 0 353 for iNdEx < l { 354 preIndex := iNdEx 355 var wire uint64 356 for shift := uint(0); ; shift += 7 { 357 if shift >= 64 { 358 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow 359 } 360 if iNdEx >= l { 361 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 362 } 363 b := dAtA[iNdEx] 364 iNdEx++ 365 wire |= uint64(b&0x7F) << shift 366 if b < 0x80 { 367 break 368 } 369 } 370 fieldNum := int32(wire >> 3) 371 wireType := int(wire & 0x7) 372 if wireType == 4 { 373 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MultiLayeredNesting: wiretype end group for non-group") 374 } 375 if fieldNum <= 0 { 376 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MultiLayeredNesting: illegal tag %d (wire type %d)", fieldNum, wire) 377 } 378 switch fieldNum { 379 case 1: 380 if wireType != 2 { 381 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nested1", wireType) 382 } 383 var msglen int 384 for shift := uint(0); ; shift += 7 { 385 if shift >= 64 { 386 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow 387 } 388 if iNdEx >= l { 389 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 390 } 391 b := dAtA[iNdEx] 392 iNdEx++ 393 msglen |= int(b&0x7F) << shift 394 if b < 0x80 { 395 break 396 } 397 } 398 if msglen < 0 { 399 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength 400 } 401 postIndex := iNdEx + msglen 402 if postIndex < 0 { 403 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength 404 } 405 if postIndex > l { 406 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 407 } 408 if x.Nested1 == nil { 409 x.Nested1 = &MultiLayeredNesting_Nested1{} 410 } 411 if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Nested1); err != nil { 412 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err 413 } 414 iNdEx = postIndex 415 default: 416 iNdEx = preIndex 417 skippy, err := runtime.Skip(dAtA[iNdEx:]) 418 if err != nil { 419 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err 420 } 421 if (skippy < 0) || (iNdEx+skippy) < 0 { 422 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength 423 } 424 if (iNdEx + skippy) > l { 425 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 426 } 427 if !options.DiscardUnknown { 428 x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 429 } 430 iNdEx += skippy 431 } 432 } 433 434 if iNdEx > l { 435 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 436 } 437 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil 438 } 439 return &protoiface.Methods{ 440 NoUnkeyedLiterals: struct{}{}, 441 Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, 442 Size: size, 443 Marshal: marshal, 444 Unmarshal: unmarshal, 445 Merge: nil, 446 CheckInitialized: nil, 447 } 448 } 449 450 var ( 451 md_MultiLayeredNesting_Nested1 protoreflect.MessageDescriptor 452 ) 453 454 func init() { 455 file_internal_testprotos_test3_test_nesting_proto_init() 456 md_MultiLayeredNesting_Nested1 = File_internal_testprotos_test3_test_nesting_proto.Messages().ByName("MultiLayeredNesting").Messages().ByName("Nested1") 457 } 458 459 var _ protoreflect.Message = (*fastReflection_MultiLayeredNesting_Nested1)(nil) 460 461 type fastReflection_MultiLayeredNesting_Nested1 MultiLayeredNesting_Nested1 462 463 func (x *MultiLayeredNesting_Nested1) ProtoReflect() protoreflect.Message { 464 return (*fastReflection_MultiLayeredNesting_Nested1)(x) 465 } 466 467 func (x *MultiLayeredNesting_Nested1) slowProtoReflect() protoreflect.Message { 468 mi := &file_internal_testprotos_test3_test_nesting_proto_msgTypes[1] 469 if protoimpl.UnsafeEnabled && x != nil { 470 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 471 if ms.LoadMessageInfo() == nil { 472 ms.StoreMessageInfo(mi) 473 } 474 return ms 475 } 476 return mi.MessageOf(x) 477 } 478 479 var _fastReflection_MultiLayeredNesting_Nested1_messageType fastReflection_MultiLayeredNesting_Nested1_messageType 480 var _ protoreflect.MessageType = fastReflection_MultiLayeredNesting_Nested1_messageType{} 481 482 type fastReflection_MultiLayeredNesting_Nested1_messageType struct{} 483 484 func (x fastReflection_MultiLayeredNesting_Nested1_messageType) Zero() protoreflect.Message { 485 return (*fastReflection_MultiLayeredNesting_Nested1)(nil) 486 } 487 func (x fastReflection_MultiLayeredNesting_Nested1_messageType) New() protoreflect.Message { 488 return new(fastReflection_MultiLayeredNesting_Nested1) 489 } 490 func (x fastReflection_MultiLayeredNesting_Nested1_messageType) Descriptor() protoreflect.MessageDescriptor { 491 return md_MultiLayeredNesting_Nested1 492 } 493 494 // Descriptor returns message descriptor, which contains only the protobuf 495 // type information for the message. 496 func (x *fastReflection_MultiLayeredNesting_Nested1) Descriptor() protoreflect.MessageDescriptor { 497 return md_MultiLayeredNesting_Nested1 498 } 499 500 // Type returns the message type, which encapsulates both Go and protobuf 501 // type information. If the Go type information is not needed, 502 // it is recommended that the message descriptor be used instead. 503 func (x *fastReflection_MultiLayeredNesting_Nested1) Type() protoreflect.MessageType { 504 return _fastReflection_MultiLayeredNesting_Nested1_messageType 505 } 506 507 // New returns a newly allocated and mutable empty message. 508 func (x *fastReflection_MultiLayeredNesting_Nested1) New() protoreflect.Message { 509 return new(fastReflection_MultiLayeredNesting_Nested1) 510 } 511 512 // Interface unwraps the message reflection interface and 513 // returns the underlying ProtoMessage interface. 514 func (x *fastReflection_MultiLayeredNesting_Nested1) Interface() protoreflect.ProtoMessage { 515 return (*MultiLayeredNesting_Nested1)(x) 516 } 517 518 // Range iterates over every populated field in an undefined order, 519 // calling f for each field descriptor and value encountered. 520 // Range returns immediately if f returns false. 521 // While iterating, mutating operations may only be performed 522 // on the current field descriptor. 523 func (x *fastReflection_MultiLayeredNesting_Nested1) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { 524 } 525 526 // Has reports whether a field is populated. 527 // 528 // Some fields have the property of nullability where it is possible to 529 // distinguish between the default value of a field and whether the field 530 // was explicitly populated with the default value. Singular message fields, 531 // member fields of a oneof, and proto2 scalar fields are nullable. Such 532 // fields are populated only if explicitly set. 533 // 534 // In other cases (aside from the nullable cases above), 535 // a proto3 scalar field is populated if it contains a non-zero value, and 536 // a repeated field is populated if it is non-empty. 537 func (x *fastReflection_MultiLayeredNesting_Nested1) Has(fd protoreflect.FieldDescriptor) bool { 538 switch fd.FullName() { 539 default: 540 if fd.IsExtension() { 541 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1")) 542 } 543 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1 does not contain field %s", fd.FullName())) 544 } 545 } 546 547 // Clear clears the field such that a subsequent Has call reports false. 548 // 549 // Clearing an extension field clears both the extension type and value 550 // associated with the given field number. 551 // 552 // Clear is a mutating operation and unsafe for concurrent use. 553 func (x *fastReflection_MultiLayeredNesting_Nested1) Clear(fd protoreflect.FieldDescriptor) { 554 switch fd.FullName() { 555 default: 556 if fd.IsExtension() { 557 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1")) 558 } 559 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1 does not contain field %s", fd.FullName())) 560 } 561 } 562 563 // Get retrieves the value for a field. 564 // 565 // For unpopulated scalars, it returns the default value, where 566 // the default value of a bytes scalar is guaranteed to be a copy. 567 // For unpopulated composite types, it returns an empty, read-only view 568 // of the value; to obtain a mutable reference, use Mutable. 569 func (x *fastReflection_MultiLayeredNesting_Nested1) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { 570 switch descriptor.FullName() { 571 default: 572 if descriptor.IsExtension() { 573 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1")) 574 } 575 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1 does not contain field %s", descriptor.FullName())) 576 } 577 } 578 579 // Set stores the value for a field. 580 // 581 // For a field belonging to a oneof, it implicitly clears any other field 582 // that may be currently set within the same oneof. 583 // For extension fields, it implicitly stores the provided ExtensionType. 584 // When setting a composite type, it is unspecified whether the stored value 585 // aliases the source's memory in any way. If the composite value is an 586 // empty, read-only value, then it panics. 587 // 588 // Set is a mutating operation and unsafe for concurrent use. 589 func (x *fastReflection_MultiLayeredNesting_Nested1) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { 590 switch fd.FullName() { 591 default: 592 if fd.IsExtension() { 593 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1")) 594 } 595 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1 does not contain field %s", fd.FullName())) 596 } 597 } 598 599 // Mutable returns a mutable reference to a composite type. 600 // 601 // If the field is unpopulated, it may allocate a composite value. 602 // For a field belonging to a oneof, it implicitly clears any other field 603 // that may be currently set within the same oneof. 604 // For extension fields, it implicitly stores the provided ExtensionType 605 // if not already stored. 606 // It panics if the field does not contain a composite type. 607 // 608 // Mutable is a mutating operation and unsafe for concurrent use. 609 func (x *fastReflection_MultiLayeredNesting_Nested1) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { 610 switch fd.FullName() { 611 default: 612 if fd.IsExtension() { 613 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1")) 614 } 615 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1 does not contain field %s", fd.FullName())) 616 } 617 } 618 619 // NewField returns a new value that is assignable to the field 620 // for the given descriptor. For scalars, this returns the default value. 621 // For lists, maps, and messages, this returns a new, empty, mutable value. 622 func (x *fastReflection_MultiLayeredNesting_Nested1) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { 623 switch fd.FullName() { 624 default: 625 if fd.IsExtension() { 626 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1")) 627 } 628 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1 does not contain field %s", fd.FullName())) 629 } 630 } 631 632 // WhichOneof reports which field within the oneof is populated, 633 // returning nil if none are populated. 634 // It panics if the oneof descriptor does not belong to this message. 635 func (x *fastReflection_MultiLayeredNesting_Nested1) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { 636 switch d.FullName() { 637 default: 638 panic(fmt.Errorf("%s is not a oneof field in goproto.proto.test3.MultiLayeredNesting.Nested1", d.FullName())) 639 } 640 panic("unreachable") 641 } 642 643 // GetUnknown retrieves the entire list of unknown fields. 644 // The caller may only mutate the contents of the RawFields 645 // if the mutated bytes are stored back into the message with SetUnknown. 646 func (x *fastReflection_MultiLayeredNesting_Nested1) GetUnknown() protoreflect.RawFields { 647 return x.unknownFields 648 } 649 650 // SetUnknown stores an entire list of unknown fields. 651 // The raw fields must be syntactically valid according to the wire format. 652 // An implementation may panic if this is not the case. 653 // Once stored, the caller must not mutate the content of the RawFields. 654 // An empty RawFields may be passed to clear the fields. 655 // 656 // SetUnknown is a mutating operation and unsafe for concurrent use. 657 func (x *fastReflection_MultiLayeredNesting_Nested1) SetUnknown(fields protoreflect.RawFields) { 658 x.unknownFields = fields 659 } 660 661 // IsValid reports whether the message is valid. 662 // 663 // An invalid message is an empty, read-only value. 664 // 665 // An invalid message often corresponds to a nil pointer of the concrete 666 // message type, but the details are implementation dependent. 667 // Validity is not part of the protobuf data model, and may not 668 // be preserved in marshaling or other operations. 669 func (x *fastReflection_MultiLayeredNesting_Nested1) IsValid() bool { 670 return x != nil 671 } 672 673 // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. 674 // This method may return nil. 675 // 676 // The returned methods type is identical to 677 // "google.golang.org/protobuf/runtime/protoiface".Methods. 678 // Consult the protoiface package documentation for details. 679 func (x *fastReflection_MultiLayeredNesting_Nested1) ProtoMethods() *protoiface.Methods { 680 size := func(input protoiface.SizeInput) protoiface.SizeOutput { 681 x := input.Message.Interface().(*MultiLayeredNesting_Nested1) 682 if x == nil { 683 return protoiface.SizeOutput{ 684 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 685 Size: 0, 686 } 687 } 688 options := runtime.SizeInputToOptions(input) 689 _ = options 690 var n int 691 var l int 692 _ = l 693 if x.unknownFields != nil { 694 n += len(x.unknownFields) 695 } 696 return protoiface.SizeOutput{ 697 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 698 Size: n, 699 } 700 } 701 702 marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { 703 x := input.Message.Interface().(*MultiLayeredNesting_Nested1) 704 if x == nil { 705 return protoiface.MarshalOutput{ 706 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 707 Buf: input.Buf, 708 }, nil 709 } 710 options := runtime.MarshalInputToOptions(input) 711 _ = options 712 size := options.Size(x) 713 dAtA := make([]byte, size) 714 i := len(dAtA) 715 _ = i 716 var l int 717 _ = l 718 if x.unknownFields != nil { 719 i -= len(x.unknownFields) 720 copy(dAtA[i:], x.unknownFields) 721 } 722 if input.Buf != nil { 723 input.Buf = append(input.Buf, dAtA...) 724 } else { 725 input.Buf = dAtA 726 } 727 return protoiface.MarshalOutput{ 728 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 729 Buf: input.Buf, 730 }, nil 731 } 732 unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { 733 x := input.Message.Interface().(*MultiLayeredNesting_Nested1) 734 if x == nil { 735 return protoiface.UnmarshalOutput{ 736 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 737 Flags: input.Flags, 738 }, nil 739 } 740 options := runtime.UnmarshalInputToOptions(input) 741 _ = options 742 dAtA := input.Buf 743 l := len(dAtA) 744 iNdEx := 0 745 for iNdEx < l { 746 preIndex := iNdEx 747 var wire uint64 748 for shift := uint(0); ; shift += 7 { 749 if shift >= 64 { 750 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow 751 } 752 if iNdEx >= l { 753 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 754 } 755 b := dAtA[iNdEx] 756 iNdEx++ 757 wire |= uint64(b&0x7F) << shift 758 if b < 0x80 { 759 break 760 } 761 } 762 fieldNum := int32(wire >> 3) 763 wireType := int(wire & 0x7) 764 if wireType == 4 { 765 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MultiLayeredNesting_Nested1: wiretype end group for non-group") 766 } 767 if fieldNum <= 0 { 768 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MultiLayeredNesting_Nested1: illegal tag %d (wire type %d)", fieldNum, wire) 769 } 770 switch fieldNum { 771 default: 772 iNdEx = preIndex 773 skippy, err := runtime.Skip(dAtA[iNdEx:]) 774 if err != nil { 775 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err 776 } 777 if (skippy < 0) || (iNdEx+skippy) < 0 { 778 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength 779 } 780 if (iNdEx + skippy) > l { 781 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 782 } 783 if !options.DiscardUnknown { 784 x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 785 } 786 iNdEx += skippy 787 } 788 } 789 790 if iNdEx > l { 791 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 792 } 793 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil 794 } 795 return &protoiface.Methods{ 796 NoUnkeyedLiterals: struct{}{}, 797 Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, 798 Size: size, 799 Marshal: marshal, 800 Unmarshal: unmarshal, 801 Merge: nil, 802 CheckInitialized: nil, 803 } 804 } 805 806 var ( 807 md_MultiLayeredNesting_Nested1_Nested2 protoreflect.MessageDescriptor 808 fd_MultiLayeredNesting_Nested1_Nested2_nested_3 protoreflect.FieldDescriptor 809 ) 810 811 func init() { 812 file_internal_testprotos_test3_test_nesting_proto_init() 813 md_MultiLayeredNesting_Nested1_Nested2 = File_internal_testprotos_test3_test_nesting_proto.Messages().ByName("MultiLayeredNesting").Messages().ByName("Nested1").Messages().ByName("Nested2") 814 fd_MultiLayeredNesting_Nested1_Nested2_nested_3 = md_MultiLayeredNesting_Nested1_Nested2.Fields().ByName("nested_3") 815 } 816 817 var _ protoreflect.Message = (*fastReflection_MultiLayeredNesting_Nested1_Nested2)(nil) 818 819 type fastReflection_MultiLayeredNesting_Nested1_Nested2 MultiLayeredNesting_Nested1_Nested2 820 821 func (x *MultiLayeredNesting_Nested1_Nested2) ProtoReflect() protoreflect.Message { 822 return (*fastReflection_MultiLayeredNesting_Nested1_Nested2)(x) 823 } 824 825 func (x *MultiLayeredNesting_Nested1_Nested2) slowProtoReflect() protoreflect.Message { 826 mi := &file_internal_testprotos_test3_test_nesting_proto_msgTypes[2] 827 if protoimpl.UnsafeEnabled && x != nil { 828 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 829 if ms.LoadMessageInfo() == nil { 830 ms.StoreMessageInfo(mi) 831 } 832 return ms 833 } 834 return mi.MessageOf(x) 835 } 836 837 var _fastReflection_MultiLayeredNesting_Nested1_Nested2_messageType fastReflection_MultiLayeredNesting_Nested1_Nested2_messageType 838 var _ protoreflect.MessageType = fastReflection_MultiLayeredNesting_Nested1_Nested2_messageType{} 839 840 type fastReflection_MultiLayeredNesting_Nested1_Nested2_messageType struct{} 841 842 func (x fastReflection_MultiLayeredNesting_Nested1_Nested2_messageType) Zero() protoreflect.Message { 843 return (*fastReflection_MultiLayeredNesting_Nested1_Nested2)(nil) 844 } 845 func (x fastReflection_MultiLayeredNesting_Nested1_Nested2_messageType) New() protoreflect.Message { 846 return new(fastReflection_MultiLayeredNesting_Nested1_Nested2) 847 } 848 func (x fastReflection_MultiLayeredNesting_Nested1_Nested2_messageType) Descriptor() protoreflect.MessageDescriptor { 849 return md_MultiLayeredNesting_Nested1_Nested2 850 } 851 852 // Descriptor returns message descriptor, which contains only the protobuf 853 // type information for the message. 854 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) Descriptor() protoreflect.MessageDescriptor { 855 return md_MultiLayeredNesting_Nested1_Nested2 856 } 857 858 // Type returns the message type, which encapsulates both Go and protobuf 859 // type information. If the Go type information is not needed, 860 // it is recommended that the message descriptor be used instead. 861 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) Type() protoreflect.MessageType { 862 return _fastReflection_MultiLayeredNesting_Nested1_Nested2_messageType 863 } 864 865 // New returns a newly allocated and mutable empty message. 866 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) New() protoreflect.Message { 867 return new(fastReflection_MultiLayeredNesting_Nested1_Nested2) 868 } 869 870 // Interface unwraps the message reflection interface and 871 // returns the underlying ProtoMessage interface. 872 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) Interface() protoreflect.ProtoMessage { 873 return (*MultiLayeredNesting_Nested1_Nested2)(x) 874 } 875 876 // Range iterates over every populated field in an undefined order, 877 // calling f for each field descriptor and value encountered. 878 // Range returns immediately if f returns false. 879 // While iterating, mutating operations may only be performed 880 // on the current field descriptor. 881 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { 882 if x.Nested_3 != nil { 883 value := protoreflect.ValueOfMessage(x.Nested_3.ProtoReflect()) 884 if !f(fd_MultiLayeredNesting_Nested1_Nested2_nested_3, value) { 885 return 886 } 887 } 888 } 889 890 // Has reports whether a field is populated. 891 // 892 // Some fields have the property of nullability where it is possible to 893 // distinguish between the default value of a field and whether the field 894 // was explicitly populated with the default value. Singular message fields, 895 // member fields of a oneof, and proto2 scalar fields are nullable. Such 896 // fields are populated only if explicitly set. 897 // 898 // In other cases (aside from the nullable cases above), 899 // a proto3 scalar field is populated if it contains a non-zero value, and 900 // a repeated field is populated if it is non-empty. 901 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) Has(fd protoreflect.FieldDescriptor) bool { 902 switch fd.FullName() { 903 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.nested_3": 904 return x.Nested_3 != nil 905 default: 906 if fd.IsExtension() { 907 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2")) 908 } 909 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2 does not contain field %s", fd.FullName())) 910 } 911 } 912 913 // Clear clears the field such that a subsequent Has call reports false. 914 // 915 // Clearing an extension field clears both the extension type and value 916 // associated with the given field number. 917 // 918 // Clear is a mutating operation and unsafe for concurrent use. 919 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) Clear(fd protoreflect.FieldDescriptor) { 920 switch fd.FullName() { 921 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.nested_3": 922 x.Nested_3 = nil 923 default: 924 if fd.IsExtension() { 925 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2")) 926 } 927 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2 does not contain field %s", fd.FullName())) 928 } 929 } 930 931 // Get retrieves the value for a field. 932 // 933 // For unpopulated scalars, it returns the default value, where 934 // the default value of a bytes scalar is guaranteed to be a copy. 935 // For unpopulated composite types, it returns an empty, read-only view 936 // of the value; to obtain a mutable reference, use Mutable. 937 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { 938 switch descriptor.FullName() { 939 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.nested_3": 940 value := x.Nested_3 941 return protoreflect.ValueOfMessage(value.ProtoReflect()) 942 default: 943 if descriptor.IsExtension() { 944 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2")) 945 } 946 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2 does not contain field %s", descriptor.FullName())) 947 } 948 } 949 950 // Set stores the value for a field. 951 // 952 // For a field belonging to a oneof, it implicitly clears any other field 953 // that may be currently set within the same oneof. 954 // For extension fields, it implicitly stores the provided ExtensionType. 955 // When setting a composite type, it is unspecified whether the stored value 956 // aliases the source's memory in any way. If the composite value is an 957 // empty, read-only value, then it panics. 958 // 959 // Set is a mutating operation and unsafe for concurrent use. 960 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { 961 switch fd.FullName() { 962 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.nested_3": 963 x.Nested_3 = value.Message().Interface().(*MultiLayeredNesting_Nested1_Nested2_Nested3) 964 default: 965 if fd.IsExtension() { 966 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2")) 967 } 968 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2 does not contain field %s", fd.FullName())) 969 } 970 } 971 972 // Mutable returns a mutable reference to a composite type. 973 // 974 // If the field is unpopulated, it may allocate a composite value. 975 // For a field belonging to a oneof, it implicitly clears any other field 976 // that may be currently set within the same oneof. 977 // For extension fields, it implicitly stores the provided ExtensionType 978 // if not already stored. 979 // It panics if the field does not contain a composite type. 980 // 981 // Mutable is a mutating operation and unsafe for concurrent use. 982 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { 983 switch fd.FullName() { 984 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.nested_3": 985 if x.Nested_3 == nil { 986 x.Nested_3 = new(MultiLayeredNesting_Nested1_Nested2_Nested3) 987 } 988 return protoreflect.ValueOfMessage(x.Nested_3.ProtoReflect()) 989 default: 990 if fd.IsExtension() { 991 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2")) 992 } 993 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2 does not contain field %s", fd.FullName())) 994 } 995 } 996 997 // NewField returns a new value that is assignable to the field 998 // for the given descriptor. For scalars, this returns the default value. 999 // For lists, maps, and messages, this returns a new, empty, mutable value. 1000 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { 1001 switch fd.FullName() { 1002 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.nested_3": 1003 m := new(MultiLayeredNesting_Nested1_Nested2_Nested3) 1004 return protoreflect.ValueOfMessage(m.ProtoReflect()) 1005 default: 1006 if fd.IsExtension() { 1007 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2")) 1008 } 1009 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2 does not contain field %s", fd.FullName())) 1010 } 1011 } 1012 1013 // WhichOneof reports which field within the oneof is populated, 1014 // returning nil if none are populated. 1015 // It panics if the oneof descriptor does not belong to this message. 1016 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { 1017 switch d.FullName() { 1018 default: 1019 panic(fmt.Errorf("%s is not a oneof field in goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2", d.FullName())) 1020 } 1021 panic("unreachable") 1022 } 1023 1024 // GetUnknown retrieves the entire list of unknown fields. 1025 // The caller may only mutate the contents of the RawFields 1026 // if the mutated bytes are stored back into the message with SetUnknown. 1027 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) GetUnknown() protoreflect.RawFields { 1028 return x.unknownFields 1029 } 1030 1031 // SetUnknown stores an entire list of unknown fields. 1032 // The raw fields must be syntactically valid according to the wire format. 1033 // An implementation may panic if this is not the case. 1034 // Once stored, the caller must not mutate the content of the RawFields. 1035 // An empty RawFields may be passed to clear the fields. 1036 // 1037 // SetUnknown is a mutating operation and unsafe for concurrent use. 1038 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) SetUnknown(fields protoreflect.RawFields) { 1039 x.unknownFields = fields 1040 } 1041 1042 // IsValid reports whether the message is valid. 1043 // 1044 // An invalid message is an empty, read-only value. 1045 // 1046 // An invalid message often corresponds to a nil pointer of the concrete 1047 // message type, but the details are implementation dependent. 1048 // Validity is not part of the protobuf data model, and may not 1049 // be preserved in marshaling or other operations. 1050 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) IsValid() bool { 1051 return x != nil 1052 } 1053 1054 // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. 1055 // This method may return nil. 1056 // 1057 // The returned methods type is identical to 1058 // "google.golang.org/protobuf/runtime/protoiface".Methods. 1059 // Consult the protoiface package documentation for details. 1060 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2) ProtoMethods() *protoiface.Methods { 1061 size := func(input protoiface.SizeInput) protoiface.SizeOutput { 1062 x := input.Message.Interface().(*MultiLayeredNesting_Nested1_Nested2) 1063 if x == nil { 1064 return protoiface.SizeOutput{ 1065 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1066 Size: 0, 1067 } 1068 } 1069 options := runtime.SizeInputToOptions(input) 1070 _ = options 1071 var n int 1072 var l int 1073 _ = l 1074 if x.Nested_3 != nil { 1075 l = options.Size(x.Nested_3) 1076 n += 1 + l + runtime.Sov(uint64(l)) 1077 } 1078 if x.unknownFields != nil { 1079 n += len(x.unknownFields) 1080 } 1081 return protoiface.SizeOutput{ 1082 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1083 Size: n, 1084 } 1085 } 1086 1087 marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { 1088 x := input.Message.Interface().(*MultiLayeredNesting_Nested1_Nested2) 1089 if x == nil { 1090 return protoiface.MarshalOutput{ 1091 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1092 Buf: input.Buf, 1093 }, nil 1094 } 1095 options := runtime.MarshalInputToOptions(input) 1096 _ = options 1097 size := options.Size(x) 1098 dAtA := make([]byte, size) 1099 i := len(dAtA) 1100 _ = i 1101 var l int 1102 _ = l 1103 if x.unknownFields != nil { 1104 i -= len(x.unknownFields) 1105 copy(dAtA[i:], x.unknownFields) 1106 } 1107 if x.Nested_3 != nil { 1108 encoded, err := options.Marshal(x.Nested_3) 1109 if err != nil { 1110 return protoiface.MarshalOutput{ 1111 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1112 Buf: input.Buf, 1113 }, err 1114 } 1115 i -= len(encoded) 1116 copy(dAtA[i:], encoded) 1117 i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) 1118 i-- 1119 dAtA[i] = 0xa 1120 } 1121 if input.Buf != nil { 1122 input.Buf = append(input.Buf, dAtA...) 1123 } else { 1124 input.Buf = dAtA 1125 } 1126 return protoiface.MarshalOutput{ 1127 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1128 Buf: input.Buf, 1129 }, nil 1130 } 1131 unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { 1132 x := input.Message.Interface().(*MultiLayeredNesting_Nested1_Nested2) 1133 if x == nil { 1134 return protoiface.UnmarshalOutput{ 1135 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1136 Flags: input.Flags, 1137 }, nil 1138 } 1139 options := runtime.UnmarshalInputToOptions(input) 1140 _ = options 1141 dAtA := input.Buf 1142 l := len(dAtA) 1143 iNdEx := 0 1144 for iNdEx < l { 1145 preIndex := iNdEx 1146 var wire uint64 1147 for shift := uint(0); ; shift += 7 { 1148 if shift >= 64 { 1149 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow 1150 } 1151 if iNdEx >= l { 1152 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1153 } 1154 b := dAtA[iNdEx] 1155 iNdEx++ 1156 wire |= uint64(b&0x7F) << shift 1157 if b < 0x80 { 1158 break 1159 } 1160 } 1161 fieldNum := int32(wire >> 3) 1162 wireType := int(wire & 0x7) 1163 if wireType == 4 { 1164 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MultiLayeredNesting_Nested1_Nested2: wiretype end group for non-group") 1165 } 1166 if fieldNum <= 0 { 1167 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MultiLayeredNesting_Nested1_Nested2: illegal tag %d (wire type %d)", fieldNum, wire) 1168 } 1169 switch fieldNum { 1170 case 1: 1171 if wireType != 2 { 1172 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nested_3", wireType) 1173 } 1174 var msglen int 1175 for shift := uint(0); ; shift += 7 { 1176 if shift >= 64 { 1177 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow 1178 } 1179 if iNdEx >= l { 1180 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1181 } 1182 b := dAtA[iNdEx] 1183 iNdEx++ 1184 msglen |= int(b&0x7F) << shift 1185 if b < 0x80 { 1186 break 1187 } 1188 } 1189 if msglen < 0 { 1190 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength 1191 } 1192 postIndex := iNdEx + msglen 1193 if postIndex < 0 { 1194 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength 1195 } 1196 if postIndex > l { 1197 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1198 } 1199 if x.Nested_3 == nil { 1200 x.Nested_3 = &MultiLayeredNesting_Nested1_Nested2_Nested3{} 1201 } 1202 if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Nested_3); err != nil { 1203 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err 1204 } 1205 iNdEx = postIndex 1206 default: 1207 iNdEx = preIndex 1208 skippy, err := runtime.Skip(dAtA[iNdEx:]) 1209 if err != nil { 1210 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err 1211 } 1212 if (skippy < 0) || (iNdEx+skippy) < 0 { 1213 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength 1214 } 1215 if (iNdEx + skippy) > l { 1216 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1217 } 1218 if !options.DiscardUnknown { 1219 x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 1220 } 1221 iNdEx += skippy 1222 } 1223 } 1224 1225 if iNdEx > l { 1226 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1227 } 1228 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil 1229 } 1230 return &protoiface.Methods{ 1231 NoUnkeyedLiterals: struct{}{}, 1232 Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, 1233 Size: size, 1234 Marshal: marshal, 1235 Unmarshal: unmarshal, 1236 Merge: nil, 1237 CheckInitialized: nil, 1238 } 1239 } 1240 1241 var ( 1242 md_MultiLayeredNesting_Nested1_Nested2_Nested3 protoreflect.MessageDescriptor 1243 fd_MultiLayeredNesting_Nested1_Nested2_Nested3_nested_3_string protoreflect.FieldDescriptor 1244 fd_MultiLayeredNesting_Nested1_Nested2_Nested3_nested_3_int32 protoreflect.FieldDescriptor 1245 ) 1246 1247 func init() { 1248 file_internal_testprotos_test3_test_nesting_proto_init() 1249 md_MultiLayeredNesting_Nested1_Nested2_Nested3 = File_internal_testprotos_test3_test_nesting_proto.Messages().ByName("MultiLayeredNesting").Messages().ByName("Nested1").Messages().ByName("Nested2").Messages().ByName("Nested3") 1250 fd_MultiLayeredNesting_Nested1_Nested2_Nested3_nested_3_string = md_MultiLayeredNesting_Nested1_Nested2_Nested3.Fields().ByName("nested_3_string") 1251 fd_MultiLayeredNesting_Nested1_Nested2_Nested3_nested_3_int32 = md_MultiLayeredNesting_Nested1_Nested2_Nested3.Fields().ByName("nested_3_int32") 1252 } 1253 1254 var _ protoreflect.Message = (*fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3)(nil) 1255 1256 type fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3 MultiLayeredNesting_Nested1_Nested2_Nested3 1257 1258 func (x *MultiLayeredNesting_Nested1_Nested2_Nested3) ProtoReflect() protoreflect.Message { 1259 return (*fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3)(x) 1260 } 1261 1262 func (x *MultiLayeredNesting_Nested1_Nested2_Nested3) slowProtoReflect() protoreflect.Message { 1263 mi := &file_internal_testprotos_test3_test_nesting_proto_msgTypes[3] 1264 if protoimpl.UnsafeEnabled && x != nil { 1265 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 1266 if ms.LoadMessageInfo() == nil { 1267 ms.StoreMessageInfo(mi) 1268 } 1269 return ms 1270 } 1271 return mi.MessageOf(x) 1272 } 1273 1274 var _fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3_messageType fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3_messageType 1275 var _ protoreflect.MessageType = fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3_messageType{} 1276 1277 type fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3_messageType struct{} 1278 1279 func (x fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3_messageType) Zero() protoreflect.Message { 1280 return (*fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3)(nil) 1281 } 1282 func (x fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3_messageType) New() protoreflect.Message { 1283 return new(fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) 1284 } 1285 func (x fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3_messageType) Descriptor() protoreflect.MessageDescriptor { 1286 return md_MultiLayeredNesting_Nested1_Nested2_Nested3 1287 } 1288 1289 // Descriptor returns message descriptor, which contains only the protobuf 1290 // type information for the message. 1291 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) Descriptor() protoreflect.MessageDescriptor { 1292 return md_MultiLayeredNesting_Nested1_Nested2_Nested3 1293 } 1294 1295 // Type returns the message type, which encapsulates both Go and protobuf 1296 // type information. If the Go type information is not needed, 1297 // it is recommended that the message descriptor be used instead. 1298 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) Type() protoreflect.MessageType { 1299 return _fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3_messageType 1300 } 1301 1302 // New returns a newly allocated and mutable empty message. 1303 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) New() protoreflect.Message { 1304 return new(fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) 1305 } 1306 1307 // Interface unwraps the message reflection interface and 1308 // returns the underlying ProtoMessage interface. 1309 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) Interface() protoreflect.ProtoMessage { 1310 return (*MultiLayeredNesting_Nested1_Nested2_Nested3)(x) 1311 } 1312 1313 // Range iterates over every populated field in an undefined order, 1314 // calling f for each field descriptor and value encountered. 1315 // Range returns immediately if f returns false. 1316 // While iterating, mutating operations may only be performed 1317 // on the current field descriptor. 1318 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { 1319 if x.Nested3Oneof != nil { 1320 switch o := x.Nested3Oneof.(type) { 1321 case *MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String: 1322 v := o.Nested_3String 1323 value := protoreflect.ValueOfString(v) 1324 if !f(fd_MultiLayeredNesting_Nested1_Nested2_Nested3_nested_3_string, value) { 1325 return 1326 } 1327 case *MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32: 1328 v := o.Nested_3Int32 1329 value := protoreflect.ValueOfInt32(v) 1330 if !f(fd_MultiLayeredNesting_Nested1_Nested2_Nested3_nested_3_int32, value) { 1331 return 1332 } 1333 } 1334 } 1335 } 1336 1337 // Has reports whether a field is populated. 1338 // 1339 // Some fields have the property of nullability where it is possible to 1340 // distinguish between the default value of a field and whether the field 1341 // was explicitly populated with the default value. Singular message fields, 1342 // member fields of a oneof, and proto2 scalar fields are nullable. Such 1343 // fields are populated only if explicitly set. 1344 // 1345 // In other cases (aside from the nullable cases above), 1346 // a proto3 scalar field is populated if it contains a non-zero value, and 1347 // a repeated field is populated if it is non-empty. 1348 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) Has(fd protoreflect.FieldDescriptor) bool { 1349 switch fd.FullName() { 1350 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_string": 1351 if x.Nested3Oneof == nil { 1352 return false 1353 } else if _, ok := x.Nested3Oneof.(*MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String); ok { 1354 return true 1355 } else { 1356 return false 1357 } 1358 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_int32": 1359 if x.Nested3Oneof == nil { 1360 return false 1361 } else if _, ok := x.Nested3Oneof.(*MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32); ok { 1362 return true 1363 } else { 1364 return false 1365 } 1366 default: 1367 if fd.IsExtension() { 1368 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3")) 1369 } 1370 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3 does not contain field %s", fd.FullName())) 1371 } 1372 } 1373 1374 // Clear clears the field such that a subsequent Has call reports false. 1375 // 1376 // Clearing an extension field clears both the extension type and value 1377 // associated with the given field number. 1378 // 1379 // Clear is a mutating operation and unsafe for concurrent use. 1380 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) Clear(fd protoreflect.FieldDescriptor) { 1381 switch fd.FullName() { 1382 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_string": 1383 x.Nested3Oneof = nil 1384 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_int32": 1385 x.Nested3Oneof = nil 1386 default: 1387 if fd.IsExtension() { 1388 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3")) 1389 } 1390 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3 does not contain field %s", fd.FullName())) 1391 } 1392 } 1393 1394 // Get retrieves the value for a field. 1395 // 1396 // For unpopulated scalars, it returns the default value, where 1397 // the default value of a bytes scalar is guaranteed to be a copy. 1398 // For unpopulated composite types, it returns an empty, read-only view 1399 // of the value; to obtain a mutable reference, use Mutable. 1400 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { 1401 switch descriptor.FullName() { 1402 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_string": 1403 if x.Nested3Oneof == nil { 1404 return protoreflect.ValueOfString("") 1405 } else if v, ok := x.Nested3Oneof.(*MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String); ok { 1406 return protoreflect.ValueOfString(v.Nested_3String) 1407 } else { 1408 return protoreflect.ValueOfString("") 1409 } 1410 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_int32": 1411 if x.Nested3Oneof == nil { 1412 return protoreflect.ValueOfInt32(int32(0)) 1413 } else if v, ok := x.Nested3Oneof.(*MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32); ok { 1414 return protoreflect.ValueOfInt32(v.Nested_3Int32) 1415 } else { 1416 return protoreflect.ValueOfInt32(int32(0)) 1417 } 1418 default: 1419 if descriptor.IsExtension() { 1420 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3")) 1421 } 1422 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3 does not contain field %s", descriptor.FullName())) 1423 } 1424 } 1425 1426 // Set stores the value for a field. 1427 // 1428 // For a field belonging to a oneof, it implicitly clears any other field 1429 // that may be currently set within the same oneof. 1430 // For extension fields, it implicitly stores the provided ExtensionType. 1431 // When setting a composite type, it is unspecified whether the stored value 1432 // aliases the source's memory in any way. If the composite value is an 1433 // empty, read-only value, then it panics. 1434 // 1435 // Set is a mutating operation and unsafe for concurrent use. 1436 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { 1437 switch fd.FullName() { 1438 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_string": 1439 cv := value.Interface().(string) 1440 x.Nested3Oneof = &MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String{Nested_3String: cv} 1441 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_int32": 1442 cv := int32(value.Int()) 1443 x.Nested3Oneof = &MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32{Nested_3Int32: cv} 1444 default: 1445 if fd.IsExtension() { 1446 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3")) 1447 } 1448 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3 does not contain field %s", fd.FullName())) 1449 } 1450 } 1451 1452 // Mutable returns a mutable reference to a composite type. 1453 // 1454 // If the field is unpopulated, it may allocate a composite value. 1455 // For a field belonging to a oneof, it implicitly clears any other field 1456 // that may be currently set within the same oneof. 1457 // For extension fields, it implicitly stores the provided ExtensionType 1458 // if not already stored. 1459 // It panics if the field does not contain a composite type. 1460 // 1461 // Mutable is a mutating operation and unsafe for concurrent use. 1462 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { 1463 switch fd.FullName() { 1464 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_string": 1465 panic(fmt.Errorf("field nested_3_string of message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3 is not mutable")) 1466 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_int32": 1467 panic(fmt.Errorf("field nested_3_int32 of message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3 is not mutable")) 1468 default: 1469 if fd.IsExtension() { 1470 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3")) 1471 } 1472 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3 does not contain field %s", fd.FullName())) 1473 } 1474 } 1475 1476 // NewField returns a new value that is assignable to the field 1477 // for the given descriptor. For scalars, this returns the default value. 1478 // For lists, maps, and messages, this returns a new, empty, mutable value. 1479 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { 1480 switch fd.FullName() { 1481 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_string": 1482 return protoreflect.ValueOfString("") 1483 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested_3_int32": 1484 return protoreflect.ValueOfInt32(int32(0)) 1485 default: 1486 if fd.IsExtension() { 1487 panic(fmt.Errorf("proto3 declared messages do not support extensions: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3")) 1488 } 1489 panic(fmt.Errorf("message goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3 does not contain field %s", fd.FullName())) 1490 } 1491 } 1492 1493 // WhichOneof reports which field within the oneof is populated, 1494 // returning nil if none are populated. 1495 // It panics if the oneof descriptor does not belong to this message. 1496 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { 1497 switch d.FullName() { 1498 case "goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3.nested3_oneof": 1499 if x.Nested3Oneof == nil { 1500 return nil 1501 } 1502 switch x.Nested3Oneof.(type) { 1503 case *MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String: 1504 return x.Descriptor().Fields().ByName("nested_3_string") 1505 case *MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32: 1506 return x.Descriptor().Fields().ByName("nested_3_int32") 1507 } 1508 default: 1509 panic(fmt.Errorf("%s is not a oneof field in goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3", d.FullName())) 1510 } 1511 panic("unreachable") 1512 } 1513 1514 // GetUnknown retrieves the entire list of unknown fields. 1515 // The caller may only mutate the contents of the RawFields 1516 // if the mutated bytes are stored back into the message with SetUnknown. 1517 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) GetUnknown() protoreflect.RawFields { 1518 return x.unknownFields 1519 } 1520 1521 // SetUnknown stores an entire list of unknown fields. 1522 // The raw fields must be syntactically valid according to the wire format. 1523 // An implementation may panic if this is not the case. 1524 // Once stored, the caller must not mutate the content of the RawFields. 1525 // An empty RawFields may be passed to clear the fields. 1526 // 1527 // SetUnknown is a mutating operation and unsafe for concurrent use. 1528 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) SetUnknown(fields protoreflect.RawFields) { 1529 x.unknownFields = fields 1530 } 1531 1532 // IsValid reports whether the message is valid. 1533 // 1534 // An invalid message is an empty, read-only value. 1535 // 1536 // An invalid message often corresponds to a nil pointer of the concrete 1537 // message type, but the details are implementation dependent. 1538 // Validity is not part of the protobuf data model, and may not 1539 // be preserved in marshaling or other operations. 1540 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) IsValid() bool { 1541 return x != nil 1542 } 1543 1544 // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. 1545 // This method may return nil. 1546 // 1547 // The returned methods type is identical to 1548 // "google.golang.org/protobuf/runtime/protoiface".Methods. 1549 // Consult the protoiface package documentation for details. 1550 func (x *fastReflection_MultiLayeredNesting_Nested1_Nested2_Nested3) ProtoMethods() *protoiface.Methods { 1551 size := func(input protoiface.SizeInput) protoiface.SizeOutput { 1552 x := input.Message.Interface().(*MultiLayeredNesting_Nested1_Nested2_Nested3) 1553 if x == nil { 1554 return protoiface.SizeOutput{ 1555 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1556 Size: 0, 1557 } 1558 } 1559 options := runtime.SizeInputToOptions(input) 1560 _ = options 1561 var n int 1562 var l int 1563 _ = l 1564 switch x := x.Nested3Oneof.(type) { 1565 case *MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String: 1566 if x == nil { 1567 break 1568 } 1569 l = len(x.Nested_3String) 1570 n += 1 + l + runtime.Sov(uint64(l)) 1571 case *MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32: 1572 if x == nil { 1573 break 1574 } 1575 n += 1 + runtime.Sov(uint64(x.Nested_3Int32)) 1576 } 1577 if x.unknownFields != nil { 1578 n += len(x.unknownFields) 1579 } 1580 return protoiface.SizeOutput{ 1581 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1582 Size: n, 1583 } 1584 } 1585 1586 marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { 1587 x := input.Message.Interface().(*MultiLayeredNesting_Nested1_Nested2_Nested3) 1588 if x == nil { 1589 return protoiface.MarshalOutput{ 1590 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1591 Buf: input.Buf, 1592 }, nil 1593 } 1594 options := runtime.MarshalInputToOptions(input) 1595 _ = options 1596 size := options.Size(x) 1597 dAtA := make([]byte, size) 1598 i := len(dAtA) 1599 _ = i 1600 var l int 1601 _ = l 1602 if x.unknownFields != nil { 1603 i -= len(x.unknownFields) 1604 copy(dAtA[i:], x.unknownFields) 1605 } 1606 switch x := x.Nested3Oneof.(type) { 1607 case *MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String: 1608 i -= len(x.Nested_3String) 1609 copy(dAtA[i:], x.Nested_3String) 1610 i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Nested_3String))) 1611 i-- 1612 dAtA[i] = 0xa 1613 case *MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32: 1614 i = runtime.EncodeVarint(dAtA, i, uint64(x.Nested_3Int32)) 1615 i-- 1616 dAtA[i] = 0x10 1617 } 1618 if input.Buf != nil { 1619 input.Buf = append(input.Buf, dAtA...) 1620 } else { 1621 input.Buf = dAtA 1622 } 1623 return protoiface.MarshalOutput{ 1624 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1625 Buf: input.Buf, 1626 }, nil 1627 } 1628 unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { 1629 x := input.Message.Interface().(*MultiLayeredNesting_Nested1_Nested2_Nested3) 1630 if x == nil { 1631 return protoiface.UnmarshalOutput{ 1632 NoUnkeyedLiterals: input.NoUnkeyedLiterals, 1633 Flags: input.Flags, 1634 }, nil 1635 } 1636 options := runtime.UnmarshalInputToOptions(input) 1637 _ = options 1638 dAtA := input.Buf 1639 l := len(dAtA) 1640 iNdEx := 0 1641 for iNdEx < l { 1642 preIndex := iNdEx 1643 var wire uint64 1644 for shift := uint(0); ; shift += 7 { 1645 if shift >= 64 { 1646 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow 1647 } 1648 if iNdEx >= l { 1649 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1650 } 1651 b := dAtA[iNdEx] 1652 iNdEx++ 1653 wire |= uint64(b&0x7F) << shift 1654 if b < 0x80 { 1655 break 1656 } 1657 } 1658 fieldNum := int32(wire >> 3) 1659 wireType := int(wire & 0x7) 1660 if wireType == 4 { 1661 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MultiLayeredNesting_Nested1_Nested2_Nested3: wiretype end group for non-group") 1662 } 1663 if fieldNum <= 0 { 1664 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MultiLayeredNesting_Nested1_Nested2_Nested3: illegal tag %d (wire type %d)", fieldNum, wire) 1665 } 1666 switch fieldNum { 1667 case 1: 1668 if wireType != 2 { 1669 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nested_3String", wireType) 1670 } 1671 var stringLen uint64 1672 for shift := uint(0); ; shift += 7 { 1673 if shift >= 64 { 1674 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow 1675 } 1676 if iNdEx >= l { 1677 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1678 } 1679 b := dAtA[iNdEx] 1680 iNdEx++ 1681 stringLen |= uint64(b&0x7F) << shift 1682 if b < 0x80 { 1683 break 1684 } 1685 } 1686 intStringLen := int(stringLen) 1687 if intStringLen < 0 { 1688 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength 1689 } 1690 postIndex := iNdEx + intStringLen 1691 if postIndex < 0 { 1692 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength 1693 } 1694 if postIndex > l { 1695 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1696 } 1697 x.Nested3Oneof = &MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String{string(dAtA[iNdEx:postIndex])} 1698 iNdEx = postIndex 1699 case 2: 1700 if wireType != 0 { 1701 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Nested_3Int32", wireType) 1702 } 1703 var v int32 1704 for shift := uint(0); ; shift += 7 { 1705 if shift >= 64 { 1706 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow 1707 } 1708 if iNdEx >= l { 1709 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1710 } 1711 b := dAtA[iNdEx] 1712 iNdEx++ 1713 v |= int32(b&0x7F) << shift 1714 if b < 0x80 { 1715 break 1716 } 1717 } 1718 x.Nested3Oneof = &MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32{v} 1719 default: 1720 iNdEx = preIndex 1721 skippy, err := runtime.Skip(dAtA[iNdEx:]) 1722 if err != nil { 1723 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err 1724 } 1725 if (skippy < 0) || (iNdEx+skippy) < 0 { 1726 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength 1727 } 1728 if (iNdEx + skippy) > l { 1729 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1730 } 1731 if !options.DiscardUnknown { 1732 x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) 1733 } 1734 iNdEx += skippy 1735 } 1736 } 1737 1738 if iNdEx > l { 1739 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF 1740 } 1741 return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil 1742 } 1743 return &protoiface.Methods{ 1744 NoUnkeyedLiterals: struct{}{}, 1745 Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, 1746 Size: size, 1747 Marshal: marshal, 1748 Unmarshal: unmarshal, 1749 Merge: nil, 1750 CheckInitialized: nil, 1751 } 1752 } 1753 1754 // Code generated by protoc-gen-go. DO NOT EDIT. 1755 // versions: 1756 // protoc-gen-go v1.27.0 1757 // protoc v3.18.1 1758 // source: internal/testprotos/test3/test_nesting.proto 1759 1760 const ( 1761 // Verify that this generated code is sufficiently up-to-date. 1762 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 1763 // Verify that runtime/protoimpl is sufficiently up-to-date. 1764 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 1765 ) 1766 1767 type MultiLayeredNesting struct { 1768 state protoimpl.MessageState 1769 sizeCache protoimpl.SizeCache 1770 unknownFields protoimpl.UnknownFields 1771 1772 Nested1 *MultiLayeredNesting_Nested1 `protobuf:"bytes,1,opt,name=nested1,proto3" json:"nested1,omitempty"` 1773 } 1774 1775 func (x *MultiLayeredNesting) Reset() { 1776 *x = MultiLayeredNesting{} 1777 if protoimpl.UnsafeEnabled { 1778 mi := &file_internal_testprotos_test3_test_nesting_proto_msgTypes[0] 1779 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 1780 ms.StoreMessageInfo(mi) 1781 } 1782 } 1783 1784 func (x *MultiLayeredNesting) String() string { 1785 return protoimpl.X.MessageStringOf(x) 1786 } 1787 1788 func (*MultiLayeredNesting) ProtoMessage() {} 1789 1790 // Deprecated: Use MultiLayeredNesting.ProtoReflect.Descriptor instead. 1791 func (*MultiLayeredNesting) Descriptor() ([]byte, []int) { 1792 return file_internal_testprotos_test3_test_nesting_proto_rawDescGZIP(), []int{0} 1793 } 1794 1795 func (x *MultiLayeredNesting) GetNested1() *MultiLayeredNesting_Nested1 { 1796 if x != nil { 1797 return x.Nested1 1798 } 1799 return nil 1800 } 1801 1802 type MultiLayeredNesting_Nested1 struct { 1803 state protoimpl.MessageState 1804 sizeCache protoimpl.SizeCache 1805 unknownFields protoimpl.UnknownFields 1806 } 1807 1808 func (x *MultiLayeredNesting_Nested1) Reset() { 1809 *x = MultiLayeredNesting_Nested1{} 1810 if protoimpl.UnsafeEnabled { 1811 mi := &file_internal_testprotos_test3_test_nesting_proto_msgTypes[1] 1812 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 1813 ms.StoreMessageInfo(mi) 1814 } 1815 } 1816 1817 func (x *MultiLayeredNesting_Nested1) String() string { 1818 return protoimpl.X.MessageStringOf(x) 1819 } 1820 1821 func (*MultiLayeredNesting_Nested1) ProtoMessage() {} 1822 1823 // Deprecated: Use MultiLayeredNesting_Nested1.ProtoReflect.Descriptor instead. 1824 func (*MultiLayeredNesting_Nested1) Descriptor() ([]byte, []int) { 1825 return file_internal_testprotos_test3_test_nesting_proto_rawDescGZIP(), []int{0, 0} 1826 } 1827 1828 type MultiLayeredNesting_Nested1_Nested2 struct { 1829 state protoimpl.MessageState 1830 sizeCache protoimpl.SizeCache 1831 unknownFields protoimpl.UnknownFields 1832 1833 Nested_3 *MultiLayeredNesting_Nested1_Nested2_Nested3 `protobuf:"bytes,1,opt,name=nested_3,json=nested3,proto3" json:"nested_3,omitempty"` 1834 } 1835 1836 func (x *MultiLayeredNesting_Nested1_Nested2) Reset() { 1837 *x = MultiLayeredNesting_Nested1_Nested2{} 1838 if protoimpl.UnsafeEnabled { 1839 mi := &file_internal_testprotos_test3_test_nesting_proto_msgTypes[2] 1840 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 1841 ms.StoreMessageInfo(mi) 1842 } 1843 } 1844 1845 func (x *MultiLayeredNesting_Nested1_Nested2) String() string { 1846 return protoimpl.X.MessageStringOf(x) 1847 } 1848 1849 func (*MultiLayeredNesting_Nested1_Nested2) ProtoMessage() {} 1850 1851 // Deprecated: Use MultiLayeredNesting_Nested1_Nested2.ProtoReflect.Descriptor instead. 1852 func (*MultiLayeredNesting_Nested1_Nested2) Descriptor() ([]byte, []int) { 1853 return file_internal_testprotos_test3_test_nesting_proto_rawDescGZIP(), []int{0, 0, 0} 1854 } 1855 1856 func (x *MultiLayeredNesting_Nested1_Nested2) GetNested_3() *MultiLayeredNesting_Nested1_Nested2_Nested3 { 1857 if x != nil { 1858 return x.Nested_3 1859 } 1860 return nil 1861 } 1862 1863 type MultiLayeredNesting_Nested1_Nested2_Nested3 struct { 1864 state protoimpl.MessageState 1865 sizeCache protoimpl.SizeCache 1866 unknownFields protoimpl.UnknownFields 1867 1868 // Types that are assignable to Nested3Oneof: 1869 // *MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String 1870 // *MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32 1871 Nested3Oneof isMultiLayeredNesting_Nested1_Nested2_Nested3_Nested3Oneof `protobuf_oneof:"nested3_oneof"` 1872 } 1873 1874 func (x *MultiLayeredNesting_Nested1_Nested2_Nested3) Reset() { 1875 *x = MultiLayeredNesting_Nested1_Nested2_Nested3{} 1876 if protoimpl.UnsafeEnabled { 1877 mi := &file_internal_testprotos_test3_test_nesting_proto_msgTypes[3] 1878 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 1879 ms.StoreMessageInfo(mi) 1880 } 1881 } 1882 1883 func (x *MultiLayeredNesting_Nested1_Nested2_Nested3) String() string { 1884 return protoimpl.X.MessageStringOf(x) 1885 } 1886 1887 func (*MultiLayeredNesting_Nested1_Nested2_Nested3) ProtoMessage() {} 1888 1889 // Deprecated: Use MultiLayeredNesting_Nested1_Nested2_Nested3.ProtoReflect.Descriptor instead. 1890 func (*MultiLayeredNesting_Nested1_Nested2_Nested3) Descriptor() ([]byte, []int) { 1891 return file_internal_testprotos_test3_test_nesting_proto_rawDescGZIP(), []int{0, 0, 0, 0} 1892 } 1893 1894 func (x *MultiLayeredNesting_Nested1_Nested2_Nested3) GetNested3Oneof() isMultiLayeredNesting_Nested1_Nested2_Nested3_Nested3Oneof { 1895 if x != nil { 1896 return x.Nested3Oneof 1897 } 1898 return nil 1899 } 1900 1901 func (x *MultiLayeredNesting_Nested1_Nested2_Nested3) GetNested_3String() string { 1902 if x, ok := x.GetNested3Oneof().(*MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String); ok { 1903 return x.Nested_3String 1904 } 1905 return "" 1906 } 1907 1908 func (x *MultiLayeredNesting_Nested1_Nested2_Nested3) GetNested_3Int32() int32 { 1909 if x, ok := x.GetNested3Oneof().(*MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32); ok { 1910 return x.Nested_3Int32 1911 } 1912 return 0 1913 } 1914 1915 type isMultiLayeredNesting_Nested1_Nested2_Nested3_Nested3Oneof interface { 1916 isMultiLayeredNesting_Nested1_Nested2_Nested3_Nested3Oneof() 1917 } 1918 1919 type MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String struct { 1920 Nested_3String string `protobuf:"bytes,1,opt,name=nested_3_string,json=nested3String,proto3,oneof"` 1921 } 1922 1923 type MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32 struct { 1924 Nested_3Int32 int32 `protobuf:"varint,2,opt,name=nested_3_int32,json=nested3Int32,proto3,oneof"` 1925 } 1926 1927 func (*MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String) isMultiLayeredNesting_Nested1_Nested2_Nested3_Nested3Oneof() { 1928 } 1929 1930 func (*MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32) isMultiLayeredNesting_Nested1_Nested2_Nested3_Nested3Oneof() { 1931 } 1932 1933 var File_internal_testprotos_test3_test_nesting_proto protoreflect.FileDescriptor 1934 1935 var file_internal_testprotos_test3_test_nesting_proto_rawDesc = []byte{ 1936 0x0a, 0x2c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 1937 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x33, 0x2f, 0x74, 0x65, 0x73, 0x74, 1938 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 1939 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x65, 1940 0x73, 0x74, 0x33, 0x22, 0xc4, 0x02, 0x0a, 0x13, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4c, 0x61, 0x79, 1941 0x65, 0x72, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x4a, 0x0a, 0x07, 0x6e, 1942 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x67, 1943 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x65, 0x73, 1944 0x74, 0x33, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x65, 0x64, 0x4e, 1945 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x52, 0x07, 1946 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x1a, 0xe0, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x73, 0x74, 1947 0x65, 0x64, 0x31, 0x1a, 0xd4, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x12, 1948 0x5b, 0x0a, 0x08, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x33, 0x18, 0x01, 0x20, 0x01, 0x28, 1949 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 1950 0x6f, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x33, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x4c, 0x61, 0x79, 1951 0x65, 0x72, 0x65, 0x64, 0x4e, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x4e, 0x65, 0x73, 0x74, 1952 0x65, 0x64, 0x31, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x2e, 0x4e, 0x65, 0x73, 0x74, 1953 0x65, 0x64, 0x33, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x33, 0x1a, 0x6c, 0x0a, 0x07, 1954 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x33, 0x12, 0x28, 0x0a, 0x0f, 0x6e, 0x65, 0x73, 0x74, 0x65, 1955 0x64, 0x5f, 0x33, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 1956 0x48, 0x00, 0x52, 0x0d, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x33, 0x53, 0x74, 0x72, 0x69, 0x6e, 1957 0x67, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x33, 0x5f, 0x69, 0x6e, 1958 0x74, 0x33, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x65, 0x73, 1959 0x74, 0x65, 0x64, 0x33, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x42, 0x0f, 0x0a, 0x0d, 0x6e, 0x65, 0x73, 1960 0x74, 0x65, 0x64, 0x33, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 1961 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 1962 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x69, 0x6e, 0x74, 1963 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 1964 0x2f, 0x74, 0x65, 0x73, 0x74, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 1965 } 1966 1967 var ( 1968 file_internal_testprotos_test3_test_nesting_proto_rawDescOnce sync.Once 1969 file_internal_testprotos_test3_test_nesting_proto_rawDescData = file_internal_testprotos_test3_test_nesting_proto_rawDesc 1970 ) 1971 1972 func file_internal_testprotos_test3_test_nesting_proto_rawDescGZIP() []byte { 1973 file_internal_testprotos_test3_test_nesting_proto_rawDescOnce.Do(func() { 1974 file_internal_testprotos_test3_test_nesting_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_testprotos_test3_test_nesting_proto_rawDescData) 1975 }) 1976 return file_internal_testprotos_test3_test_nesting_proto_rawDescData 1977 } 1978 1979 var file_internal_testprotos_test3_test_nesting_proto_msgTypes = make([]protoimpl.MessageInfo, 4) 1980 var file_internal_testprotos_test3_test_nesting_proto_goTypes = []interface{}{ 1981 (*MultiLayeredNesting)(nil), // 0: goproto.proto.test3.MultiLayeredNesting 1982 (*MultiLayeredNesting_Nested1)(nil), // 1: goproto.proto.test3.MultiLayeredNesting.Nested1 1983 (*MultiLayeredNesting_Nested1_Nested2)(nil), // 2: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2 1984 (*MultiLayeredNesting_Nested1_Nested2_Nested3)(nil), // 3: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3 1985 } 1986 var file_internal_testprotos_test3_test_nesting_proto_depIdxs = []int32{ 1987 1, // 0: goproto.proto.test3.MultiLayeredNesting.nested1:type_name -> goproto.proto.test3.MultiLayeredNesting.Nested1 1988 3, // 1: goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.nested_3:type_name -> goproto.proto.test3.MultiLayeredNesting.Nested1.Nested2.Nested3 1989 2, // [2:2] is the sub-list for method output_type 1990 2, // [2:2] is the sub-list for method input_type 1991 2, // [2:2] is the sub-list for extension type_name 1992 2, // [2:2] is the sub-list for extension extendee 1993 0, // [0:2] is the sub-list for field type_name 1994 } 1995 1996 func init() { file_internal_testprotos_test3_test_nesting_proto_init() } 1997 func file_internal_testprotos_test3_test_nesting_proto_init() { 1998 if File_internal_testprotos_test3_test_nesting_proto != nil { 1999 return 2000 } 2001 if !protoimpl.UnsafeEnabled { 2002 file_internal_testprotos_test3_test_nesting_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 2003 switch v := v.(*MultiLayeredNesting); i { 2004 case 0: 2005 return &v.state 2006 case 1: 2007 return &v.sizeCache 2008 case 2: 2009 return &v.unknownFields 2010 default: 2011 return nil 2012 } 2013 } 2014 file_internal_testprotos_test3_test_nesting_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 2015 switch v := v.(*MultiLayeredNesting_Nested1); i { 2016 case 0: 2017 return &v.state 2018 case 1: 2019 return &v.sizeCache 2020 case 2: 2021 return &v.unknownFields 2022 default: 2023 return nil 2024 } 2025 } 2026 file_internal_testprotos_test3_test_nesting_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 2027 switch v := v.(*MultiLayeredNesting_Nested1_Nested2); i { 2028 case 0: 2029 return &v.state 2030 case 1: 2031 return &v.sizeCache 2032 case 2: 2033 return &v.unknownFields 2034 default: 2035 return nil 2036 } 2037 } 2038 file_internal_testprotos_test3_test_nesting_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { 2039 switch v := v.(*MultiLayeredNesting_Nested1_Nested2_Nested3); i { 2040 case 0: 2041 return &v.state 2042 case 1: 2043 return &v.sizeCache 2044 case 2: 2045 return &v.unknownFields 2046 default: 2047 return nil 2048 } 2049 } 2050 } 2051 file_internal_testprotos_test3_test_nesting_proto_msgTypes[3].OneofWrappers = []interface{}{ 2052 (*MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3String)(nil), 2053 (*MultiLayeredNesting_Nested1_Nested2_Nested3_Nested_3Int32)(nil), 2054 } 2055 type x struct{} 2056 out := protoimpl.TypeBuilder{ 2057 File: protoimpl.DescBuilder{ 2058 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 2059 RawDescriptor: file_internal_testprotos_test3_test_nesting_proto_rawDesc, 2060 NumEnums: 0, 2061 NumMessages: 4, 2062 NumExtensions: 0, 2063 NumServices: 0, 2064 }, 2065 GoTypes: file_internal_testprotos_test3_test_nesting_proto_goTypes, 2066 DependencyIndexes: file_internal_testprotos_test3_test_nesting_proto_depIdxs, 2067 MessageInfos: file_internal_testprotos_test3_test_nesting_proto_msgTypes, 2068 }.Build() 2069 File_internal_testprotos_test3_test_nesting_proto = out.File 2070 file_internal_testprotos_test3_test_nesting_proto_rawDesc = nil 2071 file_internal_testprotos_test3_test_nesting_proto_goTypes = nil 2072 file_internal_testprotos_test3_test_nesting_proto_depIdxs = nil 2073 }