edition = "2023";

package buf.test;

import "google/protobuf/cpp_features.proto";
import "google/protobuf/go_features.proto";
import "google/protobuf/java_features.proto";

// File-level Edition 2024 features
option features.(pb.cpp).enum_name_uses_string_view = true;
option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP;
option features.(pb.java).large_enum = true;
option features.default_symbol_visibility = EXPORT_TOP_LEVEL;
option features.enforce_naming_style = STYLE2024;

message TestMessage {
  option features.(pb.java).nest_in_file_class = YES;
  option features.enforce_naming_style = STYLE2024;

  string test_field = 1 [features.enforce_naming_style = STYLE2024];

  oneof test_oneof {
    option features.enforce_naming_style = STYLE2024;
    int32 oneof_field = 2;
  }

  extensions 100 to 200 [features.enforce_naming_style = STYLE2024];
}

enum TestEnum {
  option features.(pb.java).large_enum = true;
  option features.(pb.java).nest_in_file_class = YES;
  option features.(pb.cpp).enum_name_uses_string_view = true;
  option features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP;
  option features.enforce_naming_style = STYLE2024;

  TEST_ENUM_UNSPECIFIED = 0;
  TEST_ENUM_VALUE = 1 [
    features.(pb.go).strip_enum_prefix = STRIP_ENUM_PREFIX_STRIP,
    features.enforce_naming_style = STYLE2024
  ];
}

service TestService {
  option features.(pb.java).nest_in_file_class = YES;
  option features.enforce_naming_style = STYLE2024;

  rpc TestMethod(TestMessage) returns (TestMessage) {
    option features.enforce_naming_style = STYLE2024;
  }
}
