1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
syntax = "proto3";
package google.expr.proto3.test;
option go_package = "github.com/google/cel-go/test/proto3pb";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
// Imported message dependency test.
import "test/proto3pb/test_import.proto";
// This proto includes every type of field in both singular and repeated
// forms.
message TestAllTypes {
message NestedMessage {
// The field name "b" fails to compile in proto1 because it conflicts with
// a local variable named "b" in one of the generated methods.
// This file needs to compile in proto1 to test backwards-compatibility.
int32 bb = 1;
}
enum NestedEnum {
FOO = 0;
BAR = 1;
BAZ = 2;
}
// Singular
int32 single_int32 = 1;
int64 single_int64 = 2;
uint32 single_uint32 = 3;
uint64 single_uint64 = 4;
sint32 single_sint32 = 5;
sint64 single_sint64 = 6;
fixed32 single_fixed32 = 7;
fixed64 single_fixed64 = 8;
sfixed32 single_sfixed32 = 9;
sfixed64 single_sfixed64 = 10;
float single_float = 11;
double single_double = 12;
bool single_bool = 13;
string single_string = 14;
bytes single_bytes = 15;
NestedEnum standalone_enum = 22;
// Wellknown.
google.protobuf.Any single_any = 100;
google.protobuf.Duration single_duration = 101;
google.protobuf.Timestamp single_timestamp = 102;
google.protobuf.Struct single_struct = 103;
google.protobuf.Value single_value = 104;
google.protobuf.Int64Value single_int64_wrapper = 105;
google.protobuf.Int32Value single_int32_wrapper = 106;
google.protobuf.DoubleValue single_double_wrapper = 107;
google.protobuf.FloatValue single_float_wrapper = 108;
google.protobuf.UInt64Value single_uint64_wrapper = 109;
google.protobuf.UInt32Value single_uint32_wrapper = 110;
google.protobuf.StringValue single_string_wrapper = 111;
google.protobuf.BoolValue single_bool_wrapper = 112;
google.protobuf.BytesValue single_bytes_wrapper = 113;
// Nested messages
oneof nested_type {
NestedMessage single_nested_message = 18;
NestedEnum single_nested_enum = 21;
}
// Repeated
repeated int32 repeated_int32 = 31;
repeated int64 repeated_int64 = 32;
repeated uint32 repeated_uint32 = 33;
repeated uint64 repeated_uint64 = 34;
repeated sint32 repeated_sint32 = 35;
repeated sint64 repeated_sint64 = 36;
repeated fixed32 repeated_fixed32 = 37;
repeated fixed64 repeated_fixed64 = 38;
repeated sfixed32 repeated_sfixed32 = 39;
repeated sfixed64 repeated_sfixed64 = 40;
repeated float repeated_float = 41;
repeated double repeated_double = 42;
repeated bool repeated_bool = 43;
repeated string repeated_string = 44;
repeated bytes repeated_bytes = 45;
repeated NestedMessage repeated_nested_message = 48;
repeated NestedEnum repeated_nested_enum = 51;
repeated string repeated_string_piece = 54 [ctype = STRING_PIECE];
repeated string repeated_cord = 55 [ctype = CORD];
repeated NestedMessage repeated_lazy_message = 57 [lazy = true];
// Map
map<string, string> map_string_string = 58;
map<int64, NestedTestAllTypes> map_int64_nested_type = 59;
// Imports
repeated ImportedGlobalEnum imported_enums = 60;
}
// This proto includes a recursively nested message.
message NestedTestAllTypes {
NestedTestAllTypes child = 1;
TestAllTypes payload = 2;
}
// This proto tests that global enums are resolved correctly.
enum GlobalEnum {
GOO = 0;
GAR = 1;
GAZ = 2;
}
|