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).
  • Field Details

  • Constructor Details

    • CapabilityGrantResponse

      public CapabilityGrantResponse()
  • Method Details

    • actorId

      public CapabilityGrantResponse actorId(@Nullable UUID actorId)
    • getActorId

      @Nullable public UUID getActorId()
      Get actorId
      Returns:
      actorId
    • setActorId

      public void setActorId(@Nullable UUID actorId)
    • actorName

      public CapabilityGrantResponse actorName(@Nullable String actorName)
    • getActorName

      @Nullable public String getActorName()
      Human-readable Actor name, resolved from the Actor the grant references
      Returns:
      actorName
    • setActorName

      public void setActorName(@Nullable String actorName)
    • allowWildcardAsset

      public CapabilityGrantResponse allowWildcardAsset(@Nullable Boolean allowWildcardAsset)
    • getAllowWildcardAsset

      @Nullable public Boolean getAllowWildcardAsset()
      Get allowWildcardAsset
      Returns:
      allowWildcardAsset
    • setAllowWildcardAsset

      public void setAllowWildcardAsset(@Nullable Boolean allowWildcardAsset)
    • assetKids

      public CapabilityGrantResponse assetKids(@Nullable List<String> assetKids)
    • addAssetKidsItem

      public CapabilityGrantResponse addAssetKidsItem(String assetKidsItem)
    • getAssetKids

      @Nullable public List<String> 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

      public void setAssetKids(@Nullable List<String> assetKids)
    • capabilities

      public CapabilityGrantResponse capabilities(@Nullable List<String> capabilities)
    • addCapabilitiesItem

      public CapabilityGrantResponse addCapabilitiesItem(String capabilitiesItem)
    • getCapabilities

      @Nullable public List<String> getCapabilities()
      Capability strings (e.g. [\"ENCRYPT\",\"DECRYPT\"] or [\"REENCRYPT\"])
      Returns:
      capabilities
    • setCapabilities

      public void setCapabilities(@Nullable List<String> capabilities)
    • constraintPolicyId

      public CapabilityGrantResponse constraintPolicyId(@Nullable UUID constraintPolicyId)
    • getConstraintPolicyId

      @Nullable public UUID getConstraintPolicyId()
      Get constraintPolicyId
      Returns:
      constraintPolicyId
    • setConstraintPolicyId

      public void setConstraintPolicyId(@Nullable UUID constraintPolicyId)
    • constraintPolicyName

      public CapabilityGrantResponse constraintPolicyName(@Nullable String constraintPolicyName)
    • getConstraintPolicyName

      @Nullable public String getConstraintPolicyName()
      Constraint Policy name, resolved from the Constraint Policy the grant references
      Returns:
      constraintPolicyName
    • setConstraintPolicyName

      public void setConstraintPolicyName(@Nullable String constraintPolicyName)
    • constraintPolicyVersion

      public CapabilityGrantResponse constraintPolicyVersion(@Nullable Integer constraintPolicyVersion)
    • getConstraintPolicyVersion

      @Nullable public Integer 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

      public void setConstraintPolicyVersion(@Nullable Integer constraintPolicyVersion)
    • constraintSnapshot

      public CapabilityGrantResponse constraintSnapshot(@Nullable GrantConstraintSnapshot constraintSnapshot)
    • getConstraintSnapshot

      @Nullable public GrantConstraintSnapshot 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

      public void setConstraintSnapshot(@Nullable GrantConstraintSnapshot constraintSnapshot)
    • consumption

      public CapabilityGrantResponse consumption(@Nullable GrantConsumption consumption)
    • getConsumption

      @Nullable public GrantConsumption 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

      public void setConsumption(@Nullable GrantConsumption consumption)
    • createdAt

      public CapabilityGrantResponse createdAt(@Nullable OffsetDateTime createdAt)
    • getCreatedAt

      @Nullable public OffsetDateTime getCreatedAt()
      Get createdAt
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nullable OffsetDateTime createdAt)
    • exchangeContextId

      public CapabilityGrantResponse exchangeContextId(@Nullable UUID exchangeContextId)
    • getExchangeContextId

      @Nullable public UUID getExchangeContextId()
      Exchange Context UUID. null = context-less internal operation
      Returns:
      exchangeContextId
    • setExchangeContextId

      public void setExchangeContextId(@Nullable UUID exchangeContextId)
    • exchangeContextName

      public CapabilityGrantResponse exchangeContextName(@Nullable String exchangeContextName)
    • getExchangeContextName

      @Nullable public String getExchangeContextName()
      Exchange Context name, resolved from the Exchange Context the grant references
      Returns:
      exchangeContextName
    • setExchangeContextName

      public void setExchangeContextName(@Nullable String exchangeContextName)
    • id

      public CapabilityGrantResponse id(@Nullable UUID id)
    • getId

      @Nullable public UUID getId()
      Get id
      Returns:
      id
    • setId

      public void setId(@Nullable UUID id)
    • operationScopes

      public CapabilityGrantResponse operationScopes(@Nullable List<String> operationScopes)
    • addOperationScopesItem

      public CapabilityGrantResponse addOperationScopesItem(String operationScopesItem)
    • getOperationScopes

      @Nullable public List<String> 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

      public void setOperationScopes(@Nullable List<String> operationScopes)
    • tenantId

      public CapabilityGrantResponse tenantId(@Nullable UUID tenantId)
    • getTenantId

      @Nullable public UUID getTenantId()
      Get tenantId
      Returns:
      tenantId
    • setTenantId

      public void setTenantId(@Nullable UUID tenantId)
    • updatedAt

      public CapabilityGrantResponse updatedAt(@Nullable OffsetDateTime updatedAt)
    • getUpdatedAt

      @Nullable public OffsetDateTime getUpdatedAt()
      When the grant was last updated: issued, consumed, suspended or resumed with its exchange, or revoked.
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(@Nullable OffsetDateTime updatedAt)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      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 of validateJsonElement(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

      public static CapabilityGrantResponse fromJson(String jsonString) throws IOException
      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

      public String toJson()
      Convert an instance of CapabilityGrantResponse to an JSON string
      Returns:
      JSON string