Class DraftsApi

java.lang.Object
ai.shipeasy.admin.api.DraftsApi

public class DraftsApi extends Object
  • Constructor Details

    • DraftsApi

      public DraftsApi()
    • DraftsApi

      public DraftsApi(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)
    • createI18nDraftCall

      public okhttp3.Call createI18nDraftCall(@Nonnull CreateI18nDraftRequest createI18nDraftRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for createI18nDraft
      Parameters:
      createI18nDraftRequest - (required)
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • createI18nDraft

      public I18nDraft createI18nDraft(@Nonnull CreateI18nDraftRequest createI18nDraftRequest, @Nullable String xProjectId) throws ApiException
      Create a translation draft Stage a new translation draft against a target profile, optionally seeding its keys from a source profile. **Use case:** Open a machine-translation draft for review before publishing it to a locale.
      Parameters:
      createI18nDraftRequest - (required)
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)
      Returns:
      I18nDraft
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createI18nDraftWithHttpInfo

      public ApiResponse<I18nDraft> createI18nDraftWithHttpInfo(@Nonnull CreateI18nDraftRequest createI18nDraftRequest, @Nullable String xProjectId) throws ApiException
      Create a translation draft Stage a new translation draft against a target profile, optionally seeding its keys from a source profile. **Use case:** Open a machine-translation draft for review before publishing it to a locale.
      Parameters:
      createI18nDraftRequest - (required)
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)
      Returns:
      ApiResponse<I18nDraft>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createI18nDraftAsync

      public okhttp3.Call createI18nDraftAsync(@Nonnull CreateI18nDraftRequest createI18nDraftRequest, @Nullable String xProjectId, ApiCallback<I18nDraft> _callback) throws ApiException
      Create a translation draft (asynchronously) Stage a new translation draft against a target profile, optionally seeding its keys from a source profile. **Use case:** Open a machine-translation draft for review before publishing it to a locale.
      Parameters:
      createI18nDraftRequest - (required)
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (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
    • listI18nDraftsCall

      public okhttp3.Call listI18nDraftsCall(@Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for listI18nDrafts
      Parameters:
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • listI18nDrafts

      public List<ListI18nDraftsResponseInner> listI18nDrafts(@Nullable String xProjectId) throws ApiException
      List translation drafts List staged translation drafts awaiting review/publish. **Use case:** Review machine-translation drafts before publishing them to a locale.
      Parameters:
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)
      Returns:
      List<ListI18nDraftsResponseInner>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listI18nDraftsWithHttpInfo

      public ApiResponse<List<ListI18nDraftsResponseInner>> listI18nDraftsWithHttpInfo(@Nullable String xProjectId) throws ApiException
      List translation drafts List staged translation drafts awaiting review/publish. **Use case:** Review machine-translation drafts before publishing them to a locale.
      Parameters:
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)
      Returns:
      ApiResponse<List<ListI18nDraftsResponseInner>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listI18nDraftsAsync

      public okhttp3.Call listI18nDraftsAsync(@Nullable String xProjectId, ApiCallback<List<ListI18nDraftsResponseInner>> _callback) throws ApiException
      List translation drafts (asynchronously) List staged translation drafts awaiting review/publish. **Use case:** Review machine-translation drafts before publishing them to a locale.
      Parameters:
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (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
    • updateI18nDraftCall

      public okhttp3.Call updateI18nDraftCall(@Nonnull String draftId, @Nonnull UpdateI18nDraftRequest updateI18nDraftRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for updateI18nDraft
      Parameters:
      draftId - The draft id to update. (required)
      updateI18nDraftRequest - (required)
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • updateI18nDraft

      public I18nDraft updateI18nDraft(@Nonnull String draftId, @Nonnull UpdateI18nDraftRequest updateI18nDraftRequest, @Nullable String xProjectId) throws ApiException
      Update a translation draft Transition a draft's lifecycle state (`open` / `merged` / `abandoned`). **Use case:** Mark a reviewed draft as merged, or abandon one that should not ship.
      Parameters:
      draftId - The draft id to update. (required)
      updateI18nDraftRequest - (required)
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)
      Returns:
      I18nDraft
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateI18nDraftWithHttpInfo

      public ApiResponse<I18nDraft> updateI18nDraftWithHttpInfo(@Nonnull String draftId, @Nonnull UpdateI18nDraftRequest updateI18nDraftRequest, @Nullable String xProjectId) throws ApiException
      Update a translation draft Transition a draft's lifecycle state (`open` / `merged` / `abandoned`). **Use case:** Mark a reviewed draft as merged, or abandon one that should not ship.
      Parameters:
      draftId - The draft id to update. (required)
      updateI18nDraftRequest - (required)
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (optional)
      Returns:
      ApiResponse<I18nDraft>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateI18nDraftAsync

      public okhttp3.Call updateI18nDraftAsync(@Nonnull String draftId, @Nonnull UpdateI18nDraftRequest updateI18nDraftRequest, @Nullable String xProjectId, ApiCallback<I18nDraft> _callback) throws ApiException
      Update a translation draft (asynchronously) Transition a draft's lifecycle state (`open` / `merged` / `abandoned`). **Use case:** Mark a reviewed draft as merged, or abandon one that should not ship.
      Parameters:
      draftId - The draft id to update. (required)
      updateI18nDraftRequest - (required)
      xProjectId - Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it). (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