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
Five-dimensional authorization: Actor × Capabilities × Asset(s) × ExchangeContext × ConstraintPolicy. capabilities is a JSONB array (e.g. [\"ENCRYPT\",\"DECRYPT\"]); assetKids is a JSONB array of KID strings (1 for atomic, 2 for REENCRYPT/RESIGN, written source-first by convention).
-
Nested Class Summary
Nested Classes -
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 String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAssetKidsItem(String assetKidsItem) addCapabilitiesItem(String capabilitiesItem) 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) 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 allowWildcardAssetKID strings. 1 element for atomic ops; 2 elements for REENCRYPT/RESIGN, written source-first as [source, target].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 createdAtExchange Context UUID. null = context-less internal operationExchange Context name, resolved from the Exchange Context the grant referencesgetId()Get idThe operation scopes this grant confers on its actor while it is effective, sorted.Get tenantIdWhen the grant was last updated: issued, consumed, suspended or resumed with its exchange, or revoked.inthashCode()operationScopes(List<String> operationScopes) 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) voidsetExchangeContextId(UUID exchangeContextId) voidsetExchangeContextName(String exchangeContextName) voidvoidsetOperationScopes(List<String> operationScopes) voidsetTenantId(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_EXCHANGE_CONTEXT_ID
- See Also:
-
SERIALIZED_NAME_EXCHANGE_CONTEXT_NAME
- See Also:
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_OPERATION_SCOPES
- See Also:
-
SERIALIZED_NAME_TENANT_ID
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CapabilityGrantResponse
public CapabilityGrantResponse()
-
-
Method Details
-
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
KID strings. 1 element for atomic ops; 2 elements for REENCRYPT/RESIGN, written source-first as [source, target]. That order is a RECORDING CONVENTION, not a control: the runtime matches a grant's asset set with containsAll, a subset test, so one grant authorises the pair in either direction. What IS enforced is the capability — REENCRYPT never becomes a standalone DECRYPT on the source key. Null elements = wildcard (requires opt-in).- 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
-
exchangeContextId
-
getExchangeContextId
Exchange Context UUID. null = context-less internal operation- 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
-
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
-
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
-