| // Copyright 2018 The LUCI 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. |
| |
| syntax = "proto3"; |
| |
| package testprotos; |
| |
| import "go.chromium.org/luci/starlark/starlarkproto/testprotos/another.proto"; |
| import "google/protobuf/timestamp.proto"; |
| |
| enum Enum { |
| ENUM_DEFAULT = 0; |
| ENUM_VAL_1 = 1; |
| } |
| |
| message SimpleFields { |
| int64 i64 = 1; |
| repeated int64 i64_rep = 2; |
| int32 i32 = 3; |
| uint64 ui64 = 4; |
| uint32 ui32 = 5; |
| bool b = 6; |
| float f32 = 7; |
| double f64 = 8; |
| string s = 9; |
| bytes bs = 10; |
| repeated bytes bs_rep = 11; |
| } |
| |
| message MessageFields { |
| Simple single = 1; |
| repeated Simple rep = 2; |
| } |
| |
| message Simple { |
| int64 i = 1; |
| repeated int64 many_i = 2; |
| } |
| |
| message Complex { |
| enum InnerEnum { |
| UNKNOWN = 0; |
| ENUM_VAL_1 = 1; |
| } |
| |
| message InnerMessage { |
| int64 i = 1; |
| } |
| |
| int64 i64 = 1; |
| repeated int64 i64_rep = 2; |
| |
| InnerEnum enum_val = 3; |
| InnerMessage msg_val = 4; |
| repeated InnerMessage msg_val_rep = 5; |
| |
| oneof oneof_val { |
| Simple simple = 6; |
| InnerMessage inner_msg = 7; |
| } |
| } |
| |
| message RefsOtherProtos { |
| AnotherMessage another_msg = 1; |
| google.protobuf.Timestamp ts = 2; |
| } |
| |
| message MapWithPrimitiveType { |
| map<string, int64> m = 1; |
| } |
| |
| message MapWithMessageType { |
| map<string, Simple> m = 1; |
| } |