api.fabaccess-api/traits/claimable.capnp
Nadja von Reitzenstein Čerpnjak 637e56c4ad Compact struct return values
2024-04-22 11:00:27 +02:00

65 lines
2.0 KiB
Cap'n Proto

@0xcdb148188bb77a8e;
using CSharp = import "../programming_language/csharp.capnp";
$CSharp.namespace("FabAccessAPI.Schema");
using import "../traits.capnp".TraitSuper;
using import "../traits.capnp".TraitError;
using import "../utils.capnp".Fallible;
using import "../utils.capnp".L10NString;
using import "../claim.capnp".Claim;
using import "../claim.capnp".Lock;
using import "../owned.capnp".Owned;
using import "../interest.capnp".Interest;
using import "../interest.capnp".InterestKind;
# OID for this trait: 1.3.6.1.4.1.61783.612.1.0
# │ │ │ │
# RLKM UG PEN ╯ │ │ │
# │ │ │
# FabAccess subtree ╯ │ │
# │ │
# Traits ╯ │
# │
# Claimable ╯
interface TraitClaimable extends (TraitSuper) {
getState @0 () -> StateClaimable;
}
struct StateClaimable {
claims @0 :List(ClaimView);
maxClaims @1 :UInt64;
interests @2 :List(InterestView);
lock @3 :LockView;
}
struct ClaimView {
claim @0 :Claim;
# NULL if caller lacks impersonate permission.
# The list is still populated, so the number of entries is the number of
# currently outstanding claims.
owner @1 :Owned;
# NULL if caller lacks manage permission.
}
struct InterestView {
interest @0 :Interest;
# NULL if caller lacks impersonate permission.
# The list is still populated, so the number of entries is the number of
# currently outstanding interests.
owner @1 :Owned;
# NULL if caller lacks manage permission.
kind @2 :InterestKind;
}
struct LockView {
isLocked @0 :Bool;
lock @1 :Lock;
# NULL if caller lacks impersonate permission.
lockReason @2 :L10NString;
# Only set if resource is locked *and* a lock reason was set.
}