syntax = "proto3";

package protobuf_unittest;

option csharp_namespace = "Google.Protobuf.TestProtos";
option java_multiple_files = true;
option java_package = "com.google.protobuf.test";

import "google/protobuf/any.proto";
import "google/protobuf/api.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/source_context.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/type.proto";
import "google/protobuf/wrappers.proto";

// Test that we can include all well-known types. Each wrapper type is included
// separately, as languages map handle different wrappers in different ways.
message TestWellKnownTypes {
    google.protobuf.Any any_field = 1;
    google.protobuf.Api api_field = 2;
    google.protobuf.BoolValue bool_value_field = 3;
    google.protobuf.BytesValue bytes_value_field = 4;
    google.protobuf.DoubleValue double_value_field = 5;
    google.protobuf.Duration duration_field = 6;
    google.protobuf.Empty empty_field = 7;
    google.protobuf.Enum enum_field = 8;
    google.protobuf.EnumValue enum_value_field = 9;
    google.protobuf.Field field_field = 10;
    google.protobuf.Field.Cardinality field_cardinality_field = 11;
    google.protobuf.Field.Kind field_kind_field = 12;
    google.protobuf.FieldMask field_mask_field = 13;
    google.protobuf.FloatValue float_value_field = 14;
    google.protobuf.Int32Value int32_value_field = 15;
    google.protobuf.Int64Value int64_value_field = 16;
    google.protobuf.ListValue list_value_field = 17;
    google.protobuf.Method method_field = 18;
    google.protobuf.Mixin mixin_field = 19;
    google.protobuf.NullValue null_value_field = 20;
    google.protobuf.Option option_field = 21;
    google.protobuf.SourceContext source_context_field = 22;
    google.protobuf.StringValue string_value_field = 23;
    google.protobuf.Struct struct_field = 24;
    google.protobuf.Syntax syntax_field = 25;
    google.protobuf.Timestamp timestamp_field = 26;
    google.protobuf.Type type_field = 27;
    google.protobuf.UInt32Value uint32_value_field = 28;
    google.protobuf.UInt64Value uint64_value_field = 29;
    google.protobuf.Value value_field = 30;
}

// A repeated field for each well-known type.
message RepeatedWellKnownTypes {
  repeated google.protobuf.Any any_field = 1;
  repeated google.protobuf.Api api_field = 2;
  repeated google.protobuf.BoolValue bool_value_field = 3;
  repeated google.protobuf.BytesValue bytes_value_field = 4;
  repeated google.protobuf.DoubleValue double_value_field = 5;
  repeated google.protobuf.Duration duration_field = 6;
  repeated google.protobuf.Empty empty_field = 7;
  repeated google.protobuf.Enum enum_field = 8;
  repeated google.protobuf.EnumValue enum_value_field = 9;
  repeated google.protobuf.Field field_field = 10;
  repeated google.protobuf.Field.Cardinality field_cardinality_field = 11;
  repeated google.protobuf.Field.Kind field_kind_field = 12;
  repeated google.protobuf.FieldMask field_mask_field = 13;
  repeated google.protobuf.FloatValue float_value_field = 14;
  repeated google.protobuf.Int32Value int32_value_field = 15;
  repeated google.protobuf.Int64Value int64_value_field = 16;
  repeated google.protobuf.ListValue list_value_field = 17;
  repeated google.protobuf.Method method_field = 18;
  repeated google.protobuf.Mixin mixin_field = 19;
  repeated google.protobuf.NullValue null_value_field = 20;
  repeated google.protobuf.Option option_field = 21;
  repeated google.protobuf.SourceContext source_context_field = 22;
  repeated google.protobuf.StringValue string_value_field = 23;
  repeated google.protobuf.Struct struct_field = 24;
  repeated google.protobuf.Syntax syntax_field = 25;
  repeated google.protobuf.Timestamp timestamp_field = 26;
  repeated google.protobuf.Type type_field = 27;
  repeated google.protobuf.UInt32Value uint32_value_field = 28;
  repeated google.protobuf.UInt64Value uint64_value_field = 29;
  repeated google.protobuf.Value value_field = 30;
}

message OneofWellKnownTypes {
  oneof oneof_field {
      google.protobuf.Any any_field = 1;
      google.protobuf.Api api_field = 2;
      google.protobuf.BoolValue bool_value_field = 3;
      google.protobuf.BytesValue bytes_value_field = 4;
      google.protobuf.DoubleValue double_value_field = 5;
      google.protobuf.Duration duration_field = 6;
      google.protobuf.Empty empty_field = 7;
      google.protobuf.Enum enum_field = 8;
      google.protobuf.EnumValue enum_value_field = 9;
      google.protobuf.Field field_field = 10;
      google.protobuf.Field.Cardinality field_cardinality_field = 11;
      google.protobuf.Field.Kind field_kind_field = 12;
      google.protobuf.FieldMask field_mask_field = 13;
      google.protobuf.FloatValue float_value_field = 14;
      google.protobuf.Int32Value int32_value_field = 15;
      google.protobuf.Int64Value int64_value_field = 16;
      google.protobuf.ListValue list_value_field = 17;
      google.protobuf.Method method_field = 18;
      google.protobuf.Mixin mixin_field = 19;
      google.protobuf.NullValue null_value_field = 20;
      google.protobuf.Option option_field = 21;
      google.protobuf.SourceContext source_context_field = 22;
      google.protobuf.StringValue string_value_field = 23;
      google.protobuf.Struct struct_field = 24;
      google.protobuf.Syntax syntax_field = 25;
      google.protobuf.Timestamp timestamp_field = 26;
      google.protobuf.Type type_field = 27;
      google.protobuf.UInt32Value uint32_value_field = 28;
      google.protobuf.UInt64Value uint64_value_field = 29;
      google.protobuf.Value value_field = 30;
  }
}

// A map field for each well-known type. We only need to worry about the value
// part of the map being the well-known types, as messages can't be map keys.
message MapWellKnownTypes {
    map<int32, google.protobuf.Any> any_field = 1;
    map<int32, google.protobuf.Api> api_field = 2;
    map<int32, google.protobuf.BoolValue> bool_value_field = 3;
    map<int32, google.protobuf.BytesValue> bytes_value_field = 4;
    map<int32, google.protobuf.DoubleValue> double_value_field = 5;
    map<int32, google.protobuf.Duration> duration_field = 6;
    map<int32, google.protobuf.Empty> empty_field = 7;
    map<int32, google.protobuf.Enum> enum_field = 8;
    map<int32, google.protobuf.EnumValue> enum_value_field = 9;
    map<int32, google.protobuf.Field> field_field = 10;
    map<int32, google.protobuf.Field.Cardinality> field_cardinality_field = 11;
    map<int32, google.protobuf.Field.Kind> field_kind_field = 12;
    map<int32, google.protobuf.FieldMask> field_mask_field = 13;
    map<int32, google.protobuf.FloatValue> float_value_field = 14;
    map<int32, google.protobuf.Int32Value> int32_value_field = 15;
    map<int32, google.protobuf.Int64Value> int64_value_field = 16;
    map<int32, google.protobuf.ListValue> list_value_field = 17;
    map<int32, google.protobuf.Method> method_field = 18;
    map<int32, google.protobuf.Mixin> mixin_field = 19;
    map<int32, google.protobuf.NullValue> null_value_field = 20;
    map<int32, google.protobuf.Option> option_field = 21;
    map<int32, google.protobuf.SourceContext> source_context_field = 22;
    map<int32, google.protobuf.StringValue> string_value_field = 23;
    map<int32, google.protobuf.Struct> struct_field = 24;
    map<int32, google.protobuf.Syntax> syntax_field = 25;
    map<int32, google.protobuf.Timestamp> timestamp_field = 26;
    map<int32, google.protobuf.Type> type_field = 27;
    map<int32, google.protobuf.UInt32Value> uint32_value_field = 28;
    map<int32, google.protobuf.UInt64Value> uint64_value_field = 29;
    map<int32, google.protobuf.Value> value_field = 30;
}
