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.FactSetBenchmarks.api;
import com.factset.sdk.FactSetBenchmarks.ApiException;
import com.factset.sdk.FactSetBenchmarks.ApiClient;
import com.factset.sdk.FactSetBenchmarks.ApiResponse;
import com.factset.sdk.FactSetBenchmarks.Configuration;
import com.factset.sdk.FactSetBenchmarks.Pair;
import javax.ws.rs.core.GenericType;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import com.factset.sdk.FactSetBenchmarks.models.BenchmarkConstituentsRequest;
import com.factset.sdk.FactSetBenchmarks.models.BenchmarkConstituentsResponse;
import com.factset.sdk.FactSetBenchmarks.models.ErrorResponse;
import com.factset.sdk.FactSetBenchmarks.models.FixedIncomeBenchmarkConstituentsRequest;
import com.factset.sdk.FactSetBenchmarks.models.FixedIncomeBenchmarkConstituentsResponse;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class BenchmarkConstituentsApi {
private ApiClient apiClient;
public BenchmarkConstituentsApi() {
this(Configuration.getDefaultApiClient());
}
public BenchmarkConstituentsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
private static final Map getBenchmarkConstituentsResponseTypeMap = new HashMap();
static {
getBenchmarkConstituentsResponseTypeMap.put(200, new GenericType(){});
getBenchmarkConstituentsResponseTypeMap.put(400, new GenericType(){});
getBenchmarkConstituentsResponseTypeMap.put(401, new GenericType(){});
getBenchmarkConstituentsResponseTypeMap.put(403, new GenericType(){});
getBenchmarkConstituentsResponseTypeMap.put(415, new GenericType(){});
getBenchmarkConstituentsResponseTypeMap.put(500, new GenericType(){});
}
private static final Map getBenchmarkConstituentsForListResponseTypeMap = new HashMap();
static {
getBenchmarkConstituentsForListResponseTypeMap.put(200, new GenericType(){});
getBenchmarkConstituentsForListResponseTypeMap.put(400, new GenericType(){});
getBenchmarkConstituentsForListResponseTypeMap.put(401, new GenericType(){});
getBenchmarkConstituentsForListResponseTypeMap.put(403, new GenericType(){});
getBenchmarkConstituentsForListResponseTypeMap.put(415, new GenericType(){});
getBenchmarkConstituentsForListResponseTypeMap.put(500, new GenericType(){});
}
private static final Map getFIBenchmarkConstituentsResponseTypeMap = new HashMap();
static {
getFIBenchmarkConstituentsResponseTypeMap.put(200, new GenericType(){});
getFIBenchmarkConstituentsResponseTypeMap.put(400, new GenericType(){});
getFIBenchmarkConstituentsResponseTypeMap.put(401, new GenericType(){});
getFIBenchmarkConstituentsResponseTypeMap.put(403, new GenericType(){});
getFIBenchmarkConstituentsResponseTypeMap.put(415, new GenericType(){});
getFIBenchmarkConstituentsResponseTypeMap.put(500, new GenericType(){});
}
private static final Map getFIBenchmarkConstituentsForListResponseTypeMap = new HashMap();
static {
getFIBenchmarkConstituentsForListResponseTypeMap.put(200, new GenericType(){});
getFIBenchmarkConstituentsForListResponseTypeMap.put(400, new GenericType(){});
getFIBenchmarkConstituentsForListResponseTypeMap.put(401, new GenericType(){});
getFIBenchmarkConstituentsForListResponseTypeMap.put(403, new GenericType(){});
getFIBenchmarkConstituentsForListResponseTypeMap.put(415, new GenericType(){});
getFIBenchmarkConstituentsForListResponseTypeMap.put(500, 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;
}
/**
* Returns the requested Benchmark Constituents and respective Weights, Price and Market Value.
* Returns the requested Benchmark Constituents and respective Weights, Price and Market Value. You must be authorized for the `ids` requested. Use the helper endpoint **_/id-list** for valid identifiers.
* @param ids Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers. You must be authorized for the `ids` requested, otherwise you will receive an error. <p>***ids limit** = 1 per request*</p> (required)
* @param date Date of holding expressed in YYYY-MM-DD format. (optional)
* @param currency Currency for response. (optional)
* @return BenchmarkConstituentsResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Benchmark data items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public BenchmarkConstituentsResponse getBenchmarkConstituents(java.util.List ids, String date, String currency) throws ApiException {
return getBenchmarkConstituentsWithHttpInfo(ids, date, currency).getData();
}
/**
* Returns the requested Benchmark Constituents and respective Weights, Price and Market Value.
* Returns the requested Benchmark Constituents and respective Weights, Price and Market Value. You must be authorized for the `ids` requested. Use the helper endpoint **_/id-list** for valid identifiers.
* @param ids Benchmark Identifiers. Reference the helper endpoint **_/id-list** to get a sample list of valid identifiers. You must be authorized for the `ids` requested, otherwise you will receive an error. <p>***ids limit** = 1 per request*</p> (required)
* @param date Date of holding expressed in YYYY-MM-DD format. (optional)
* @param currency Currency for response. (optional)
* @return ApiResponse<BenchmarkConstituentsResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Benchmark data items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public ApiResponse getBenchmarkConstituentsWithHttpInfo(java.util.List ids, String date, String currency) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'ids' is set
if (ids == null) {
throw new ApiException(400, "Missing the required parameter 'ids' when calling getBenchmarkConstituents");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/constituents";
// 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("csv", "ids", ids));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "date", date));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "currency", currency));
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<
BenchmarkConstituentsResponse
> apiResponse = apiClient.invokeAPI("BenchmarkConstituentsApi.getBenchmarkConstituents", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getBenchmarkConstituentsResponseTypeMap, false);
return apiResponse;
}
/**
* Returns the requested Benchmark Constituents and respective Weights, Price and Market Value.
* Returns the requested Benchmark Constituents and respective Weights, Price and Market Value. You must be authorized for the `ids` requested. Use the helper endpoint **_/id-list** for valid identifiers.
* @param benchmarkConstituentsRequest Requests Benchmark Constituents for the given identifier and date. (required)
* @return BenchmarkConstituentsResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Benchmark data items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public BenchmarkConstituentsResponse getBenchmarkConstituentsForList(BenchmarkConstituentsRequest benchmarkConstituentsRequest) throws ApiException {
return getBenchmarkConstituentsForListWithHttpInfo(benchmarkConstituentsRequest).getData();
}
/**
* Returns the requested Benchmark Constituents and respective Weights, Price and Market Value.
* Returns the requested Benchmark Constituents and respective Weights, Price and Market Value. You must be authorized for the `ids` requested. Use the helper endpoint **_/id-list** for valid identifiers.
* @param benchmarkConstituentsRequest Requests Benchmark Constituents for the given identifier and date. (required)
* @return ApiResponse<BenchmarkConstituentsResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Benchmark data items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public ApiResponse getBenchmarkConstituentsForListWithHttpInfo(BenchmarkConstituentsRequest benchmarkConstituentsRequest) throws ApiException {
Object localVarPostBody = benchmarkConstituentsRequest;
// verify the required parameter 'benchmarkConstituentsRequest' is set
if (benchmarkConstituentsRequest == null) {
throw new ApiException(400, "Missing the required parameter 'benchmarkConstituentsRequest' when calling getBenchmarkConstituentsForList");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/constituents";
// 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"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
BenchmarkConstituentsResponse
> apiResponse = apiClient.invokeAPI("BenchmarkConstituentsApi.getBenchmarkConstituentsForList", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getBenchmarkConstituentsForListResponseTypeMap, false);
return apiResponse;
}
/**
* Returns the requested Fixed Income Benchmark Constituents and respective Weights, Price and Market Value.
* Returns the requested Fixed Income Benchmark Constituents and respective Weights, Price and Market Value. You must be authorized for the `ids` requested.
* @param ids Fixed Income Benchmark Identifiers. You must be authorized for the `ids` requested, otherwise you will receive an error. <p>***ids limit** = 1 per request*</p> (required)
* @param date Date of holding expressed in YYYY-MM-DD format. (optional)
* @param currency Currency for response. (optional)
* @return FixedIncomeBenchmarkConstituentsResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Fixed Income Constituent data items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public FixedIncomeBenchmarkConstituentsResponse getFIBenchmarkConstituents(java.util.List ids, String date, String currency) throws ApiException {
return getFIBenchmarkConstituentsWithHttpInfo(ids, date, currency).getData();
}
/**
* Returns the requested Fixed Income Benchmark Constituents and respective Weights, Price and Market Value.
* Returns the requested Fixed Income Benchmark Constituents and respective Weights, Price and Market Value. You must be authorized for the `ids` requested.
* @param ids Fixed Income Benchmark Identifiers. You must be authorized for the `ids` requested, otherwise you will receive an error. <p>***ids limit** = 1 per request*</p> (required)
* @param date Date of holding expressed in YYYY-MM-DD format. (optional)
* @param currency Currency for response. (optional)
* @return ApiResponse<FixedIncomeBenchmarkConstituentsResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Fixed Income Constituent data items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public ApiResponse getFIBenchmarkConstituentsWithHttpInfo(java.util.List ids, String date, String currency) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'ids' is set
if (ids == null) {
throw new ApiException(400, "Missing the required parameter 'ids' when calling getFIBenchmarkConstituents");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/fixed-income-constituents";
// 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("csv", "ids", ids));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "date", date));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "currency", currency));
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<
FixedIncomeBenchmarkConstituentsResponse
> apiResponse = apiClient.invokeAPI("BenchmarkConstituentsApi.getFIBenchmarkConstituents", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getFIBenchmarkConstituentsResponseTypeMap, false);
return apiResponse;
}
/**
* Returns the requested Benchmark Constituents and respective Weights, Price and Market Value.
* Returns the requested Fixed Income Benchmark Constituents and respective Weights, Price and Market Value. You must be authorized for the `ids` requested.
* @param fixedIncomeBenchmarkConstituentsRequest Requests Fixed Income Benchmark Constituents for the given identifier and date. (required)
* @return FixedIncomeBenchmarkConstituentsResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Fixed Income Constituent data items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public FixedIncomeBenchmarkConstituentsResponse getFIBenchmarkConstituentsForList(FixedIncomeBenchmarkConstituentsRequest fixedIncomeBenchmarkConstituentsRequest) throws ApiException {
return getFIBenchmarkConstituentsForListWithHttpInfo(fixedIncomeBenchmarkConstituentsRequest).getData();
}
/**
* Returns the requested Benchmark Constituents and respective Weights, Price and Market Value.
* Returns the requested Fixed Income Benchmark Constituents and respective Weights, Price and Market Value. You must be authorized for the `ids` requested.
* @param fixedIncomeBenchmarkConstituentsRequest Requests Fixed Income Benchmark Constituents for the given identifier and date. (required)
* @return ApiResponse<FixedIncomeBenchmarkConstituentsResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
Fixed Income Constituent data items
-
400
Bad Request. This can occur for several reasons. Please review the \"message\" for more details.
-
401
Unauthenticated USERNAME-SERIAL. Ensure you are logged in and have successfully generated an API KEY for the IP range you are connecting from. For more help, select the **Report Issue** in the top right corner of this Developer Portal specification card and choose Connectivity 401 or 403 Responses.
-
403
The USERNAME-SERIAL attempted to request the endpoint is not authorized to access. The request was a legal request, but the server is refusing to respond. Please reach out to FactSet Account Team for assistance with authorization.
-
415
Unsupported Media Type. This error may be returned when the caller sends a resource in a format that is not accepted by the server. This can be fixed by ensuring that Content-Type header is set to the correct value. In this instance, \"application/json\" would be the appropriate value.
-
500
Internal Server Error.
-
*/
public ApiResponse getFIBenchmarkConstituentsForListWithHttpInfo(FixedIncomeBenchmarkConstituentsRequest fixedIncomeBenchmarkConstituentsRequest) throws ApiException {
Object localVarPostBody = fixedIncomeBenchmarkConstituentsRequest;
// verify the required parameter 'fixedIncomeBenchmarkConstituentsRequest' is set
if (fixedIncomeBenchmarkConstituentsRequest == null) {
throw new ApiException(400, "Missing the required parameter 'fixedIncomeBenchmarkConstituentsRequest' when calling getFIBenchmarkConstituentsForList");
}
// create path and map variables
String localVarPath = "/factset-benchmarks/v1/fixed-income-constituents";
// 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"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" };
ApiResponse<
FixedIncomeBenchmarkConstituentsResponse
> apiResponse = apiClient.invokeAPI("BenchmarkConstituentsApi.getFIBenchmarkConstituentsForList", localVarPath, "POST", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, getFIBenchmarkConstituentsForListResponseTypeMap, false);
return apiResponse;
}
}