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

software.tnb.jira.validation.generated.api.IssueCustomFieldContextsApi 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.CreateCustomFieldContext;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueUpdate;
import software.tnb.jira.validation.generated.model.CustomFieldContextUpdateDetails;
import software.tnb.jira.validation.generated.model.IssueTypeIds;
import software.tnb.jira.validation.generated.model.PageBeanContextForProjectAndIssueType;
import software.tnb.jira.validation.generated.model.PageBeanCustomFieldContext;
import software.tnb.jira.validation.generated.model.PageBeanCustomFieldContextDefaultValue;
import software.tnb.jira.validation.generated.model.PageBeanCustomFieldContextProjectMapping;
import software.tnb.jira.validation.generated.model.PageBeanIssueTypeToContextMapping;
import software.tnb.jira.validation.generated.model.ProjectIds;
import software.tnb.jira.validation.generated.model.ProjectIssueTypeMappings;
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 IssueCustomFieldContextsApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

    public IssueCustomFieldContextsApi(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 addIssueTypesToContext
     * @param fieldId The ID of the custom field. (required)
     * @param contextId The ID of the context. (required)
     * @param issueTypeIds  (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 operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more issue types are not found. -
409 Returned if the issue type is a sub-task, but sub-tasks are disabled in Jira settings. -
*/ public okhttp3.Call addIssueTypesToContextCall(String fieldId, Long contextId, IssueTypeIds issueTypeIds, 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 = issueTypeIds; // create path and map variables String localVarPath = "/rest/api/3/field/{fieldId}/context/{contextId}/issuetype" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())) .replace("{" + "contextId" + "}", localVarApiClient.escapeString(contextId.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 addIssueTypesToContextValidateBeforeCall(String fieldId, Long contextId, IssueTypeIds issueTypeIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling addIssueTypesToContext(Async)"); } // verify the required parameter 'contextId' is set if (contextId == null) { throw new ApiException("Missing the required parameter 'contextId' when calling addIssueTypesToContext(Async)"); } // verify the required parameter 'issueTypeIds' is set if (issueTypeIds == null) { throw new ApiException("Missing the required parameter 'issueTypeIds' when calling addIssueTypesToContext(Async)"); } return addIssueTypesToContextCall(fieldId, contextId, issueTypeIds, _callback); } /** * Add issue types to context * Adds issue types to a custom field context, appending the issue types to the issue types list. A custom field context without any issue types applies to all issue types. Adding issue types to such a custom field context would result in it applying to only the listed issue types. If any of the issue types exists in the custom field context, the operation fails and no issue types are added. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param issueTypeIds (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
204 Returned if operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more issue types are not found. -
409 Returned if the issue type is a sub-task, but sub-tasks are disabled in Jira settings. -
*/ public Object addIssueTypesToContext(String fieldId, Long contextId, IssueTypeIds issueTypeIds) throws ApiException { ApiResponse localVarResp = addIssueTypesToContextWithHttpInfo(fieldId, contextId, issueTypeIds); return localVarResp.getData(); } /** * Add issue types to context * Adds issue types to a custom field context, appending the issue types to the issue types list. A custom field context without any issue types applies to all issue types. Adding issue types to such a custom field context would result in it applying to only the listed issue types. If any of the issue types exists in the custom field context, the operation fails and no issue types are added. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param issueTypeIds (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
204 Returned if operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more issue types are not found. -
409 Returned if the issue type is a sub-task, but sub-tasks are disabled in Jira settings. -
*/ public ApiResponse addIssueTypesToContextWithHttpInfo(String fieldId, Long contextId, IssueTypeIds issueTypeIds) throws ApiException { okhttp3.Call localVarCall = addIssueTypesToContextValidateBeforeCall(fieldId, contextId, issueTypeIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add issue types to context (asynchronously) * Adds issue types to a custom field context, appending the issue types to the issue types list. A custom field context without any issue types applies to all issue types. Adding issue types to such a custom field context would result in it applying to only the listed issue types. If any of the issue types exists in the custom field context, the operation fails and no issue types are added. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param issueTypeIds (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 operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more issue types are not found. -
409 Returned if the issue type is a sub-task, but sub-tasks are disabled in Jira settings. -
*/ public okhttp3.Call addIssueTypesToContextAsync(String fieldId, Long contextId, IssueTypeIds issueTypeIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addIssueTypesToContextValidateBeforeCall(fieldId, contextId, issueTypeIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for assignProjectsToCustomFieldContext * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param projectIds (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 operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or project is not found. -
*/ public okhttp3.Call assignProjectsToCustomFieldContextCall(String fieldId, Long contextId, ProjectIds projectIds, 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 = projectIds; // create path and map variables String localVarPath = "/rest/api/3/field/{fieldId}/context/{contextId}/project" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())) .replace("{" + "contextId" + "}", localVarApiClient.escapeString(contextId.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 assignProjectsToCustomFieldContextValidateBeforeCall(String fieldId, Long contextId, ProjectIds projectIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling assignProjectsToCustomFieldContext(Async)"); } // verify the required parameter 'contextId' is set if (contextId == null) { throw new ApiException("Missing the required parameter 'contextId' when calling assignProjectsToCustomFieldContext(Async)"); } // verify the required parameter 'projectIds' is set if (projectIds == null) { throw new ApiException("Missing the required parameter 'projectIds' when calling assignProjectsToCustomFieldContext(Async)"); } return assignProjectsToCustomFieldContextCall(fieldId, contextId, projectIds, _callback); } /** * Assign custom field context to projects * Assigns a custom field context to projects. If any project in the request is assigned to any context of the custom field, the operation fails. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param projectIds (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
204 Returned if operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or project is not found. -
*/ public Object assignProjectsToCustomFieldContext(String fieldId, Long contextId, ProjectIds projectIds) throws ApiException { ApiResponse localVarResp = assignProjectsToCustomFieldContextWithHttpInfo(fieldId, contextId, projectIds); return localVarResp.getData(); } /** * Assign custom field context to projects * Assigns a custom field context to projects. If any project in the request is assigned to any context of the custom field, the operation fails. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param projectIds (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
204 Returned if operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or project is not found. -
*/ public ApiResponse assignProjectsToCustomFieldContextWithHttpInfo(String fieldId, Long contextId, ProjectIds projectIds) throws ApiException { okhttp3.Call localVarCall = assignProjectsToCustomFieldContextValidateBeforeCall(fieldId, contextId, projectIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Assign custom field context to projects (asynchronously) * Assigns a custom field context to projects. If any project in the request is assigned to any context of the custom field, the operation fails. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param projectIds (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 operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or project is not found. -
*/ public okhttp3.Call assignProjectsToCustomFieldContextAsync(String fieldId, Long contextId, ProjectIds projectIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = assignProjectsToCustomFieldContextValidateBeforeCall(fieldId, contextId, projectIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createCustomFieldContext * @param fieldId The ID of the custom field. (required) * @param createCustomFieldContext (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
201 Returned if the custom field context is created. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field, project, or issue type is not found. -
409 Returned if the issue type is a sub-task, but sub-tasks are disabled in Jira settings. -
*/ public okhttp3.Call createCustomFieldContextCall(String fieldId, CreateCustomFieldContext createCustomFieldContext, 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 = createCustomFieldContext; // create path and map variables String localVarPath = "/rest/api/3/field/{fieldId}/context" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createCustomFieldContextValidateBeforeCall(String fieldId, CreateCustomFieldContext createCustomFieldContext, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling createCustomFieldContext(Async)"); } // verify the required parameter 'createCustomFieldContext' is set if (createCustomFieldContext == null) { throw new ApiException("Missing the required parameter 'createCustomFieldContext' when calling createCustomFieldContext(Async)"); } return createCustomFieldContextCall(fieldId, createCustomFieldContext, _callback); } /** * Create custom field context * Creates a custom field context. If `projectIds` is empty, a global context is created. A global context is one that applies to all project. If `issueTypeIds` is empty, the context applies to all issue types. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param createCustomFieldContext (required) * @return CreateCustomFieldContext * @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
201 Returned if the custom field context is created. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field, project, or issue type is not found. -
409 Returned if the issue type is a sub-task, but sub-tasks are disabled in Jira settings. -
*/ public CreateCustomFieldContext createCustomFieldContext(String fieldId, CreateCustomFieldContext createCustomFieldContext) throws ApiException { ApiResponse localVarResp = createCustomFieldContextWithHttpInfo(fieldId, createCustomFieldContext); return localVarResp.getData(); } /** * Create custom field context * Creates a custom field context. If `projectIds` is empty, a global context is created. A global context is one that applies to all project. If `issueTypeIds` is empty, the context applies to all issue types. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param createCustomFieldContext (required) * @return ApiResponse<CreateCustomFieldContext> * @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
201 Returned if the custom field context is created. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field, project, or issue type is not found. -
409 Returned if the issue type is a sub-task, but sub-tasks are disabled in Jira settings. -
*/ public ApiResponse createCustomFieldContextWithHttpInfo(String fieldId, CreateCustomFieldContext createCustomFieldContext) throws ApiException { okhttp3.Call localVarCall = createCustomFieldContextValidateBeforeCall(fieldId, createCustomFieldContext, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create custom field context (asynchronously) * Creates a custom field context. If `projectIds` is empty, a global context is created. A global context is one that applies to all project. If `issueTypeIds` is empty, the context applies to all issue types. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param createCustomFieldContext (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
201 Returned if the custom field context is created. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the field, project, or issue type is not found. -
409 Returned if the issue type is a sub-task, but sub-tasks are disabled in Jira settings. -
*/ public okhttp3.Call createCustomFieldContextAsync(String fieldId, CreateCustomFieldContext createCustomFieldContext, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createCustomFieldContextValidateBeforeCall(fieldId, createCustomFieldContext, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteCustomFieldContext * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (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 context is deleted. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field or the context is not found. -
*/ public okhttp3.Call deleteCustomFieldContextCall(String fieldId, Long contextId, 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/field/{fieldId}/context/{contextId}" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())) .replace("{" + "contextId" + "}", localVarApiClient.escapeString(contextId.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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteCustomFieldContextValidateBeforeCall(String fieldId, Long contextId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling deleteCustomFieldContext(Async)"); } // verify the required parameter 'contextId' is set if (contextId == null) { throw new ApiException("Missing the required parameter 'contextId' when calling deleteCustomFieldContext(Async)"); } return deleteCustomFieldContextCall(fieldId, contextId, _callback); } /** * Delete custom field context * Deletes a [ custom field context](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (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
204 Returned if the context is deleted. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field or the context is not found. -
*/ public Object deleteCustomFieldContext(String fieldId, Long contextId) throws ApiException { ApiResponse localVarResp = deleteCustomFieldContextWithHttpInfo(fieldId, contextId); return localVarResp.getData(); } /** * Delete custom field context * Deletes a [ custom field context](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (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
204 Returned if the context is deleted. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field or the context is not found. -
*/ public ApiResponse deleteCustomFieldContextWithHttpInfo(String fieldId, Long contextId) throws ApiException { okhttp3.Call localVarCall = deleteCustomFieldContextValidateBeforeCall(fieldId, contextId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete custom field context (asynchronously) * Deletes a [ custom field context](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (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 context is deleted. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field or the context is not found. -
*/ public okhttp3.Call deleteCustomFieldContextAsync(String fieldId, Long contextId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteCustomFieldContextValidateBeforeCall(fieldId, contextId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getContextsForField * @param fieldId The ID of the custom field. (required) * @param isAnyIssueType Whether to return contexts that apply to all issue types. (optional) * @param isGlobalContext Whether to return contexts that apply to all projects. (optional) * @param contextId The list of context IDs. To include multiple contexts, separate IDs with ampersand: `contextId=10000&contextId=10001`. (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 50) * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field was not found. -
*/ public okhttp3.Call getContextsForFieldCall(String fieldId, Boolean isAnyIssueType, Boolean isGlobalContext, Set contextId, 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/field/{fieldId}/context" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (isAnyIssueType != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("isAnyIssueType", isAnyIssueType)); } if (isGlobalContext != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("isGlobalContext", isGlobalContext)); } if (contextId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "contextId", contextId)); } 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 getContextsForFieldValidateBeforeCall(String fieldId, Boolean isAnyIssueType, Boolean isGlobalContext, Set contextId, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling getContextsForField(Async)"); } return getContextsForFieldCall(fieldId, isAnyIssueType, isGlobalContext, contextId, startAt, maxResults, _callback); } /** * Get custom field contexts * Returns a [paginated](#pagination) list of [ contexts](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html) for a custom field. Contexts can be returned as follows: * With no other parameters set, all contexts. * By defining `id` only, all contexts from the list of IDs. * By defining `isAnyIssueType`, limit the list of contexts returned to either those that apply to all issue types (true) or those that apply to only a subset of issue types (false) * By defining `isGlobalContext`, limit the list of contexts return to either those that apply to all projects (global contexts) (true) or those that apply to only a subset of projects (false). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param isAnyIssueType Whether to return contexts that apply to all issue types. (optional) * @param isGlobalContext Whether to return contexts that apply to all projects. (optional) * @param contextId The list of context IDs. To include multiple contexts, separate IDs with ampersand: `contextId=10000&contextId=10001`. (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 50) * @return PageBeanCustomFieldContext * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field was not found. -
*/ public PageBeanCustomFieldContext getContextsForField(String fieldId, Boolean isAnyIssueType, Boolean isGlobalContext, Set contextId, Long startAt, Integer maxResults) throws ApiException { ApiResponse localVarResp = getContextsForFieldWithHttpInfo(fieldId, isAnyIssueType, isGlobalContext, contextId, startAt, maxResults); return localVarResp.getData(); } /** * Get custom field contexts * Returns a [paginated](#pagination) list of [ contexts](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html) for a custom field. Contexts can be returned as follows: * With no other parameters set, all contexts. * By defining `id` only, all contexts from the list of IDs. * By defining `isAnyIssueType`, limit the list of contexts returned to either those that apply to all issue types (true) or those that apply to only a subset of issue types (false) * By defining `isGlobalContext`, limit the list of contexts return to either those that apply to all projects (global contexts) (true) or those that apply to only a subset of projects (false). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param isAnyIssueType Whether to return contexts that apply to all issue types. (optional) * @param isGlobalContext Whether to return contexts that apply to all projects. (optional) * @param contextId The list of context IDs. To include multiple contexts, separate IDs with ampersand: `contextId=10000&contextId=10001`. (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 50) * @return ApiResponse<PageBeanCustomFieldContext> * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field was not found. -
*/ public ApiResponse getContextsForFieldWithHttpInfo(String fieldId, Boolean isAnyIssueType, Boolean isGlobalContext, Set contextId, Long startAt, Integer maxResults) throws ApiException { okhttp3.Call localVarCall = getContextsForFieldValidateBeforeCall(fieldId, isAnyIssueType, isGlobalContext, contextId, startAt, maxResults, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get custom field contexts (asynchronously) * Returns a [paginated](#pagination) list of [ contexts](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html) for a custom field. Contexts can be returned as follows: * With no other parameters set, all contexts. * By defining `id` only, all contexts from the list of IDs. * By defining `isAnyIssueType`, limit the list of contexts returned to either those that apply to all issue types (true) or those that apply to only a subset of issue types (false) * By defining `isGlobalContext`, limit the list of contexts return to either those that apply to all projects (global contexts) (true) or those that apply to only a subset of projects (false). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param isAnyIssueType Whether to return contexts that apply to all issue types. (optional) * @param isGlobalContext Whether to return contexts that apply to all projects. (optional) * @param contextId The list of context IDs. To include multiple contexts, separate IDs with ampersand: `contextId=10000&contextId=10001`. (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 50) * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field was not found. -
*/ public okhttp3.Call getContextsForFieldAsync(String fieldId, Boolean isAnyIssueType, Boolean isGlobalContext, Set contextId, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getContextsForFieldValidateBeforeCall(fieldId, isAnyIssueType, isGlobalContext, contextId, startAt, maxResults, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getCustomFieldContextsForProjectsAndIssueTypes * @param fieldId The ID of the custom field. (required) * @param projectIssueTypeMappings The list of project and issue type mappings. (required) * @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 50) * @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 or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, project, or issue type is not found. -
*/ public okhttp3.Call getCustomFieldContextsForProjectsAndIssueTypesCall(String fieldId, ProjectIssueTypeMappings projectIssueTypeMappings, 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 = projectIssueTypeMappings; // create path and map variables String localVarPath = "/rest/api/3/field/{fieldId}/context/mapping" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); 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 = { "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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getCustomFieldContextsForProjectsAndIssueTypesValidateBeforeCall(String fieldId, ProjectIssueTypeMappings projectIssueTypeMappings, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling getCustomFieldContextsForProjectsAndIssueTypes(Async)"); } // verify the required parameter 'projectIssueTypeMappings' is set if (projectIssueTypeMappings == null) { throw new ApiException("Missing the required parameter 'projectIssueTypeMappings' when calling getCustomFieldContextsForProjectsAndIssueTypes(Async)"); } return getCustomFieldContextsForProjectsAndIssueTypesCall(fieldId, projectIssueTypeMappings, startAt, maxResults, _callback); } /** * Get custom field contexts for projects and issue types * Returns a [paginated](#pagination) list of project and issue type mappings and, for each mapping, the ID of a [custom field context](https://confluence.atlassian.com/x/k44fOw) that applies to the project and issue type. If there is no custom field context assigned to the project then, if present, the custom field context that applies to all projects is returned if it also applies to the issue type or all issue types. If a custom field context is not found, the returned custom field context ID is `null`. Duplicate project and issue type mappings cannot be provided in the request. The order of the returned values is the same as provided in the request. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param projectIssueTypeMappings The list of project and issue type mappings. (required) * @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 50) * @return PageBeanContextForProjectAndIssueType * @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 or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, project, or issue type is not found. -
*/ public PageBeanContextForProjectAndIssueType getCustomFieldContextsForProjectsAndIssueTypes(String fieldId, ProjectIssueTypeMappings projectIssueTypeMappings, Long startAt, Integer maxResults) throws ApiException { ApiResponse localVarResp = getCustomFieldContextsForProjectsAndIssueTypesWithHttpInfo(fieldId, projectIssueTypeMappings, startAt, maxResults); return localVarResp.getData(); } /** * Get custom field contexts for projects and issue types * Returns a [paginated](#pagination) list of project and issue type mappings and, for each mapping, the ID of a [custom field context](https://confluence.atlassian.com/x/k44fOw) that applies to the project and issue type. If there is no custom field context assigned to the project then, if present, the custom field context that applies to all projects is returned if it also applies to the issue type or all issue types. If a custom field context is not found, the returned custom field context ID is `null`. Duplicate project and issue type mappings cannot be provided in the request. The order of the returned values is the same as provided in the request. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param projectIssueTypeMappings The list of project and issue type mappings. (required) * @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 50) * @return ApiResponse<PageBeanContextForProjectAndIssueType> * @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 or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, project, or issue type is not found. -
*/ public ApiResponse getCustomFieldContextsForProjectsAndIssueTypesWithHttpInfo(String fieldId, ProjectIssueTypeMappings projectIssueTypeMappings, Long startAt, Integer maxResults) throws ApiException { okhttp3.Call localVarCall = getCustomFieldContextsForProjectsAndIssueTypesValidateBeforeCall(fieldId, projectIssueTypeMappings, startAt, maxResults, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get custom field contexts for projects and issue types (asynchronously) * Returns a [paginated](#pagination) list of project and issue type mappings and, for each mapping, the ID of a [custom field context](https://confluence.atlassian.com/x/k44fOw) that applies to the project and issue type. If there is no custom field context assigned to the project then, if present, the custom field context that applies to all projects is returned if it also applies to the issue type or all issue types. If a custom field context is not found, the returned custom field context ID is `null`. Duplicate project and issue type mappings cannot be provided in the request. The order of the returned values is the same as provided in the request. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param projectIssueTypeMappings The list of project and issue type mappings. (required) * @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 50) * @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 or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, project, or issue type is not found. -
*/ public okhttp3.Call getCustomFieldContextsForProjectsAndIssueTypesAsync(String fieldId, ProjectIssueTypeMappings projectIssueTypeMappings, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCustomFieldContextsForProjectsAndIssueTypesValidateBeforeCall(fieldId, projectIssueTypeMappings, startAt, maxResults, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDefaultValues * @param fieldId The ID of the custom field, for example `customfield\\_10000`. (required) * @param contextId The IDs of the contexts. (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 50) * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field is not found. -
*/ public okhttp3.Call getDefaultValuesCall(String fieldId, Set contextId, 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/field/{fieldId}/context/defaultValue" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (contextId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "contextId", contextId)); } 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 getDefaultValuesValidateBeforeCall(String fieldId, Set contextId, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling getDefaultValues(Async)"); } return getDefaultValuesCall(fieldId, contextId, startAt, maxResults, _callback); } /** * Get custom field contexts default values * Returns a [paginated](#pagination) list of defaults for a custom field. The results can be filtered by `contextId`, otherwise all values are returned. If no defaults are set for a context, nothing is returned. The returned object depends on type of the custom field: * `CustomFieldContextDefaultValueDate` (type `datepicker`) for date fields. * `CustomFieldContextDefaultValueDateTime` (type `datetimepicker`) for date-time fields. * `CustomFieldContextDefaultValueSingleOption` (type `option.single`) for single choice select lists and radio buttons. * `CustomFieldContextDefaultValueMultipleOption` (type `option.multiple`) for multiple choice select lists and checkboxes. * `CustomFieldContextDefaultValueCascadingOption` (type `option.cascading`) for cascading select lists. * `CustomFieldContextSingleUserPickerDefaults` (type `single.user.select`) for single users. * `CustomFieldContextDefaultValueMultiUserPicker` (type `multi.user.select`) for user lists. * `CustomFieldContextDefaultValueSingleGroupPicker` (type `grouppicker.single`) for single choice group pickers. * `CustomFieldContextDefaultValueMultipleGroupPicker` (type `grouppicker.multiple`) for multiple choice group pickers. * `CustomFieldContextDefaultValueURL` (type `url`) for URLs. * `CustomFieldContextDefaultValueProject` (type `project`) for project pickers. * `CustomFieldContextDefaultValueFloat` (type `float`) for floats (floating-point numbers). * `CustomFieldContextDefaultValueLabels` (type `labels`) for labels. * `CustomFieldContextDefaultValueTextField` (type `textfield`) for text fields. * `CustomFieldContextDefaultValueTextArea` (type `textarea`) for text area fields. * `CustomFieldContextDefaultValueReadOnly` (type `readonly`) for read only (text) fields. * `CustomFieldContextDefaultValueMultipleVersion` (type `version.multiple`) for single choice version pickers. * `CustomFieldContextDefaultValueSingleVersion` (type `version.single`) for multiple choice version pickers. Forge custom fields [types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/#data-types) are also supported, returning: * `CustomFieldContextDefaultValueForgeStringFieldBean` (type `forge.string`) for Forge string fields. * `CustomFieldContextDefaultValueForgeMultiStringFieldBean` (type `forge.string.list`) for Forge string collection fields. * `CustomFieldContextDefaultValueForgeObjectFieldBean` (type `forge.object`) for Forge object fields. * `CustomFieldContextDefaultValueForgeDateTimeFieldBean` (type `forge.datetime`) for Forge date-time fields. * `CustomFieldContextDefaultValueForgeGroupFieldBean` (type `forge.group`) for Forge group fields. * `CustomFieldContextDefaultValueForgeMultiGroupFieldBean` (type `forge.group.list`) for Forge group collection fields. * `CustomFieldContextDefaultValueForgeNumberFieldBean` (type `forge.number`) for Forge number fields. * `CustomFieldContextDefaultValueForgeUserFieldBean` (type `forge.user`) for Forge user fields. * `CustomFieldContextDefaultValueForgeMultiUserFieldBean` (type `forge.user.list`) for Forge user collection fields. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field, for example `customfield\\_10000`. (required) * @param contextId The IDs of the contexts. (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 50) * @return PageBeanCustomFieldContextDefaultValue * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field is not found. -
*/ public PageBeanCustomFieldContextDefaultValue getDefaultValues(String fieldId, Set contextId, Long startAt, Integer maxResults) throws ApiException { ApiResponse localVarResp = getDefaultValuesWithHttpInfo(fieldId, contextId, startAt, maxResults); return localVarResp.getData(); } /** * Get custom field contexts default values * Returns a [paginated](#pagination) list of defaults for a custom field. The results can be filtered by `contextId`, otherwise all values are returned. If no defaults are set for a context, nothing is returned. The returned object depends on type of the custom field: * `CustomFieldContextDefaultValueDate` (type `datepicker`) for date fields. * `CustomFieldContextDefaultValueDateTime` (type `datetimepicker`) for date-time fields. * `CustomFieldContextDefaultValueSingleOption` (type `option.single`) for single choice select lists and radio buttons. * `CustomFieldContextDefaultValueMultipleOption` (type `option.multiple`) for multiple choice select lists and checkboxes. * `CustomFieldContextDefaultValueCascadingOption` (type `option.cascading`) for cascading select lists. * `CustomFieldContextSingleUserPickerDefaults` (type `single.user.select`) for single users. * `CustomFieldContextDefaultValueMultiUserPicker` (type `multi.user.select`) for user lists. * `CustomFieldContextDefaultValueSingleGroupPicker` (type `grouppicker.single`) for single choice group pickers. * `CustomFieldContextDefaultValueMultipleGroupPicker` (type `grouppicker.multiple`) for multiple choice group pickers. * `CustomFieldContextDefaultValueURL` (type `url`) for URLs. * `CustomFieldContextDefaultValueProject` (type `project`) for project pickers. * `CustomFieldContextDefaultValueFloat` (type `float`) for floats (floating-point numbers). * `CustomFieldContextDefaultValueLabels` (type `labels`) for labels. * `CustomFieldContextDefaultValueTextField` (type `textfield`) for text fields. * `CustomFieldContextDefaultValueTextArea` (type `textarea`) for text area fields. * `CustomFieldContextDefaultValueReadOnly` (type `readonly`) for read only (text) fields. * `CustomFieldContextDefaultValueMultipleVersion` (type `version.multiple`) for single choice version pickers. * `CustomFieldContextDefaultValueSingleVersion` (type `version.single`) for multiple choice version pickers. Forge custom fields [types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/#data-types) are also supported, returning: * `CustomFieldContextDefaultValueForgeStringFieldBean` (type `forge.string`) for Forge string fields. * `CustomFieldContextDefaultValueForgeMultiStringFieldBean` (type `forge.string.list`) for Forge string collection fields. * `CustomFieldContextDefaultValueForgeObjectFieldBean` (type `forge.object`) for Forge object fields. * `CustomFieldContextDefaultValueForgeDateTimeFieldBean` (type `forge.datetime`) for Forge date-time fields. * `CustomFieldContextDefaultValueForgeGroupFieldBean` (type `forge.group`) for Forge group fields. * `CustomFieldContextDefaultValueForgeMultiGroupFieldBean` (type `forge.group.list`) for Forge group collection fields. * `CustomFieldContextDefaultValueForgeNumberFieldBean` (type `forge.number`) for Forge number fields. * `CustomFieldContextDefaultValueForgeUserFieldBean` (type `forge.user`) for Forge user fields. * `CustomFieldContextDefaultValueForgeMultiUserFieldBean` (type `forge.user.list`) for Forge user collection fields. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field, for example `customfield\\_10000`. (required) * @param contextId The IDs of the contexts. (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 50) * @return ApiResponse<PageBeanCustomFieldContextDefaultValue> * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field is not found. -
*/ public ApiResponse getDefaultValuesWithHttpInfo(String fieldId, Set contextId, Long startAt, Integer maxResults) throws ApiException { okhttp3.Call localVarCall = getDefaultValuesValidateBeforeCall(fieldId, contextId, startAt, maxResults, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get custom field contexts default values (asynchronously) * Returns a [paginated](#pagination) list of defaults for a custom field. The results can be filtered by `contextId`, otherwise all values are returned. If no defaults are set for a context, nothing is returned. The returned object depends on type of the custom field: * `CustomFieldContextDefaultValueDate` (type `datepicker`) for date fields. * `CustomFieldContextDefaultValueDateTime` (type `datetimepicker`) for date-time fields. * `CustomFieldContextDefaultValueSingleOption` (type `option.single`) for single choice select lists and radio buttons. * `CustomFieldContextDefaultValueMultipleOption` (type `option.multiple`) for multiple choice select lists and checkboxes. * `CustomFieldContextDefaultValueCascadingOption` (type `option.cascading`) for cascading select lists. * `CustomFieldContextSingleUserPickerDefaults` (type `single.user.select`) for single users. * `CustomFieldContextDefaultValueMultiUserPicker` (type `multi.user.select`) for user lists. * `CustomFieldContextDefaultValueSingleGroupPicker` (type `grouppicker.single`) for single choice group pickers. * `CustomFieldContextDefaultValueMultipleGroupPicker` (type `grouppicker.multiple`) for multiple choice group pickers. * `CustomFieldContextDefaultValueURL` (type `url`) for URLs. * `CustomFieldContextDefaultValueProject` (type `project`) for project pickers. * `CustomFieldContextDefaultValueFloat` (type `float`) for floats (floating-point numbers). * `CustomFieldContextDefaultValueLabels` (type `labels`) for labels. * `CustomFieldContextDefaultValueTextField` (type `textfield`) for text fields. * `CustomFieldContextDefaultValueTextArea` (type `textarea`) for text area fields. * `CustomFieldContextDefaultValueReadOnly` (type `readonly`) for read only (text) fields. * `CustomFieldContextDefaultValueMultipleVersion` (type `version.multiple`) for single choice version pickers. * `CustomFieldContextDefaultValueSingleVersion` (type `version.single`) for multiple choice version pickers. Forge custom fields [types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/#data-types) are also supported, returning: * `CustomFieldContextDefaultValueForgeStringFieldBean` (type `forge.string`) for Forge string fields. * `CustomFieldContextDefaultValueForgeMultiStringFieldBean` (type `forge.string.list`) for Forge string collection fields. * `CustomFieldContextDefaultValueForgeObjectFieldBean` (type `forge.object`) for Forge object fields. * `CustomFieldContextDefaultValueForgeDateTimeFieldBean` (type `forge.datetime`) for Forge date-time fields. * `CustomFieldContextDefaultValueForgeGroupFieldBean` (type `forge.group`) for Forge group fields. * `CustomFieldContextDefaultValueForgeMultiGroupFieldBean` (type `forge.group.list`) for Forge group collection fields. * `CustomFieldContextDefaultValueForgeNumberFieldBean` (type `forge.number`) for Forge number fields. * `CustomFieldContextDefaultValueForgeUserFieldBean` (type `forge.user`) for Forge user fields. * `CustomFieldContextDefaultValueForgeMultiUserFieldBean` (type `forge.user.list`) for Forge user collection fields. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field, for example `customfield\\_10000`. (required) * @param contextId The IDs of the contexts. (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 50) * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field is not found. -
*/ public okhttp3.Call getDefaultValuesAsync(String fieldId, Set contextId, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDefaultValuesValidateBeforeCall(fieldId, contextId, startAt, maxResults, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getIssueTypeMappingsForContexts * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. To include multiple contexts, provide an ampersand-separated list. For example, `contextId=10001&contextId=10002`. (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 50) * @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 operation is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
*/ public okhttp3.Call getIssueTypeMappingsForContextsCall(String fieldId, List contextId, 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/field/{fieldId}/context/issuetypemapping" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (contextId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "contextId", contextId)); } 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 getIssueTypeMappingsForContextsValidateBeforeCall(String fieldId, List contextId, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling getIssueTypeMappingsForContexts(Async)"); } return getIssueTypeMappingsForContextsCall(fieldId, contextId, startAt, maxResults, _callback); } /** * Get issue types for custom field context * Returns a [paginated](#pagination) list of context to issue type mappings for a custom field. Mappings are returned for all contexts or a list of contexts. Mappings are ordered first by context ID and then by issue type ID. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. To include multiple contexts, provide an ampersand-separated list. For example, `contextId=10001&contextId=10002`. (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 50) * @return PageBeanIssueTypeToContextMapping * @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 operation is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
*/ public PageBeanIssueTypeToContextMapping getIssueTypeMappingsForContexts(String fieldId, List contextId, Long startAt, Integer maxResults) throws ApiException { ApiResponse localVarResp = getIssueTypeMappingsForContextsWithHttpInfo(fieldId, contextId, startAt, maxResults); return localVarResp.getData(); } /** * Get issue types for custom field context * Returns a [paginated](#pagination) list of context to issue type mappings for a custom field. Mappings are returned for all contexts or a list of contexts. Mappings are ordered first by context ID and then by issue type ID. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. To include multiple contexts, provide an ampersand-separated list. For example, `contextId=10001&contextId=10002`. (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 50) * @return ApiResponse<PageBeanIssueTypeToContextMapping> * @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 operation is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
*/ public ApiResponse getIssueTypeMappingsForContextsWithHttpInfo(String fieldId, List contextId, Long startAt, Integer maxResults) throws ApiException { okhttp3.Call localVarCall = getIssueTypeMappingsForContextsValidateBeforeCall(fieldId, contextId, startAt, maxResults, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get issue types for custom field context (asynchronously) * Returns a [paginated](#pagination) list of context to issue type mappings for a custom field. Mappings are returned for all contexts or a list of contexts. Mappings are ordered first by context ID and then by issue type ID. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. To include multiple contexts, provide an ampersand-separated list. For example, `contextId=10001&contextId=10002`. (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 50) * @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 operation is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
*/ public okhttp3.Call getIssueTypeMappingsForContextsAsync(String fieldId, List contextId, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getIssueTypeMappingsForContextsValidateBeforeCall(fieldId, contextId, startAt, maxResults, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getProjectContextMapping * @param fieldId The ID of the custom field, for example `customfield\\_10000`. (required) * @param contextId The list of context IDs. To include multiple context, separate IDs with ampersand: `contextId=10000&contextId=10001`. (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 50) * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field is not found. -
*/ public okhttp3.Call getProjectContextMappingCall(String fieldId, Set contextId, 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/field/{fieldId}/context/projectmapping" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (contextId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "contextId", contextId)); } 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 getProjectContextMappingValidateBeforeCall(String fieldId, Set contextId, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling getProjectContextMapping(Async)"); } return getProjectContextMappingCall(fieldId, contextId, startAt, maxResults, _callback); } /** * Get project mappings for custom field context * Returns a [paginated](#pagination) list of context to project mappings for a custom field. The result can be filtered by `contextId`. Otherwise, all mappings are returned. Invalid IDs are ignored. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field, for example `customfield\\_10000`. (required) * @param contextId The list of context IDs. To include multiple context, separate IDs with ampersand: `contextId=10000&contextId=10001`. (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 50) * @return PageBeanCustomFieldContextProjectMapping * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field is not found. -
*/ public PageBeanCustomFieldContextProjectMapping getProjectContextMapping(String fieldId, Set contextId, Long startAt, Integer maxResults) throws ApiException { ApiResponse localVarResp = getProjectContextMappingWithHttpInfo(fieldId, contextId, startAt, maxResults); return localVarResp.getData(); } /** * Get project mappings for custom field context * Returns a [paginated](#pagination) list of context to project mappings for a custom field. The result can be filtered by `contextId`. Otherwise, all mappings are returned. Invalid IDs are ignored. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field, for example `customfield\\_10000`. (required) * @param contextId The list of context IDs. To include multiple context, separate IDs with ampersand: `contextId=10000&contextId=10001`. (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 50) * @return ApiResponse<PageBeanCustomFieldContextProjectMapping> * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field is not found. -
*/ public ApiResponse getProjectContextMappingWithHttpInfo(String fieldId, Set contextId, Long startAt, Integer maxResults) throws ApiException { okhttp3.Call localVarCall = getProjectContextMappingValidateBeforeCall(fieldId, contextId, startAt, maxResults, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get project mappings for custom field context (asynchronously) * Returns a [paginated](#pagination) list of context to project mappings for a custom field. The result can be filtered by `contextId`. Otherwise, all mappings are returned. Invalid IDs are ignored. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field, for example `customfield\\_10000`. (required) * @param contextId The list of context IDs. To include multiple context, separate IDs with ampersand: `contextId=10000&contextId=10001`. (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 50) * @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. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field is not found. -
*/ public okhttp3.Call getProjectContextMappingAsync(String fieldId, Set contextId, Long startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getProjectContextMappingValidateBeforeCall(fieldId, contextId, startAt, maxResults, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeCustomFieldContextFromProjects * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param projectIds (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 custom field context is removed from the projects. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more projects are not found. -
*/ public okhttp3.Call removeCustomFieldContextFromProjectsCall(String fieldId, Long contextId, ProjectIds projectIds, 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 = projectIds; // create path and map variables String localVarPath = "/rest/api/3/field/{fieldId}/context/{contextId}/project/remove" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())) .replace("{" + "contextId" + "}", localVarApiClient.escapeString(contextId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call removeCustomFieldContextFromProjectsValidateBeforeCall(String fieldId, Long contextId, ProjectIds projectIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling removeCustomFieldContextFromProjects(Async)"); } // verify the required parameter 'contextId' is set if (contextId == null) { throw new ApiException("Missing the required parameter 'contextId' when calling removeCustomFieldContextFromProjects(Async)"); } // verify the required parameter 'projectIds' is set if (projectIds == null) { throw new ApiException("Missing the required parameter 'projectIds' when calling removeCustomFieldContextFromProjects(Async)"); } return removeCustomFieldContextFromProjectsCall(fieldId, contextId, projectIds, _callback); } /** * Remove custom field context from projects * Removes a custom field context from projects. A custom field context without any projects applies to all projects. Removing all projects from a custom field context would result in it applying to all projects. If any project in the request is not assigned to the context, or the operation would result in two global contexts for the field, the operation fails. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param projectIds (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
204 Returned if the custom field context is removed from the projects. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more projects are not found. -
*/ public Object removeCustomFieldContextFromProjects(String fieldId, Long contextId, ProjectIds projectIds) throws ApiException { ApiResponse localVarResp = removeCustomFieldContextFromProjectsWithHttpInfo(fieldId, contextId, projectIds); return localVarResp.getData(); } /** * Remove custom field context from projects * Removes a custom field context from projects. A custom field context without any projects applies to all projects. Removing all projects from a custom field context would result in it applying to all projects. If any project in the request is not assigned to the context, or the operation would result in two global contexts for the field, the operation fails. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param projectIds (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
204 Returned if the custom field context is removed from the projects. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more projects are not found. -
*/ public ApiResponse removeCustomFieldContextFromProjectsWithHttpInfo(String fieldId, Long contextId, ProjectIds projectIds) throws ApiException { okhttp3.Call localVarCall = removeCustomFieldContextFromProjectsValidateBeforeCall(fieldId, contextId, projectIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Remove custom field context from projects (asynchronously) * Removes a custom field context from projects. A custom field context without any projects applies to all projects. Removing all projects from a custom field context would result in it applying to all projects. If any project in the request is not assigned to the context, or the operation would result in two global contexts for the field, the operation fails. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param projectIds (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 custom field context is removed from the projects. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more projects are not found. -
*/ public okhttp3.Call removeCustomFieldContextFromProjectsAsync(String fieldId, Long contextId, ProjectIds projectIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeCustomFieldContextFromProjectsValidateBeforeCall(fieldId, contextId, projectIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeIssueTypesFromContext * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param issueTypeIds (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 operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more issue types are not found. -
*/ public okhttp3.Call removeIssueTypesFromContextCall(String fieldId, Long contextId, IssueTypeIds issueTypeIds, 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 = issueTypeIds; // create path and map variables String localVarPath = "/rest/api/3/field/{fieldId}/context/{contextId}/issuetype/remove" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())) .replace("{" + "contextId" + "}", localVarApiClient.escapeString(contextId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call removeIssueTypesFromContextValidateBeforeCall(String fieldId, Long contextId, IssueTypeIds issueTypeIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling removeIssueTypesFromContext(Async)"); } // verify the required parameter 'contextId' is set if (contextId == null) { throw new ApiException("Missing the required parameter 'contextId' when calling removeIssueTypesFromContext(Async)"); } // verify the required parameter 'issueTypeIds' is set if (issueTypeIds == null) { throw new ApiException("Missing the required parameter 'issueTypeIds' when calling removeIssueTypesFromContext(Async)"); } return removeIssueTypesFromContextCall(fieldId, contextId, issueTypeIds, _callback); } /** * Remove issue types from context * Removes issue types from a custom field context. A custom field context without any issue types applies to all issue types. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param issueTypeIds (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
204 Returned if operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more issue types are not found. -
*/ public Object removeIssueTypesFromContext(String fieldId, Long contextId, IssueTypeIds issueTypeIds) throws ApiException { ApiResponse localVarResp = removeIssueTypesFromContextWithHttpInfo(fieldId, contextId, issueTypeIds); return localVarResp.getData(); } /** * Remove issue types from context * Removes issue types from a custom field context. A custom field context without any issue types applies to all issue types. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param issueTypeIds (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
204 Returned if operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more issue types are not found. -
*/ public ApiResponse removeIssueTypesFromContextWithHttpInfo(String fieldId, Long contextId, IssueTypeIds issueTypeIds) throws ApiException { okhttp3.Call localVarCall = removeIssueTypesFromContextValidateBeforeCall(fieldId, contextId, issueTypeIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Remove issue types from context (asynchronously) * Removes issue types from a custom field context. A custom field context without any issue types applies to all issue types. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param issueTypeIds (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 operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, context, or one or more issue types are not found. -
*/ public okhttp3.Call removeIssueTypesFromContextAsync(String fieldId, Long contextId, IssueTypeIds issueTypeIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeIssueTypesFromContextValidateBeforeCall(fieldId, contextId, issueTypeIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for setDefaultValues * @param fieldId The ID of the custom field. (required) * @param customFieldContextDefaultValueUpdate (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 operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, a context, an option, or a cascading option is not found. -
*/ public okhttp3.Call setDefaultValuesCall(String fieldId, CustomFieldContextDefaultValueUpdate customFieldContextDefaultValueUpdate, 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 = customFieldContextDefaultValueUpdate; // create path and map variables String localVarPath = "/rest/api/3/field/{fieldId}/context/defaultValue" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.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 setDefaultValuesValidateBeforeCall(String fieldId, CustomFieldContextDefaultValueUpdate customFieldContextDefaultValueUpdate, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling setDefaultValues(Async)"); } // verify the required parameter 'customFieldContextDefaultValueUpdate' is set if (customFieldContextDefaultValueUpdate == null) { throw new ApiException("Missing the required parameter 'customFieldContextDefaultValueUpdate' when calling setDefaultValues(Async)"); } return setDefaultValuesCall(fieldId, customFieldContextDefaultValueUpdate, _callback); } /** * Set custom field contexts default values * Sets default for contexts of a custom field. Default are defined using these objects: * `CustomFieldContextDefaultValueDate` (type `datepicker`) for date fields. * `CustomFieldContextDefaultValueDateTime` (type `datetimepicker`) for date-time fields. * `CustomFieldContextDefaultValueSingleOption` (type `option.single`) for single choice select lists and radio buttons. * `CustomFieldContextDefaultValueMultipleOption` (type `option.multiple`) for multiple choice select lists and checkboxes. * `CustomFieldContextDefaultValueCascadingOption` (type `option.cascading`) for cascading select lists. * `CustomFieldContextSingleUserPickerDefaults` (type `single.user.select`) for single users. * `CustomFieldContextDefaultValueMultiUserPicker` (type `multi.user.select`) for user lists. * `CustomFieldContextDefaultValueSingleGroupPicker` (type `grouppicker.single`) for single choice group pickers. * `CustomFieldContextDefaultValueMultipleGroupPicker` (type `grouppicker.multiple`) for multiple choice group pickers. * `CustomFieldContextDefaultValueURL` (type `url`) for URLs. * `CustomFieldContextDefaultValueProject` (type `project`) for project pickers. * `CustomFieldContextDefaultValueFloat` (type `float`) for floats (floating-point numbers). * `CustomFieldContextDefaultValueLabels` (type `labels`) for labels. * `CustomFieldContextDefaultValueTextField` (type `textfield`) for text fields. * `CustomFieldContextDefaultValueTextArea` (type `textarea`) for text area fields. * `CustomFieldContextDefaultValueReadOnly` (type `readonly`) for read only (text) fields. * `CustomFieldContextDefaultValueMultipleVersion` (type `version.multiple`) for single choice version pickers. * `CustomFieldContextDefaultValueSingleVersion` (type `version.single`) for multiple choice version pickers. Forge custom fields [types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/#data-types) are also supported, returning: * `CustomFieldContextDefaultValueForgeStringFieldBean` (type `forge.string`) for Forge string fields. * `CustomFieldContextDefaultValueForgeMultiStringFieldBean` (type `forge.string.list`) for Forge string collection fields. * `CustomFieldContextDefaultValueForgeObjectFieldBean` (type `forge.object`) for Forge object fields. * `CustomFieldContextDefaultValueForgeDateTimeFieldBean` (type `forge.datetime`) for Forge date-time fields. * `CustomFieldContextDefaultValueForgeGroupFieldBean` (type `forge.group`) for Forge group fields. * `CustomFieldContextDefaultValueForgeMultiGroupFieldBean` (type `forge.group.list`) for Forge group collection fields. * `CustomFieldContextDefaultValueForgeNumberFieldBean` (type `forge.number`) for Forge number fields. * `CustomFieldContextDefaultValueForgeUserFieldBean` (type `forge.user`) for Forge user fields. * `CustomFieldContextDefaultValueForgeMultiUserFieldBean` (type `forge.user.list`) for Forge user collection fields. Only one type of default object can be included in a request. To remove a default for a context, set the default parameter to `null`. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param customFieldContextDefaultValueUpdate (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
204 Returned if operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, a context, an option, or a cascading option is not found. -
*/ public Object setDefaultValues(String fieldId, CustomFieldContextDefaultValueUpdate customFieldContextDefaultValueUpdate) throws ApiException { ApiResponse localVarResp = setDefaultValuesWithHttpInfo(fieldId, customFieldContextDefaultValueUpdate); return localVarResp.getData(); } /** * Set custom field contexts default values * Sets default for contexts of a custom field. Default are defined using these objects: * `CustomFieldContextDefaultValueDate` (type `datepicker`) for date fields. * `CustomFieldContextDefaultValueDateTime` (type `datetimepicker`) for date-time fields. * `CustomFieldContextDefaultValueSingleOption` (type `option.single`) for single choice select lists and radio buttons. * `CustomFieldContextDefaultValueMultipleOption` (type `option.multiple`) for multiple choice select lists and checkboxes. * `CustomFieldContextDefaultValueCascadingOption` (type `option.cascading`) for cascading select lists. * `CustomFieldContextSingleUserPickerDefaults` (type `single.user.select`) for single users. * `CustomFieldContextDefaultValueMultiUserPicker` (type `multi.user.select`) for user lists. * `CustomFieldContextDefaultValueSingleGroupPicker` (type `grouppicker.single`) for single choice group pickers. * `CustomFieldContextDefaultValueMultipleGroupPicker` (type `grouppicker.multiple`) for multiple choice group pickers. * `CustomFieldContextDefaultValueURL` (type `url`) for URLs. * `CustomFieldContextDefaultValueProject` (type `project`) for project pickers. * `CustomFieldContextDefaultValueFloat` (type `float`) for floats (floating-point numbers). * `CustomFieldContextDefaultValueLabels` (type `labels`) for labels. * `CustomFieldContextDefaultValueTextField` (type `textfield`) for text fields. * `CustomFieldContextDefaultValueTextArea` (type `textarea`) for text area fields. * `CustomFieldContextDefaultValueReadOnly` (type `readonly`) for read only (text) fields. * `CustomFieldContextDefaultValueMultipleVersion` (type `version.multiple`) for single choice version pickers. * `CustomFieldContextDefaultValueSingleVersion` (type `version.single`) for multiple choice version pickers. Forge custom fields [types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/#data-types) are also supported, returning: * `CustomFieldContextDefaultValueForgeStringFieldBean` (type `forge.string`) for Forge string fields. * `CustomFieldContextDefaultValueForgeMultiStringFieldBean` (type `forge.string.list`) for Forge string collection fields. * `CustomFieldContextDefaultValueForgeObjectFieldBean` (type `forge.object`) for Forge object fields. * `CustomFieldContextDefaultValueForgeDateTimeFieldBean` (type `forge.datetime`) for Forge date-time fields. * `CustomFieldContextDefaultValueForgeGroupFieldBean` (type `forge.group`) for Forge group fields. * `CustomFieldContextDefaultValueForgeMultiGroupFieldBean` (type `forge.group.list`) for Forge group collection fields. * `CustomFieldContextDefaultValueForgeNumberFieldBean` (type `forge.number`) for Forge number fields. * `CustomFieldContextDefaultValueForgeUserFieldBean` (type `forge.user`) for Forge user fields. * `CustomFieldContextDefaultValueForgeMultiUserFieldBean` (type `forge.user.list`) for Forge user collection fields. Only one type of default object can be included in a request. To remove a default for a context, set the default parameter to `null`. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param customFieldContextDefaultValueUpdate (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
204 Returned if operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, a context, an option, or a cascading option is not found. -
*/ public ApiResponse setDefaultValuesWithHttpInfo(String fieldId, CustomFieldContextDefaultValueUpdate customFieldContextDefaultValueUpdate) throws ApiException { okhttp3.Call localVarCall = setDefaultValuesValidateBeforeCall(fieldId, customFieldContextDefaultValueUpdate, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set custom field contexts default values (asynchronously) * Sets default for contexts of a custom field. Default are defined using these objects: * `CustomFieldContextDefaultValueDate` (type `datepicker`) for date fields. * `CustomFieldContextDefaultValueDateTime` (type `datetimepicker`) for date-time fields. * `CustomFieldContextDefaultValueSingleOption` (type `option.single`) for single choice select lists and radio buttons. * `CustomFieldContextDefaultValueMultipleOption` (type `option.multiple`) for multiple choice select lists and checkboxes. * `CustomFieldContextDefaultValueCascadingOption` (type `option.cascading`) for cascading select lists. * `CustomFieldContextSingleUserPickerDefaults` (type `single.user.select`) for single users. * `CustomFieldContextDefaultValueMultiUserPicker` (type `multi.user.select`) for user lists. * `CustomFieldContextDefaultValueSingleGroupPicker` (type `grouppicker.single`) for single choice group pickers. * `CustomFieldContextDefaultValueMultipleGroupPicker` (type `grouppicker.multiple`) for multiple choice group pickers. * `CustomFieldContextDefaultValueURL` (type `url`) for URLs. * `CustomFieldContextDefaultValueProject` (type `project`) for project pickers. * `CustomFieldContextDefaultValueFloat` (type `float`) for floats (floating-point numbers). * `CustomFieldContextDefaultValueLabels` (type `labels`) for labels. * `CustomFieldContextDefaultValueTextField` (type `textfield`) for text fields. * `CustomFieldContextDefaultValueTextArea` (type `textarea`) for text area fields. * `CustomFieldContextDefaultValueReadOnly` (type `readonly`) for read only (text) fields. * `CustomFieldContextDefaultValueMultipleVersion` (type `version.multiple`) for single choice version pickers. * `CustomFieldContextDefaultValueSingleVersion` (type `version.single`) for multiple choice version pickers. Forge custom fields [types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/#data-types) are also supported, returning: * `CustomFieldContextDefaultValueForgeStringFieldBean` (type `forge.string`) for Forge string fields. * `CustomFieldContextDefaultValueForgeMultiStringFieldBean` (type `forge.string.list`) for Forge string collection fields. * `CustomFieldContextDefaultValueForgeObjectFieldBean` (type `forge.object`) for Forge object fields. * `CustomFieldContextDefaultValueForgeDateTimeFieldBean` (type `forge.datetime`) for Forge date-time fields. * `CustomFieldContextDefaultValueForgeGroupFieldBean` (type `forge.group`) for Forge group fields. * `CustomFieldContextDefaultValueForgeMultiGroupFieldBean` (type `forge.group.list`) for Forge group collection fields. * `CustomFieldContextDefaultValueForgeNumberFieldBean` (type `forge.number`) for Forge number fields. * `CustomFieldContextDefaultValueForgeUserFieldBean` (type `forge.user`) for Forge user fields. * `CustomFieldContextDefaultValueForgeMultiUserFieldBean` (type `forge.user.list`) for Forge user collection fields. Only one type of default object can be included in a request. To remove a default for a context, set the default parameter to `null`. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param customFieldContextDefaultValueUpdate (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 operation is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field, a context, an option, or a cascading option is not found. -
*/ public okhttp3.Call setDefaultValuesAsync(String fieldId, CustomFieldContextDefaultValueUpdate customFieldContextDefaultValueUpdate, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setDefaultValuesValidateBeforeCall(fieldId, customFieldContextDefaultValueUpdate, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateCustomFieldContext * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param customFieldContextUpdateDetails (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 context is updated. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field or the context is not found. -
*/ public okhttp3.Call updateCustomFieldContextCall(String fieldId, Long contextId, CustomFieldContextUpdateDetails customFieldContextUpdateDetails, 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 = customFieldContextUpdateDetails; // create path and map variables String localVarPath = "/rest/api/3/field/{fieldId}/context/{contextId}" .replace("{" + "fieldId" + "}", localVarApiClient.escapeString(fieldId.toString())) .replace("{" + "contextId" + "}", localVarApiClient.escapeString(contextId.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 updateCustomFieldContextValidateBeforeCall(String fieldId, Long contextId, CustomFieldContextUpdateDetails customFieldContextUpdateDetails, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fieldId' is set if (fieldId == null) { throw new ApiException("Missing the required parameter 'fieldId' when calling updateCustomFieldContext(Async)"); } // verify the required parameter 'contextId' is set if (contextId == null) { throw new ApiException("Missing the required parameter 'contextId' when calling updateCustomFieldContext(Async)"); } // verify the required parameter 'customFieldContextUpdateDetails' is set if (customFieldContextUpdateDetails == null) { throw new ApiException("Missing the required parameter 'customFieldContextUpdateDetails' when calling updateCustomFieldContext(Async)"); } return updateCustomFieldContextCall(fieldId, contextId, customFieldContextUpdateDetails, _callback); } /** * Update custom field context * Updates a [ custom field context](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param customFieldContextUpdateDetails (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
204 Returned if the context is updated. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field or the context is not found. -
*/ public Object updateCustomFieldContext(String fieldId, Long contextId, CustomFieldContextUpdateDetails customFieldContextUpdateDetails) throws ApiException { ApiResponse localVarResp = updateCustomFieldContextWithHttpInfo(fieldId, contextId, customFieldContextUpdateDetails); return localVarResp.getData(); } /** * Update custom field context * Updates a [ custom field context](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param customFieldContextUpdateDetails (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
204 Returned if the context is updated. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field or the context is not found. -
*/ public ApiResponse updateCustomFieldContextWithHttpInfo(String fieldId, Long contextId, CustomFieldContextUpdateDetails customFieldContextUpdateDetails) throws ApiException { okhttp3.Call localVarCall = updateCustomFieldContextValidateBeforeCall(fieldId, contextId, customFieldContextUpdateDetails, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update custom field context (asynchronously) * Updates a [ custom field context](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html). **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * @param fieldId The ID of the custom field. (required) * @param contextId The ID of the context. (required) * @param customFieldContextUpdateDetails (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 context is updated. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user does not have the required permissions. -
404 Returned if the custom field or the context is not found. -
*/ public okhttp3.Call updateCustomFieldContextAsync(String fieldId, Long contextId, CustomFieldContextUpdateDetails customFieldContextUpdateDetails, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateCustomFieldContextValidateBeforeCall(fieldId, contextId, customFieldContextUpdateDetails, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }