syntax = "proto3";

package testpb;

import "amino/amino.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/empty.proto";

message WithAMap {
  map<string, string> str_map = 1;
}

message WithAList {
  repeated string dont_omitempty_list = 1 [(amino.dont_omitempty) = true];
  repeated string list                = 2;
}

message WithAJson {
  bytes field1 = 1 [(amino.encoding) = "inline_json"];
}

message ABitOfEverything {
  option (amino.name) = "ABitOfEverything";

  NestedMessage message = 1;
  AnEnum enum           = 2;

  repeated int32 repeated = 6;

  string str     = 7;
  bool bool      = 8;
  bytes    bytes = 9;
  int32    i32   = 10;
  fixed32  f32   = 11;
  uint32   u32   = 12;
  sint32   si32  = 13;
  sfixed32 sf32  = 14;
  int64    i64   = 15;
  fixed64  f64   = 16;
  uint64   u64   = 17;
  sint64   si64  = 18;
  sfixed64 sf64  = 19;

  // The following types are not tested here because they are treated fundamentally differently in
  // gogoproto.  They are tested fully in /tests/integration/aminojson/aminojson_test.go

  // Any types are not tested here because they are treated fundamentally differently in gogoproto.
  // In the go-admin/gogoproto paradigm a custom SDK type is used to wrap the Any type, which has no
  // equivalent in code in pulsar generated types.
  //
  // google.protobuf.Any any = 22

  // Also not tested due to gogoproto differences.  In gogoproto, time.Time is used instead of
  // google.protobuf.Timestamp.  There is no equivalent in pulsar generated types.
  //
  // google.protobuf.Timestamp timestamp = 23;

  // Also not tested due to gogoproto differences.  In gogoproto, time.Duration is used instead of
  // google.protobuf.Duration.  There is no equivalent in pulsar generated types.
  //
  // google.protobuf.Duration duration = 24;
}

message Duration {
  google.protobuf.Duration  duration  = 1;
  google.protobuf.Timestamp timestamp = 2;
}

message NestedMessage {
  option (amino.name) = "NestedMessage";

  string foo = 1;
  int32  bar = 2;
}

enum AnEnum {
  UNDEFINED = 0;
  ONE       = 1;
  TWO       = 2;
}