syntax = "proto2";

package ct;

import "ct/proto/tls_options.proto";


// A message that covers each option at least once.
// The test coverage is best-effort: the test message can't cover
// all combinations of message types and options.
message TestMessage {
  enum TestEnum {
    option (tls_enum_opts).max_value = 65535;
    ENUM_0 = 0;
    ENUM_1 = 1;
  }

  message EmbeddedMessage {
    optional uint32 uint_32 = 1 [(tls_opts).bytes_in_use = 2];
  }

  optional uint32 skip_uint32 = 1 [(tls_opts).skip = true];
  optional uint32 uint_8 = 2 [(tls_opts).bytes_in_use = 1];
  optional uint32 uint_16 = 3 [(tls_opts).bytes_in_use = 2];
  optional uint32 uint_24 = 4 [(tls_opts).bytes_in_use = 3];
  optional uint32 uint_32 = 5;
  optional uint64 uint_48 = 6 [(tls_opts).bytes_in_use = 6];
  optional uint64 uint_64 = 7;
  optional bytes skip_bytes = 8 [(tls_opts).skip = true];
  optional bytes fixed_bytes = 9 [(tls_opts).fixed_length = 2];
  optional bytes var_bytes = 10 [(tls_opts).max_length = 16];
  optional bytes var_bytes2 = 11 [(tls_opts).min_length = 4,
                                  (tls_opts).max_length = 256];
  repeated bytes vector_bytes = 12 [(tls_opts).max_length = 10,
                                    (tls_opts).max_total_length = 20];
  repeated uint32 vector_uint32 = 13 [(tls_opts).min_total_length = 4,
                                      (tls_opts).max_total_length = 8];
  optional TestEnum test_enum = 14;
  optional uint32 select_uint32 = 15 [(tls_opts).select_field = "test_enum",
                                      (tls_opts).select_value = 1];
  optional EmbeddedMessage embedded_message = 16;
  repeated EmbeddedMessage repeated_message = 17
      [(tls_opts).max_total_length = 8];
}
