All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.tnb.jira.validation.generated.api.AuditRecordsApi Maven / Gradle / Ivy

The newest version!
/*
 * The Jira Cloud platform REST API
 * Jira Cloud platform REST API documentation
 *
 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package software.tnb.jira.validation.generated.api;

import software.tnb.jira.validation.generated.ApiCallback;
import software.tnb.jira.validation.generated.ApiClient;
import software.tnb.jira.validation.generated.ApiException;
import software.tnb.jira.validation.generated.ApiResponse;
import software.tnb.jira.validation.generated.Configuration;
import software.tnb.jira.validation.generated.Pair;
import software.tnb.jira.validation.generated.ProgressRequestBody;
import software.tnb.jira.validation.generated.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import software.tnb.jira.validation.generated.model.AuditRecords;
import java.time.OffsetDateTime;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AuditRecordsApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public AuditRecordsApi() {
        this(Configuration.getDefaultApiClient());
    }

    public AuditRecordsApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    /**
     * Build call for getAuditRecords
     * @param offset The number of records to skip before returning the first result. (optional, default to 0)
     * @param limit The maximum number of results to return. (optional, default to 1000)
     * @param filter The strings to match with audit field content, space separated. (optional)
     * @param from The date and time on or after which returned audit records must have been created. If `to` is provided `from` must be before `to` or no audit records are returned. (optional)
     * @param to The date and time on or before which returned audit results must have been created. If `from` is provided `to` must be after `from` or no audit records are returned. (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if: * the user does not have the required permissions. * all Jira products are on free plans. Audit logs are available when at least one Jira product is on a paid plan. -
*/ public okhttp3.Call getAuditRecordsCall(Integer offset, Integer limit, String filter, String from, String to, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/auditing/record"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (offset != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } if (from != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("from", from)); } if (to != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("to", to)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAuditRecordsValidateBeforeCall(Integer offset, Integer limit, String filter, String from, String to, final ApiCallback _callback) throws ApiException { return getAuditRecordsCall(offset, limit, filter, from, to, _callback); } /** * Get audit records * Returns a list of audit records. The list can be filtered to include items: * where each item in `filter` has at least one match in any of these fields: * `summary` * `category` * `eventSource` * `objectItem.name` If the object is a user, account ID is available to filter. * `objectItem.parentName` * `objectItem.typeName` * `changedValues.changedFrom` * `changedValues.changedTo` * `remoteAddress` For example, if `filter` contains *man ed*, an audit record containing `summary\": \"User added to group\"` and `\"category\": \"group management\"` is returned. * created on or after a date and time. * created or or before a date and time. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param offset The number of records to skip before returning the first result. (optional, default to 0) * @param limit The maximum number of results to return. (optional, default to 1000) * @param filter The strings to match with audit field content, space separated. (optional) * @param from The date and time on or after which returned audit records must have been created. If `to` is provided `from` must be before `to` or no audit records are returned. (optional) * @param to The date and time on or before which returned audit results must have been created. If `from` is provided `to` must be after `from` or no audit records are returned. (optional) * @return AuditRecords * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if: * the user does not have the required permissions. * all Jira products are on free plans. Audit logs are available when at least one Jira product is on a paid plan. -
*/ public AuditRecords getAuditRecords(Integer offset, Integer limit, String filter, String from, String to) throws ApiException { ApiResponse localVarResp = getAuditRecordsWithHttpInfo(offset, limit, filter, from, to); return localVarResp.getData(); } /** * Get audit records * Returns a list of audit records. The list can be filtered to include items: * where each item in `filter` has at least one match in any of these fields: * `summary` * `category` * `eventSource` * `objectItem.name` If the object is a user, account ID is available to filter. * `objectItem.parentName` * `objectItem.typeName` * `changedValues.changedFrom` * `changedValues.changedTo` * `remoteAddress` For example, if `filter` contains *man ed*, an audit record containing `summary\": \"User added to group\"` and `\"category\": \"group management\"` is returned. * created on or after a date and time. * created or or before a date and time. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param offset The number of records to skip before returning the first result. (optional, default to 0) * @param limit The maximum number of results to return. (optional, default to 1000) * @param filter The strings to match with audit field content, space separated. (optional) * @param from The date and time on or after which returned audit records must have been created. If `to` is provided `from` must be before `to` or no audit records are returned. (optional) * @param to The date and time on or before which returned audit results must have been created. If `from` is provided `to` must be after `from` or no audit records are returned. (optional) * @return ApiResponse<AuditRecords> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if: * the user does not have the required permissions. * all Jira products are on free plans. Audit logs are available when at least one Jira product is on a paid plan. -
*/ public ApiResponse getAuditRecordsWithHttpInfo(Integer offset, Integer limit, String filter, String from, String to) throws ApiException { okhttp3.Call localVarCall = getAuditRecordsValidateBeforeCall(offset, limit, filter, from, to, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get audit records (asynchronously) * Returns a list of audit records. The list can be filtered to include items: * where each item in `filter` has at least one match in any of these fields: * `summary` * `category` * `eventSource` * `objectItem.name` If the object is a user, account ID is available to filter. * `objectItem.parentName` * `objectItem.typeName` * `changedValues.changedFrom` * `changedValues.changedTo` * `remoteAddress` For example, if `filter` contains *man ed*, an audit record containing `summary\": \"User added to group\"` and `\"category\": \"group management\"` is returned. * created on or after a date and time. * created or or before a date and time. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param offset The number of records to skip before returning the first result. (optional, default to 0) * @param limit The maximum number of results to return. (optional, default to 1000) * @param filter The strings to match with audit field content, space separated. (optional) * @param from The date and time on or after which returned audit records must have been created. If `to` is provided `from` must be before `to` or no audit records are returned. (optional) * @param to The date and time on or before which returned audit results must have been created. If `from` is provided `to` must be after `from` or no audit records are returned. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if: * the user does not have the required permissions. * all Jira products are on free plans. Audit logs are available when at least one Jira product is on a paid plan. -
*/ public okhttp3.Call getAuditRecordsAsync(Integer offset, Integer limit, String filter, String from, String to, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAuditRecordsValidateBeforeCall(offset, limit, filter, from, to, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy