/**
 * FinFeedAPI Stock REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 * Contact: support@apibricks.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */


import ApiClient from "../ApiClient";
import AdminAdminMessageModel from '../model/AdminAdminMessageModel';
import AdminSystemEventModel from '../model/AdminSystemEventModel';
import Level1QuoteUpdateModel from '../model/Level1QuoteUpdateModel';
import Level2PriceLevelUpdateModel from '../model/Level2PriceLevelUpdateModel';
import Level3OrderBookModel from '../model/Level3OrderBookModel';
import TradeTradeModel from '../model/TradeTradeModel';

/**
* NativeIEX service.
* @module api/NativeIEXApi
* @version v1
*/
export default class NativeIEXApi {

    /**
    * Constructs a new NativeIEXApi. 
    * @alias module:api/NativeIEXApi
    * @class
    * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
    * default to {@link module:ApiClient#instance} if unspecified.
    */
    constructor(apiClient) {
        this.apiClient = apiClient || ApiClient.instance;
    }


    /**
     * Callback function to receive the result of the v1NativeIexAdminMessagesSymbolGet operation.
     * @callback module:api/NativeIEXApi~v1NativeIexAdminMessagesSymbolGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/AdminAdminMessageModel>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Get Admin Messages
     * @param {String} symbol The symbol identifier
     * @param {Date} date Optional date in format YYYY-MM-DD (defaults to latest available data)
     * @param {module:api/NativeIEXApi~v1NativeIexAdminMessagesSymbolGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/AdminAdminMessageModel>}
     */
    v1NativeIexAdminMessagesSymbolGet(symbol, date, callback) {
      let postBody = null;
      // verify the required parameter 'symbol' is set
      if (symbol === undefined || symbol === null) {
        throw new Error("Missing the required parameter 'symbol' when calling v1NativeIexAdminMessagesSymbolGet");
      }
      // verify the required parameter 'date' is set
      if (date === undefined || date === null) {
        throw new Error("Missing the required parameter 'date' when calling v1NativeIexAdminMessagesSymbolGet");
      }

      let pathParams = {
        'symbol': symbol
      };
      let queryParams = {
        'date': date
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = [AdminAdminMessageModel];
      return this.apiClient.callApi(
        '/v1/native/iex/admin/messages/{symbol}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }

    /**
     * Callback function to receive the result of the v1NativeIexAdminSystemEventGet operation.
     * @callback module:api/NativeIEXApi~v1NativeIexAdminSystemEventGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/AdminSystemEventModel>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Get System Events
     * @param {Date} date Date in format YYYY-MM-DD
     * @param {module:api/NativeIEXApi~v1NativeIexAdminSystemEventGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/AdminSystemEventModel>}
     */
    v1NativeIexAdminSystemEventGet(date, callback) {
      let postBody = null;
      // verify the required parameter 'date' is set
      if (date === undefined || date === null) {
        throw new Error("Missing the required parameter 'date' when calling v1NativeIexAdminSystemEventGet");
      }

      let pathParams = {
      };
      let queryParams = {
        'date': date
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = [AdminSystemEventModel];
      return this.apiClient.callApi(
        '/v1/native/iex/admin/system-event', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }

    /**
     * Callback function to receive the result of the v1NativeIexLevel1QuoteSymbolGet operation.
     * @callback module:api/NativeIEXApi~v1NativeIexLevel1QuoteSymbolGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/Level1QuoteUpdateModel>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Get Level-1 Quotes
     * @param {String} symbol The symbol identifier
     * @param {Date} date Optional date in format YYYY-MM-DD (defaults to latest available data)
     * @param {module:api/NativeIEXApi~v1NativeIexLevel1QuoteSymbolGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/Level1QuoteUpdateModel>}
     */
    v1NativeIexLevel1QuoteSymbolGet(symbol, date, callback) {
      let postBody = null;
      // verify the required parameter 'symbol' is set
      if (symbol === undefined || symbol === null) {
        throw new Error("Missing the required parameter 'symbol' when calling v1NativeIexLevel1QuoteSymbolGet");
      }
      // verify the required parameter 'date' is set
      if (date === undefined || date === null) {
        throw new Error("Missing the required parameter 'date' when calling v1NativeIexLevel1QuoteSymbolGet");
      }

      let pathParams = {
        'symbol': symbol
      };
      let queryParams = {
        'date': date
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = [Level1QuoteUpdateModel];
      return this.apiClient.callApi(
        '/v1/native/iex/level1-quote/{symbol}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }

    /**
     * Callback function to receive the result of the v1NativeIexLevel2PriceLevelUpdateSymbolGet operation.
     * @callback module:api/NativeIEXApi~v1NativeIexLevel2PriceLevelUpdateSymbolGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/Level2PriceLevelUpdateModel>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Get Level-2 Price Level Book
     * @param {String} symbol The symbol identifier
     * @param {Date} date Optional date in format YYYY-MM-DD (defaults to latest available data)
     * @param {module:api/NativeIEXApi~v1NativeIexLevel2PriceLevelUpdateSymbolGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/Level2PriceLevelUpdateModel>}
     */
    v1NativeIexLevel2PriceLevelUpdateSymbolGet(symbol, date, callback) {
      let postBody = null;
      // verify the required parameter 'symbol' is set
      if (symbol === undefined || symbol === null) {
        throw new Error("Missing the required parameter 'symbol' when calling v1NativeIexLevel2PriceLevelUpdateSymbolGet");
      }
      // verify the required parameter 'date' is set
      if (date === undefined || date === null) {
        throw new Error("Missing the required parameter 'date' when calling v1NativeIexLevel2PriceLevelUpdateSymbolGet");
      }

      let pathParams = {
        'symbol': symbol
      };
      let queryParams = {
        'date': date
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = [Level2PriceLevelUpdateModel];
      return this.apiClient.callApi(
        '/v1/native/iex/level2-price-level-update/{symbol}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }

    /**
     * Callback function to receive the result of the v1NativeIexLevel3OrderBookSymbolGet operation.
     * @callback module:api/NativeIEXApi~v1NativeIexLevel3OrderBookSymbolGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/Level3OrderBookModel>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Get Level-3 Order Book
     * @param {String} symbol The symbol identifier
     * @param {Date} date Optional date in format YYYY-MM-DD (defaults to latest available data)
     * @param {module:api/NativeIEXApi~v1NativeIexLevel3OrderBookSymbolGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/Level3OrderBookModel>}
     */
    v1NativeIexLevel3OrderBookSymbolGet(symbol, date, callback) {
      let postBody = null;
      // verify the required parameter 'symbol' is set
      if (symbol === undefined || symbol === null) {
        throw new Error("Missing the required parameter 'symbol' when calling v1NativeIexLevel3OrderBookSymbolGet");
      }
      // verify the required parameter 'date' is set
      if (date === undefined || date === null) {
        throw new Error("Missing the required parameter 'date' when calling v1NativeIexLevel3OrderBookSymbolGet");
      }

      let pathParams = {
        'symbol': symbol
      };
      let queryParams = {
        'date': date
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = [Level3OrderBookModel];
      return this.apiClient.callApi(
        '/v1/native/iex/level3-order-book/{symbol}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }

    /**
     * Callback function to receive the result of the v1NativeIexTradeSymbolGet operation.
     * @callback module:api/NativeIEXApi~v1NativeIexTradeSymbolGetCallback
     * @param {String} error Error message, if any.
     * @param {Array.<module:model/TradeTradeModel>} data The data returned by the service call.
     * @param {String} response The complete HTTP response.
     */

    /**
     * Get Trades
     * @param {String} symbol The symbol identifier
     * @param {Date} date Optional date in format YYYY-MM-DD (defaults to latest available data)
     * @param {module:api/NativeIEXApi~v1NativeIexTradeSymbolGetCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link Array.<module:model/TradeTradeModel>}
     */
    v1NativeIexTradeSymbolGet(symbol, date, callback) {
      let postBody = null;
      // verify the required parameter 'symbol' is set
      if (symbol === undefined || symbol === null) {
        throw new Error("Missing the required parameter 'symbol' when calling v1NativeIexTradeSymbolGet");
      }
      // verify the required parameter 'date' is set
      if (date === undefined || date === null) {
        throw new Error("Missing the required parameter 'date' when calling v1NativeIexTradeSymbolGet");
      }

      let pathParams = {
        'symbol': symbol
      };
      let queryParams = {
        'date': date
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['APIKey', 'JWT'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = [TradeTradeModel];
      return this.apiClient.callApi(
        '/v1/native/iex/trade/{symbol}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null, callback
      );
    }


}
