@0xf8f8864ba0678056; using CSharp = import "programming_language/csharp.capnp"; $CSharp.namespace("FabAccessAPI.Schema"); using import "/capnp/rpc.capnp".SturdyRef; using import "persistent.capnp".Persistent; using import "state.capnp".State; using import "state.capnp".Update; interface Claimable extends (Persistent) { restore @0 ( sturdy :SturdyRef ) -> ( claim :Claim ); # Restore a previously saved SturdyRef pointing to a Claim claim @1 () -> ( claim :Claim ); # returns NULL if the resource is *currently* not claimable. # drop the returned claim capability to unclaim it. } interface Claim extends (Persistent) { update @0 ( update :Update ) -> ( error :Error ); # Transactionally update a resource via a claim. # # The parameter `update` is a list of `UpdateValue` that specify a list of behaviours to be # updated with the associated data. The format of this data depends on and is defined by the # behaviour. # An update call is atomic and transactional, if any one of the UpdateValue can not be applied # the entire update call fails and is not applied. A client may send multiple update calls in # parallel to opt out of the transactional behaviour of update. The ordering in which multiple # update calls are applied is not specified, a client MUST NOT rely on updates happening in the # order they are sent. # The returned `error` is NULL if the update call succeeded. interface Error { } }