xref: /aosp_15_r20/external/grpc-grpc/src/proto/grpc/testing/compiler_test.proto (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1// Copyright 2016 gRPC authors.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// File detached comment 1
16
17// File detached comment 2
18
19// File leading comment 1
20syntax = "proto3";
21
22// Ignored detached comment
23// The comments in this file are not meant for readability
24// but rather to test to make sure that the code generator
25// properly preserves comments on files, services, and RPCs.
26
27// Ignored package leading comment
28package grpc.testing;
29
30message Request {
31}
32message Response {
33}
34
35// ServiceA detached comment 1
36
37// ServiceA detached comment 2
38
39// Comments may contain special characters like "^[a-z0-9-]{1,63}$" and $$
40
41// ServiceA leading comment 1
42service ServiceA {
43  // MethodA1 leading comment 1
44  rpc MethodA1(Request) returns (Response);  // MethodA1 trailing comment 1
45
46  // MethodA2 detached leading comment 1
47
48  // Method A2 leading comment 1
49  // Method A2 leading comment 2
50  rpc MethodA2(stream Request) returns (Response);
51  // MethodA2 trailing comment 1
52
53  // Method A3 leading comment 1
54  rpc MethodA3(Request) returns (stream Response);
55  // Method A3 trailing comment 1
56
57  // Method A4 leading comment 1
58  rpc MethodA4(stream Request) returns (stream Response);
59  // Method A4 trailing comment 1
60}
61// Ignored ServiceA trailing comment 1
62
63// ServiceB leading comment 1
64service ServiceB {
65  // ServiceB trailing comment 1
66
67  // MethodB1 leading comment 1
68  rpc MethodB1(Request) returns (Response);
69  // MethodB1 trailing comment 1
70}
71// Ignored ServiceB trailing comment 2
72
73// Ignored file trailing comment
74