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

software.tnb.jira.validation.generated.api.IssueWorklogPropertiesApi 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.EntityProperty;
import software.tnb.jira.validation.generated.model.PropertyKeys;

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

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

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

    public IssueWorklogPropertiesApi(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 deleteWorklogProperty
     * @param issueIdOrKey The ID or key of the issue. (required)
     * @param worklogId The ID of the worklog. (required)
     * @param propertyKey The key of the property. (required)
     * @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
204 Returned if the worklog property is removed. -
400 Returned if the worklog key or id is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have permission to edit the worklog. -
404 Returned if: * the issue, worklog, or property is not found. * the user does not have permission to view the issue or worklog. -
*/ public okhttp3.Call deleteWorklogPropertyCall(String issueIdOrKey, String worklogId, String propertyKey, 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/issue/{issueIdOrKey}/worklog/{worklogId}/properties/{propertyKey}" .replace("{" + "issueIdOrKey" + "}", localVarApiClient.escapeString(issueIdOrKey.toString())) .replace("{" + "worklogId" + "}", localVarApiClient.escapeString(worklogId.toString())) .replace("{" + "propertyKey" + "}", localVarApiClient.escapeString(propertyKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { }; 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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteWorklogPropertyValidateBeforeCall(String issueIdOrKey, String worklogId, String propertyKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'issueIdOrKey' is set if (issueIdOrKey == null) { throw new ApiException("Missing the required parameter 'issueIdOrKey' when calling deleteWorklogProperty(Async)"); } // verify the required parameter 'worklogId' is set if (worklogId == null) { throw new ApiException("Missing the required parameter 'worklogId' when calling deleteWorklogProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling deleteWorklogProperty(Async)"); } return deleteWorklogPropertyCall(issueIdOrKey, worklogId, propertyKey, _callback); } /** * Delete worklog property * Deletes a worklog property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the property. (required) * @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
204 Returned if the worklog property is removed. -
400 Returned if the worklog key or id is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have permission to edit the worklog. -
404 Returned if: * the issue, worklog, or property is not found. * the user does not have permission to view the issue or worklog. -
*/ public void deleteWorklogProperty(String issueIdOrKey, String worklogId, String propertyKey) throws ApiException { deleteWorklogPropertyWithHttpInfo(issueIdOrKey, worklogId, propertyKey); } /** * Delete worklog property * Deletes a worklog property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the property. (required) * @return ApiResponse<Void> * @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
204 Returned if the worklog property is removed. -
400 Returned if the worklog key or id is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have permission to edit the worklog. -
404 Returned if: * the issue, worklog, or property is not found. * the user does not have permission to view the issue or worklog. -
*/ public ApiResponse deleteWorklogPropertyWithHttpInfo(String issueIdOrKey, String worklogId, String propertyKey) throws ApiException { okhttp3.Call localVarCall = deleteWorklogPropertyValidateBeforeCall(issueIdOrKey, worklogId, propertyKey, null); return localVarApiClient.execute(localVarCall); } /** * Delete worklog property (asynchronously) * Deletes a worklog property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the property. (required) * @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
204 Returned if the worklog property is removed. -
400 Returned if the worklog key or id is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have permission to edit the worklog. -
404 Returned if: * the issue, worklog, or property is not found. * the user does not have permission to view the issue or worklog. -
*/ public okhttp3.Call deleteWorklogPropertyAsync(String issueIdOrKey, String worklogId, String propertyKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWorklogPropertyValidateBeforeCall(issueIdOrKey, worklogId, propertyKey, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getWorklogProperty * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the property. (required) * @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. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue, worklog, or property is not found. * the user does not have permission to view the issue or worklog. -
*/ public okhttp3.Call getWorklogPropertyCall(String issueIdOrKey, String worklogId, String propertyKey, 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/issue/{issueIdOrKey}/worklog/{worklogId}/properties/{propertyKey}" .replace("{" + "issueIdOrKey" + "}", localVarApiClient.escapeString(issueIdOrKey.toString())) .replace("{" + "worklogId" + "}", localVarApiClient.escapeString(worklogId.toString())) .replace("{" + "propertyKey" + "}", localVarApiClient.escapeString(propertyKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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 getWorklogPropertyValidateBeforeCall(String issueIdOrKey, String worklogId, String propertyKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'issueIdOrKey' is set if (issueIdOrKey == null) { throw new ApiException("Missing the required parameter 'issueIdOrKey' when calling getWorklogProperty(Async)"); } // verify the required parameter 'worklogId' is set if (worklogId == null) { throw new ApiException("Missing the required parameter 'worklogId' when calling getWorklogProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling getWorklogProperty(Async)"); } return getWorklogPropertyCall(issueIdOrKey, worklogId, propertyKey, _callback); } /** * Get worklog property * Returns the value of a worklog property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the property. (required) * @return EntityProperty * @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. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue, worklog, or property is not found. * the user does not have permission to view the issue or worklog. -
*/ public EntityProperty getWorklogProperty(String issueIdOrKey, String worklogId, String propertyKey) throws ApiException { ApiResponse localVarResp = getWorklogPropertyWithHttpInfo(issueIdOrKey, worklogId, propertyKey); return localVarResp.getData(); } /** * Get worklog property * Returns the value of a worklog property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the property. (required) * @return ApiResponse<EntityProperty> * @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. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue, worklog, or property is not found. * the user does not have permission to view the issue or worklog. -
*/ public ApiResponse getWorklogPropertyWithHttpInfo(String issueIdOrKey, String worklogId, String propertyKey) throws ApiException { okhttp3.Call localVarCall = getWorklogPropertyValidateBeforeCall(issueIdOrKey, worklogId, propertyKey, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get worklog property (asynchronously) * Returns the value of a worklog property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the property. (required) * @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. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue, worklog, or property is not found. * the user does not have permission to view the issue or worklog. -
*/ public okhttp3.Call getWorklogPropertyAsync(String issueIdOrKey, String worklogId, String propertyKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorklogPropertyValidateBeforeCall(issueIdOrKey, worklogId, propertyKey, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getWorklogPropertyKeys * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @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. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue or worklog is not found. * the user does not have permission to view the issue or worklog. -
*/ public okhttp3.Call getWorklogPropertyKeysCall(String issueIdOrKey, String worklogId, 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/issue/{issueIdOrKey}/worklog/{worklogId}/properties" .replace("{" + "issueIdOrKey" + "}", localVarApiClient.escapeString(issueIdOrKey.toString())) .replace("{" + "worklogId" + "}", localVarApiClient.escapeString(worklogId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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 getWorklogPropertyKeysValidateBeforeCall(String issueIdOrKey, String worklogId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'issueIdOrKey' is set if (issueIdOrKey == null) { throw new ApiException("Missing the required parameter 'issueIdOrKey' when calling getWorklogPropertyKeys(Async)"); } // verify the required parameter 'worklogId' is set if (worklogId == null) { throw new ApiException("Missing the required parameter 'worklogId' when calling getWorklogPropertyKeys(Async)"); } return getWorklogPropertyKeysCall(issueIdOrKey, worklogId, _callback); } /** * Get worklog property keys * Returns the keys of all properties for a worklog. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @return PropertyKeys * @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. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue or worklog is not found. * the user does not have permission to view the issue or worklog. -
*/ public PropertyKeys getWorklogPropertyKeys(String issueIdOrKey, String worklogId) throws ApiException { ApiResponse localVarResp = getWorklogPropertyKeysWithHttpInfo(issueIdOrKey, worklogId); return localVarResp.getData(); } /** * Get worklog property keys * Returns the keys of all properties for a worklog. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @return ApiResponse<PropertyKeys> * @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. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue or worklog is not found. * the user does not have permission to view the issue or worklog. -
*/ public ApiResponse getWorklogPropertyKeysWithHttpInfo(String issueIdOrKey, String worklogId) throws ApiException { okhttp3.Call localVarCall = getWorklogPropertyKeysValidateBeforeCall(issueIdOrKey, worklogId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get worklog property keys (asynchronously) * Returns the keys of all properties for a worklog. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @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. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if: * the issue or worklog is not found. * the user does not have permission to view the issue or worklog. -
*/ public okhttp3.Call getWorklogPropertyKeysAsync(String issueIdOrKey, String worklogId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWorklogPropertyKeysValidateBeforeCall(issueIdOrKey, worklogId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for setWorklogProperty * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the issue property. The maximum length is 255 characters. (required) * @param body (required) * @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 worklog property is updated. -
201 Returned if the worklog property is created. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have permission to edit the worklog. -
404 Returned if: * the issue or worklog is not found. * the user does not have permission to view the issue or worklog. -
*/ public okhttp3.Call setWorklogPropertyCall(String issueIdOrKey, String worklogId, String propertyKey, Object body, 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 = body; // create path and map variables String localVarPath = "/rest/api/3/issue/{issueIdOrKey}/worklog/{worklogId}/properties/{propertyKey}" .replace("{" + "issueIdOrKey" + "}", localVarApiClient.escapeString(issueIdOrKey.toString())) .replace("{" + "worklogId" + "}", localVarApiClient.escapeString(worklogId.toString())) .replace("{" + "propertyKey" + "}", localVarApiClient.escapeString(propertyKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; 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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call setWorklogPropertyValidateBeforeCall(String issueIdOrKey, String worklogId, String propertyKey, Object body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'issueIdOrKey' is set if (issueIdOrKey == null) { throw new ApiException("Missing the required parameter 'issueIdOrKey' when calling setWorklogProperty(Async)"); } // verify the required parameter 'worklogId' is set if (worklogId == null) { throw new ApiException("Missing the required parameter 'worklogId' when calling setWorklogProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling setWorklogProperty(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling setWorklogProperty(Async)"); } return setWorklogPropertyCall(issueIdOrKey, worklogId, propertyKey, body, _callback); } /** * Set worklog property * Sets the value of a worklog property. Use this operation to store custom data against the worklog. The value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * *Edit all worklogs*[ project permission](https://confluence.atlassian.com/x/yodKLg) to update any worklog or *Edit own worklogs* to update worklogs created by the user. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the issue property. The maximum length is 255 characters. (required) * @param body (required) * @return Object * @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 worklog property is updated. -
201 Returned if the worklog property is created. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have permission to edit the worklog. -
404 Returned if: * the issue or worklog is not found. * the user does not have permission to view the issue or worklog. -
*/ public Object setWorklogProperty(String issueIdOrKey, String worklogId, String propertyKey, Object body) throws ApiException { ApiResponse localVarResp = setWorklogPropertyWithHttpInfo(issueIdOrKey, worklogId, propertyKey, body); return localVarResp.getData(); } /** * Set worklog property * Sets the value of a worklog property. Use this operation to store custom data against the worklog. The value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * *Edit all worklogs*[ project permission](https://confluence.atlassian.com/x/yodKLg) to update any worklog or *Edit own worklogs* to update worklogs created by the user. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the issue property. The maximum length is 255 characters. (required) * @param body (required) * @return ApiResponse<Object> * @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 worklog property is updated. -
201 Returned if the worklog property is created. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have permission to edit the worklog. -
404 Returned if: * the issue or worklog is not found. * the user does not have permission to view the issue or worklog. -
*/ public ApiResponse setWorklogPropertyWithHttpInfo(String issueIdOrKey, String worklogId, String propertyKey, Object body) throws ApiException { okhttp3.Call localVarCall = setWorklogPropertyValidateBeforeCall(issueIdOrKey, worklogId, propertyKey, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set worklog property (asynchronously) * Sets the value of a worklog property. Use this operation to store custom data against the worklog. The value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project that the issue is in. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * *Edit all worklogs*[ project permission](https://confluence.atlassian.com/x/yodKLg) to update any worklog or *Edit own worklogs* to update worklogs created by the user. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param issueIdOrKey The ID or key of the issue. (required) * @param worklogId The ID of the worklog. (required) * @param propertyKey The key of the issue property. The maximum length is 255 characters. (required) * @param body (required) * @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 worklog property is updated. -
201 Returned if the worklog property is created. -
400 Returned if the worklog ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have permission to edit the worklog. -
404 Returned if: * the issue or worklog is not found. * the user does not have permission to view the issue or worklog. -
*/ public okhttp3.Call setWorklogPropertyAsync(String issueIdOrKey, String worklogId, String propertyKey, Object body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setWorklogPropertyValidateBeforeCall(issueIdOrKey, worklogId, propertyKey, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }