mirror of
https://gitlab.com/fabinfra/fabaccess/fabaccess-api.git
synced 2025-03-11 14:21:44 +01:00
return Optional value for searches
This commit is contained in:
parent
049b183f96
commit
aa006507c4
@ -25,4 +25,11 @@ struct UUID {
|
||||
struct KeyValuePair {
|
||||
key @0 :Text;
|
||||
value @1 :Text;
|
||||
}
|
||||
}
|
||||
|
||||
struct Optional(T) {
|
||||
union {
|
||||
nothing @0 :Void;
|
||||
just @1 :T;
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ using CSharp = import "programming_language/csharp.capnp";
|
||||
$CSharp.namespace("FabAccessAPI.Schema");
|
||||
|
||||
using General = import "general.capnp";
|
||||
using Optional = General.Optional;
|
||||
using Machine = import "machine.capnp".Machine;
|
||||
|
||||
struct MachineSystem
|
||||
@ -15,7 +16,7 @@ struct MachineSystem
|
||||
interface Info $CSharp.name("InfoInterface") {
|
||||
getMachineList @0 () -> ( machine_list :List(Machine) );
|
||||
|
||||
getMachine @1 ( id :Text ) -> Machine;
|
||||
getMachineURN @2 ( urn :Text ) -> Machine;
|
||||
getMachine @1 ( id :Text ) -> Optional(Machine);
|
||||
getMachineURN @2 ( urn :Text ) -> Optional(Machine);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user