| 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 |
syntax = "proto3"; |
| 16 |
|
| 17 |
import "tests/protoc_plugin/protos/payload/test_payload.proto"; |
| 18 |
|
| 19 |
package grpc_protoc_plugin; |
| 20 |
|
| 21 |
message SimpleRequest { |
| 22 |
// Desired payload type in the response from the server. |
| 23 |
// If response_type is RANDOM, server randomly chooses one from other formats. |
| 24 |
PayloadType response_type = 1; |
| 25 |
|
| 26 |
// Desired payload size in the response from the server. |
| 27 |
// If response_type is COMPRESSABLE, this denotes the size before compression. |
| 28 |
int32 response_size = 2; |
| 29 |
|
| 30 |
// input payload sent along with the request. |
| 31 |
Payload payload = 3; |
| 32 |
} |
| 33 |
|
| 34 |
message StreamingInputCallRequest { |
| 35 |
// input payload sent along with the request. |
| 36 |
Payload payload = 1; |
| 37 |
|
| 38 |
// Not expecting any payload from the response. |
| 39 |
} |
| 40 |
|
| 41 |
message ResponseParameters { |
| 42 |
// Desired payload sizes in responses from the server. |
| 43 |
// If response_type is COMPRESSABLE, this denotes the size before compression. |
| 44 |
int32 size = 1; |
| 45 |
|
| 46 |
// Desired interval between consecutive responses in the response stream in |
| 47 |
// microseconds. |
| 48 |
int32 interval_us = 2; |
| 49 |
} |
| 50 |
|
| 51 |
message StreamingOutputCallRequest { |
| 52 |
// Desired payload type in the response from the server. |
| 53 |
// If response_type is RANDOM, the payload from each response in the stream |
| 54 |
// might be of different types. This is to simulate a mixed type of payload |
| 55 |
// stream. |
| 56 |
PayloadType response_type = 1; |
| 57 |
|
| 58 |
repeated ResponseParameters response_parameters = 2; |
| 59 |
|
| 60 |
// input payload sent along with the request. |
| 61 |
Payload payload = 3; |
| 62 |
} |