-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbasic.proto
More file actions
55 lines (45 loc) · 1.49 KB
/
basic.proto
File metadata and controls
55 lines (45 loc) · 1.49 KB
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
syntax = "proto3";
package testing.basic;
// php_namespace option not included; to test generating namespace from proto package.
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
// This is a basic service.
service Basic {
option (google.api.default_host) = "basic.example.com";
option (google.api.oauth_scopes) = "scope1,scope2";
option (google.api.api_version) = "v1_20240418";
// Test summary text for AMethod
rpc AMethod(Request) returns(Response) {
option (google.api.http) = {
post: "/path:aMethod"
body: "*"
};
}
// Test including method args.
rpc MethodWithArgs(RequestWithArgs) returns(Response) {
option (google.api.http) = {
post: "/path:methodWithArgs"
body: "*"
};
};
}
message Request {
}
message PartOfRequestA {}
message PartOfRequestB {}
message PartOfRequestC {}
message RequestWithArgs {
// A required field...
string a_string = 1 [(google.api.field_behavior) = REQUIRED];
// ...and an optional field.
int32 an_int = 2;
// ...and a repeated message type, which checks that an extra import is *not* added,
// in contrast to a paginated method where an extra import *is* added.
repeated PartOfRequestA part_of_request_a = 4 [(google.api.field_behavior) = REQUIRED];
repeated PartOfRequestB part_of_request_b = 5;
PartOfRequestC part_of_request_c = 6;
int32 status = 7 [(google.api.field_behavior) = REQUIRED]; // reserved variable name
}
message Response {
}