com.google.api.tools.framework.processors.normalizer.testdata.regenerated_descriptor_test.proto Maven / Gradle / Ivy
// Test Proto source for RegeneratedDescriptorTest
syntax = "proto2";
package com.google.api.tools.framework.processors.normalizer.RegeneratedDescriptorTest;
import "regenerated_descriptor_test2.proto";
message OuterMessage {
option deprecated = true;
// Test field options
optional string string1 = 1 [ctype = CORD];
optional string string2 = 2;
optional int64 int64 = 3 [jstype = JS_NUMBER];
optional InnerEnum inner_enum = 4 [json_name = "inner"];
optional OuterEnum outer_enum = 5 [default = VALUE3];
repeated int32 packed = 6 [packed = true];
optional InnerMessage lazy = 7 [lazy = true];
optional string deprecated = 8 [deprecated = true];
optional OtherMessage other_message = 9;
oneof test_oneof {
string foo = 10;
string bar = 11;
}
// not testing the "weak" option
// not testing upgraded_option
// not testing deprecated_raw_message
// not testing uninterpreted_option
message InnerMessage {
optional string field1 = 1;
enum InnerInnerEnum {
VALUE1 = 1;
}
optional InnerInnerEnum enum1 = 2;
message InnerInnerMessage {
optional string field1 = 1;
}
optional InnerInnerMessage field2 = 3;
}
enum InnerEnum {
VALUE1 = 1;
}
// LINT: ALLOW_GROUPS
repeated group GroupMessage = 12 {
optional string group_field = 13;
}
repeated GroupMessage not_really_grouped = 14;
required string required_field = 15;
repeated InnerMessage mess = 16;
}
enum OuterEnum {
VALUE2_ALIAS = 2;
VALUE2 = 2;
VALUE3 = 3 [deprecated = true];
option allow_alias = true;
option deprecated = true;
}
service Service {
rpc Method(OuterMessage) returns (OuterMessage.InnerMessage);
rpc ServerStreamingMethod(OuterMessage) returns (stream OuterMessage);
rpc ClientStreamingMethod(stream OuterMessage) returns (OuterMessage);
rpc BidiStreamingMethod(stream OuterMessage) returns (stream OuterMessage) {
option legacy_client_initial_tokens = 1024;
option legacy_server_initial_tokens = 1024;
}
rpc LegacyStream(OuterMessage) returns (OuterMessage) {
option stream_type = "StreamReply";
}
rpc MethodWithOptions(OuterMessage) returns (OuterMessage) {
// Testing method options
option protocol = UDP;
option deadline = 5.0;
option duplicate_suppression = true;
option fail_fast = true;
option end_user_creds_requested = true;
option client_logging = 128;
option server_logging = 129;
option security_level = INTEGRITY;
option response_format = ZIPPY_COMPRESSED;
option request_format = ZIPPY_COMPRESSED;
option security_label = "admin";
option log_level = LOG_HEADER_ONLY;
option deprecated = true;
// not testing uninterpreted_options
}
// Legacy stream declarations are not supported in One Platform.
// stream StreamWithOptions(OuterMessage, OuterMessage);
}