/**
 * @fileoverview AUTOMATICALLY GENERATED service for API.Client.NativeIEXApi.
 * Do not edit this file by hand or your changes will be lost next time it is
 * generated.
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 * Version: v1
* Generator version: 7.14.0
 * Generated by: org.openapitools.codegen.languages.JavascriptClosureAngularClientCodegen
 */
/**
 * @license MIT License
 * https://github.com/api-bricks/api-bricks-sdk/blob/master/LICENSE
 */

goog.provide('API.Client.NativeIEXApi');

goog.require('API.Client.Admin.AdminMessageModel');
goog.require('API.Client.Admin.SystemEventModel');
goog.require('API.Client.Level1.QuoteUpdateModel');
goog.require('API.Client.Level2.PriceLevelUpdateModel');
goog.require('API.Client.Level3.OrderBookModel');
goog.require('API.Client.Trade.TradeModel');

/**
 * @constructor
 * @param {!angular.$http} $http
 * @param {!Object} $httpParamSerializer
 * @param {!angular.$injector} $injector
 * @struct
 */
API.Client.NativeIEXApi = function($http, $httpParamSerializer, $injector) {
  /** @private {!string} */
  this.basePath_ = $injector.has('NativeIEXApiBasePath') ?
                   /** @type {!string} */ ($injector.get('NativeIEXApiBasePath')) :
                   'https://api-historical.stock.finfeedapi.com';

  /** @private {!Object<string, string>} */
  this.defaultHeaders_ = $injector.has('NativeIEXApiDefaultHeaders') ?
                   /** @type {!Object<string, string>} */ (
                       $injector.get('NativeIEXApiDefaultHeaders')) :
                   {};

  /** @private {!angular.$http} */
  this.http_ = $http;

  /** @package {!Object} */
  this.httpParamSerializer = $injector.get('$httpParamSerializer');
}
API.Client.NativeIEXApi.$inject = ['$http', '$httpParamSerializer', '$injector'];

/**
 * 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 {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.Admin.AdminMessageModel>>}
 */
API.Client.NativeIEXApi.prototype.v1NativeIexAdminMessagesSymbolGet = function(symbol, date, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/native/iex/admin/messages/{symbol}'
      .replace('{' + 'symbol' + '}', String(symbol));

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  // verify required parameter 'symbol' is set
  if (!symbol) {
    throw new Error('Missing required parameter symbol when calling v1NativeIexAdminMessagesSymbolGet');
  }
  // verify required parameter 'date' is set
  if (!date) {
    throw new Error('Missing required parameter date when calling v1NativeIexAdminMessagesSymbolGet');
  }
  if (date !== undefined) {
    queryParameters['date'] = date;
  }

  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}

/**
 * Get System Events
 * 
 * @param {!Date} date Date in format YYYY-MM-DD
 * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.Admin.SystemEventModel>>}
 */
API.Client.NativeIEXApi.prototype.v1NativeIexAdminSystemEventGet = function(date, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/native/iex/admin/system-event';

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  // verify required parameter 'date' is set
  if (!date) {
    throw new Error('Missing required parameter date when calling v1NativeIexAdminSystemEventGet');
  }
  if (date !== undefined) {
    queryParameters['date'] = date;
  }

  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}

/**
 * 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 {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.Level1.QuoteUpdateModel>>}
 */
API.Client.NativeIEXApi.prototype.v1NativeIexLevel1QuoteSymbolGet = function(symbol, date, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/native/iex/level1-quote/{symbol}'
      .replace('{' + 'symbol' + '}', String(symbol));

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  // verify required parameter 'symbol' is set
  if (!symbol) {
    throw new Error('Missing required parameter symbol when calling v1NativeIexLevel1QuoteSymbolGet');
  }
  // verify required parameter 'date' is set
  if (!date) {
    throw new Error('Missing required parameter date when calling v1NativeIexLevel1QuoteSymbolGet');
  }
  if (date !== undefined) {
    queryParameters['date'] = date;
  }

  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}

/**
 * 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 {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.Level2.PriceLevelUpdateModel>>}
 */
API.Client.NativeIEXApi.prototype.v1NativeIexLevel2PriceLevelUpdateSymbolGet = function(symbol, date, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/native/iex/level2-price-level-update/{symbol}'
      .replace('{' + 'symbol' + '}', String(symbol));

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  // verify required parameter 'symbol' is set
  if (!symbol) {
    throw new Error('Missing required parameter symbol when calling v1NativeIexLevel2PriceLevelUpdateSymbolGet');
  }
  // verify required parameter 'date' is set
  if (!date) {
    throw new Error('Missing required parameter date when calling v1NativeIexLevel2PriceLevelUpdateSymbolGet');
  }
  if (date !== undefined) {
    queryParameters['date'] = date;
  }

  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}

/**
 * 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 {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.Level3.OrderBookModel>>}
 */
API.Client.NativeIEXApi.prototype.v1NativeIexLevel3OrderBookSymbolGet = function(symbol, date, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/native/iex/level3-order-book/{symbol}'
      .replace('{' + 'symbol' + '}', String(symbol));

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  // verify required parameter 'symbol' is set
  if (!symbol) {
    throw new Error('Missing required parameter symbol when calling v1NativeIexLevel3OrderBookSymbolGet');
  }
  // verify required parameter 'date' is set
  if (!date) {
    throw new Error('Missing required parameter date when calling v1NativeIexLevel3OrderBookSymbolGet');
  }
  if (date !== undefined) {
    queryParameters['date'] = date;
  }

  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}

/**
 * Get Trades
 * 
 * @param {!string} symbol The symbol identifier
 * @param {!Date} date Optional date in format YYYY-MM-DD (defaults to latest available data)
 * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send.
 * @return {!angular.$q.Promise<!Array<!API.Client.Trade.TradeModel>>}
 */
API.Client.NativeIEXApi.prototype.v1NativeIexTradeSymbolGet = function(symbol, date, opt_extraHttpRequestParams) {
  /** @const {string} */
  var path = this.basePath_ + '/v1/native/iex/trade/{symbol}'
      .replace('{' + 'symbol' + '}', String(symbol));

  /** @type {!Object} */
  var queryParameters = {};

  /** @type {!Object} */
  var headerParams = angular.extend({}, this.defaultHeaders_);
  // verify required parameter 'symbol' is set
  if (!symbol) {
    throw new Error('Missing required parameter symbol when calling v1NativeIexTradeSymbolGet');
  }
  // verify required parameter 'date' is set
  if (!date) {
    throw new Error('Missing required parameter date when calling v1NativeIexTradeSymbolGet');
  }
  if (date !== undefined) {
    queryParameters['date'] = date;
  }

  /** @type {!Object} */
  var httpRequestParams = {
    method: 'GET',
    url: path,
    json: true,
            params: queryParameters,
    headers: headerParams
  };

  if (opt_extraHttpRequestParams) {
    httpRequestParams = angular.extend(httpRequestParams, opt_extraHttpRequestParams);
  }

  return (/** @type {?} */ (this.http_))(httpRequestParams);
}
