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

com.factset.sdk.IRNNotes.api.NotesApi Maven / Gradle / Ivy

There is a newer version: 4.0.1
Show newest version
package com.factset.sdk.IRNNotes.api;

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

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

import com.factset.sdk.IRNNotes.models.CreateNoteDto;
import com.factset.sdk.IRNNotes.models.NewItemDto;
import com.factset.sdk.IRNNotes.models.NoteDto;
import com.factset.sdk.IRNNotes.models.NoteSummaryDto;
import com.factset.sdk.IRNNotes.models.ProblemDetails;
import com.factset.sdk.IRNNotes.models.UpdateNoteDto;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class NotesApi {
  private ApiClient apiClient;

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

  public NotesApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }
  
  private static final Map createNoteResponseTypeMap = new HashMap();
  static {
    createNoteResponseTypeMap.put(201, new GenericType(){});
    createNoteResponseTypeMap.put(400, new GenericType(){});
  }

  private static final Map deleteNoteResponseTypeMap = new HashMap();

  private static final Map getNoteResponseTypeMap = new HashMap();
  static {
    getNoteResponseTypeMap.put(200, new GenericType(){});
    getNoteResponseTypeMap.put(404, new GenericType(){});
    getNoteResponseTypeMap.put(0, new GenericType(){});
  }

  private static final Map getNotesResponseTypeMap = new HashMap();
  static {
    getNotesResponseTypeMap.put(200, new GenericType>(){});
    getNotesResponseTypeMap.put(400, new GenericType(){});
  }

  private static final Map updateNoteResponseTypeMap = 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 a note
   * 
   * @param createNoteDto  (required)
   * @param xIRNContributorUsername  (optional)
   * @param xIRNContributorSerial  (optional)
   * @return NewItemDto
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
201 Success - Returns unique identifier of the note created -
400 Bad Request -
*/ public NewItemDto createNote(CreateNoteDto createNoteDto, String xIRNContributorUsername, String xIRNContributorSerial) throws ApiException { return createNoteWithHttpInfo(createNoteDto, xIRNContributorUsername, xIRNContributorSerial).getData(); } /** * Create a note * * @param createNoteDto (required) * @param xIRNContributorUsername (optional) * @param xIRNContributorSerial (optional) * @return ApiResponse<NewItemDto> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
201 Success - Returns unique identifier of the note created -
400 Bad Request -
*/ public ApiResponse createNoteWithHttpInfo(CreateNoteDto createNoteDto, String xIRNContributorUsername, String xIRNContributorSerial) throws ApiException { Object localVarPostBody = createNoteDto; // verify the required parameter 'createNoteDto' is set if (createNoteDto == null) { throw new ApiException(400, "Missing the required parameter 'createNoteDto' when calling createNote"); } // create path and map variables String localVarPath = "/notes"; // 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(); if (xIRNContributorUsername != null) localVarHeaderParams.put("X-IRN-Contributor-Username", apiClient.parameterToString(xIRNContributorUsername)); if (xIRNContributorSerial != null) localVarHeaderParams.put("X-IRN-Contributor-Serial", apiClient.parameterToString(xIRNContributorSerial)); 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("NotesApi.createNote", localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, createNoteResponseTypeMap, false); return apiResponse; } /** * Delete a Note * * @param noteId Note Id (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 deleteNote(java.util.UUID noteId) throws ApiException { deleteNoteWithHttpInfo(noteId); } /** * Delete a Note * * @param noteId Note Id (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 deleteNoteWithHttpInfo(java.util.UUID noteId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'noteId' is set if (noteId == null) { throw new ApiException(400, "Missing the required parameter 'noteId' when calling deleteNote"); } // create path and map variables String localVarPath = "/notes/{noteId}" .replaceAll("\\{" + "noteId" + "\\}", apiClient.escapeString(noteId.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("NotesApi.deleteNote", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, deleteNoteResponseTypeMap, false); return apiResponse; } /** * Get details of a note * * @param noteId Note Id (required) * @return NoteDto * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Success -
404 Not Found -
0 Error -
*/ public NoteDto getNote(java.util.UUID noteId) throws ApiException { return getNoteWithHttpInfo(noteId).getData(); } /** * Get details of a note * * @param noteId Note Id (required) * @return ApiResponse<NoteDto> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Success -
404 Not Found -
0 Error -
*/ public ApiResponse getNoteWithHttpInfo(java.util.UUID noteId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'noteId' is set if (noteId == null) { throw new ApiException(400, "Missing the required parameter 'noteId' when calling getNote"); } // create path and map variables String localVarPath = "/notes/{noteId}" .replaceAll("\\{" + "noteId" + "\\}", apiClient.escapeString(noteId.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< NoteDto > apiResponse = apiClient.invokeAPI("NotesApi.getNote", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, getNoteResponseTypeMap, false); return apiResponse; } /** * Get all the notes in the specified date range filtered on the given identifiers * * @param start StartDate (optional) * @param end EndDate (optional) * @param identifiers Set of identifiers to filter on (optional) * @param authors Set of authors to filter on (optional) * @param subjects Set of subjects to filter on (optional) * @param recommendations Set of recommendations to filter on (optional) * @param sentiments Set of sentiments to filter on (optional) * @param limit Limit on the number of notes retrieved (optional) * @param offset Fetch notes after the offset (optional) * @param modifiedSince Only return notes which have been modified or created since a particular time (optional) * @param states Set of states to filter on (optional) * @param filterOnRelatedSymbols Include notes whose related symbols match the identifier filter (optional, default to false) * @param includeRelatedEntities When set to true fetches notes tagged with all the entities related to identifiers param (optional, default to false) * @param xIRNIncludeDeleted (optional, default to false) * @return java.util.List * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ public java.util.List getNotes(String start, String end, java.util.List identifiers, java.util.List authors, java.util.List subjects, java.util.List recommendations, java.util.List sentiments, Integer limit, Integer offset, String modifiedSince, java.util.List states, Boolean filterOnRelatedSymbols, Boolean includeRelatedEntities, Boolean xIRNIncludeDeleted) throws ApiException { return getNotesWithHttpInfo(start, end, identifiers, authors, subjects, recommendations, sentiments, limit, offset, modifiedSince, states, filterOnRelatedSymbols, includeRelatedEntities, xIRNIncludeDeleted).getData(); } /** * Get all the notes in the specified date range filtered on the given identifiers * * @param start StartDate (optional) * @param end EndDate (optional) * @param identifiers Set of identifiers to filter on (optional) * @param authors Set of authors to filter on (optional) * @param subjects Set of subjects to filter on (optional) * @param recommendations Set of recommendations to filter on (optional) * @param sentiments Set of sentiments to filter on (optional) * @param limit Limit on the number of notes retrieved (optional) * @param offset Fetch notes after the offset (optional) * @param modifiedSince Only return notes which have been modified or created since a particular time (optional) * @param states Set of states to filter on (optional) * @param filterOnRelatedSymbols Include notes whose related symbols match the identifier filter (optional, default to false) * @param includeRelatedEntities When set to true fetches notes tagged with all the entities related to identifiers param (optional, default to false) * @param xIRNIncludeDeleted (optional, default to false) * @return ApiResponse<java.util.List> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
*/ public ApiResponse> getNotesWithHttpInfo(String start, String end, java.util.List identifiers, java.util.List authors, java.util.List subjects, java.util.List recommendations, java.util.List sentiments, Integer limit, Integer offset, String modifiedSince, java.util.List states, Boolean filterOnRelatedSymbols, Boolean includeRelatedEntities, Boolean xIRNIncludeDeleted) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/notes"; // 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("", "start", start)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "identifiers", identifiers)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "authors", authors)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "subjects", subjects)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "recommendations", recommendations)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "sentiments", sentiments)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "modifiedSince", modifiedSince)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "states", states)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filterOnRelatedSymbols", filterOnRelatedSymbols)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "includeRelatedEntities", includeRelatedEntities)); if (xIRNIncludeDeleted != null) localVarHeaderParams.put("X-IRN-Include-Deleted", apiClient.parameterToString(xIRNIncludeDeleted)); 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("NotesApi.getNotes", localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, getNotesResponseTypeMap, false); return apiResponse; } /** * Updates a note by replacing existing note with new data * * @param noteId Note Id (required) * @param updateNoteDto The new data for the note (optional) * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 Success -
400 Bad Request -
404 Not Found -
*/ public void updateNote(java.util.UUID noteId, UpdateNoteDto updateNoteDto) throws ApiException { updateNoteWithHttpInfo(noteId, updateNoteDto); } /** * Updates a note by replacing existing note with new data * * @param noteId Note Id (required) * @param updateNoteDto The new data for the note (optional) * @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 -
*/ public ApiResponse updateNoteWithHttpInfo(java.util.UUID noteId, UpdateNoteDto updateNoteDto) throws ApiException { Object localVarPostBody = updateNoteDto; // verify the required parameter 'noteId' is set if (noteId == null) { throw new ApiException(400, "Missing the required parameter 'noteId' when calling updateNote"); } // create path and map variables String localVarPath = "/notes/{noteId}" .replaceAll("\\{" + "noteId" + "\\}", apiClient.escapeString(noteId.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("NotesApi.updateNote", localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, updateNoteResponseTypeMap, false); return apiResponse; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy