pluginlib_descriptor_test2.proto 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // Protos/pluginlib_descriptor_test.proto - test proto
  2. //
  3. // This source file is part of the Swift.org open source project
  4. //
  5. // Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
  6. // Licensed under Apache License v2.0 with Runtime Library Exception
  7. //
  8. // See http://swift.org/LICENSE.txt for license information
  9. // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
  10. //
  11. // -----------------------------------------------------------------------------
  12. ///
  13. /// Test proto for Tests/SwiftProtobufPluginLibraryTests/Test_Descriptor.swift
  14. ///
  15. // -----------------------------------------------------------------------------
  16. syntax = "proto3";
  17. package swift_descriptor_test;
  18. message Proto3MessageForPresence {
  19. enum SubEnum {
  20. SUB_VALUE_0 = 0;
  21. SUB_VALUE_1 = 1;
  22. SUB_VALUE_2 = 2;
  23. }
  24. string str_field = 1;
  25. int32 int32_field = 2;
  26. SubEnum enum_field = 3;
  27. OtherMessage message_field = 4;
  28. optional string opt_str_field = 11;
  29. optional int32 opt_int32_field = 12;
  30. optional SubEnum opt_enum_field = 13;
  31. optional OtherMessage opt_message_field = 14;
  32. repeated string repeat_str_field = 21;
  33. repeated int32 repeat_int32_field = 22;
  34. repeated SubEnum repeat_enum_field = 23;
  35. repeated OtherMessage repeat_message_field = 24;
  36. oneof o {
  37. string oneof_str_field = 31;
  38. int32 oneof_int32_field = 32;
  39. SubEnum oneof_enum_field = 33;
  40. OtherMessage oneof_message_field = 34;
  41. }
  42. }
  43. message OtherMessage {
  44. string field = 1;
  45. }