Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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 UserPropertiesApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public UserPropertiesApi() {
this(Configuration.getDefaultApiClient());
}
public UserPropertiesApi(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 deleteUserProperty
* @param propertyKey The key of the user's property. (required)
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the user property is deleted.
-
400
Returned if `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user or the property is not found.
-
*/
public okhttp3.Call deleteUserPropertyCall(String propertyKey, String accountId, String userKey, String username, 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/user/properties/{propertyKey}"
.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();
if (accountId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("accountId", accountId));
}
if (userKey != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("userKey", userKey));
}
if (username != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username));
}
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 deleteUserPropertyValidateBeforeCall(String propertyKey, String accountId, String userKey, String username, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'propertyKey' is set
if (propertyKey == null) {
throw new ApiException("Missing the required parameter 'propertyKey' when calling deleteUserProperty(Async)");
}
return deleteUserPropertyCall(propertyKey, accountId, userKey, username, _callback);
}
/**
* Delete user property
* Deletes a property from a user. Note: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira. **[Permissions](#permissions) required:** * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to delete a property from any user. * Access to Jira, to delete a property from the calling user's record.
* @param propertyKey The key of the user's property. (required)
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @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 user property is deleted.
-
400
Returned if `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user or the property is not found.
-
*/
public void deleteUserProperty(String propertyKey, String accountId, String userKey, String username) throws ApiException {
deleteUserPropertyWithHttpInfo(propertyKey, accountId, userKey, username);
}
/**
* Delete user property
* Deletes a property from a user. Note: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira. **[Permissions](#permissions) required:** * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to delete a property from any user. * Access to Jira, to delete a property from the calling user's record.
* @param propertyKey The key of the user's property. (required)
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @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 user property is deleted.
-
400
Returned if `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user or the property is not found.
-
*/
public ApiResponse deleteUserPropertyWithHttpInfo(String propertyKey, String accountId, String userKey, String username) throws ApiException {
okhttp3.Call localVarCall = deleteUserPropertyValidateBeforeCall(propertyKey, accountId, userKey, username, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete user property (asynchronously)
* Deletes a property from a user. Note: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira. **[Permissions](#permissions) required:** * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to delete a property from any user. * Access to Jira, to delete a property from the calling user's record.
* @param propertyKey The key of the user's property. (required)
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
Returned if the user property is deleted.
-
400
Returned if `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user or the property is not found.
-
*/
public okhttp3.Call deleteUserPropertyAsync(String propertyKey, String accountId, String userKey, String username, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteUserPropertyValidateBeforeCall(propertyKey, accountId, userKey, username, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getUserProperty
* @param propertyKey The key of the user's property. (required)
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
400
Returned if `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user is not found.
-
*/
public okhttp3.Call getUserPropertyCall(String propertyKey, String accountId, String userKey, String username, 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/user/properties/{propertyKey}"
.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();
if (accountId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("accountId", accountId));
}
if (userKey != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("userKey", userKey));
}
if (username != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username));
}
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 getUserPropertyValidateBeforeCall(String propertyKey, String accountId, String userKey, String username, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'propertyKey' is set
if (propertyKey == null) {
throw new ApiException("Missing the required parameter 'propertyKey' when calling getUserProperty(Async)");
}
return getUserPropertyCall(propertyKey, accountId, userKey, username, _callback);
}
/**
* Get user property
* Returns the value of a user's property. If no property key is provided [Get user property keys](#api-rest-api-3-user-properties-get) is called. Note: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira. **[Permissions](#permissions) required:** * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to get a property from any user. * Access to Jira, to get a property from the calling user's record.
* @param propertyKey The key of the user's property. (required)
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @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 `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user is not found.
-
*/
public EntityProperty getUserProperty(String propertyKey, String accountId, String userKey, String username) throws ApiException {
ApiResponse localVarResp = getUserPropertyWithHttpInfo(propertyKey, accountId, userKey, username);
return localVarResp.getData();
}
/**
* Get user property
* Returns the value of a user's property. If no property key is provided [Get user property keys](#api-rest-api-3-user-properties-get) is called. Note: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira. **[Permissions](#permissions) required:** * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to get a property from any user. * Access to Jira, to get a property from the calling user's record.
* @param propertyKey The key of the user's property. (required)
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @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 `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user is not found.
-
*/
public ApiResponse getUserPropertyWithHttpInfo(String propertyKey, String accountId, String userKey, String username) throws ApiException {
okhttp3.Call localVarCall = getUserPropertyValidateBeforeCall(propertyKey, accountId, userKey, username, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get user property (asynchronously)
* Returns the value of a user's property. If no property key is provided [Get user property keys](#api-rest-api-3-user-properties-get) is called. Note: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira. **[Permissions](#permissions) required:** * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to get a property from any user. * Access to Jira, to get a property from the calling user's record.
* @param propertyKey The key of the user's property. (required)
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
400
Returned if `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user is not found.
-
*/
public okhttp3.Call getUserPropertyAsync(String propertyKey, String accountId, String userKey, String username, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getUserPropertyValidateBeforeCall(propertyKey, accountId, userKey, username, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getUserPropertyKeys
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
400
Returned if `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user is not found.
-
*/
public okhttp3.Call getUserPropertyKeysCall(String accountId, String userKey, String username, 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/user/properties";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (accountId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("accountId", accountId));
}
if (userKey != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("userKey", userKey));
}
if (username != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username));
}
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 getUserPropertyKeysValidateBeforeCall(String accountId, String userKey, String username, final ApiCallback _callback) throws ApiException {
return getUserPropertyKeysCall(accountId, userKey, username, _callback);
}
/**
* Get user property keys
* Returns the keys of all properties for a user. Note: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira. **[Permissions](#permissions) required:** * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to access the property keys on any user. * Access to Jira, to access the calling user's property keys.
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @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 `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user is not found.
-
*/
public PropertyKeys getUserPropertyKeys(String accountId, String userKey, String username) throws ApiException {
ApiResponse localVarResp = getUserPropertyKeysWithHttpInfo(accountId, userKey, username);
return localVarResp.getData();
}
/**
* Get user property keys
* Returns the keys of all properties for a user. Note: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira. **[Permissions](#permissions) required:** * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to access the property keys on any user. * Access to Jira, to access the calling user's property keys.
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @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 `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user is not found.
-
*/
public ApiResponse getUserPropertyKeysWithHttpInfo(String accountId, String userKey, String username) throws ApiException {
okhttp3.Call localVarCall = getUserPropertyKeysValidateBeforeCall(accountId, userKey, username, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get user property keys (asynchronously)
* Returns the keys of all properties for a user. Note: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira. **[Permissions](#permissions) required:** * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to access the property keys on any user. * Access to Jira, to access the calling user's property keys.
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the request is successful.
-
400
Returned if `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user is not found.
-
*/
public okhttp3.Call getUserPropertyKeysAsync(String accountId, String userKey, String username, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getUserPropertyKeysValidateBeforeCall(accountId, userKey, username, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for setUserProperty
* @param propertyKey The key of the user's property. The maximum length is 255 characters. (required)
* @param body (required)
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Returned if the user property is updated.
-
201
Returned if the user property is created.
-
400
Returned if `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.
-
404
Returned if the user is not found.
-
405
Returned if the property key is not specified.
-
*/
public okhttp3.Call setUserPropertyCall(String propertyKey, Object body, String accountId, String userKey, String username, 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/user/properties/{propertyKey}"
.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();
if (accountId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("accountId", accountId));
}
if (userKey != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("userKey", userKey));
}
if (username != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username));
}
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 setUserPropertyValidateBeforeCall(String propertyKey, Object body, String accountId, String userKey, String username, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'propertyKey' is set
if (propertyKey == null) {
throw new ApiException("Missing the required parameter 'propertyKey' when calling setUserProperty(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling setUserProperty(Async)");
}
return setUserPropertyCall(propertyKey, body, accountId, userKey, username, _callback);
}
/**
* Set user property
* Sets the value of a user's property. Use this resource to store custom data against a user. Note: This operation does not access the [user properties](https://confluence.atlassian.com/x/8YxjL) created and maintained in Jira. **[Permissions](#permissions) required:** * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg), to set a property on any user. * Access to Jira, to set a property on the calling user's record.
* @param propertyKey The key of the user's property. The maximum length is 255 characters. (required)
* @param body (required)
* @param accountId The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. (optional)
* @param userKey This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @param username This parameter is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. (optional)
* @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 user property is updated.
-
201
Returned if the user property is created.
-
400
Returned if `accountId` is missing.
-
401
Returned if the authentication credentials are incorrect or missing.
-
403
Returned if the user does not have the necessary permission or is not accessing their user record.