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

com.factset.sdk.OpenRisk.api.OperationsApi Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package com.factset.sdk.OpenRisk.api;

import com.factset.sdk.OpenRisk.ApiException;
import com.factset.sdk.OpenRisk.ApiClient;
import com.factset.sdk.OpenRisk.ApiResponse;
import com.factset.sdk.OpenRisk.Configuration;
import com.factset.sdk.OpenRisk.Pair;

import javax.ws.rs.core.GenericType;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

import com.factset.sdk.OpenRisk.models.CalculateFromHoldingsRequestBody;
import com.factset.sdk.OpenRisk.models.ErrorResponse;
import com.factset.sdk.OpenRisk.models.GenerateIDMappingRequestBody;
import com.factset.sdk.OpenRisk.models.InlineResponse2004;
import com.factset.sdk.OpenRisk.models.InlineResponse2005;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class OperationsApi {
  private ApiClient apiClient;

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

  public OperationsApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }
  
  private static final Map calculateFromHoldingsResponseTypeMap = new HashMap();
  static {
    calculateFromHoldingsResponseTypeMap.put(200, new GenericType(){});
    calculateFromHoldingsResponseTypeMap.put(400, new GenericType(){});
    calculateFromHoldingsResponseTypeMap.put(401, new GenericType(){});
    calculateFromHoldingsResponseTypeMap.put(403, new GenericType(){});
    calculateFromHoldingsResponseTypeMap.put(404, new GenericType(){});
    calculateFromHoldingsResponseTypeMap.put(500, new GenericType(){});
  }

  private static final Map generateIdMappingResponseTypeMap = new HashMap();
  static {
    generateIdMappingResponseTypeMap.put(200, new GenericType(){});
    generateIdMappingResponseTypeMap.put(400, new GenericType(){});
    generateIdMappingResponseTypeMap.put(403, new GenericType(){});
    generateIdMappingResponseTypeMap.put(404, new GenericType(){});
    generateIdMappingResponseTypeMap.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;
  }

  /**
   * Calculate risk statistics
   * Calculate predicted risk statistics for provided holdings using risk model data. Asset symbols and market values/weights are required.
   * @param version Semantic version number. See [this link here](https://regexr.com/47b7t) to test validate patterns. (required)
   * @param calculateFromHoldingsRequestBody  (required)
   * @return InlineResponse2004
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
200 Calculate predicted risk statistics for provided holdings using risk model data. Asset symbols and market values/weights are required. * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
400 Request was malformed or the requested data is not available * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
401 Missing or invalid authentication -
403 Access forbidden for the requested data * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
404 Endpoint not found * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
429 Rate limit reached. Wait until the time specified in header 'Retry-After' has elapsed before making further requests. * Retry-After -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
500 Internal server error occurred * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
*/ public InlineResponse2004 calculateFromHoldings(String version, CalculateFromHoldingsRequestBody calculateFromHoldingsRequestBody) throws ApiException { return calculateFromHoldingsWithHttpInfo(version, calculateFromHoldingsRequestBody).getData(); } /** * Calculate risk statistics * Calculate predicted risk statistics for provided holdings using risk model data. Asset symbols and market values/weights are required. * @param version Semantic version number. See [this link here](https://regexr.com/47b7t) to test validate patterns. (required) * @param calculateFromHoldingsRequestBody (required) * @return ApiResponse<InlineResponse2004> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Calculate predicted risk statistics for provided holdings using risk model data. Asset symbols and market values/weights are required. * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
400 Request was malformed or the requested data is not available * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
401 Missing or invalid authentication -
403 Access forbidden for the requested data * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
404 Endpoint not found * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
429 Rate limit reached. Wait until the time specified in header 'Retry-After' has elapsed before making further requests. * Retry-After -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
500 Internal server error occurred * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
*/ public ApiResponse calculateFromHoldingsWithHttpInfo(String version, CalculateFromHoldingsRequestBody calculateFromHoldingsRequestBody) throws ApiException { Object localVarPostBody = calculateFromHoldingsRequestBody; // verify the required parameter 'version' is set if (version == null) { throw new ApiException(400, "Missing the required parameter 'version' when calling calculateFromHoldings"); } // verify the required parameter 'calculateFromHoldingsRequestBody' is set if (calculateFromHoldingsRequestBody == null) { throw new ApiException(400, "Missing the required parameter 'calculateFromHoldingsRequestBody' when calling calculateFromHoldings"); } // create path and map variables String localVarPath = "/linear/{version}/calculate/from-holdings" .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.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", "text/plain" }; 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< InlineResponse2004 > apiResponse = apiClient.invokeAPI("OperationsApi.calculateFromHoldings", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, calculateFromHoldingsResponseTypeMap, false); return apiResponse; } /** * Generate risk model ID mapping * Resolve all input holdings IDs against a risk model for coverage and provide a mapping to security indices in the model or the reason for exclusion * @param version Semantic version number. See [this link here](https://regexr.com/47b7t) to test validate patterns. (required) * @param generateIDMappingRequestBody (required) * @return InlineResponse2005 * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Provides a mapping to security indices in the risk model or the reason for exclusion -
400 Request was malformed or the requested data is not available * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
403 Access forbidden for the requested data * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
404 Endpoint not found * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
429 Rate limit reached. Wait until the time specified in header 'Retry-After' has elapsed before making further requests. * Retry-After -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
500 Internal server error occurred * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
*/ public InlineResponse2005 generateIdMapping(String version, GenerateIDMappingRequestBody generateIDMappingRequestBody) throws ApiException { return generateIdMappingWithHttpInfo(version, generateIDMappingRequestBody).getData(); } /** * Generate risk model ID mapping * Resolve all input holdings IDs against a risk model for coverage and provide a mapping to security indices in the model or the reason for exclusion * @param version Semantic version number. See [this link here](https://regexr.com/47b7t) to test validate patterns. (required) * @param generateIDMappingRequestBody (required) * @return ApiResponse<InlineResponse2005> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Provides a mapping to security indices in the risk model or the reason for exclusion -
400 Request was malformed or the requested data is not available * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
403 Access forbidden for the requested data * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
404 Endpoint not found * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
429 Rate limit reached. Wait until the time specified in header 'Retry-After' has elapsed before making further requests. * Retry-After -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
500 Internal server error occurred * api-supported-versions -
* api-version -
* RateLimit-Limit -
* RateLimit-Remaining -
* RateLimit-Reset -
*/ public ApiResponse generateIdMappingWithHttpInfo(String version, GenerateIDMappingRequestBody generateIDMappingRequestBody) throws ApiException { Object localVarPostBody = generateIDMappingRequestBody; // verify the required parameter 'version' is set if (version == null) { throw new ApiException(400, "Missing the required parameter 'version' when calling generateIdMapping"); } // verify the required parameter 'generateIDMappingRequestBody' is set if (generateIDMappingRequestBody == null) { throw new ApiException(400, "Missing the required parameter 'generateIDMappingRequestBody' when calling generateIdMapping"); } // create path and map variables String localVarPath = "/linear/{version}/generate/id-mapping" .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.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" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "FactSetApiKey", "FactSetOAuth2", "FactSetOAuth2Client" }; ApiResponse< InlineResponse2005 > apiResponse = apiClient.invokeAPI("OperationsApi.generateIdMapping", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, generateIdMappingResponseTypeMap, false); return apiResponse; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy