Class CryptographicExchangesApi

java.lang.Object
co.ankatech.keymanagement.client.keymanagement.api.CryptographicExchangesApi

public class CryptographicExchangesApi extends Object
  • Constructor Details

    • CryptographicExchangesApi

      public CryptographicExchangesApi()
    • CryptographicExchangesApi

      public CryptographicExchangesApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • activateExchangeCall

      public okhttp3.Call activateExchangeCall(@Nonnull UUID id, @Nonnull ActivateRequest activateRequest, ApiCallback _callback) throws ApiException
      Build call for activateExchange
      Parameters:
      id - Exchange UUID (required)
      activateRequest - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • activateExchange

      public ExchangeDetailResponse activateExchange(@Nonnull UUID id, @Nonnull ActivateRequest activateRequest) throws ApiException
      Activate Exchange (READY -> ACTIVE) — atomic Grant creation Atomically creates the Capability Grant (resolved from the Exchange's references plus the explicit <code>capability</code>) and transitions the Exchange to ACTIVE. The 1:1 Exchange-Grant invariant is enforced at the DB layer via the UNIQUE constraint on <code>grant_id</code>. <b>This operation CONFERS standing operation authority on the Exchange's Cryptographic Actor.</b> While the grant is effective, the scopes its capability derives are part of every token that Actor mints — with no <code>actor_roles</code> row written anywhere. Two consequences follow, and both are refusals rather than warnings: the caller must also hold <code>admin.tenant.actor.roles.assign</code> whenever the activation would add a scope the Actor does not already hold, and the operation is refused outright under a support-access impersonation session. <b>The capability must be one the asset key can actually perform.</b> The <code>key_ops</code> the key was provisioned with are checked HERE, at activation, and refuse with 422. That check is not advisory and it is not deferred to the cryptographic service at crypto-operation time: an Exchange that activated and then failed on its first operation is the failure this refusal removes. Call <code>previewExchangeActivation</code> first to obtain every one of these verdicts without writing anything — it returns the same problem documents, with the same <code>type</code> URIs.
      Parameters:
      id - Exchange UUID (required)
      activateRequest - (required)
      Returns:
      ExchangeDetailResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • activateExchangeWithHttpInfo

      public ApiResponse<ExchangeDetailResponse> activateExchangeWithHttpInfo(@Nonnull UUID id, @Nonnull ActivateRequest activateRequest) throws ApiException
      Activate Exchange (READY -> ACTIVE) — atomic Grant creation Atomically creates the Capability Grant (resolved from the Exchange's references plus the explicit <code>capability</code>) and transitions the Exchange to ACTIVE. The 1:1 Exchange-Grant invariant is enforced at the DB layer via the UNIQUE constraint on <code>grant_id</code>. <b>This operation CONFERS standing operation authority on the Exchange's Cryptographic Actor.</b> While the grant is effective, the scopes its capability derives are part of every token that Actor mints — with no <code>actor_roles</code> row written anywhere. Two consequences follow, and both are refusals rather than warnings: the caller must also hold <code>admin.tenant.actor.roles.assign</code> whenever the activation would add a scope the Actor does not already hold, and the operation is refused outright under a support-access impersonation session. <b>The capability must be one the asset key can actually perform.</b> The <code>key_ops</code> the key was provisioned with are checked HERE, at activation, and refuse with 422. That check is not advisory and it is not deferred to the cryptographic service at crypto-operation time: an Exchange that activated and then failed on its first operation is the failure this refusal removes. Call <code>previewExchangeActivation</code> first to obtain every one of these verdicts without writing anything — it returns the same problem documents, with the same <code>type</code> URIs.
      Parameters:
      id - Exchange UUID (required)
      activateRequest - (required)
      Returns:
      ApiResponse<ExchangeDetailResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • activateExchangeAsync

      public okhttp3.Call activateExchangeAsync(@Nonnull UUID id, @Nonnull ActivateRequest activateRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException
      Activate Exchange (READY -> ACTIVE) — atomic Grant creation (asynchronously) Atomically creates the Capability Grant (resolved from the Exchange's references plus the explicit <code>capability</code>) and transitions the Exchange to ACTIVE. The 1:1 Exchange-Grant invariant is enforced at the DB layer via the UNIQUE constraint on <code>grant_id</code>. <b>This operation CONFERS standing operation authority on the Exchange's Cryptographic Actor.</b> While the grant is effective, the scopes its capability derives are part of every token that Actor mints — with no <code>actor_roles</code> row written anywhere. Two consequences follow, and both are refusals rather than warnings: the caller must also hold <code>admin.tenant.actor.roles.assign</code> whenever the activation would add a scope the Actor does not already hold, and the operation is refused outright under a support-access impersonation session. <b>The capability must be one the asset key can actually perform.</b> The <code>key_ops</code> the key was provisioned with are checked HERE, at activation, and refuse with 422. That check is not advisory and it is not deferred to the cryptographic service at crypto-operation time: an Exchange that activated and then failed on its first operation is the failure this refusal removes. Call <code>previewExchangeActivation</code> first to obtain every one of these verdicts without writing anything — it returns the same problem documents, with the same <code>type</code> URIs.
      Parameters:
      id - Exchange UUID (required)
      activateRequest - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • cloneExchangeCall

      public okhttp3.Call cloneExchangeCall(@Nonnull UUID id, @Nullable CloneRequest cloneRequest, ApiCallback _callback) throws ApiException
      Build call for cloneExchange
      Parameters:
      id - (required)
      cloneRequest - (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • cloneExchange

      public ExchangeDetailResponse cloneExchange(@Nonnull UUID id, @Nullable CloneRequest cloneRequest) throws ApiException
      Clone Exchange to DRAFT Copies references and metadata from the source Exchange into a new Exchange in DRAFT. cloned_from_exchange_id is populated for provenance. Allowed from any source status including REVOKED. Name defaults to source name + -clone-N when omitted. Every reference copied belongs to the caller's tenant: the source is resolved inside that tenant, and the database refuses to store an Exchange reference to another tenant's application, actor, Exchange Context, Constraint Policy or grant, so the source cannot carry one. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.
      Parameters:
      id - (required)
      cloneRequest - (optional)
      Returns:
      ExchangeDetailResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • cloneExchangeWithHttpInfo

      public ApiResponse<ExchangeDetailResponse> cloneExchangeWithHttpInfo(@Nonnull UUID id, @Nullable CloneRequest cloneRequest) throws ApiException
      Clone Exchange to DRAFT Copies references and metadata from the source Exchange into a new Exchange in DRAFT. cloned_from_exchange_id is populated for provenance. Allowed from any source status including REVOKED. Name defaults to source name + -clone-N when omitted. Every reference copied belongs to the caller's tenant: the source is resolved inside that tenant, and the database refuses to store an Exchange reference to another tenant's application, actor, Exchange Context, Constraint Policy or grant, so the source cannot carry one. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.
      Parameters:
      id - (required)
      cloneRequest - (optional)
      Returns:
      ApiResponse<ExchangeDetailResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • cloneExchangeAsync

      public okhttp3.Call cloneExchangeAsync(@Nonnull UUID id, @Nullable CloneRequest cloneRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException
      Clone Exchange to DRAFT (asynchronously) Copies references and metadata from the source Exchange into a new Exchange in DRAFT. cloned_from_exchange_id is populated for provenance. Allowed from any source status including REVOKED. Name defaults to source name + -clone-N when omitted. Every reference copied belongs to the caller's tenant: the source is resolved inside that tenant, and the database refuses to store an Exchange reference to another tenant's application, actor, Exchange Context, Constraint Policy or grant, so the source cannot carry one. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.
      Parameters:
      id - (required)
      cloneRequest - (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • createExchangeCall

      public okhttp3.Call createExchangeCall(@Nonnull ExchangeCreateRequest exchangeCreateRequest, ApiCallback _callback) throws ApiException
      Build call for createExchange
      Parameters:
      exchangeCreateRequest - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • createExchange

      public ExchangeDetailResponse createExchange(@Nonnull ExchangeCreateRequest exchangeCreateRequest) throws ApiException
      Create a Cryptographic Exchange in DRAFT Creates a new Exchange with all references nullable. The 6 references are resolved by subsequent PATCH calls before validate / activate. The audit event admin.cryptographicexchange.create is published automatically when the Exchange is persisted. Every application, actor, Exchange Context and Constraint Policy id the body names is resolved in the caller's tenant before anything is written; one that does not resolve there is refused with 404 <code>not-found</code>, identically whether it belongs to another tenant or to none. Once every named reference has resolved, an actor that an Internal Crypto Use Case owns is refused with 422 <code>actor-owned-by-use-case</code>: a use case's actor acts only for that use case, whose own grants are the whole of its authority. Ownership is the use case's record of the actor, not the actor's type - an INTERNAL actor an operator created is admitted. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.
      Parameters:
      exchangeCreateRequest - (required)
      Returns:
      ExchangeDetailResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createExchangeWithHttpInfo

      public ApiResponse<ExchangeDetailResponse> createExchangeWithHttpInfo(@Nonnull ExchangeCreateRequest exchangeCreateRequest) throws ApiException
      Create a Cryptographic Exchange in DRAFT Creates a new Exchange with all references nullable. The 6 references are resolved by subsequent PATCH calls before validate / activate. The audit event admin.cryptographicexchange.create is published automatically when the Exchange is persisted. Every application, actor, Exchange Context and Constraint Policy id the body names is resolved in the caller's tenant before anything is written; one that does not resolve there is refused with 404 <code>not-found</code>, identically whether it belongs to another tenant or to none. Once every named reference has resolved, an actor that an Internal Crypto Use Case owns is refused with 422 <code>actor-owned-by-use-case</code>: a use case's actor acts only for that use case, whose own grants are the whole of its authority. Ownership is the use case's record of the actor, not the actor's type - an INTERNAL actor an operator created is admitted. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.
      Parameters:
      exchangeCreateRequest - (required)
      Returns:
      ApiResponse<ExchangeDetailResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createExchangeAsync

      public okhttp3.Call createExchangeAsync(@Nonnull ExchangeCreateRequest exchangeCreateRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException
      Create a Cryptographic Exchange in DRAFT (asynchronously) Creates a new Exchange with all references nullable. The 6 references are resolved by subsequent PATCH calls before validate / activate. The audit event admin.cryptographicexchange.create is published automatically when the Exchange is persisted. Every application, actor, Exchange Context and Constraint Policy id the body names is resolved in the caller's tenant before anything is written; one that does not resolve there is refused with 404 <code>not-found</code>, identically whether it belongs to another tenant or to none. Once every named reference has resolved, an actor that an Internal Crypto Use Case owns is refused with 422 <code>actor-owned-by-use-case</code>: a use case's actor acts only for that use case, whose own grants are the whole of its authority. Ownership is the use case's record of the actor, not the actor's type - an INTERNAL actor an operator created is admitted. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.create</code>.
      Parameters:
      exchangeCreateRequest - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • discardDraftCall

      public okhttp3.Call discardDraftCall(@Nonnull UUID id, @Nonnull Integer version, ApiCallback _callback) throws ApiException
      Build call for discardDraft
      Parameters:
      id - Stable Exchange UUID (required)
      version - Expected @Version (optimistic-lock discriminator) (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • discardDraft

      public void discardDraft(@Nonnull UUID id, @Nonnull Integer version) throws ApiException
      Discard a draft (DRAFT/READY) Exchange Soft-deletes an Exchange that has NOT yet been activated. Sets `deletedAt = NOW()` so the row vanishes from every standard query while remaining in DB for forensic access. Allowed ONLY when the Exchange is in `DRAFT` or `READY` status (no Capability Grant emitted under it). For `ACTIVE / SUSPENDED` callers MUST use `revoke` instead (preserves the row as terminal-state evidence). Terminal states (`REVOKED / EXPIRED`) are already non-actionable. Optimistic locking: the `version` query parameter MUST match the entity's current `@Version`. Mismatch → 409 Conflict. Any other status is refused with 422 `invalid-state-transition`, whose detail names the current state. **Scope:** `admin.tenant.exchange.delete`
      Parameters:
      id - Stable Exchange UUID (required)
      version - Expected @Version (optimistic-lock discriminator) (required)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • discardDraftWithHttpInfo

      public ApiResponse<Void> discardDraftWithHttpInfo(@Nonnull UUID id, @Nonnull Integer version) throws ApiException
      Discard a draft (DRAFT/READY) Exchange Soft-deletes an Exchange that has NOT yet been activated. Sets `deletedAt = NOW()` so the row vanishes from every standard query while remaining in DB for forensic access. Allowed ONLY when the Exchange is in `DRAFT` or `READY` status (no Capability Grant emitted under it). For `ACTIVE / SUSPENDED` callers MUST use `revoke` instead (preserves the row as terminal-state evidence). Terminal states (`REVOKED / EXPIRED`) are already non-actionable. Optimistic locking: the `version` query parameter MUST match the entity's current `@Version`. Mismatch → 409 Conflict. Any other status is refused with 422 `invalid-state-transition`, whose detail names the current state. **Scope:** `admin.tenant.exchange.delete`
      Parameters:
      id - Stable Exchange UUID (required)
      version - Expected @Version (optimistic-lock discriminator) (required)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • discardDraftAsync

      public okhttp3.Call discardDraftAsync(@Nonnull UUID id, @Nonnull Integer version, ApiCallback<Void> _callback) throws ApiException
      Discard a draft (DRAFT/READY) Exchange (asynchronously) Soft-deletes an Exchange that has NOT yet been activated. Sets `deletedAt = NOW()` so the row vanishes from every standard query while remaining in DB for forensic access. Allowed ONLY when the Exchange is in `DRAFT` or `READY` status (no Capability Grant emitted under it). For `ACTIVE / SUSPENDED` callers MUST use `revoke` instead (preserves the row as terminal-state evidence). Terminal states (`REVOKED / EXPIRED`) are already non-actionable. Optimistic locking: the `version` query parameter MUST match the entity's current `@Version`. Mismatch → 409 Conflict. Any other status is refused with 422 `invalid-state-transition`, whose detail names the current state. **Scope:** `admin.tenant.exchange.delete`
      Parameters:
      id - Stable Exchange UUID (required)
      version - Expected @Version (optimistic-lock discriminator) (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • getByIdCall

      public okhttp3.Call getByIdCall(@Nonnull UUID id, ApiCallback _callback) throws ApiException
      Build call for getById
      Parameters:
      id - Stable Exchange UUID (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getById

      public ExchangeDetailResponse getById(@Nonnull UUID id) throws ApiException
      Get Cryptographic Exchange detail Returns the full eager-loaded Exchange detail. Returns 404 (NEVER 403) when the Exchange does not exist OR exists in a different tenant — this avoids an existence oracle across tenants.
      Parameters:
      id - Stable Exchange UUID (required)
      Returns:
      ExchangeDetailResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getByIdWithHttpInfo

      public ApiResponse<ExchangeDetailResponse> getByIdWithHttpInfo(@Nonnull UUID id) throws ApiException
      Get Cryptographic Exchange detail Returns the full eager-loaded Exchange detail. Returns 404 (NEVER 403) when the Exchange does not exist OR exists in a different tenant — this avoids an existence oracle across tenants.
      Parameters:
      id - Stable Exchange UUID (required)
      Returns:
      ApiResponse<ExchangeDetailResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getByIdAsync

      public okhttp3.Call getByIdAsync(@Nonnull UUID id, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException
      Get Cryptographic Exchange detail (asynchronously) Returns the full eager-loaded Exchange detail. Returns 404 (NEVER 403) when the Exchange does not exist OR exists in a different tenant — this avoids an existence oracle across tenants.
      Parameters:
      id - Stable Exchange UUID (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • listExchangesCall

      public okhttp3.Call listExchangesCall(@Nullable String status, @Nullable String counterparty, @Nullable UUID applicationId, @Nullable UUID ownerPrincipalId, @Nullable String nameSearch, @Nullable Integer page, @Nullable Integer size, @Nullable String sortBy, @Nullable String sortDirection, ApiCallback _callback) throws ApiException
      Build call for listExchanges
      Parameters:
      status - Lifecycle status filter (optional) (optional)
      counterparty - Counterparty substring (case-insensitive, optional) (optional)
      applicationId - Application UUID filter (optional) (optional)
      ownerPrincipalId - Owner principal UUID filter (optional) (optional)
      nameSearch - Name substring (case-insensitive, optional) (optional)
      page - Page index (0-based) (optional, default to 0)
      size - Page size (max 50) (optional, default to 20)
      sortBy - Sort field — must be one of: modifiedAt, createdAt, name, effectiveUntil, status (optional, default to modifiedAt)
      sortDirection - Sort direction (ASC or DESC) (optional, default to DESC)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • listExchanges

      public PageExchangeListItemResponse listExchanges(@Nullable String status, @Nullable String counterparty, @Nullable UUID applicationId, @Nullable UUID ownerPrincipalId, @Nullable String nameSearch, @Nullable Integer page, @Nullable Integer size, @Nullable String sortBy, @Nullable String sortDirection) throws ApiException
      List Cryptographic Exchanges Returns a paginated list of Exchanges in the caller's tenant. Filter by status, counterparty (case-insensitive substring), application UUID, owner principal UUID, and name (case-insensitive substring). Default sort is `updatedAt DESC`. Page size is bounded to 50.
      Parameters:
      status - Lifecycle status filter (optional) (optional)
      counterparty - Counterparty substring (case-insensitive, optional) (optional)
      applicationId - Application UUID filter (optional) (optional)
      ownerPrincipalId - Owner principal UUID filter (optional) (optional)
      nameSearch - Name substring (case-insensitive, optional) (optional)
      page - Page index (0-based) (optional, default to 0)
      size - Page size (max 50) (optional, default to 20)
      sortBy - Sort field — must be one of: modifiedAt, createdAt, name, effectiveUntil, status (optional, default to modifiedAt)
      sortDirection - Sort direction (ASC or DESC) (optional, default to DESC)
      Returns:
      PageExchangeListItemResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listExchangesWithHttpInfo

      public ApiResponse<PageExchangeListItemResponse> listExchangesWithHttpInfo(@Nullable String status, @Nullable String counterparty, @Nullable UUID applicationId, @Nullable UUID ownerPrincipalId, @Nullable String nameSearch, @Nullable Integer page, @Nullable Integer size, @Nullable String sortBy, @Nullable String sortDirection) throws ApiException
      List Cryptographic Exchanges Returns a paginated list of Exchanges in the caller's tenant. Filter by status, counterparty (case-insensitive substring), application UUID, owner principal UUID, and name (case-insensitive substring). Default sort is `updatedAt DESC`. Page size is bounded to 50.
      Parameters:
      status - Lifecycle status filter (optional) (optional)
      counterparty - Counterparty substring (case-insensitive, optional) (optional)
      applicationId - Application UUID filter (optional) (optional)
      ownerPrincipalId - Owner principal UUID filter (optional) (optional)
      nameSearch - Name substring (case-insensitive, optional) (optional)
      page - Page index (0-based) (optional, default to 0)
      size - Page size (max 50) (optional, default to 20)
      sortBy - Sort field — must be one of: modifiedAt, createdAt, name, effectiveUntil, status (optional, default to modifiedAt)
      sortDirection - Sort direction (ASC or DESC) (optional, default to DESC)
      Returns:
      ApiResponse<PageExchangeListItemResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listExchangesAsync

      public okhttp3.Call listExchangesAsync(@Nullable String status, @Nullable String counterparty, @Nullable UUID applicationId, @Nullable UUID ownerPrincipalId, @Nullable String nameSearch, @Nullable Integer page, @Nullable Integer size, @Nullable String sortBy, @Nullable String sortDirection, ApiCallback<PageExchangeListItemResponse> _callback) throws ApiException
      List Cryptographic Exchanges (asynchronously) Returns a paginated list of Exchanges in the caller's tenant. Filter by status, counterparty (case-insensitive substring), application UUID, owner principal UUID, and name (case-insensitive substring). Default sort is `updatedAt DESC`. Page size is bounded to 50.
      Parameters:
      status - Lifecycle status filter (optional) (optional)
      counterparty - Counterparty substring (case-insensitive, optional) (optional)
      applicationId - Application UUID filter (optional) (optional)
      ownerPrincipalId - Owner principal UUID filter (optional) (optional)
      nameSearch - Name substring (case-insensitive, optional) (optional)
      page - Page index (0-based) (optional, default to 0)
      size - Page size (max 50) (optional, default to 20)
      sortBy - Sort field — must be one of: modifiedAt, createdAt, name, effectiveUntil, status (optional, default to modifiedAt)
      sortDirection - Sort direction (ASC or DESC) (optional, default to DESC)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • previewExchangeActivationCall

      public okhttp3.Call previewExchangeActivationCall(@Nonnull UUID id, @Nullable String capability, ApiCallback _callback) throws ApiException
      Build call for previewExchangeActivation
      Parameters:
      id - Exchange UUID (required)
      capability - The capability to plan. Omit to receive the offers only. Bound to the same four values activateExchange accepts; anything else is a 400, never a 500. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • previewExchangeActivation

      public ExchangeActivationPreviewResponse previewExchangeActivation(@Nonnull UUID id, @Nullable String capability) throws ApiException
      Preview what activating or resuming this Exchange would confer — writes nothing Returns the verdict <code>activateExchange</code> (or, for a SUSPENDED Exchange, <code>resumeExchange</code>) would return, and the operation scopes it would confer, without writing anything. Every refusal here comes from the same computation the write performs, so a capability this endpoint reports as admissible is one the write admits. <b>Three modes, decided by the Exchange's own state</b> — read <code>mode</code>, never re-derive it from <code>exchangeStatus</code>: <ul> <li><code>ACTIVATE</code> (READY) — <code>capabilities</code> carries one offer per activation capability, each with <code>admissible</code> and, when it is not, the <code>refusal</code> the activation would have returned. Add <code>?capability=</code> to also receive <code>plan</code>: the grant that would be created and the scope arithmetic.</li> <li><code>RESTORE</code> (SUSPENDED) — <code>capabilities</code> is empty and <code>plan</code> describes what resuming brings back. Its <code>toAdd</code> is what RETURNS: a suspended Exchange's grant is not effective, so those scopes are genuinely absent right now. When the Actor is not ACTIVE, <code>plan.refusal</code> carries the <code>actor-not-active</code> refusal the resume would return, and <code>operationPermissions</code> is <code>null</code>.</li> <li><code>NONE</code> (ACTIVE) — <code>capabilities</code> is empty and <code>plan</code> describes the grant already in force, with nothing to add. This is the post-activation verdict.</li> </ul> DRAFT, REVOKED and EXPIRED are refused with 422 naming the state — the same refusal, and the same <code>type</code>, the activation itself would return. <b>Disclosure is bounded.</b> <code>plan.operationPermissions.required</code> and <code>confersNew</code> always answer; <code>alreadyHeld</code> and <code>toAdd</code> name scopes and are <code>null</code> unless the caller also holds <code>admin.tenant.actor.roles.read</code>. Read <code>namesVisible</code> rather than inferring a withheld list from a <code>null</code> — a withheld list and an empty one are otherwise indistinguishable. Nothing here states HOW MANY scopes would be added: without the names, the caller learns only whether anything would be, which the write reveals anyway by being admitted or refused. The <code>conferring-authority-required</code> refusal embedded in an offer carries no count and no scope name either. <b>Authorization</b>: <code>admin.tenant.exchange.activate</code> — the write scope, deliberately. This is a GET that previews a CONFERRAL, so it answers to the operator about to perform it and not to every reader of the tenant. This operation is NOT refused under impersonation: it writes nothing and confers nothing.
      Parameters:
      id - Exchange UUID (required)
      capability - The capability to plan. Omit to receive the offers only. Bound to the same four values activateExchange accepts; anything else is a 400, never a 500. (optional)
      Returns:
      ExchangeActivationPreviewResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • previewExchangeActivationWithHttpInfo

      public ApiResponse<ExchangeActivationPreviewResponse> previewExchangeActivationWithHttpInfo(@Nonnull UUID id, @Nullable String capability) throws ApiException
      Preview what activating or resuming this Exchange would confer — writes nothing Returns the verdict <code>activateExchange</code> (or, for a SUSPENDED Exchange, <code>resumeExchange</code>) would return, and the operation scopes it would confer, without writing anything. Every refusal here comes from the same computation the write performs, so a capability this endpoint reports as admissible is one the write admits. <b>Three modes, decided by the Exchange's own state</b> — read <code>mode</code>, never re-derive it from <code>exchangeStatus</code>: <ul> <li><code>ACTIVATE</code> (READY) — <code>capabilities</code> carries one offer per activation capability, each with <code>admissible</code> and, when it is not, the <code>refusal</code> the activation would have returned. Add <code>?capability=</code> to also receive <code>plan</code>: the grant that would be created and the scope arithmetic.</li> <li><code>RESTORE</code> (SUSPENDED) — <code>capabilities</code> is empty and <code>plan</code> describes what resuming brings back. Its <code>toAdd</code> is what RETURNS: a suspended Exchange's grant is not effective, so those scopes are genuinely absent right now. When the Actor is not ACTIVE, <code>plan.refusal</code> carries the <code>actor-not-active</code> refusal the resume would return, and <code>operationPermissions</code> is <code>null</code>.</li> <li><code>NONE</code> (ACTIVE) — <code>capabilities</code> is empty and <code>plan</code> describes the grant already in force, with nothing to add. This is the post-activation verdict.</li> </ul> DRAFT, REVOKED and EXPIRED are refused with 422 naming the state — the same refusal, and the same <code>type</code>, the activation itself would return. <b>Disclosure is bounded.</b> <code>plan.operationPermissions.required</code> and <code>confersNew</code> always answer; <code>alreadyHeld</code> and <code>toAdd</code> name scopes and are <code>null</code> unless the caller also holds <code>admin.tenant.actor.roles.read</code>. Read <code>namesVisible</code> rather than inferring a withheld list from a <code>null</code> — a withheld list and an empty one are otherwise indistinguishable. Nothing here states HOW MANY scopes would be added: without the names, the caller learns only whether anything would be, which the write reveals anyway by being admitted or refused. The <code>conferring-authority-required</code> refusal embedded in an offer carries no count and no scope name either. <b>Authorization</b>: <code>admin.tenant.exchange.activate</code> — the write scope, deliberately. This is a GET that previews a CONFERRAL, so it answers to the operator about to perform it and not to every reader of the tenant. This operation is NOT refused under impersonation: it writes nothing and confers nothing.
      Parameters:
      id - Exchange UUID (required)
      capability - The capability to plan. Omit to receive the offers only. Bound to the same four values activateExchange accepts; anything else is a 400, never a 500. (optional)
      Returns:
      ApiResponse<ExchangeActivationPreviewResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • previewExchangeActivationAsync

      public okhttp3.Call previewExchangeActivationAsync(@Nonnull UUID id, @Nullable String capability, ApiCallback<ExchangeActivationPreviewResponse> _callback) throws ApiException
      Preview what activating or resuming this Exchange would confer — writes nothing (asynchronously) Returns the verdict <code>activateExchange</code> (or, for a SUSPENDED Exchange, <code>resumeExchange</code>) would return, and the operation scopes it would confer, without writing anything. Every refusal here comes from the same computation the write performs, so a capability this endpoint reports as admissible is one the write admits. <b>Three modes, decided by the Exchange's own state</b> — read <code>mode</code>, never re-derive it from <code>exchangeStatus</code>: <ul> <li><code>ACTIVATE</code> (READY) — <code>capabilities</code> carries one offer per activation capability, each with <code>admissible</code> and, when it is not, the <code>refusal</code> the activation would have returned. Add <code>?capability=</code> to also receive <code>plan</code>: the grant that would be created and the scope arithmetic.</li> <li><code>RESTORE</code> (SUSPENDED) — <code>capabilities</code> is empty and <code>plan</code> describes what resuming brings back. Its <code>toAdd</code> is what RETURNS: a suspended Exchange's grant is not effective, so those scopes are genuinely absent right now. When the Actor is not ACTIVE, <code>plan.refusal</code> carries the <code>actor-not-active</code> refusal the resume would return, and <code>operationPermissions</code> is <code>null</code>.</li> <li><code>NONE</code> (ACTIVE) — <code>capabilities</code> is empty and <code>plan</code> describes the grant already in force, with nothing to add. This is the post-activation verdict.</li> </ul> DRAFT, REVOKED and EXPIRED are refused with 422 naming the state — the same refusal, and the same <code>type</code>, the activation itself would return. <b>Disclosure is bounded.</b> <code>plan.operationPermissions.required</code> and <code>confersNew</code> always answer; <code>alreadyHeld</code> and <code>toAdd</code> name scopes and are <code>null</code> unless the caller also holds <code>admin.tenant.actor.roles.read</code>. Read <code>namesVisible</code> rather than inferring a withheld list from a <code>null</code> — a withheld list and an empty one are otherwise indistinguishable. Nothing here states HOW MANY scopes would be added: without the names, the caller learns only whether anything would be, which the write reveals anyway by being admitted or refused. The <code>conferring-authority-required</code> refusal embedded in an offer carries no count and no scope name either. <b>Authorization</b>: <code>admin.tenant.exchange.activate</code> — the write scope, deliberately. This is a GET that previews a CONFERRAL, so it answers to the operator about to perform it and not to every reader of the tenant. This operation is NOT refused under impersonation: it writes nothing and confers nothing.
      Parameters:
      id - Exchange UUID (required)
      capability - The capability to plan. Omit to receive the offers only. Bound to the same four values activateExchange accepts; anything else is a 400, never a 500. (optional)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • resumeExchangeCall

      public okhttp3.Call resumeExchangeCall(@Nonnull UUID id, @Nonnull ResumeExchangeRequest resumeExchangeRequest, ApiCallback _callback) throws ApiException
      Build call for resumeExchange
      Parameters:
      id - (required)
      resumeExchangeRequest - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • resumeExchange

      public ExchangeDetailResponse resumeExchange(@Nonnull UUID id, @Nonnull ResumeExchangeRequest resumeExchangeRequest) throws ApiException
      Resume Exchange (SUSPENDED -> ACTIVE) — shares scope with activate Returns a SUSPENDED Cryptographic Exchange to ACTIVE and republishes the linked Capability Grant projection. The body carries the optimistic-lock <code>version</code> and NOTHING ELSE. Resume records no justification: restoring a capability generates no grievance for the audit trail to answer. A body that still carries <code>reason</code> is REFUSED with 400 rather than silently ignored - the request type has no such component and strict deserialization is enabled - so a caller learns that the value is not recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.activate</code>, the same scope that governs activation. There is no .resume scope. <b>Resume RESTORES; it never confers anything new.</b> The Capability Grant already exists and already names its capabilities — resuming makes it effective again, so the operator is NOT asked for <code>admin.tenant.actor.roles.assign</code>. Gating the scope half on a scope the activation already required would make resume unusable for every Exchange a custom role built. <b>The asset kid must still name a live key.</b> A kid that names no live key is refused with 422 <code>asset-key-not-resolvable</code>, asked before the Actor, and nothing is written. <b>The Actor must be ACTIVE.</b> Making the grant effective again is standing authority on the Actor, so a resume onto a SUSPENDED or DISABLED Actor is refused with 422 <code>actor-not-active</code> - the same refusal, and the same <code>type</code>, activation returns - and nothing is written. Reactivate the Actor first. Call <code>previewExchangeActivation</code> to see what comes back, or that it would be refused.
      Parameters:
      id - (required)
      resumeExchangeRequest - (required)
      Returns:
      ExchangeDetailResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • resumeExchangeWithHttpInfo

      public ApiResponse<ExchangeDetailResponse> resumeExchangeWithHttpInfo(@Nonnull UUID id, @Nonnull ResumeExchangeRequest resumeExchangeRequest) throws ApiException
      Resume Exchange (SUSPENDED -> ACTIVE) — shares scope with activate Returns a SUSPENDED Cryptographic Exchange to ACTIVE and republishes the linked Capability Grant projection. The body carries the optimistic-lock <code>version</code> and NOTHING ELSE. Resume records no justification: restoring a capability generates no grievance for the audit trail to answer. A body that still carries <code>reason</code> is REFUSED with 400 rather than silently ignored - the request type has no such component and strict deserialization is enabled - so a caller learns that the value is not recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.activate</code>, the same scope that governs activation. There is no .resume scope. <b>Resume RESTORES; it never confers anything new.</b> The Capability Grant already exists and already names its capabilities — resuming makes it effective again, so the operator is NOT asked for <code>admin.tenant.actor.roles.assign</code>. Gating the scope half on a scope the activation already required would make resume unusable for every Exchange a custom role built. <b>The asset kid must still name a live key.</b> A kid that names no live key is refused with 422 <code>asset-key-not-resolvable</code>, asked before the Actor, and nothing is written. <b>The Actor must be ACTIVE.</b> Making the grant effective again is standing authority on the Actor, so a resume onto a SUSPENDED or DISABLED Actor is refused with 422 <code>actor-not-active</code> - the same refusal, and the same <code>type</code>, activation returns - and nothing is written. Reactivate the Actor first. Call <code>previewExchangeActivation</code> to see what comes back, or that it would be refused.
      Parameters:
      id - (required)
      resumeExchangeRequest - (required)
      Returns:
      ApiResponse<ExchangeDetailResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • resumeExchangeAsync

      public okhttp3.Call resumeExchangeAsync(@Nonnull UUID id, @Nonnull ResumeExchangeRequest resumeExchangeRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException
      Resume Exchange (SUSPENDED -> ACTIVE) — shares scope with activate (asynchronously) Returns a SUSPENDED Cryptographic Exchange to ACTIVE and republishes the linked Capability Grant projection. The body carries the optimistic-lock <code>version</code> and NOTHING ELSE. Resume records no justification: restoring a capability generates no grievance for the audit trail to answer. A body that still carries <code>reason</code> is REFUSED with 400 rather than silently ignored - the request type has no such component and strict deserialization is enabled - so a caller learns that the value is not recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.activate</code>, the same scope that governs activation. There is no .resume scope. <b>Resume RESTORES; it never confers anything new.</b> The Capability Grant already exists and already names its capabilities — resuming makes it effective again, so the operator is NOT asked for <code>admin.tenant.actor.roles.assign</code>. Gating the scope half on a scope the activation already required would make resume unusable for every Exchange a custom role built. <b>The asset kid must still name a live key.</b> A kid that names no live key is refused with 422 <code>asset-key-not-resolvable</code>, asked before the Actor, and nothing is written. <b>The Actor must be ACTIVE.</b> Making the grant effective again is standing authority on the Actor, so a resume onto a SUSPENDED or DISABLED Actor is refused with 422 <code>actor-not-active</code> - the same refusal, and the same <code>type</code>, activation returns - and nothing is written. Reactivate the Actor first. Call <code>previewExchangeActivation</code> to see what comes back, or that it would be refused.
      Parameters:
      id - (required)
      resumeExchangeRequest - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • revokeExchangeCall

      public okhttp3.Call revokeExchangeCall(@Nonnull UUID id, @Nonnull RevokeExchangeRequest revokeExchangeRequest, ApiCallback _callback) throws ApiException
      Build call for revokeExchange
      Parameters:
      id - (required)
      revokeExchangeRequest - Optimistic-lock version plus the mandatory operator justification. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • revokeExchange

      public ExchangeDetailResponse revokeExchange(@Nonnull UUID id, @Nonnull RevokeExchangeRequest revokeExchangeRequest) throws ApiException
      Revoke Exchange (any non-terminal -> REVOKED) — irreversible Moves a non-terminal Cryptographic Exchange to REVOKED, populates <code>revokedAt</code> / <code>revokedBy</code> / <code>revokedReason</code> atomically with the transition, and invalidates the linked Capability Grant projection. Terminal and irreversible. This is the ONE operation in the family whose justification has TWO homes: the <code>revokedReason</code> property of the resource, and canonical position 21 of the signed admin audit event. Both are written from the SAME submitted value, so a divergence between them is a defect and not a degree of freedom. <code>reason</code> is MANDATORY, bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters) - the same bound applied before signing - and NEVER written to a log line. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.revoke</code>.
      Parameters:
      id - (required)
      revokeExchangeRequest - Optimistic-lock version plus the mandatory operator justification. (required)
      Returns:
      ExchangeDetailResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • revokeExchangeWithHttpInfo

      public ApiResponse<ExchangeDetailResponse> revokeExchangeWithHttpInfo(@Nonnull UUID id, @Nonnull RevokeExchangeRequest revokeExchangeRequest) throws ApiException
      Revoke Exchange (any non-terminal -> REVOKED) — irreversible Moves a non-terminal Cryptographic Exchange to REVOKED, populates <code>revokedAt</code> / <code>revokedBy</code> / <code>revokedReason</code> atomically with the transition, and invalidates the linked Capability Grant projection. Terminal and irreversible. This is the ONE operation in the family whose justification has TWO homes: the <code>revokedReason</code> property of the resource, and canonical position 21 of the signed admin audit event. Both are written from the SAME submitted value, so a divergence between them is a defect and not a degree of freedom. <code>reason</code> is MANDATORY, bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters) - the same bound applied before signing - and NEVER written to a log line. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.revoke</code>.
      Parameters:
      id - (required)
      revokeExchangeRequest - Optimistic-lock version plus the mandatory operator justification. (required)
      Returns:
      ApiResponse<ExchangeDetailResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • revokeExchangeAsync

      public okhttp3.Call revokeExchangeAsync(@Nonnull UUID id, @Nonnull RevokeExchangeRequest revokeExchangeRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException
      Revoke Exchange (any non-terminal -> REVOKED) — irreversible (asynchronously) Moves a non-terminal Cryptographic Exchange to REVOKED, populates <code>revokedAt</code> / <code>revokedBy</code> / <code>revokedReason</code> atomically with the transition, and invalidates the linked Capability Grant projection. Terminal and irreversible. This is the ONE operation in the family whose justification has TWO homes: the <code>revokedReason</code> property of the resource, and canonical position 21 of the signed admin audit event. Both are written from the SAME submitted value, so a divergence between them is a defect and not a degree of freedom. <code>reason</code> is MANDATORY, bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters) - the same bound applied before signing - and NEVER written to a log line. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.revoke</code>.
      Parameters:
      id - (required)
      revokeExchangeRequest - Optimistic-lock version plus the mandatory operator justification. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • suspendExchangeCall

      public okhttp3.Call suspendExchangeCall(@Nonnull UUID id, @Nonnull SuspendExchangeRequest suspendExchangeRequest, ApiCallback _callback) throws ApiException
      Build call for suspendExchange
      Parameters:
      id - (required)
      suspendExchangeRequest - Optimistic-lock version plus the mandatory operator justification. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • suspendExchange

      public ExchangeDetailResponse suspendExchange(@Nonnull UUID id, @Nonnull SuspendExchangeRequest suspendExchangeRequest) throws ApiException
      Suspend Exchange (ACTIVE -> SUSPENDED) Moves an ACTIVE Cryptographic Exchange to SUSPENDED and invalidates the linked Capability Grant projection, so runtime authorization stops honouring it. The body is an OPTIMISTIC-LOCKING ENVELOPE that also carries the operator's justification. <code>version</code> is the discriminator last read from the exchange detail response; a stale value is refused with 409 and nothing is written. <code>reason</code> is MANDATORY. It is recorded verbatim at canonical position 21 of the signed admin audit event, which is what makes the suspension answerable later: no audit row records a suspension without its reason. It is bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters - the unit the signed preimage and every carrier downstream of it are measured in) - the same bound applied before signing, so no accepted value is silently truncated on its way into the preimage. The reason is NEVER written to a log line; the signed audit event is where it is recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.suspend</code>. The tenant boundary is resolved from the JWT claim, never from the path.
      Parameters:
      id - (required)
      suspendExchangeRequest - Optimistic-lock version plus the mandatory operator justification. (required)
      Returns:
      ExchangeDetailResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • suspendExchangeWithHttpInfo

      public ApiResponse<ExchangeDetailResponse> suspendExchangeWithHttpInfo(@Nonnull UUID id, @Nonnull SuspendExchangeRequest suspendExchangeRequest) throws ApiException
      Suspend Exchange (ACTIVE -> SUSPENDED) Moves an ACTIVE Cryptographic Exchange to SUSPENDED and invalidates the linked Capability Grant projection, so runtime authorization stops honouring it. The body is an OPTIMISTIC-LOCKING ENVELOPE that also carries the operator's justification. <code>version</code> is the discriminator last read from the exchange detail response; a stale value is refused with 409 and nothing is written. <code>reason</code> is MANDATORY. It is recorded verbatim at canonical position 21 of the signed admin audit event, which is what makes the suspension answerable later: no audit row records a suspension without its reason. It is bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters - the unit the signed preimage and every carrier downstream of it are measured in) - the same bound applied before signing, so no accepted value is silently truncated on its way into the preimage. The reason is NEVER written to a log line; the signed audit event is where it is recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.suspend</code>. The tenant boundary is resolved from the JWT claim, never from the path.
      Parameters:
      id - (required)
      suspendExchangeRequest - Optimistic-lock version plus the mandatory operator justification. (required)
      Returns:
      ApiResponse<ExchangeDetailResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • suspendExchangeAsync

      public okhttp3.Call suspendExchangeAsync(@Nonnull UUID id, @Nonnull SuspendExchangeRequest suspendExchangeRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException
      Suspend Exchange (ACTIVE -> SUSPENDED) (asynchronously) Moves an ACTIVE Cryptographic Exchange to SUSPENDED and invalidates the linked Capability Grant projection, so runtime authorization stops honouring it. The body is an OPTIMISTIC-LOCKING ENVELOPE that also carries the operator's justification. <code>version</code> is the discriminator last read from the exchange detail response; a stale value is refused with 409 and nothing is written. <code>reason</code> is MANDATORY. It is recorded verbatim at canonical position 21 of the signed admin audit event, which is what makes the suspension answerable later: no audit row records a suspension without its reason. It is bounded at the audit reason limit (1,000 UTF-8 BYTES, not characters - the unit the signed preimage and every carrier downstream of it are measured in) - the same bound applied before signing, so no accepted value is silently truncated on its way into the preimage. The reason is NEVER written to a log line; the signed audit event is where it is recorded. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.suspend</code>. The tenant boundary is resolved from the JWT claim, never from the path.
      Parameters:
      id - (required)
      suspendExchangeRequest - Optimistic-lock version plus the mandatory operator justification. (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • updateExchangeCall

      public okhttp3.Call updateExchangeCall(@Nonnull UUID id, @Nonnull ExchangeUpdateRequest exchangeUpdateRequest, ApiCallback _callback) throws ApiException
      Build call for updateExchange
      Parameters:
      id - Stable Exchange UUID (required)
      exchangeUpdateRequest - (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • updateExchange

      public ExchangeDetailResponse updateExchange(@Nonnull UUID id, @Nonnull ExchangeUpdateRequest exchangeUpdateRequest) throws ApiException
      Update Exchange in DRAFT or READY PATCH-style update. All fields except `version` are optional. Mutating any of the 5 references on a READY Exchange demotes it back to DRAFT (single admin.cryptographicexchange.update event with previousStatus and newStatus). ACTIVE / SUSPENDED / terminal Exchanges are rejected with 422 <code>exchange-not-editable</code>, whose <code>exchangeStatus</code> member names the observed state - clone the exchange to edit a copy. A stale `version` returns 409 <code>conflict</code> (RFC 9457). A named application, actor, Exchange Context or Constraint Policy that does not resolve in the caller's tenant is refused with 404 <code>not-found</code> before any field is applied, identically whether it belongs to another tenant or to none. Once every named reference has resolved, moving the actor to one an Internal Crypto Use Case owns is refused with 422 <code>actor-owned-by-use-case</code>, before any field is applied. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.
      Parameters:
      id - Stable Exchange UUID (required)
      exchangeUpdateRequest - (required)
      Returns:
      ExchangeDetailResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateExchangeWithHttpInfo

      public ApiResponse<ExchangeDetailResponse> updateExchangeWithHttpInfo(@Nonnull UUID id, @Nonnull ExchangeUpdateRequest exchangeUpdateRequest) throws ApiException
      Update Exchange in DRAFT or READY PATCH-style update. All fields except `version` are optional. Mutating any of the 5 references on a READY Exchange demotes it back to DRAFT (single admin.cryptographicexchange.update event with previousStatus and newStatus). ACTIVE / SUSPENDED / terminal Exchanges are rejected with 422 <code>exchange-not-editable</code>, whose <code>exchangeStatus</code> member names the observed state - clone the exchange to edit a copy. A stale `version` returns 409 <code>conflict</code> (RFC 9457). A named application, actor, Exchange Context or Constraint Policy that does not resolve in the caller's tenant is refused with 404 <code>not-found</code> before any field is applied, identically whether it belongs to another tenant or to none. Once every named reference has resolved, moving the actor to one an Internal Crypto Use Case owns is refused with 422 <code>actor-owned-by-use-case</code>, before any field is applied. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.
      Parameters:
      id - Stable Exchange UUID (required)
      exchangeUpdateRequest - (required)
      Returns:
      ApiResponse<ExchangeDetailResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateExchangeAsync

      public okhttp3.Call updateExchangeAsync(@Nonnull UUID id, @Nonnull ExchangeUpdateRequest exchangeUpdateRequest, ApiCallback<ExchangeDetailResponse> _callback) throws ApiException
      Update Exchange in DRAFT or READY (asynchronously) PATCH-style update. All fields except `version` are optional. Mutating any of the 5 references on a READY Exchange demotes it back to DRAFT (single admin.cryptographicexchange.update event with previousStatus and newStatus). ACTIVE / SUSPENDED / terminal Exchanges are rejected with 422 <code>exchange-not-editable</code>, whose <code>exchangeStatus</code> member names the observed state - clone the exchange to edit a copy. A stale `version` returns 409 <code>conflict</code> (RFC 9457). A named application, actor, Exchange Context or Constraint Policy that does not resolve in the caller's tenant is refused with 404 <code>not-found</code> before any field is applied, identically whether it belongs to another tenant or to none. Once every named reference has resolved, moving the actor to one an Internal Crypto Use Case owns is refused with 422 <code>actor-owned-by-use-case</code>, before any field is applied. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.
      Parameters:
      id - Stable Exchange UUID (required)
      exchangeUpdateRequest - (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object
    • validateExchangeCall

      public okhttp3.Call validateExchangeCall(@Nonnull UUID id, ApiCallback _callback) throws ApiException
      Build call for validateExchange
      Parameters:
      id - Exchange UUID (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • validateExchange

      public ValidationResultResponse validateExchange(@Nonnull UUID id) throws ApiException
      Validate Exchange (DRAFT to READY) Runs the reference and coherence predicates: all required references resolved (application, actor, asset KID and Exchange Context; the Constraint Policy is optional), the asset kid names a live key in the caller's tenant, and dates coherent. That the references belong to the caller's tenant is not a predicate here: the database refuses to store any other. On success, the Exchange transitions to READY. Returns the ValidationResultResponse with violations[] and warnings[]. <b>The asset kid must name a live key</b>. A kid that names no live key in this tenant is the violation <code>ASSET_KEY_NOT_FOUND</code> on field <code>assetKid</code> - the same violation, with the same message, whether the kid never existed or exists only in another tenant - and the status is left unchanged. A Key ID names one key for good: a destroyed key's Key ID is never given to another key. Re-validating a READY Exchange changes nothing; editing any reference of a READY Exchange returns it to DRAFT. <b>This does NOT check whether the asset key can perform a capability</b>, and it does not need to: no capability has been chosen yet. The capability is supplied at ACTIVATION, and it is there that the key's provisioned <code>key_ops</code>, state, purpose and algorithm are checked — blocking, with 422. Call <code>previewExchangeActivation</code> on a READY Exchange to learn which capabilities its key admits before activating. Only a DRAFT or READY exchange can be validated; any later state is refused with 422 <code>invalid-state-transition</code>, whose detail names the current state. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.
      Parameters:
      id - Exchange UUID (required)
      Returns:
      ValidationResultResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • validateExchangeWithHttpInfo

      public ApiResponse<ValidationResultResponse> validateExchangeWithHttpInfo(@Nonnull UUID id) throws ApiException
      Validate Exchange (DRAFT to READY) Runs the reference and coherence predicates: all required references resolved (application, actor, asset KID and Exchange Context; the Constraint Policy is optional), the asset kid names a live key in the caller's tenant, and dates coherent. That the references belong to the caller's tenant is not a predicate here: the database refuses to store any other. On success, the Exchange transitions to READY. Returns the ValidationResultResponse with violations[] and warnings[]. <b>The asset kid must name a live key</b>. A kid that names no live key in this tenant is the violation <code>ASSET_KEY_NOT_FOUND</code> on field <code>assetKid</code> - the same violation, with the same message, whether the kid never existed or exists only in another tenant - and the status is left unchanged. A Key ID names one key for good: a destroyed key's Key ID is never given to another key. Re-validating a READY Exchange changes nothing; editing any reference of a READY Exchange returns it to DRAFT. <b>This does NOT check whether the asset key can perform a capability</b>, and it does not need to: no capability has been chosen yet. The capability is supplied at ACTIVATION, and it is there that the key's provisioned <code>key_ops</code>, state, purpose and algorithm are checked — blocking, with 422. Call <code>previewExchangeActivation</code> on a READY Exchange to learn which capabilities its key admits before activating. Only a DRAFT or READY exchange can be validated; any later state is refused with 422 <code>invalid-state-transition</code>, whose detail names the current state. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.
      Parameters:
      id - Exchange UUID (required)
      Returns:
      ApiResponse<ValidationResultResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • validateExchangeAsync

      public okhttp3.Call validateExchangeAsync(@Nonnull UUID id, ApiCallback<ValidationResultResponse> _callback) throws ApiException
      Validate Exchange (DRAFT to READY) (asynchronously) Runs the reference and coherence predicates: all required references resolved (application, actor, asset KID and Exchange Context; the Constraint Policy is optional), the asset kid names a live key in the caller's tenant, and dates coherent. That the references belong to the caller's tenant is not a predicate here: the database refuses to store any other. On success, the Exchange transitions to READY. Returns the ValidationResultResponse with violations[] and warnings[]. <b>The asset kid must name a live key</b>. A kid that names no live key in this tenant is the violation <code>ASSET_KEY_NOT_FOUND</code> on field <code>assetKid</code> - the same violation, with the same message, whether the kid never existed or exists only in another tenant - and the status is left unchanged. A Key ID names one key for good: a destroyed key's Key ID is never given to another key. Re-validating a READY Exchange changes nothing; editing any reference of a READY Exchange returns it to DRAFT. <b>This does NOT check whether the asset key can perform a capability</b>, and it does not need to: no capability has been chosen yet. The capability is supplied at ACTIVATION, and it is there that the key's provisioned <code>key_ops</code>, state, purpose and algorithm are checked — blocking, with 422. Call <code>previewExchangeActivation</code> on a READY Exchange to learn which capabilities its key admits before activating. Only a DRAFT or READY exchange can be validated; any later state is refused with 422 <code>invalid-state-transition</code>, whose detail names the current state. <b>Authorization</b>: requires scope <code>admin.tenant.exchange.update</code>.
      Parameters:
      id - Exchange UUID (required)
      _callback - The callback to be executed when the API call finishes
      Returns:
      The request call
      Throws:
      ApiException - If fail to process the API call, e.g. serializing the request body object