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

  • Constructor Details

    • CapabilityGrantResponse

      public CapabilityGrantResponse()
  • Method Details

    • getOwnerTypeAsString

      public String getOwnerTypeAsString()
      The wire value of ownerType: 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() reads UNKNOWN_DEFAULT_OPEN_API; writing this model sends that wire value back, never the sentinel.
      • For an absent member, null.
      Returns:
      the wire value, or null when the member is absent
    • 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()
      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

      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)
    • effectiveState

      public CapabilityGrantResponse effectiveState(@Nonnull GrantEffectiveState effectiveState)
    • getEffectiveState

      @Nonnull public GrantEffectiveState 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

      public void setEffectiveState(@Nonnull GrantEffectiveState effectiveState)
    • exchangeContextId

      public CapabilityGrantResponse exchangeContextId(@Nonnull UUID exchangeContextId)
    • getExchangeContextId

      @Nonnull public UUID getExchangeContextId()
      The one Exchange Context the grant authorizes in
      Returns:
      exchangeContextId
    • setExchangeContextId

      public void setExchangeContextId(@Nonnull 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)
    • keyPairs

      public CapabilityGrantResponse keyPairs(@Nullable List<CapabilityGrantKeyPair> keyPairs)
    • addKeyPairsItem

      public CapabilityGrantResponse addKeyPairsItem(CapabilityGrantKeyPair keyPairsItem)
    • getKeyPairs

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

      public void setKeyPairs(@Nullable List<CapabilityGrantKeyPair> keyPairs)
    • 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)
    • ownerId

      public CapabilityGrantResponse ownerId(@Nullable UUID ownerId)
    • getOwnerId

      @Nullable public UUID getOwnerId()
      The owning Cryptographic Exchange or Internal Crypto Use Case; null for a MARKETPLACE or INDEPENDENT grant.
      Returns:
      ownerId
    • setOwnerId

      public void setOwnerId(@Nullable UUID ownerId)
    • ownerType

      public CapabilityGrantResponse ownerType(@Nonnull CapabilityGrantResponse.OwnerTypeEnum ownerType)
    • getOwnerType

      @Nonnull public CapabilityGrantResponse.OwnerTypeEnum 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

      public void setOwnerType(@Nonnull CapabilityGrantResponse.OwnerTypeEnum ownerType)
    • 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