syntax = "proto3";
import "is_msgs/validate.proto";

package is.tests;

message Foo {
  int32 myint = 1 [(validate.rules).int32 = {gte: -50, lte: 2000}];
  float myfloat = 2 [(validate.rules).float = {gt: 0.1, lt: 0.3}];
  double mydouble = 3 [(validate.rules).double = {lte: 33.333}];
};

message Bar {
  Foo myfoo = 1;
  float myfloat = 2 [(validate.rules).float = {gt: -1.0}];
};

message Repeats {
  repeated Foo foos = 1;
  Foo foo2 = 2 [(validate.rules).message = {required: true}];
  repeated int32 int32s = 3 [(validate.rules).int32 = {lt: -10}];
  repeated uint32 uint32s = 4 [(validate.rules).uint32 = {gt: 10}];
  repeated float floats = 5 [(validate.rules).float = {lte: -10}];
  repeated double doubles = 6 [(validate.rules).double = {gte: -10}];
  repeated int64 int64s = 7 [(validate.rules).int64 = {lt: 10}];
  repeated uint64 uint64s = 8 [(validate.rules).uint64 = {gt: 100}];
}