Class TemplatesApi

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

public class TemplatesApi extends Object
  • Constructor Details

    • TemplatesApi

      public TemplatesApi()
    • TemplatesApi

      public TemplatesApi(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)
    • createGateTemplateCall

      public okhttp3.Call createGateTemplateCall(@Nonnull CreateGateTemplateRequest createGateTemplateRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for createGateTemplate
      Parameters:
      createGateTemplateRequest - (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
    • createGateTemplate

      public CreateGateTemplateResponse createGateTemplate(@Nonnull CreateGateTemplateRequest createGateTemplateRequest, @Nullable String xProjectId) throws ApiException
      Create a gate template Creates a per-project (customer) targeting-rule template. Built-ins are read-only and cannot be created here. Returns `409` if a template with this `name` already exists in the project.
      Parameters:
      createGateTemplateRequest - (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:
      CreateGateTemplateResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createGateTemplateWithHttpInfo

      public ApiResponse<CreateGateTemplateResponse> createGateTemplateWithHttpInfo(@Nonnull CreateGateTemplateRequest createGateTemplateRequest, @Nullable String xProjectId) throws ApiException
      Create a gate template Creates a per-project (customer) targeting-rule template. Built-ins are read-only and cannot be created here. Returns `409` if a template with this `name` already exists in the project.
      Parameters:
      createGateTemplateRequest - (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<CreateGateTemplateResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createGateTemplateAsync

      public okhttp3.Call createGateTemplateAsync(@Nonnull CreateGateTemplateRequest createGateTemplateRequest, @Nullable String xProjectId, ApiCallback<CreateGateTemplateResponse> _callback) throws ApiException
      Create a gate template (asynchronously) Creates a per-project (customer) targeting-rule template. Built-ins are read-only and cannot be created here. Returns `409` if a template with this `name` already exists in the project.
      Parameters:
      createGateTemplateRequest - (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
    • deleteGateTemplateCall

      public okhttp3.Call deleteGateTemplateCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for deleteGateTemplate
      Parameters:
      id - Customer template id (`gtpl_…`) or its `name`. (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
    • deleteGateTemplate

      public DeleteGateTemplateResponse deleteGateTemplate(@Nonnull String id, @Nullable String xProjectId) throws ApiException
      Delete a gate template Soft-deletes (archives) a **customer** template. Returns `409` if `id` names a read-only built-in template.
      Parameters:
      id - Customer template id (`gtpl_…`) or its `name`. (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:
      DeleteGateTemplateResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteGateTemplateWithHttpInfo

      public ApiResponse<DeleteGateTemplateResponse> deleteGateTemplateWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException
      Delete a gate template Soft-deletes (archives) a **customer** template. Returns `409` if `id` names a read-only built-in template.
      Parameters:
      id - Customer template id (`gtpl_…`) or its `name`. (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<DeleteGateTemplateResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteGateTemplateAsync

      public okhttp3.Call deleteGateTemplateAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<DeleteGateTemplateResponse> _callback) throws ApiException
      Delete a gate template (asynchronously) Soft-deletes (archives) a **customer** template. Returns `409` if `id` names a read-only built-in template.
      Parameters:
      id - Customer template id (`gtpl_…`) or its `name`. (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
    • getGateTemplateCall

      public okhttp3.Call getGateTemplateCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for getGateTemplate
      Parameters:
      id - Built-in slug (`country`) or customer template id (`gtpl_…`). (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
    • getGateTemplate

      public GateTemplate getGateTemplate(@Nonnull String id, @Nullable String xProjectId) throws ApiException
      Get one gate template Returns a single template by its `id` — a built-in slug (`country`) or a customer `gtpl_…` id.
      Parameters:
      id - Built-in slug (`country`) or customer template id (`gtpl_…`). (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:
      GateTemplate
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getGateTemplateWithHttpInfo

      public ApiResponse<GateTemplate> getGateTemplateWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException
      Get one gate template Returns a single template by its `id` — a built-in slug (`country`) or a customer `gtpl_…` id.
      Parameters:
      id - Built-in slug (`country`) or customer template id (`gtpl_…`). (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<GateTemplate>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getGateTemplateAsync

      public okhttp3.Call getGateTemplateAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<GateTemplate> _callback) throws ApiException
      Get one gate template (asynchronously) Returns a single template by its `id` — a built-in slug (`country`) or a customer `gtpl_…` id.
      Parameters:
      id - Built-in slug (`country`) or customer template id (`gtpl_…`). (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
    • listGateTemplatesCall

      public okhttp3.Call listGateTemplatesCall(@Nullable String xProjectId, @Nullable String q, @Nullable String query, ApiCallback _callback) throws ApiException
      Build call for listGateTemplates
      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)
      q - Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)
      query - Deprecated alias for `q`, kept working for one release. Prefer `q`. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • listGateTemplates

      public ListGateTemplatesResponse listGateTemplates(@Nullable String xProjectId, @Nullable String q, @Nullable String query) throws ApiException
      List gate templates Returns the merged targeting-rule template catalog — read-only **built-ins first** (the `@team`/`@owner` audience aliases, country, email-domain, region presets, …), then this project's **customer** templates. Each item carries a `rules: [{ attr, op, value }]` definition; the alias templates carry a symbol value (`email in [\"@team\"]`) that the SDK expands to the resolved email list at rebuild. **Turn \"launch X in country Y\" into a gated flag:** list templates (optionally with `q`), take the matching template's `rules`, substitute the concrete value(s), and pass them as the `rules` arg of `release_flags_create`. The catalog is small and bounded, so the full merged set is returned in one page — this endpoint is **not** paginated (`next_cursor` is always `null`; there are no `limit`/`cursor` params).
      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)
      q - Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)
      query - Deprecated alias for `q`, kept working for one release. Prefer `q`. (optional)
      Returns:
      ListGateTemplatesResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listGateTemplatesWithHttpInfo

      public ApiResponse<ListGateTemplatesResponse> listGateTemplatesWithHttpInfo(@Nullable String xProjectId, @Nullable String q, @Nullable String query) throws ApiException
      List gate templates Returns the merged targeting-rule template catalog — read-only **built-ins first** (the `@team`/`@owner` audience aliases, country, email-domain, region presets, …), then this project's **customer** templates. Each item carries a `rules: [{ attr, op, value }]` definition; the alias templates carry a symbol value (`email in [\"@team\"]`) that the SDK expands to the resolved email list at rebuild. **Turn \"launch X in country Y\" into a gated flag:** list templates (optionally with `q`), take the matching template's `rules`, substitute the concrete value(s), and pass them as the `rules` arg of `release_flags_create`. The catalog is small and bounded, so the full merged set is returned in one page — this endpoint is **not** paginated (`next_cursor` is always `null`; there are no `limit`/`cursor` params).
      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)
      q - Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)
      query - Deprecated alias for `q`, kept working for one release. Prefer `q`. (optional)
      Returns:
      ApiResponse<ListGateTemplatesResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listGateTemplatesAsync

      public okhttp3.Call listGateTemplatesAsync(@Nullable String xProjectId, @Nullable String q, @Nullable String query, ApiCallback<ListGateTemplatesResponse> _callback) throws ApiException
      List gate templates (asynchronously) Returns the merged targeting-rule template catalog — read-only **built-ins first** (the `@team`/`@owner` audience aliases, country, email-domain, region presets, …), then this project's **customer** templates. Each item carries a `rules: [{ attr, op, value }]` definition; the alias templates carry a symbol value (`email in [\"@team\"]`) that the SDK expands to the resolved email list at rebuild. **Turn \"launch X in country Y\" into a gated flag:** list templates (optionally with `q`), take the matching template's `rules`, substitute the concrete value(s), and pass them as the `rules` arg of `release_flags_create`. The catalog is small and bounded, so the full merged set is returned in one page — this endpoint is **not** paginated (`next_cursor` is always `null`; there are no `limit`/`cursor` params).
      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)
      q - Case-insensitive substring filter across the resource's human-readable text columns (e.g. `name`, `title`, `description`). OR-matched across those columns; omit to return everything. (optional)
      query - Deprecated alias for `q`, kept working for one release. Prefer `q`. (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
    • updateGateTemplateCall

      public okhttp3.Call updateGateTemplateCall(@Nonnull String id, @Nonnull UpdateGateTemplateRequest updateGateTemplateRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for updateGateTemplate
      Parameters:
      id - Customer template id (`gtpl_…`) or its `name`. (required)
      updateGateTemplateRequest - (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
    • updateGateTemplate

      public UpdateGateTemplateResponse updateGateTemplate(@Nonnull String id, @Nonnull UpdateGateTemplateRequest updateGateTemplateRequest, @Nullable String xProjectId) throws ApiException
      Update a gate template Partial update of a **customer** template. `rules` replaces the list wholesale. Returns `409` if `id` names a read-only built-in template.
      Parameters:
      id - Customer template id (`gtpl_…`) or its `name`. (required)
      updateGateTemplateRequest - (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:
      UpdateGateTemplateResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateGateTemplateWithHttpInfo

      public ApiResponse<UpdateGateTemplateResponse> updateGateTemplateWithHttpInfo(@Nonnull String id, @Nonnull UpdateGateTemplateRequest updateGateTemplateRequest, @Nullable String xProjectId) throws ApiException
      Update a gate template Partial update of a **customer** template. `rules` replaces the list wholesale. Returns `409` if `id` names a read-only built-in template.
      Parameters:
      id - Customer template id (`gtpl_…`) or its `name`. (required)
      updateGateTemplateRequest - (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<UpdateGateTemplateResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateGateTemplateAsync

      public okhttp3.Call updateGateTemplateAsync(@Nonnull String id, @Nonnull UpdateGateTemplateRequest updateGateTemplateRequest, @Nullable String xProjectId, ApiCallback<UpdateGateTemplateResponse> _callback) throws ApiException
      Update a gate template (asynchronously) Partial update of a **customer** template. `rules` replaces the list wholesale. Returns `409` if `id` names a read-only built-in template.
      Parameters:
      id - Customer template id (`gtpl_…`) or its `name`. (required)
      updateGateTemplateRequest - (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