Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.factset.sdk.IRNConfiguration.api;
import com.factset.sdk.IRNConfiguration.ApiException;
import com.factset.sdk.IRNConfiguration.ApiClient;
import com.factset.sdk.IRNConfiguration.ApiResponse;
import com.factset.sdk.IRNConfiguration.Configuration;
import com.factset.sdk.IRNConfiguration.Pair;
import javax.ws.rs.core.GenericType;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import com.factset.sdk.IRNConfiguration.models.ContactRoleDto;
import com.factset.sdk.IRNConfiguration.models.NewItemDto;
import com.factset.sdk.IRNConfiguration.models.ProblemDetails;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ContactsRolesApi {
private ApiClient apiClient;
public ContactsRolesApi() {
this(Configuration.getDefaultApiClient());
}
public ContactsRolesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
private static final Map createContactRoleResponseTypeMap = new HashMap();
static {
createContactRoleResponseTypeMap.put(201, new GenericType(){});
createContactRoleResponseTypeMap.put(400, new GenericType(){});
createContactRoleResponseTypeMap.put(0, new GenericType(){});
}
private static final Map deleteContactRoleResponseTypeMap = new HashMap();
private static final Map getContactRolesResponseTypeMap = new HashMap();
static {
getContactRolesResponseTypeMap.put(200, new GenericType>(){});
}
private static final Map updateContactRoleResponseTypeMap = new HashMap();
/**
* Get the API client
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}
/**
* Set the API client
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create contact roles
*
* @param body Contact role name (required)
* @return NewItemDto
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
Bad Request
-
0
Error
-
*/
public NewItemDto createContactRole(String body) throws ApiException {
return createContactRoleWithHttpInfo(body).getData();
}
/**
* Create contact roles
*
* @param body Contact role name (required)
* @return ApiResponse<NewItemDto>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
Bad Request
-
0
Error
-
*/
public ApiResponse createContactRoleWithHttpInfo(String body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createContactRole");
}
// create path and map variables
String localVarPath = "/v1/contact-roles";
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json-patch+json", "application/json", "text/json", "application/_*+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
NewItemDto
> apiResponse = apiClient.invokeAPI("ContactsRolesApi.createContactRole", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, createContactRoleResponseTypeMap, false);
return apiResponse;
}
/**
* Delete a contact role
*
* @param contactRoleId contactRoleId to delete associated record (required)
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
404
Not Found
-
0
Error
-
*/
public void deleteContactRole(java.util.UUID contactRoleId) throws ApiException {
deleteContactRoleWithHttpInfo(contactRoleId);
}
/**
* Delete a contact role
*
* @param contactRoleId contactRoleId to delete associated record (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
Bad Request
-
404
Not Found
-
0
Error
-
*/
public ApiResponse deleteContactRoleWithHttpInfo(java.util.UUID contactRoleId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'contactRoleId' is set
if (contactRoleId == null) {
throw new ApiException(400, "Missing the required parameter 'contactRoleId' when calling deleteContactRole");
}
// create path and map variables
String localVarPath = "/v1/contact-roles/{contactRoleId}"
.replaceAll("\\{" + "contactRoleId" + "\\}", apiClient.escapeString(contactRoleId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
Void
> apiResponse = apiClient.invokeAPI("ContactsRolesApi.deleteContactRole", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, deleteContactRoleResponseTypeMap, false);
return apiResponse;
}
/**
* Get list of the contact roles configured in your group
*
* @return java.util.List
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public java.util.List getContactRoles() throws ApiException {
return getContactRolesWithHttpInfo().getData();
}
/**
* Get list of the contact roles configured in your group
*
* @return ApiResponse<java.util.List>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
*/
public ApiResponse> getContactRolesWithHttpInfo() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/contact-roles";
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
java.util.List
> apiResponse = apiClient.invokeAPI("ContactsRolesApi.getContactRoles", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getContactRolesResponseTypeMap, false);
return apiResponse;
}
/**
* Edit a contact role
*
* @param contactRoleId contactRoleId to update associated record (required)
* @param body Updated contact role name (required)
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
Bad Request
-
404
Not Found
-
0
Error
-
*/
public void updateContactRole(java.util.UUID contactRoleId, String body) throws ApiException {
updateContactRoleWithHttpInfo(contactRoleId, body);
}
/**
* Edit a contact role
*
* @param contactRoleId contactRoleId to update associated record (required)
* @param body Updated contact role name (required)
* @return ApiResponse<Void>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
Bad Request
-
404
Not Found
-
0
Error
-
*/
public ApiResponse updateContactRoleWithHttpInfo(java.util.UUID contactRoleId, String body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'contactRoleId' is set
if (contactRoleId == null) {
throw new ApiException(400, "Missing the required parameter 'contactRoleId' when calling updateContactRole");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling updateContactRole");
}
// create path and map variables
String localVarPath = "/v1/contact-roles/{contactRoleId}"
.replaceAll("\\{" + "contactRoleId" + "\\}", apiClient.escapeString(contactRoleId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json-patch+json", "application/json", "text/json", "application/_*+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
Void
> apiResponse = apiClient.invokeAPI("ContactsRolesApi.updateContactRole", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, updateContactRoleResponseTypeMap, false);
return apiResponse;
}
}