java.lang.Object
org.wso2.am.integration.clients.governance.api.RulesetsApi

public class RulesetsApi extends Object
  • Constructor Details

    • RulesetsApi

      public RulesetsApi()
    • RulesetsApi

      public RulesetsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createRulesetCall

      public okhttp3.Call createRulesetCall(String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider, ApiCallback _callback) throws ApiException
      Build call for createRuleset
      Parameters:
      name - Name of the ruleset. (required)
      rulesetContent - The content of the ruleset file (YAML or JSON). (required)
      ruleType - Context or area to which the ruleset applies. (required)
      artifactType - The type of artifact that the ruleset validates. (required)
      description - A brief description of the ruleset. (optional)
      ruleCategory - Category the rules included in ruleset. (optional, default to SPECTRAL)
      documentationLink - URL to the documentation related to the ruleset. (optional)
      provider - Entity or individual providing the ruleset. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • createRuleset

      public RulesetInfoDTO createRuleset(String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider) throws ApiException
      Create a new ruleset. Creates a new ruleset in the user's organization.
      Parameters:
      name - Name of the ruleset. (required)
      rulesetContent - The content of the ruleset file (YAML or JSON). (required)
      ruleType - Context or area to which the ruleset applies. (required)
      artifactType - The type of artifact that the ruleset validates. (required)
      description - A brief description of the ruleset. (optional)
      ruleCategory - Category the rules included in ruleset. (optional, default to SPECTRAL)
      documentationLink - URL to the documentation related to the ruleset. (optional)
      provider - Entity or individual providing the ruleset. (optional)
      Returns:
      RulesetInfoDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createRulesetWithHttpInfo

      public ApiResponse<RulesetInfoDTO> createRulesetWithHttpInfo(String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider) throws ApiException
      Create a new ruleset. Creates a new ruleset in the user's organization.
      Parameters:
      name - Name of the ruleset. (required)
      rulesetContent - The content of the ruleset file (YAML or JSON). (required)
      ruleType - Context or area to which the ruleset applies. (required)
      artifactType - The type of artifact that the ruleset validates. (required)
      description - A brief description of the ruleset. (optional)
      ruleCategory - Category the rules included in ruleset. (optional, default to SPECTRAL)
      documentationLink - URL to the documentation related to the ruleset. (optional)
      provider - Entity or individual providing the ruleset. (optional)
      Returns:
      ApiResponse<RulesetInfoDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • createRulesetAsync

      public okhttp3.Call createRulesetAsync(String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider, ApiCallback<RulesetInfoDTO> _callback) throws ApiException
      Create a new ruleset. (asynchronously) Creates a new ruleset in the user's organization.
      Parameters:
      name - Name of the ruleset. (required)
      rulesetContent - The content of the ruleset file (YAML or JSON). (required)
      ruleType - Context or area to which the ruleset applies. (required)
      artifactType - The type of artifact that the ruleset validates. (required)
      description - A brief description of the ruleset. (optional)
      ruleCategory - Category the rules included in ruleset. (optional, default to SPECTRAL)
      documentationLink - URL to the documentation related to the ruleset. (optional)
      provider - Entity or individual providing the ruleset. (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
    • deleteRulesetCall

      public okhttp3.Call deleteRulesetCall(String rulesetId, ApiCallback _callback) throws ApiException
      Build call for deleteRuleset
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • deleteRuleset

      public void deleteRuleset(String rulesetId) throws ApiException
      Deletes a specific ruleset. Deletes an existing ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteRulesetWithHttpInfo

      public ApiResponse<Void> deleteRulesetWithHttpInfo(String rulesetId) throws ApiException
      Deletes a specific ruleset. Deletes an existing ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      Returns:
      ApiResponse<Void>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • deleteRulesetAsync

      public okhttp3.Call deleteRulesetAsync(String rulesetId, ApiCallback<Void> _callback) throws ApiException
      Deletes a specific ruleset. (asynchronously) Deletes an existing ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (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
    • getRulesetByIdCall

      public okhttp3.Call getRulesetByIdCall(String rulesetId, ApiCallback _callback) throws ApiException
      Build call for getRulesetById
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getRulesetById

      public RulesetInfoDTO getRulesetById(String rulesetId) throws ApiException
      Retrieves details of a specific ruleset. Retrieves details of the ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      Returns:
      RulesetInfoDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRulesetByIdWithHttpInfo

      public ApiResponse<RulesetInfoDTO> getRulesetByIdWithHttpInfo(String rulesetId) throws ApiException
      Retrieves details of a specific ruleset. Retrieves details of the ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      Returns:
      ApiResponse<RulesetInfoDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRulesetByIdAsync

      public okhttp3.Call getRulesetByIdAsync(String rulesetId, ApiCallback<RulesetInfoDTO> _callback) throws ApiException
      Retrieves details of a specific ruleset. (asynchronously) Retrieves details of the ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (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
    • getRulesetContentCall

      public okhttp3.Call getRulesetContentCall(String rulesetId, ApiCallback _callback) throws ApiException
      Build call for getRulesetContent
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getRulesetContent

      public String getRulesetContent(String rulesetId) throws ApiException
      Retrieves the content of a specific ruleset. Retrieves the content of the ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      Returns:
      String
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRulesetContentWithHttpInfo

      public ApiResponse<String> getRulesetContentWithHttpInfo(String rulesetId) throws ApiException
      Retrieves the content of a specific ruleset. Retrieves the content of the ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      Returns:
      ApiResponse<String>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRulesetContentAsync

      public okhttp3.Call getRulesetContentAsync(String rulesetId, ApiCallback<String> _callback) throws ApiException
      Retrieves the content of a specific ruleset. (asynchronously) Retrieves the content of the ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (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
    • getRulesetUsageCall

      public okhttp3.Call getRulesetUsageCall(String rulesetId, ApiCallback _callback) throws ApiException
      Build call for getRulesetUsage
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getRulesetUsage

      public List<String> getRulesetUsage(String rulesetId) throws ApiException
      Retrieves the policy usage of a specific ruleset. Retrieves the list of policies using the ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      Returns:
      List<String>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRulesetUsageWithHttpInfo

      public ApiResponse<List<String>> getRulesetUsageWithHttpInfo(String rulesetId) throws ApiException
      Retrieves the policy usage of a specific ruleset. Retrieves the list of policies using the ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      Returns:
      ApiResponse<List<String>>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRulesetUsageAsync

      public okhttp3.Call getRulesetUsageAsync(String rulesetId, ApiCallback<List<String>> _callback) throws ApiException
      Retrieves the policy usage of a specific ruleset. (asynchronously) Retrieves the list of policies using the ruleset identified by the rulesetId.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (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
    • getRulesetsCall

      public okhttp3.Call getRulesetsCall(Integer limit, Integer offset, String query, ApiCallback _callback) throws ApiException
      Build call for getRulesets
      Parameters:
      limit - Maximum size of resource array to return. (optional, default to 25)
      offset - Starting point within the complete list of items qualified. (optional, default to 0)
      query - You can search for rulesets using the following format: - \"query=name:{NAME}\" searches rulesets by name. - \"query=artifactType:{ARTIFACT_TYPE}\" searches rulesets by artifact type. - \"query=ruleType:{RULE_TYPE}\" searches rulesets by rule type. You can combine multiple attributes to search for rulesets: - \"query=name:{NAME} artifactType:{ARTIFACT_TYPE} ruleType:{RULE_TYPE}\" searches rulesets by name, artifact type, and rule type. Remember to use URL encoding if your client does not support it (e.g., curl). (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • getRulesets

      public RulesetListDTO getRulesets(Integer limit, Integer offset, String query) throws ApiException
      Retrieves a list of rulesets. Returns a list of all rulesets associated with the requested organization.
      Parameters:
      limit - Maximum size of resource array to return. (optional, default to 25)
      offset - Starting point within the complete list of items qualified. (optional, default to 0)
      query - You can search for rulesets using the following format: - \"query=name:{NAME}\" searches rulesets by name. - \"query=artifactType:{ARTIFACT_TYPE}\" searches rulesets by artifact type. - \"query=ruleType:{RULE_TYPE}\" searches rulesets by rule type. You can combine multiple attributes to search for rulesets: - \"query=name:{NAME} artifactType:{ARTIFACT_TYPE} ruleType:{RULE_TYPE}\" searches rulesets by name, artifact type, and rule type. Remember to use URL encoding if your client does not support it (e.g., curl). (optional)
      Returns:
      RulesetListDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRulesetsWithHttpInfo

      public ApiResponse<RulesetListDTO> getRulesetsWithHttpInfo(Integer limit, Integer offset, String query) throws ApiException
      Retrieves a list of rulesets. Returns a list of all rulesets associated with the requested organization.
      Parameters:
      limit - Maximum size of resource array to return. (optional, default to 25)
      offset - Starting point within the complete list of items qualified. (optional, default to 0)
      query - You can search for rulesets using the following format: - \"query=name:{NAME}\" searches rulesets by name. - \"query=artifactType:{ARTIFACT_TYPE}\" searches rulesets by artifact type. - \"query=ruleType:{RULE_TYPE}\" searches rulesets by rule type. You can combine multiple attributes to search for rulesets: - \"query=name:{NAME} artifactType:{ARTIFACT_TYPE} ruleType:{RULE_TYPE}\" searches rulesets by name, artifact type, and rule type. Remember to use URL encoding if your client does not support it (e.g., curl). (optional)
      Returns:
      ApiResponse<RulesetListDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • getRulesetsAsync

      public okhttp3.Call getRulesetsAsync(Integer limit, Integer offset, String query, ApiCallback<RulesetListDTO> _callback) throws ApiException
      Retrieves a list of rulesets. (asynchronously) Returns a list of all rulesets associated with the requested organization.
      Parameters:
      limit - Maximum size of resource array to return. (optional, default to 25)
      offset - Starting point within the complete list of items qualified. (optional, default to 0)
      query - You can search for rulesets using the following format: - \"query=name:{NAME}\" searches rulesets by name. - \"query=artifactType:{ARTIFACT_TYPE}\" searches rulesets by artifact type. - \"query=ruleType:{RULE_TYPE}\" searches rulesets by rule type. You can combine multiple attributes to search for rulesets: - \"query=name:{NAME} artifactType:{ARTIFACT_TYPE} ruleType:{RULE_TYPE}\" searches rulesets by name, artifact type, and rule type. Remember to use URL encoding if your client does not support it (e.g., curl). (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
    • updateRulesetByIdCall

      public okhttp3.Call updateRulesetByIdCall(String rulesetId, String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider, ApiCallback _callback) throws ApiException
      Build call for updateRulesetById
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      name - Name of the ruleset. (required)
      rulesetContent - The content of the ruleset file (YAML or JSON). (required)
      ruleType - Context or area to which the ruleset applies. (required)
      artifactType - The type of artifact that the ruleset validates. (required)
      description - A brief description of the ruleset. (optional)
      ruleCategory - Category the rules included in ruleset. (optional, default to SPECTRAL)
      documentationLink - URL to the documentation related to the ruleset. (optional)
      provider - Entity or individual providing the ruleset. (optional)
      _callback - Callback for upload/download progress
      Returns:
      Call to execute
      Throws:
      ApiException - If fail to serialize the request body object
    • updateRulesetById

      public RulesetInfoDTO updateRulesetById(String rulesetId, String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider) throws ApiException
      Updates a specific ruleset. Updates the details of the ruleset identified by the `rulesetId`.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      name - Name of the ruleset. (required)
      rulesetContent - The content of the ruleset file (YAML or JSON). (required)
      ruleType - Context or area to which the ruleset applies. (required)
      artifactType - The type of artifact that the ruleset validates. (required)
      description - A brief description of the ruleset. (optional)
      ruleCategory - Category the rules included in ruleset. (optional, default to SPECTRAL)
      documentationLink - URL to the documentation related to the ruleset. (optional)
      provider - Entity or individual providing the ruleset. (optional)
      Returns:
      RulesetInfoDTO
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateRulesetByIdWithHttpInfo

      public ApiResponse<RulesetInfoDTO> updateRulesetByIdWithHttpInfo(String rulesetId, String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider) throws ApiException
      Updates a specific ruleset. Updates the details of the ruleset identified by the `rulesetId`.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      name - Name of the ruleset. (required)
      rulesetContent - The content of the ruleset file (YAML or JSON). (required)
      ruleType - Context or area to which the ruleset applies. (required)
      artifactType - The type of artifact that the ruleset validates. (required)
      description - A brief description of the ruleset. (optional)
      ruleCategory - Category the rules included in ruleset. (optional, default to SPECTRAL)
      documentationLink - URL to the documentation related to the ruleset. (optional)
      provider - Entity or individual providing the ruleset. (optional)
      Returns:
      ApiResponse<RulesetInfoDTO>
      Throws:
      ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
    • updateRulesetByIdAsync

      public okhttp3.Call updateRulesetByIdAsync(String rulesetId, String name, File rulesetContent, String ruleType, String artifactType, String description, String ruleCategory, String documentationLink, String provider, ApiCallback<RulesetInfoDTO> _callback) throws ApiException
      Updates a specific ruleset. (asynchronously) Updates the details of the ruleset identified by the `rulesetId`.
      Parameters:
      rulesetId - **UUID** of the Ruleset. (required)
      name - Name of the ruleset. (required)
      rulesetContent - The content of the ruleset file (YAML or JSON). (required)
      ruleType - Context or area to which the ruleset applies. (required)
      artifactType - The type of artifact that the ruleset validates. (required)
      description - A brief description of the ruleset. (optional)
      ruleCategory - Category the rules included in ruleset. (optional, default to SPECTRAL)
      documentationLink - URL to the documentation related to the ruleset. (optional)
      provider - Entity or individual providing the ruleset. (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