// Protocol Buffers - Google's data interchange format
// Copyright 2023 Google LLC.  All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

edition = "2023";

package upb_util_2023_test;

message EmptyMessage {}

message HasRequiredField {
  int32 required_int32 = 1 [features.field_presence = LEGACY_REQUIRED];
}

message TestRequiredFields {
  EmptyMessage required_message = 1 [features.field_presence = LEGACY_REQUIRED];
  TestRequiredFields optional_message = 2;
  repeated HasRequiredField repeated_message = 3;
  map<int32, HasRequiredField> map_int32_message = 4;
  map<int64, HasRequiredField> map_int64_message = 5;
  map<uint32, HasRequiredField> map_uint32_message = 6;
  map<uint64, HasRequiredField> map_uint64_message = 7;
  map<bool, HasRequiredField> map_bool_message = 8;
  map<string, HasRequiredField> map_string_message = 9;
}
