blob: 0279f719aa42a978ec946f4d541a872b071843e3 [file] [log] [blame]
Don Newton276cd1f2019-02-06 17:14:03 -05001syntax = "proto3";
2
3package xos;
4
5import "google/protobuf/empty.proto";
6import "annotations.proto";
7
8message Xproto {
9 string filename = 1;
10 string contents = 2;
11}
12
13message DeclFile {
14 string filename = 1;
15 string contents = 2;
16};
17
18message AtticFile {
19 string filename = 1;
20 string contents = 2;
21};
22
23message APIConvenienceFile {
24 string filename = 1;
25 string contents = 2;
26};
27
28message LoadModelsRequest {
29 string name = 1;
30 string version = 2;
31 repeated Xproto xprotos = 3;
32 repeated DeclFile decls = 4;
33 repeated AtticFile attics = 5;
34 repeated APIConvenienceFile convenience_methods = 6;
35};
36
37message ListConvenienceMethodsReply {
38 repeated APIConvenienceFile convenience_methods = 1;
39}
40
41message LoadModelsReply {
42 enum LoadModelsStatus {
43 SUCCESS = 0;
44 ERROR = 1;
45 }
46 LoadModelsStatus status = 1;
47};
48
49message UnloadModelsRequest {
50 string name = 1;
51 string version = 2;
52};
53
54message ServiceModelStatus {
55 string name = 1;
56 string version = 2;
57 string state = 3;
58};
59
60message LoadStatusReply {
61 int32 model_status = 1;
62 string model_output = 2;
63 repeated ServiceModelStatus services = 3;
64}
65
66service dynamicload {
67 rpc LoadModels(LoadModelsRequest) returns (LoadModelsReply) {
68 option (googleapi.http) = {
69 post: "/xosapi/v1/dynamicload/load_models"
70 body: "*"
71 };
72 }
73 rpc UnloadModels(UnloadModelsRequest) returns (LoadModelsReply) {
74 option (googleapi.http) = {
75 post: "/xosapi/v1/dynamicload/unload_models"
76 body: "*"
77 };
78 }
79 rpc GetLoadStatus(google.protobuf.Empty) returns (LoadStatusReply) {
80 option (googleapi.http) = {
81 get: "/xosapi/v1/dynamicload/load_status"
82 };
83 }
84 rpc GetConvenienceMethods(google.protobuf.Empty) returns (ListConvenienceMethodsReply) {
85 option (googleapi.http) = {
86 // NOTE do we need to expose this via rest? maybe for debug...
87 get: "/xosapi/v1/dynamicload/convenience_methods"
88 };
89 }
90};