test_features.proto 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // Protos/SwiftProtobufPluginLibraryTests/test_features.proto - test proto for Features
  2. //
  3. // This source file is part of the Swift.org open source project
  4. //
  5. // Copyright (c) 2014 - 2024 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. syntax = "proto2";
  13. package swift_feature_test;
  14. import "google/protobuf/descriptor.proto";
  15. extend google.protobuf.FeatureSet {
  16. optional TestFeatures test = 9999;
  17. }
  18. message TestFeatures {
  19. enum EnumFeature {
  20. ENUM_FEATURE_UNKNOWN = 0;
  21. ENUM_FEATURE_VALUE1 = 1;
  22. ENUM_FEATURE_VALUE2 = 2;
  23. ENUM_FEATURE_VALUE3 = 3;
  24. ENUM_FEATURE_VALUE4 = 4;
  25. ENUM_FEATURE_VALUE5 = 5;
  26. ENUM_FEATURE_VALUE6 = 6;
  27. }
  28. optional EnumFeature feature1 = 1 [
  29. retention = RETENTION_RUNTIME,
  30. targets = TARGET_TYPE_FILE,
  31. targets = TARGET_TYPE_FIELD,
  32. targets = TARGET_TYPE_MESSAGE,
  33. targets = TARGET_TYPE_ENUM,
  34. targets = TARGET_TYPE_ENUM_ENTRY,
  35. targets = TARGET_TYPE_SERVICE,
  36. targets = TARGET_TYPE_METHOD,
  37. targets = TARGET_TYPE_ONEOF,
  38. targets = TARGET_TYPE_EXTENSION_RANGE,
  39. feature_support.edition_introduced = EDITION_2023,
  40. edition_defaults = { edition: EDITION_LEGACY, value: "ENUM_FEATURE_VALUE1" }
  41. ];
  42. optional EnumFeature feature2 = 2 [
  43. retention = RETENTION_RUNTIME,
  44. targets = TARGET_TYPE_FILE,
  45. targets = TARGET_TYPE_FIELD,
  46. targets = TARGET_TYPE_MESSAGE,
  47. targets = TARGET_TYPE_ENUM,
  48. targets = TARGET_TYPE_ENUM_ENTRY,
  49. targets = TARGET_TYPE_SERVICE,
  50. targets = TARGET_TYPE_METHOD,
  51. targets = TARGET_TYPE_ONEOF,
  52. targets = TARGET_TYPE_EXTENSION_RANGE,
  53. feature_support.edition_introduced = EDITION_2023,
  54. edition_defaults = { edition: EDITION_LEGACY, value: "ENUM_FEATURE_VALUE1" }
  55. ];
  56. optional EnumFeature feature3 = 3 [
  57. retention = RETENTION_RUNTIME,
  58. targets = TARGET_TYPE_FILE,
  59. targets = TARGET_TYPE_FIELD,
  60. targets = TARGET_TYPE_MESSAGE,
  61. targets = TARGET_TYPE_ENUM,
  62. targets = TARGET_TYPE_ENUM_ENTRY,
  63. targets = TARGET_TYPE_SERVICE,
  64. targets = TARGET_TYPE_METHOD,
  65. targets = TARGET_TYPE_ONEOF,
  66. targets = TARGET_TYPE_EXTENSION_RANGE,
  67. feature_support.edition_introduced = EDITION_2023,
  68. edition_defaults = { edition: EDITION_LEGACY, value: "ENUM_FEATURE_VALUE1" }
  69. ];
  70. optional EnumFeature feature4 = 4 [
  71. retention = RETENTION_RUNTIME,
  72. targets = TARGET_TYPE_FILE,
  73. targets = TARGET_TYPE_FIELD,
  74. targets = TARGET_TYPE_MESSAGE,
  75. targets = TARGET_TYPE_ENUM,
  76. targets = TARGET_TYPE_ENUM_ENTRY,
  77. targets = TARGET_TYPE_SERVICE,
  78. targets = TARGET_TYPE_METHOD,
  79. targets = TARGET_TYPE_ONEOF,
  80. targets = TARGET_TYPE_EXTENSION_RANGE,
  81. feature_support.edition_introduced = EDITION_2023,
  82. edition_defaults = { edition: EDITION_LEGACY, value: "ENUM_FEATURE_VALUE1" }
  83. ];
  84. optional EnumFeature feature5 = 5 [
  85. retention = RETENTION_RUNTIME,
  86. targets = TARGET_TYPE_FILE,
  87. targets = TARGET_TYPE_FIELD,
  88. targets = TARGET_TYPE_MESSAGE,
  89. targets = TARGET_TYPE_ENUM,
  90. targets = TARGET_TYPE_ENUM_ENTRY,
  91. targets = TARGET_TYPE_SERVICE,
  92. targets = TARGET_TYPE_METHOD,
  93. targets = TARGET_TYPE_ONEOF,
  94. targets = TARGET_TYPE_EXTENSION_RANGE,
  95. feature_support.edition_introduced = EDITION_2023,
  96. edition_defaults = { edition: EDITION_LEGACY, value: "ENUM_FEATURE_VALUE1" }
  97. ];
  98. }