blob: 554e0a9ba921efd538172a90d2064e8a79adb92c [file] [log] [blame]
syntax = "proto3";
package xos;
import "google/protobuf/empty.proto";
import "annotations.proto";
import "common.proto";
import "xosoptions.proto";
message LoginRequest {
string username = 1;
string password = 2;
};
message LoginResponse {
string sessionid = 1;
};
message ModelFilter {
string class_name = 1;
};
message ModelListEntry {
string class_name = 1;
int32 id = 2;
string info = 3;
};
message ModelList {
repeated ModelListEntry items = 1;
};
message XProtos {
string xproto = 1;
};
message PopulatedServiceInstance {
option (contentTypeId) = "core.serviceinstance";
oneof id_present {
int32 id = 1;
}
oneof leaf_model_name_present {
string leaf_model_name = 2[(val).maxLength = 1024, (val).nonNull = true];
}
oneof name_present {
string name = 3[(val).maxLength = 200];
}
oneof owner_present {
int32 owner_id = 4[(val).nonNull = true, (foreignKey).modelName = "Service", (foreignKey).reverseFieldName = "service_instances"];
}
repeated int32 provided_service_instances = 5;
repeated int32 subscribed_service_instances = 6;
repeated int32 subscribed_service = 7;
repeated int32 subscribed_network = 8;
};
service utility {
rpc Login(LoginRequest) returns (LoginResponse) {
option (googleapi.http) = {
post: "/xosapi/v1/utility/login"
body: "*"
};
}
rpc Logout(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (googleapi.http) = {
post: "/xosapi/v1/utility/logout"
body: "*"
};
}
rpc NoOp(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (googleapi.http) = {
post: "/xosapi/v1/utility/noop"
body: "*"
};
}
rpc AuthenticatedNoOp(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (googleapi.http) = {
post: "/xosapi/v1/utility/auth_noop"
body: "*"
};
}
rpc SetDirtyModels(ModelFilter) returns (ModelList) {
option (googleapi.http) = {
post: "/xosapi/v1/utility/dirty_models"
body: "*"
};
}
rpc ListDirtyModels(ModelFilter) returns (ModelList) {
option (googleapi.http) = {
get: "/xosapi/v1/utility/dirty_models"
};
}
rpc GetXproto(google.protobuf.Empty) returns (XProtos) {
option (googleapi.http) = {
get: "/xosapi/v1/xproto"
};
}
rpc GetPopulatedServiceInstances(ID) returns (PopulatedServiceInstance) {
option (googleapi.http) = {
get: "/xosapi/v1/core/populatedserviceinstance/{id}"
};
}
};