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.CustomFieldConfigurations;
import software.tnb.jira.validation.generated.model.PageBeanContextualConfiguration;
import java.util.Set;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class IssueCustomFieldConfigurationAppsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public IssueCustomFieldConfigurationAppsApi() {
this(Configuration.getDefaultApiClient());
}
public IssueCustomFieldConfigurationAppsApi(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 getCustomFieldConfiguration
* @param fieldIdOrKey The ID or key of the custom field, for example `customfield_10000`. (required)
* @param id The list of configuration IDs. To include multiple configurations, separate IDs with an ampersand: `id=10000&id=10001`. Can't be provided with `fieldContextId`, `issueId`, `projectKeyOrId`, or `issueTypeId`. (optional)
* @param fieldContextId The list of field context IDs. To include multiple field contexts, separate IDs with an ampersand: `fieldContextId=10000&fieldContextId=10001`. Can't be provided with `id`, `issueId`, `projectKeyOrId`, or `issueTypeId`. (optional)
* @param issueId The ID of the issue to filter results by. If the issue doesn't exist, an empty list is returned. Can't be provided with `projectKeyOrId`, or `issueTypeId`. (optional)
* @param projectKeyOrId The ID or key of the project to filter results by. Must be provided with `issueTypeId`. Can't be provided with `issueId`. (optional)
* @param issueTypeId The ID of the issue type to filter results by. Must be provided with `projectKeyOrId`. Can't be provided with `issueId`. (optional)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 100)
* @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 is not a Jira admin or the request is not authenticated as from the app that provided the field.
-
404
Returned if the custom field is not found.
-
*/
public okhttp3.Call getCustomFieldConfigurationCall(String fieldIdOrKey, Set id, Set fieldContextId, Long issueId, String projectKeyOrId, String issueTypeId, Long startAt, Integer maxResults, 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/app/field/{fieldIdOrKey}/context/configuration"
.replace("{" + "fieldIdOrKey" + "}", localVarApiClient.escapeString(fieldIdOrKey.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (id != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "id", id));
}
if (fieldContextId != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fieldContextId", fieldContextId));
}
if (issueId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("issueId", issueId));
}
if (projectKeyOrId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("projectKeyOrId", projectKeyOrId));
}
if (issueTypeId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("issueTypeId", issueTypeId));
}
if (startAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt));
}
if (maxResults != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults));
}
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 getCustomFieldConfigurationValidateBeforeCall(String fieldIdOrKey, Set id, Set fieldContextId, Long issueId, String projectKeyOrId, String issueTypeId, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'fieldIdOrKey' is set
if (fieldIdOrKey == null) {
throw new ApiException("Missing the required parameter 'fieldIdOrKey' when calling getCustomFieldConfiguration(Async)");
}
return getCustomFieldConfigurationCall(fieldIdOrKey, id, fieldContextId, issueId, projectKeyOrId, issueTypeId, startAt, maxResults, _callback);
}
/**
* Get custom field configurations
* Returns a [paginated](#pagination) list of configurations for a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/). The result can be filtered by one of these criteria: * `id`. * `fieldContextId`. * `issueId`. * `projectKeyOrId` and `issueTypeId`. Otherwise, all configurations are returned. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the Forge app that created the custom field.
* @param fieldIdOrKey The ID or key of the custom field, for example `customfield_10000`. (required)
* @param id The list of configuration IDs. To include multiple configurations, separate IDs with an ampersand: `id=10000&id=10001`. Can't be provided with `fieldContextId`, `issueId`, `projectKeyOrId`, or `issueTypeId`. (optional)
* @param fieldContextId The list of field context IDs. To include multiple field contexts, separate IDs with an ampersand: `fieldContextId=10000&fieldContextId=10001`. Can't be provided with `id`, `issueId`, `projectKeyOrId`, or `issueTypeId`. (optional)
* @param issueId The ID of the issue to filter results by. If the issue doesn't exist, an empty list is returned. Can't be provided with `projectKeyOrId`, or `issueTypeId`. (optional)
* @param projectKeyOrId The ID or key of the project to filter results by. Must be provided with `issueTypeId`. Can't be provided with `issueId`. (optional)
* @param issueTypeId The ID of the issue type to filter results by. Must be provided with `projectKeyOrId`. Can't be provided with `issueId`. (optional)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 100)
* @return PageBeanContextualConfiguration
* @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 is not a Jira admin or the request is not authenticated as from the app that provided the field.
-
404
Returned if the custom field is not found.
-
*/
public PageBeanContextualConfiguration getCustomFieldConfiguration(String fieldIdOrKey, Set id, Set fieldContextId, Long issueId, String projectKeyOrId, String issueTypeId, Long startAt, Integer maxResults) throws ApiException {
ApiResponse localVarResp = getCustomFieldConfigurationWithHttpInfo(fieldIdOrKey, id, fieldContextId, issueId, projectKeyOrId, issueTypeId, startAt, maxResults);
return localVarResp.getData();
}
/**
* Get custom field configurations
* Returns a [paginated](#pagination) list of configurations for a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/). The result can be filtered by one of these criteria: * `id`. * `fieldContextId`. * `issueId`. * `projectKeyOrId` and `issueTypeId`. Otherwise, all configurations are returned. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the Forge app that created the custom field.
* @param fieldIdOrKey The ID or key of the custom field, for example `customfield_10000`. (required)
* @param id The list of configuration IDs. To include multiple configurations, separate IDs with an ampersand: `id=10000&id=10001`. Can't be provided with `fieldContextId`, `issueId`, `projectKeyOrId`, or `issueTypeId`. (optional)
* @param fieldContextId The list of field context IDs. To include multiple field contexts, separate IDs with an ampersand: `fieldContextId=10000&fieldContextId=10001`. Can't be provided with `id`, `issueId`, `projectKeyOrId`, or `issueTypeId`. (optional)
* @param issueId The ID of the issue to filter results by. If the issue doesn't exist, an empty list is returned. Can't be provided with `projectKeyOrId`, or `issueTypeId`. (optional)
* @param projectKeyOrId The ID or key of the project to filter results by. Must be provided with `issueTypeId`. Can't be provided with `issueId`. (optional)
* @param issueTypeId The ID of the issue type to filter results by. Must be provided with `projectKeyOrId`. Can't be provided with `issueId`. (optional)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 100)
* @return ApiResponse<PageBeanContextualConfiguration>
* @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 is not a Jira admin or the request is not authenticated as from the app that provided the field.
-
404
Returned if the custom field is not found.
-
*/
public ApiResponse getCustomFieldConfigurationWithHttpInfo(String fieldIdOrKey, Set id, Set fieldContextId, Long issueId, String projectKeyOrId, String issueTypeId, Long startAt, Integer maxResults) throws ApiException {
okhttp3.Call localVarCall = getCustomFieldConfigurationValidateBeforeCall(fieldIdOrKey, id, fieldContextId, issueId, projectKeyOrId, issueTypeId, startAt, maxResults, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get custom field configurations (asynchronously)
* Returns a [paginated](#pagination) list of configurations for a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/). The result can be filtered by one of these criteria: * `id`. * `fieldContextId`. * `issueId`. * `projectKeyOrId` and `issueTypeId`. Otherwise, all configurations are returned. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the Forge app that created the custom field.
* @param fieldIdOrKey The ID or key of the custom field, for example `customfield_10000`. (required)
* @param id The list of configuration IDs. To include multiple configurations, separate IDs with an ampersand: `id=10000&id=10001`. Can't be provided with `fieldContextId`, `issueId`, `projectKeyOrId`, or `issueTypeId`. (optional)
* @param fieldContextId The list of field context IDs. To include multiple field contexts, separate IDs with an ampersand: `fieldContextId=10000&fieldContextId=10001`. Can't be provided with `id`, `issueId`, `projectKeyOrId`, or `issueTypeId`. (optional)
* @param issueId The ID of the issue to filter results by. If the issue doesn't exist, an empty list is returned. Can't be provided with `projectKeyOrId`, or `issueTypeId`. (optional)
* @param projectKeyOrId The ID or key of the project to filter results by. Must be provided with `issueTypeId`. Can't be provided with `issueId`. (optional)
* @param issueTypeId The ID of the issue type to filter results by. Must be provided with `projectKeyOrId`. Can't be provided with `issueId`. (optional)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0)
* @param maxResults The maximum number of items to return per page. (optional, default to 100)
* @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 is not a Jira admin or the request is not authenticated as from the app that provided the field.
-
404
Returned if the custom field is not found.
-
*/
public okhttp3.Call getCustomFieldConfigurationAsync(String fieldIdOrKey, Set id, Set fieldContextId, Long issueId, String projectKeyOrId, String issueTypeId, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getCustomFieldConfigurationValidateBeforeCall(fieldIdOrKey, id, fieldContextId, issueId, projectKeyOrId, issueTypeId, startAt, maxResults, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateCustomFieldConfiguration
* @param fieldIdOrKey The ID or key of the custom field, for example `customfield_10000`. (required)
* @param customFieldConfigurations (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 is not a Jira admin or the request is not authenticated as from the app that provided the field.
-
404
Returned if the custom field is not found.
-
*/
public okhttp3.Call updateCustomFieldConfigurationCall(String fieldIdOrKey, CustomFieldConfigurations customFieldConfigurations, 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 = customFieldConfigurations;
// create path and map variables
String localVarPath = "/rest/api/3/app/field/{fieldIdOrKey}/context/configuration"
.replace("{" + "fieldIdOrKey" + "}", localVarApiClient.escapeString(fieldIdOrKey.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 updateCustomFieldConfigurationValidateBeforeCall(String fieldIdOrKey, CustomFieldConfigurations customFieldConfigurations, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'fieldIdOrKey' is set
if (fieldIdOrKey == null) {
throw new ApiException("Missing the required parameter 'fieldIdOrKey' when calling updateCustomFieldConfiguration(Async)");
}
// verify the required parameter 'customFieldConfigurations' is set
if (customFieldConfigurations == null) {
throw new ApiException("Missing the required parameter 'customFieldConfigurations' when calling updateCustomFieldConfiguration(Async)");
}
return updateCustomFieldConfigurationCall(fieldIdOrKey, customFieldConfigurations, _callback);
}
/**
* Update custom field configurations
* Update the configuration for contexts of a custom field created by a [Forge app](https://developer.atlassian.com/platform/forge/). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the Forge app that created the custom field.
* @param fieldIdOrKey The ID or key of the custom field, for example `customfield_10000`. (required)
* @param customFieldConfigurations (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 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 is not a Jira admin or the request is not authenticated as from the app that provided the field.