syntax = "proto2";

package utf8validation.proto2;

option java_package = "com.google.protobuf.utf8validation";
option java_outer_classname = "Utf8TestProto2Proto";
option java_multiple_files = true;

// Naming convention for test fields:
// file_[java_string_check_utf8 state {unset, false, true}]_field_[enforce_utf8
// state {unset, enforced}]
message Utf8TestProto2 {
  optional string file_unset_field_unset = 1;

  // TODO: Enable once allowlist entry is built into protoc.
  // optional string file_unset_field_unenforced = 2 [enforce_utf8 = false];

  optional string file_unset_field_enforced = 3 [enforce_utf8 = true];

  extensions 100 to 200;
}

extend Utf8TestProto2 {
  optional string ext_file_unset_field_unset = 100;

  // TODO: Enable once allowlist entry is built into protoc.
  // optional string ext_file_unset_field_unenforced = 101 [enforce_utf8 =
  // false];

  optional string ext_file_unset_field_enforced = 102 [enforce_utf8 = true];
}
