//% descriptor: true
//% symtab: true
edition = "2023";

package buf.test;

import "google/protobuf/descriptor.proto";

option features.(f) = {}; // Mention f so the symtab.yaml will show it.

message Features {
    bool a = 1 [feature_support = {}];

    bool b = 2 [
        edition_defaults = {edition: EDITION_LEGACY, value: "false"}
    ];

    bool c = 3 [
        edition_defaults = {edition: EDITION_PROTO2, value: "false"},
        feature_support = {}
    ];

    bool d = 4 [
        edition_defaults = {edition: EDITION_2023, value: "false"},
        feature_support.edition_introduced = EDITION_2024
    ];

    int32 e = 5 [
        edition_defaults = {edition: EDITION_PROTO2, value: "0"},
        feature_support.edition_introduced = EDITION_2024
    ];

    bool f = 6 [
        edition_defaults = {edition: EDITION_PROTO2, value: "true"},
        edition_defaults = {edition: EDITION_MAX, value: "42"},
        feature_support.edition_introduced = EDITION_LEGACY,
        feature_support.edition_deprecated = EDITION_LEGACY,
        feature_support.edition_removed = EDITION_LEGACY       
    ];

    Enum g = 7 [
        edition_defaults = {edition: EDITION_PROTO2, value: "A"},
        edition_defaults = {edition: EDITION_PROTO3, value: "B"},
        edition_defaults = {edition: EDITION_2023, value: "C"},
        feature_support.edition_introduced = EDITION_2023
    ];
}

enum Enum {
    A = 0;
    B = 1;
}

extend google.protobuf.FeatureSet {
    Features f = 10000;
}