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

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

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

    public ProjectPropertiesApi(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 deleteProjectProperty
     * @param projectIdOrKey The project ID or project key (case sensitive). (required)
     * @param propertyKey The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of all project property keys. (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 project property is deleted. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to administer the project. -
404 Returned if the project or property is not found. -
*/ public okhttp3.Call deleteProjectPropertyCall(String projectIdOrKey, 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/project/{projectIdOrKey}/properties/{propertyKey}" .replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.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 deleteProjectPropertyValidateBeforeCall(String projectIdOrKey, String propertyKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectIdOrKey' is set if (projectIdOrKey == null) { throw new ApiException("Missing the required parameter 'projectIdOrKey' when calling deleteProjectProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling deleteProjectProperty(Async)"); } return deleteProjectPropertyCall(projectIdOrKey, propertyKey, _callback); } /** * Delete project property * Deletes the [property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties) from a project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the property. * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of all project property keys. (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 project property is deleted. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to administer the project. -
404 Returned if the project or property is not found. -
*/ public void deleteProjectProperty(String projectIdOrKey, String propertyKey) throws ApiException { deleteProjectPropertyWithHttpInfo(projectIdOrKey, propertyKey); } /** * Delete project property * Deletes the [property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties) from a project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the property. * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of all project property keys. (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 project property is deleted. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to administer the project. -
404 Returned if the project or property is not found. -
*/ public ApiResponse deleteProjectPropertyWithHttpInfo(String projectIdOrKey, String propertyKey) throws ApiException { okhttp3.Call localVarCall = deleteProjectPropertyValidateBeforeCall(projectIdOrKey, propertyKey, null); return localVarApiClient.execute(localVarCall); } /** * Delete project property (asynchronously) * Deletes the [property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties) from a project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the property. * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of all project property keys. (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 project property is deleted. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to administer the project. -
404 Returned if the project or property is not found. -
*/ public okhttp3.Call deleteProjectPropertyAsync(String projectIdOrKey, String propertyKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteProjectPropertyValidateBeforeCall(projectIdOrKey, propertyKey, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getProjectProperty * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of all project property keys. (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 not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to view the project. -
404 Returned if the project or property is not found. -
*/ public okhttp3.Call getProjectPropertyCall(String projectIdOrKey, 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/project/{projectIdOrKey}/properties/{propertyKey}" .replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.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 getProjectPropertyValidateBeforeCall(String projectIdOrKey, String propertyKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectIdOrKey' is set if (projectIdOrKey == null) { throw new ApiException("Missing the required parameter 'projectIdOrKey' when calling getProjectProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling getProjectProperty(Async)"); } return getProjectPropertyCall(projectIdOrKey, propertyKey, _callback); } /** * Get project property * Returns the value of a [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties). This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the property. * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of all project property keys. (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 not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to view the project. -
404 Returned if the project or property is not found. -
*/ public EntityProperty getProjectProperty(String projectIdOrKey, String propertyKey) throws ApiException { ApiResponse localVarResp = getProjectPropertyWithHttpInfo(projectIdOrKey, propertyKey); return localVarResp.getData(); } /** * Get project property * Returns the value of a [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties). This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the property. * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of all project property keys. (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 not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to view the project. -
404 Returned if the project or property is not found. -
*/ public ApiResponse getProjectPropertyWithHttpInfo(String projectIdOrKey, String propertyKey) throws ApiException { okhttp3.Call localVarCall = getProjectPropertyValidateBeforeCall(projectIdOrKey, propertyKey, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get project property (asynchronously) * Returns the value of a [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties). This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project containing the property. * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of all project property keys. (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 not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to view the project. -
404 Returned if the project or property is not found. -
*/ public okhttp3.Call getProjectPropertyAsync(String projectIdOrKey, String propertyKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getProjectPropertyValidateBeforeCall(projectIdOrKey, propertyKey, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getProjectPropertyKeys * @param projectIdOrKey The project ID or project key (case sensitive). (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 not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to view the project. -
404 Returned if the project is not found. -
*/ public okhttp3.Call getProjectPropertyKeysCall(String projectIdOrKey, 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/project/{projectIdOrKey}/properties" .replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.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 getProjectPropertyKeysValidateBeforeCall(String projectIdOrKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectIdOrKey' is set if (projectIdOrKey == null) { throw new ApiException("Missing the required parameter 'projectIdOrKey' when calling getProjectPropertyKeys(Async)"); } return getProjectPropertyKeysCall(projectIdOrKey, _callback); } /** * Get project property keys * Returns all [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties) keys for the project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * @param projectIdOrKey The project ID or project key (case sensitive). (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 request is not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to view the project. -
404 Returned if the project is not found. -
*/ public PropertyKeys getProjectPropertyKeys(String projectIdOrKey) throws ApiException { ApiResponse localVarResp = getProjectPropertyKeysWithHttpInfo(projectIdOrKey); return localVarResp.getData(); } /** * Get project property keys * Returns all [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties) keys for the project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * @param projectIdOrKey The project ID or project key (case sensitive). (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 request is not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to view the project. -
404 Returned if the project is not found. -
*/ public ApiResponse getProjectPropertyKeysWithHttpInfo(String projectIdOrKey) throws ApiException { okhttp3.Call localVarCall = getProjectPropertyKeysValidateBeforeCall(projectIdOrKey, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get project property keys (asynchronously) * Returns all [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties) keys for the project. This operation can be accessed anonymously. **[Permissions](#permissions) required:** *Browse Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * @param projectIdOrKey The project ID or project key (case sensitive). (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 not valid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to view the project. -
404 Returned if the project is not found. -
*/ public okhttp3.Call getProjectPropertyKeysAsync(String projectIdOrKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getProjectPropertyKeysValidateBeforeCall(projectIdOrKey, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for setProjectProperty * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The key of the project 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 project property is updated. -
201 Returned if the project property is created. -
400 Returned if the project key or id is invalid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to administer the project. -
404 Returned if the project is not found. -
*/ public okhttp3.Call setProjectPropertyCall(String projectIdOrKey, 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/project/{projectIdOrKey}/properties/{propertyKey}" .replace("{" + "projectIdOrKey" + "}", localVarApiClient.escapeString(projectIdOrKey.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 setProjectPropertyValidateBeforeCall(String projectIdOrKey, String propertyKey, Object body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectIdOrKey' is set if (projectIdOrKey == null) { throw new ApiException("Missing the required parameter 'projectIdOrKey' when calling setProjectProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling setProjectProperty(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling setProjectProperty(Async)"); } return setProjectPropertyCall(projectIdOrKey, propertyKey, body, _callback); } /** * Set project property * Sets the value of the [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties). You can use project properties to store custom data against the project. 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:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project in which the property is created. * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The key of the project 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 project property is updated. -
201 Returned if the project property is created. -
400 Returned if the project key or id is invalid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to administer the project. -
404 Returned if the project is not found. -
*/ public Object setProjectProperty(String projectIdOrKey, String propertyKey, Object body) throws ApiException { ApiResponse localVarResp = setProjectPropertyWithHttpInfo(projectIdOrKey, propertyKey, body); return localVarResp.getData(); } /** * Set project property * Sets the value of the [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties). You can use project properties to store custom data against the project. 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:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project in which the property is created. * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The key of the project 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 project property is updated. -
201 Returned if the project property is created. -
400 Returned if the project key or id is invalid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to administer the project. -
404 Returned if the project is not found. -
*/ public ApiResponse setProjectPropertyWithHttpInfo(String projectIdOrKey, String propertyKey, Object body) throws ApiException { okhttp3.Call localVarCall = setProjectPropertyValidateBeforeCall(projectIdOrKey, propertyKey, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set project property (asynchronously) * Sets the value of the [project property](https://developer.atlassian.com/cloud/jira/platform/storing-data-without-a-database/#a-id-jira-entity-properties-a-jira-entity-properties). You can use project properties to store custom data against the project. 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:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) or *Administer Projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project in which the property is created. * @param projectIdOrKey The project ID or project key (case sensitive). (required) * @param propertyKey The key of the project 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 project property is updated. -
201 Returned if the project property is created. -
400 Returned if the project key or id is invalid. -
401 Returned if the authentication credentials are incorrect. -
403 Returned if the user does not have permission to administer the project. -
404 Returned if the project is not found. -
*/ public okhttp3.Call setProjectPropertyAsync(String projectIdOrKey, String propertyKey, Object body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setProjectPropertyValidateBeforeCall(projectIdOrKey, propertyKey, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }