Class AttributesApi

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

public class AttributesApi extends Object
  • Constructor Details

    • AttributesApi

      public AttributesApi()
    • AttributesApi

      public AttributesApi(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)
    • createAttributeCall

      public okhttp3.Call createAttributeCall(@Nonnull CreateAttributeRequest createAttributeRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for createAttribute
      Parameters:
      createAttributeRequest - (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
    • createAttribute

      public CreateAttributeResponse createAttribute(@Nonnull CreateAttributeRequest createAttributeRequest, @Nullable String xProjectId) throws ApiException
      Declare a targeting attribute Declare a targeting attribute the SDK reports and gates/experiments can target. `type: enum` requires `enum_values`. **Use case:** Register a `plan` or `country` attribute so targeting rules can reference it.
      Parameters:
      createAttributeRequest - (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:
      CreateAttributeResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createAttributeWithHttpInfo

      public ApiResponse<CreateAttributeResponse> createAttributeWithHttpInfo(@Nonnull CreateAttributeRequest createAttributeRequest, @Nullable String xProjectId) throws ApiException
      Declare a targeting attribute Declare a targeting attribute the SDK reports and gates/experiments can target. `type: enum` requires `enum_values`. **Use case:** Register a `plan` or `country` attribute so targeting rules can reference it.
      Parameters:
      createAttributeRequest - (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<CreateAttributeResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createAttributeAsync

      public okhttp3.Call createAttributeAsync(@Nonnull CreateAttributeRequest createAttributeRequest, @Nullable String xProjectId, ApiCallback<CreateAttributeResponse> _callback) throws ApiException
      Declare a targeting attribute (asynchronously) Declare a targeting attribute the SDK reports and gates/experiments can target. `type: enum` requires `enum_values`. **Use case:** Register a `plan` or `country` attribute so targeting rules can reference it.
      Parameters:
      createAttributeRequest - (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
    • deleteAttributeCall

      public okhttp3.Call deleteAttributeCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for deleteAttribute
      Parameters:
      id - The attribute id. (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
    • deleteAttribute

      public DeleteAttributeResponse deleteAttribute(@Nonnull String id, @Nullable String xProjectId) throws ApiException
      Archive a targeting attribute Soft-deletes (archives) a targeting attribute. **Use case:** Retire an attribute no targeting rule references anymore (the user-facing verb is `archive`).
      Parameters:
      id - The attribute id. (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:
      DeleteAttributeResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteAttributeWithHttpInfo

      public ApiResponse<DeleteAttributeResponse> deleteAttributeWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException
      Archive a targeting attribute Soft-deletes (archives) a targeting attribute. **Use case:** Retire an attribute no targeting rule references anymore (the user-facing verb is `archive`).
      Parameters:
      id - The attribute id. (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<DeleteAttributeResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteAttributeAsync

      public okhttp3.Call deleteAttributeAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<DeleteAttributeResponse> _callback) throws ApiException
      Archive a targeting attribute (asynchronously) Soft-deletes (archives) a targeting attribute. **Use case:** Retire an attribute no targeting rule references anymore (the user-facing verb is `archive`).
      Parameters:
      id - The attribute id. (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
    • getAttributeCall

      public okhttp3.Call getAttributeCall(@Nonnull String id, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for getAttribute
      Parameters:
      id - The attribute id. (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
    • getAttribute

      public GetAttributeResponse getAttribute(@Nonnull String id, @Nullable String xProjectId) throws ApiException
      Get a targeting attribute Fetch one targeting attribute by id. **Use case:** Inspect an attribute's declared type + allowed values before editing it.
      Parameters:
      id - The attribute id. (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:
      GetAttributeResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAttributeWithHttpInfo

      public ApiResponse<GetAttributeResponse> getAttributeWithHttpInfo(@Nonnull String id, @Nullable String xProjectId) throws ApiException
      Get a targeting attribute Fetch one targeting attribute by id. **Use case:** Inspect an attribute's declared type + allowed values before editing it.
      Parameters:
      id - The attribute id. (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<GetAttributeResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getAttributeAsync

      public okhttp3.Call getAttributeAsync(@Nonnull String id, @Nullable String xProjectId, ApiCallback<GetAttributeResponse> _callback) throws ApiException
      Get a targeting attribute (asynchronously) Fetch one targeting attribute by id. **Use case:** Inspect an attribute's declared type + allowed values before editing it.
      Parameters:
      id - The attribute id. (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
    • listAttributesCall

      public okhttp3.Call listAttributesCall(@Nullable String xProjectId, @Nullable String q, ApiCallback _callback) throws ApiException
      Build call for listAttributes
      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)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • listAttributes

      public List<ListAttributesResponseInner> listAttributes(@Nullable String xProjectId, @Nullable String q) throws ApiException
      List targeting attributes Returns every auto-inferred targeting attribute in the project — the `name` and (when known) the value `type` — for building gate/experiment targeting rules. **Use case:** Discover which user-context keys are available before authoring a targeting rule, instead of guessing attribute names.
      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)
      Returns:
      List<ListAttributesResponseInner>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listAttributesWithHttpInfo

      public ApiResponse<List<ListAttributesResponseInner>> listAttributesWithHttpInfo(@Nullable String xProjectId, @Nullable String q) throws ApiException
      List targeting attributes Returns every auto-inferred targeting attribute in the project — the `name` and (when known) the value `type` — for building gate/experiment targeting rules. **Use case:** Discover which user-context keys are available before authoring a targeting rule, instead of guessing attribute names.
      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)
      Returns:
      ApiResponse<List<ListAttributesResponseInner>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • listAttributesAsync

      public okhttp3.Call listAttributesAsync(@Nullable String xProjectId, @Nullable String q, ApiCallback<List<ListAttributesResponseInner>> _callback) throws ApiException
      List targeting attributes (asynchronously) Returns every auto-inferred targeting attribute in the project — the `name` and (when known) the value `type` — for building gate/experiment targeting rules. **Use case:** Discover which user-context keys are available before authoring a targeting rule, instead of guessing attribute names.
      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)
      _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
    • updateAttributeCall

      public okhttp3.Call updateAttributeCall(@Nonnull String id, @Nonnull UpdateAttributeRequest updateAttributeRequest, @Nullable String xProjectId, ApiCallback _callback) throws ApiException
      Build call for updateAttribute
      Parameters:
      id - The attribute id. (required)
      updateAttributeRequest - (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
    • updateAttribute

      public UpdateAttributeResponse updateAttribute(@Nonnull String id, @Nonnull UpdateAttributeRequest updateAttributeRequest, @Nullable String xProjectId) throws ApiException
      Update a targeting attribute Update a targeting attribute's type, allowed values, required flag, description, or SDK path. `name` is immutable. **Use case:** Add an allowed value to an `enum` attribute, or flip its required flag.
      Parameters:
      id - The attribute id. (required)
      updateAttributeRequest - (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:
      UpdateAttributeResponse
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateAttributeWithHttpInfo

      public ApiResponse<UpdateAttributeResponse> updateAttributeWithHttpInfo(@Nonnull String id, @Nonnull UpdateAttributeRequest updateAttributeRequest, @Nullable String xProjectId) throws ApiException
      Update a targeting attribute Update a targeting attribute's type, allowed values, required flag, description, or SDK path. `name` is immutable. **Use case:** Add an allowed value to an `enum` attribute, or flip its required flag.
      Parameters:
      id - The attribute id. (required)
      updateAttributeRequest - (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<UpdateAttributeResponse>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateAttributeAsync

      public okhttp3.Call updateAttributeAsync(@Nonnull String id, @Nonnull UpdateAttributeRequest updateAttributeRequest, @Nullable String xProjectId, ApiCallback<UpdateAttributeResponse> _callback) throws ApiException
      Update a targeting attribute (asynchronously) Update a targeting attribute's type, allowed values, required flag, description, or SDK path. `name` is immutable. **Use case:** Add an allowed value to an `enum` attribute, or flip its required flag.
      Parameters:
      id - The attribute id. (required)
      updateAttributeRequest - (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