// Copyright 2020 Open Reaction Database Project Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Test protos for the Open Reaction Database.
syntax = "proto3";

package ord_test;

message Scalar {
  int32 int32_value = 1;
  int64 int64_value = 2;
  optional float float_value = 3;
  string string_value = 4;
  bytes bytes_value = 5;
  optional bool bool_value = 6;
}

message RepeatedScalar {
  repeated float values = 1;
}

message Enum {
  enum EnumValues {
    UNSPECIFIED = 0;
    FIRST = 1;
    SECOND = 2;
  }
  EnumValues value = 1;
}

message RepeatedEnum {
  enum EnumValues {
    UNSPECIFIED = 0;
    FIRST = 1;
    SECOND = 2;
  }
  repeated EnumValues values = 1;
}

message Nested {
  message Child {
    optional float value = 1;
  }
  Child child = 1;
}

message RepeatedNested {
  message Child {
    optional float value = 1;
  }
  repeated Child children = 1;
}

message Map {
  map<string, float> values = 1;
}

message MapNested {
  message Child {
    optional float value = 1;
  }
  map<string, Child> children = 1;
}
