Class CapabilityGrantResponse
java.lang.Object
co.ankatech.keymanagement.client.keymanagement.model.CapabilityGrantResponse
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class CapabilityGrantResponse
extends Object
The runtime authorization of an actor: capabilities over keys, in exactly one Exchange Context, owned by exactly one governance object (ownerType), optionally limited by a Constraint Policy version. A basic grant holds one to four of ENCRYPT, DECRYPT, SIGN, VERIFY over one Key ID in assetKids, or over every key of the tenant when allowWildcardAsset is true; a REENCRYPT or RESIGN grant holds that one capability over its ordered keyPairs. An actor's live grants never overlap.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumThe governance object that owns the grant and whose lifecycle governs it: EXCHANGE (a Cryptographic Exchange), INTERNAL_USE_CASE (an Internal Crypto Use Case), MARKETPLACE (the marketplace bootstrap of the tenant) or INDEPENDENT (written directly through this API). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAssetKidsItem(String assetKidsItem) addCapabilitiesItem(String capabilitiesItem) addKeyPairsItem(CapabilityGrantKeyPair keyPairsItem) addOperationScopesItem(String operationScopesItem) allowWildcardAsset(Boolean allowWildcardAsset) capabilities(List<String> capabilities) constraintPolicyId(UUID constraintPolicyId) constraintPolicyName(String constraintPolicyName) constraintPolicyVersion(Integer constraintPolicyVersion) constraintSnapshot(GrantConstraintSnapshot constraintSnapshot) consumption(GrantConsumption consumption) createdAt(OffsetDateTime createdAt) effectiveState(GrantEffectiveState effectiveState) booleanexchangeContextId(UUID exchangeContextId) exchangeContextName(String exchangeContextName) static CapabilityGrantResponseCreate an instance of CapabilityGrantResponse given an JSON stringGet actorIdHuman-readable Actor name, resolved from the Actor the grant referencesGet allowWildcardAssetThe Key ID a basic grant authorizes; empty for the any-asset wildcard (allowWildcardAsset) and for a REENCRYPT or RESIGN grant, whose keys are its keyPairs.Capability strings (e.gGet constraintPolicyIdConstraint Policy name, resolved from the Constraint Policy the grant referencesThe version of the Constraint Policy this grant enforces: the one current when the grant was issued.The limits this grant enforces, taken from its pinned policy version, never from the policy's current values. null when the grant has no constraint policy.How the grant was used up, present only when it was: its single use was taken or its maxUsage reached.Get createdAtWhether the governance objects the administration plane owns let the grant authorize at the instant of the read, and the first reason they do notThe one Exchange Context the grant authorizes inExchange Context name, resolved from the Exchange Context the grant referencesgetId()Get idThe ordered key pairs a REENCRYPT or RESIGN grant authorizes, each in its own direction only (sourceKid to targetKid); empty for a basic grant.The operation scopes this grant confers on its actor while it is effective, sorted.The owning Cryptographic Exchange or Internal Crypto Use Case; null for a MARKETPLACE or INDEPENDENT grant.The governance object that owns the grant and whose lifecycle governs it: EXCHANGE (a Cryptographic Exchange), INTERNAL_USE_CASE (an Internal Crypto Use Case), MARKETPLACE (the marketplace bootstrap of the tenant) or INDEPENDENT (written directly through this API).The wire value ofownerType: what the server sent, verbatim.Get tenantIdWhen the grant was last updated: issued, consumed, suspended or resumed with its exchange, or revoked.inthashCode()keyPairs(List<CapabilityGrantKeyPair> keyPairs) operationScopes(List<String> operationScopes) ownerType(CapabilityGrantResponse.OwnerTypeEnum ownerType) voidsetActorId(UUID actorId) voidsetActorName(String actorName) voidsetAllowWildcardAsset(Boolean allowWildcardAsset) voidsetAssetKids(List<String> assetKids) voidsetCapabilities(List<String> capabilities) voidsetConstraintPolicyId(UUID constraintPolicyId) voidsetConstraintPolicyName(String constraintPolicyName) voidsetConstraintPolicyVersion(Integer constraintPolicyVersion) voidsetConstraintSnapshot(GrantConstraintSnapshot constraintSnapshot) voidsetConsumption(GrantConsumption consumption) voidsetCreatedAt(OffsetDateTime createdAt) voidsetEffectiveState(GrantEffectiveState effectiveState) voidsetExchangeContextId(UUID exchangeContextId) voidsetExchangeContextName(String exchangeContextName) voidvoidsetKeyPairs(List<CapabilityGrantKeyPair> keyPairs) voidsetOperationScopes(List<String> operationScopes) voidsetOwnerId(UUID ownerId) voidvoidsetTenantId(UUID tenantId) voidsetUpdatedAt(OffsetDateTime updatedAt) toJson()Convert an instance of CapabilityGrantResponse to an JSON stringtoString()updatedAt(OffsetDateTime updatedAt) static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundstatic voidvalidateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) Validates the JSON Element as a candidate of a oneOf schema: the checks ofvalidateJsonElement(JsonElement), and the element carries no member this model does not declare.
-
Field Details
-
SERIALIZED_NAME_ACTOR_ID
- See Also:
-
SERIALIZED_NAME_ACTOR_NAME
- See Also:
-
SERIALIZED_NAME_ALLOW_WILDCARD_ASSET
- See Also:
-
SERIALIZED_NAME_ASSET_KIDS
- See Also:
-
SERIALIZED_NAME_CAPABILITIES
- See Also:
-
SERIALIZED_NAME_CONSTRAINT_POLICY_ID
- See Also:
-
SERIALIZED_NAME_CONSTRAINT_POLICY_NAME
- See Also:
-
SERIALIZED_NAME_CONSTRAINT_POLICY_VERSION
- See Also:
-
SERIALIZED_NAME_CONSTRAINT_SNAPSHOT
- See Also:
-
SERIALIZED_NAME_CONSUMPTION
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_EFFECTIVE_STATE
- See Also:
-
SERIALIZED_NAME_EXCHANGE_CONTEXT_ID
- See Also:
-
SERIALIZED_NAME_EXCHANGE_CONTEXT_NAME
- See Also:
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_KEY_PAIRS
- See Also:
-
SERIALIZED_NAME_OPERATION_SCOPES
- See Also:
-
SERIALIZED_NAME_OWNER_ID
- See Also:
-
SERIALIZED_NAME_OWNER_TYPE
- See Also:
-
SERIALIZED_NAME_TENANT_ID
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CapabilityGrantResponse
public CapabilityGrantResponse()
-
-
Method Details
-
getOwnerTypeAsString
The wire value ofownerType: what the server sent, verbatim.- For a value this release declares, the same wire value the enum names.
- For a value it does not declare (one a later server added), the server's wire value verbatim,
while
getOwnerType()readsUNKNOWN_DEFAULT_OPEN_API; writing this model sends that wire value back, never the sentinel. - For an absent member,
null.
- Returns:
- the wire value, or
nullwhen the member is absent
-
actorId
-
getActorId
Get actorId- Returns:
- actorId
-
setActorId
-
actorName
-
getActorName
Human-readable Actor name, resolved from the Actor the grant references- Returns:
- actorName
-
setActorName
-
allowWildcardAsset
-
getAllowWildcardAsset
Get allowWildcardAsset- Returns:
- allowWildcardAsset
-
setAllowWildcardAsset
-
assetKids
-
addAssetKidsItem
-
getAssetKids
The Key ID a basic grant authorizes; empty for the any-asset wildcard (allowWildcardAsset) and for a REENCRYPT or RESIGN grant, whose keys are its keyPairs.- Returns:
- assetKids
-
setAssetKids
-
capabilities
-
addCapabilitiesItem
-
getCapabilities
Capability strings (e.g. [\"ENCRYPT\",\"DECRYPT\"] or [\"REENCRYPT\"])- Returns:
- capabilities
-
setCapabilities
-
constraintPolicyId
-
getConstraintPolicyId
Get constraintPolicyId- Returns:
- constraintPolicyId
-
setConstraintPolicyId
-
constraintPolicyName
-
getConstraintPolicyName
Constraint Policy name, resolved from the Constraint Policy the grant references- Returns:
- constraintPolicyName
-
setConstraintPolicyName
-
constraintPolicyVersion
-
getConstraintPolicyVersion
The version of the Constraint Policy this grant enforces: the one current when the grant was issued. Together with constraintPolicyId it identifies the snapshot the cryptographic service's audit names. Later edits of the policy do not move it. null when the grant has no constraint policy.- Returns:
- constraintPolicyVersion
-
setConstraintPolicyVersion
-
constraintSnapshot
public CapabilityGrantResponse constraintSnapshot(@Nullable GrantConstraintSnapshot constraintSnapshot) -
getConstraintSnapshot
The limits this grant enforces, taken from its pinned policy version, never from the policy's current values. null when the grant has no constraint policy.- Returns:
- constraintSnapshot
-
setConstraintSnapshot
-
consumption
-
getConsumption
How the grant was used up, present only when it was: its single use was taken or its maxUsage reached. A consumed grant authorizes nothing more, and its owning Exchange reads CONSUMED. Absent on a grant that is still in force.- Returns:
- consumption
-
setConsumption
-
createdAt
-
getCreatedAt
Get createdAt- Returns:
- createdAt
-
setCreatedAt
-
effectiveState
-
getEffectiveState
Whether the governance objects the administration plane owns let the grant authorize at the instant of the read, and the first reason they do not- Returns:
- effectiveState
-
setEffectiveState
-
exchangeContextId
-
getExchangeContextId
The one Exchange Context the grant authorizes in- Returns:
- exchangeContextId
-
setExchangeContextId
-
exchangeContextName
-
getExchangeContextName
Exchange Context name, resolved from the Exchange Context the grant references- Returns:
- exchangeContextName
-
setExchangeContextName
-
id
-
getId
Get id- Returns:
- id
-
setId
-
keyPairs
-
addKeyPairsItem
-
getKeyPairs
The ordered key pairs a REENCRYPT or RESIGN grant authorizes, each in its own direction only (sourceKid to targetKid); empty for a basic grant.- Returns:
- keyPairs
-
setKeyPairs
-
operationScopes
-
addOperationScopesItem
-
getOperationScopes
The operation scopes this grant confers on its actor while it is effective, sorted. DERIVED from capabilities — nothing stores it and nothing writes it to actor_roles, so it disappears the moment the grant stops being effective. This is what the grants list, the revoke confirmation and the connect dialog render, instead of each deriving the mapping from a scope table of its own.- Returns:
- operationScopes
-
setOperationScopes
-
ownerId
-
getOwnerId
The owning Cryptographic Exchange or Internal Crypto Use Case; null for a MARKETPLACE or INDEPENDENT grant.- Returns:
- ownerId
-
setOwnerId
-
ownerType
-
getOwnerType
The governance object that owns the grant and whose lifecycle governs it: EXCHANGE (a Cryptographic Exchange), INTERNAL_USE_CASE (an Internal Crypto Use Case), MARKETPLACE (the marketplace bootstrap of the tenant) or INDEPENDENT (written directly through this API).- Returns:
- ownerType
-
setOwnerType
-
tenantId
-
getTenantId
Get tenantId- Returns:
- tenantId
-
setTenantId
-
updatedAt
-
getUpdatedAt
When the grant was last updated: issued, consumed, suspended or resumed with its exchange, or revoked.- Returns:
- updatedAt
-
setUpdatedAt
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to CapabilityGrantResponse
-
validateJsonElementAsCandidate
public static void validateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) throws IOException Validates the JSON Element as a candidate of a oneOf schema: the checks ofvalidateJsonElement(JsonElement), and the element carries no member this model does not declare. A oneOf schema without a discriminator tells its candidates apart by their member sets, so a candidate is matched on its closed member set.- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is not a CapabilityGrantResponse
-
fromJson
Create an instance of CapabilityGrantResponse given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CapabilityGrantResponse
- Throws:
IOException- if the JSON string is invalid with respect to CapabilityGrantResponse
-
toJson
Convert an instance of CapabilityGrantResponse to an JSON string- Returns:
- JSON string
-