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.NewItemDto;
import com.factset.sdk.IRNConfiguration.models.ProblemDetails;
import com.factset.sdk.IRNConfiguration.models.RelationshipDto;
import com.factset.sdk.IRNConfiguration.models.RelationshipSaveDto;
import com.factset.sdk.IRNConfiguration.models.RelationshipType;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ContactsRelationshipsApi {
private ApiClient apiClient;
public ContactsRelationshipsApi() {
this(Configuration.getDefaultApiClient());
}
public ContactsRelationshipsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
private static final Map createContactRelationshipTypeResponseTypeMap = new HashMap();
static {
createContactRelationshipTypeResponseTypeMap.put(201, new GenericType(){});
createContactRelationshipTypeResponseTypeMap.put(400, new GenericType(){});
createContactRelationshipTypeResponseTypeMap.put(0, new GenericType(){});
}
private static final Map deleteRelationshipResponseTypeMap = new HashMap();
private static final Map editRelationshipResponseTypeMap = new HashMap();
private static final Map getRelationshipsResponseTypeMap = new HashMap();
static {
getRelationshipsResponseTypeMap.put(200, new GenericType>(){});
}
/**
* 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 a relationship type
*
* @param relationshipSaveDto RelationshipSaveDto object to save (optional)
* @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 createContactRelationshipType(RelationshipSaveDto relationshipSaveDto) throws ApiException {
return createContactRelationshipTypeWithHttpInfo(relationshipSaveDto).getData();
}
/**
* Create a relationship type
*
* @param relationshipSaveDto RelationshipSaveDto object to save (optional)
* @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 createContactRelationshipTypeWithHttpInfo(RelationshipSaveDto relationshipSaveDto) throws ApiException {
Object localVarPostBody = relationshipSaveDto;
// create path and map variables
String localVarPath = "/v1/relationships";
// 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("ContactsRelationshipsApi.createContactRelationshipType", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, createContactRelationshipTypeResponseTypeMap, false);
return apiResponse;
}
/**
* Delete a relationship type
*
* @param relationshipId relationshipId 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 deleteRelationship(java.util.UUID relationshipId) throws ApiException {
deleteRelationshipWithHttpInfo(relationshipId);
}
/**
* Delete a relationship type
*
* @param relationshipId relationshipId 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 deleteRelationshipWithHttpInfo(java.util.UUID relationshipId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'relationshipId' is set
if (relationshipId == null) {
throw new ApiException(400, "Missing the required parameter 'relationshipId' when calling deleteRelationship");
}
// create path and map variables
String localVarPath = "/v1/relationships/{relationshipId}"
.replaceAll("\\{" + "relationshipId" + "\\}", apiClient.escapeString(relationshipId.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("ContactsRelationshipsApi.deleteRelationship", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, deleteRelationshipResponseTypeMap, false);
return apiResponse;
}
/**
* Edit a relationship type
*
* @param relationshipId relationshipId to update associated record (required)
* @param relationshipSaveDto RelationshipSaveDto object to update (optional)
* @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 editRelationship(java.util.UUID relationshipId, RelationshipSaveDto relationshipSaveDto) throws ApiException {
editRelationshipWithHttpInfo(relationshipId, relationshipSaveDto);
}
/**
* Edit a relationship type
*
* @param relationshipId relationshipId to update associated record (required)
* @param relationshipSaveDto RelationshipSaveDto object to update (optional)
* @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 editRelationshipWithHttpInfo(java.util.UUID relationshipId, RelationshipSaveDto relationshipSaveDto) throws ApiException {
Object localVarPostBody = relationshipSaveDto;
// verify the required parameter 'relationshipId' is set
if (relationshipId == null) {
throw new ApiException(400, "Missing the required parameter 'relationshipId' when calling editRelationship");
}
// create path and map variables
String localVarPath = "/v1/relationships/{relationshipId}"
.replaceAll("\\{" + "relationshipId" + "\\}", apiClient.escapeString(relationshipId.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("ContactsRelationshipsApi.editRelationship", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, editRelationshipResponseTypeMap, false);
return apiResponse;
}
/**
* Get list of the relationships configured in your group
*
* @param type (optional)
* @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 getRelationships(RelationshipType type) throws ApiException {
return getRelationshipsWithHttpInfo(type).getData();
}
/**
* Get list of the relationships configured in your group
*
* @param type (optional)
* @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> getRelationshipsWithHttpInfo(RelationshipType type) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/v1/relationships";
// 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();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));
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("ContactsRelationshipsApi.getRelationships", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getRelationshipsResponseTypeMap, false);
return apiResponse;
}
}