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

software.tnb.jira.validation.generated.api.IssueCommentPropertiesApi 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 IssueCommentPropertiesApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

    public IssueCommentPropertiesApi(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 deleteCommentProperty
     * @param commentId The ID of the comment. (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 request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment or the property is not found or the user has the necessary project permissions but isn't a member of the role or group visibility of the comment is restricted to. -
*/ public okhttp3.Call deleteCommentPropertyCall(String commentId, 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/comment/{commentId}/properties/{propertyKey}" .replace("{" + "commentId" + "}", localVarApiClient.escapeString(commentId.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 deleteCommentPropertyValidateBeforeCall(String commentId, String propertyKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'commentId' is set if (commentId == null) { throw new ApiException("Missing the required parameter 'commentId' when calling deleteCommentProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling deleteCommentProperty(Async)"); } return deleteCommentPropertyCall(commentId, propertyKey, _callback); } /** * Delete comment property * Deletes a comment property. **[Permissions](#permissions) required:** either of: * *Edit All Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete a property from any comment. * *Edit Own Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete a property from a comment created by the user. Also, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group. * @param commentId The ID of the comment. (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 request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment or the property is not found or the user has the necessary project permissions but isn't a member of the role or group visibility of the comment is restricted to. -
*/ public void deleteCommentProperty(String commentId, String propertyKey) throws ApiException { deleteCommentPropertyWithHttpInfo(commentId, propertyKey); } /** * Delete comment property * Deletes a comment property. **[Permissions](#permissions) required:** either of: * *Edit All Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete a property from any comment. * *Edit Own Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete a property from a comment created by the user. Also, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group. * @param commentId The ID of the comment. (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 request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment or the property is not found or the user has the necessary project permissions but isn't a member of the role or group visibility of the comment is restricted to. -
*/ public ApiResponse deleteCommentPropertyWithHttpInfo(String commentId, String propertyKey) throws ApiException { okhttp3.Call localVarCall = deleteCommentPropertyValidateBeforeCall(commentId, propertyKey, null); return localVarApiClient.execute(localVarCall); } /** * Delete comment property (asynchronously) * Deletes a comment property. **[Permissions](#permissions) required:** either of: * *Edit All Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete a property from any comment. * *Edit Own Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to delete a property from a comment created by the user. Also, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group. * @param commentId The ID of the comment. (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 request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment or the property is not found or the user has the necessary project permissions but isn't a member of the role or group visibility of the comment is restricted to. -
*/ public okhttp3.Call deleteCommentPropertyAsync(String commentId, String propertyKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteCommentPropertyValidateBeforeCall(commentId, propertyKey, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getCommentProperty * @param commentId The ID of the comment. (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 request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment or the property is not found. -
*/ public okhttp3.Call getCommentPropertyCall(String commentId, 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/comment/{commentId}/properties/{propertyKey}" .replace("{" + "commentId" + "}", localVarApiClient.escapeString(commentId.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 getCommentPropertyValidateBeforeCall(String commentId, String propertyKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'commentId' is set if (commentId == null) { throw new ApiException("Missing the required parameter 'commentId' when calling getCommentProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling getCommentProperty(Async)"); } return getCommentPropertyCall(commentId, propertyKey, _callback); } /** * Get comment property * Returns the value of a comment property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param commentId The ID of the comment. (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 request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment or the property is not found. -
*/ public EntityProperty getCommentProperty(String commentId, String propertyKey) throws ApiException { ApiResponse localVarResp = getCommentPropertyWithHttpInfo(commentId, propertyKey); return localVarResp.getData(); } /** * Get comment property * Returns the value of a comment property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param commentId The ID of the comment. (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 request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment or the property is not found. -
*/ public ApiResponse getCommentPropertyWithHttpInfo(String commentId, String propertyKey) throws ApiException { okhttp3.Call localVarCall = getCommentPropertyValidateBeforeCall(commentId, propertyKey, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get comment property (asynchronously) * Returns the value of a comment property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param commentId The ID of the comment. (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 request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment or the property is not found. -
*/ public okhttp3.Call getCommentPropertyAsync(String commentId, String propertyKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCommentPropertyValidateBeforeCall(commentId, propertyKey, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getCommentPropertyKeys * @param commentId The ID of the comment. (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 comment ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment is not found. -
*/ public okhttp3.Call getCommentPropertyKeysCall(String commentId, 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/comment/{commentId}/properties" .replace("{" + "commentId" + "}", localVarApiClient.escapeString(commentId.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 getCommentPropertyKeysValidateBeforeCall(String commentId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'commentId' is set if (commentId == null) { throw new ApiException("Missing the required parameter 'commentId' when calling getCommentPropertyKeys(Async)"); } return getCommentPropertyKeysCall(commentId, _callback); } /** * Get comment property keys * Returns the keys of all the properties of a comment. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param commentId The ID of the comment. (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 comment ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment is not found. -
*/ public PropertyKeys getCommentPropertyKeys(String commentId) throws ApiException { ApiResponse localVarResp = getCommentPropertyKeysWithHttpInfo(commentId); return localVarResp.getData(); } /** * Get comment property keys * Returns the keys of all the properties of a comment. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param commentId The ID of the comment. (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 comment ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment is not found. -
*/ public ApiResponse getCommentPropertyKeysWithHttpInfo(String commentId) throws ApiException { okhttp3.Call localVarCall = getCommentPropertyKeysValidateBeforeCall(commentId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get comment property keys (asynchronously) * Returns the keys of all the properties of a comment. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * If [issue-level security](https://confluence.atlassian.com/x/J4lKLg) is configured, issue-level security permission to view the issue. * If the comment has visibility restrictions, belongs to the group or has the role visibility is restricted to. * @param commentId The ID of the comment. (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 comment ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment is not found. -
*/ public okhttp3.Call getCommentPropertyKeysAsync(String commentId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCommentPropertyKeysValidateBeforeCall(commentId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for setCommentProperty * @param commentId The ID of the comment. (required) * @param propertyKey The key of the 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 comment property is updated. -
201 Returned if the comment property is created. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment is not found. -
*/ public okhttp3.Call setCommentPropertyCall(String commentId, 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/comment/{commentId}/properties/{propertyKey}" .replace("{" + "commentId" + "}", localVarApiClient.escapeString(commentId.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 setCommentPropertyValidateBeforeCall(String commentId, String propertyKey, Object body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'commentId' is set if (commentId == null) { throw new ApiException("Missing the required parameter 'commentId' when calling setCommentProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling setCommentProperty(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling setCommentProperty(Async)"); } return setCommentPropertyCall(commentId, propertyKey, body, _callback); } /** * Set comment property * Creates or updates the value of a property for a comment. Use this resource to store custom data against a comment. 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. **[Permissions](#permissions) required:** either of: * *Edit All Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to create or update the value of a property on any comment. * *Edit Own Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to create or update the value of a property on a comment created by the user. Also, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group. * @param commentId The ID of the comment. (required) * @param propertyKey The key of the 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 comment property is updated. -
201 Returned if the comment property is created. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment is not found. -
*/ public Object setCommentProperty(String commentId, String propertyKey, Object body) throws ApiException { ApiResponse localVarResp = setCommentPropertyWithHttpInfo(commentId, propertyKey, body); return localVarResp.getData(); } /** * Set comment property * Creates or updates the value of a property for a comment. Use this resource to store custom data against a comment. 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. **[Permissions](#permissions) required:** either of: * *Edit All Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to create or update the value of a property on any comment. * *Edit Own Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to create or update the value of a property on a comment created by the user. Also, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group. * @param commentId The ID of the comment. (required) * @param propertyKey The key of the 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 comment property is updated. -
201 Returned if the comment property is created. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment is not found. -
*/ public ApiResponse setCommentPropertyWithHttpInfo(String commentId, String propertyKey, Object body) throws ApiException { okhttp3.Call localVarCall = setCommentPropertyValidateBeforeCall(commentId, propertyKey, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set comment property (asynchronously) * Creates or updates the value of a property for a comment. Use this resource to store custom data against a comment. 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. **[Permissions](#permissions) required:** either of: * *Edit All Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to create or update the value of a property on any comment. * *Edit Own Comments* [project permission](https://confluence.atlassian.com/x/yodKLg) to create or update the value of a property on a comment created by the user. Also, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group. * @param commentId The ID of the comment. (required) * @param propertyKey The key of the 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 comment property is updated. -
201 Returned if the comment property is created. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the necessary permission. -
404 Returned if the comment is not found. -
*/ public okhttp3.Call setCommentPropertyAsync(String commentId, String propertyKey, Object body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setCommentPropertyValidateBeforeCall(commentId, propertyKey, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }